Index: /atk2-sc3-1.4.0-ntisr/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/MANIFEST	(revision 172)
@@ -0,0 +1,102 @@
+PACKAGE atk2-sc3
+VERSION 1.4.0
+
+MANIFEST
+README.txt
+configure
+
+doc/porting.txt
+doc/tuning_memo.txt
+doc/user.txt
+doc/version.txt
+
+include/histogram.h
+include/kernel_fncode.h
+include/log_output.h
+include/MemMap.h
+include/Os.h
+include/queue.h
+include/Rte_Os_Type.h
+include/Std_Types.h
+include/svc_funccall.h
+include/t_stdlib.h
+include/t_syslog.h
+
+kernel/alarm.c
+kernel/alarm.h
+kernel/allfunc.h
+kernel/check.h
+kernel/counter.c
+kernel/counter.h
+kernel/counter_manage.c
+kernel/event.c
+kernel/genoffset.tf
+kernel/interrupt.c
+kernel/interrupt.h
+kernel/interrupt_manage.c
+kernel/ioc.tf
+kernel/ioc_impl.h
+kernel/ioc_manage.c
+kernel/kernel.tf
+kernel/kernel_common.tf
+kernel/kernel_def.csv
+kernel/kernel_impl.h
+kernel/kernel_int.h
+kernel/kernel_mem.tf
+kernel/kernel_opt.tf
+kernel/kernel.csv
+kernel/kernel.ini
+kernel/Makefile.kernel
+kernel/memory.c
+kernel/memory.h
+kernel/osap.c
+kernel/osap.h
+kernel/osctl.c
+kernel/osctl_manage.c
+kernel/resource.c
+kernel/resource.h
+kernel/scheduletable.c
+kernel/scheduletable.h
+kernel/svc.def
+kernel/svc_table.c
+kernel/system.csv
+kernel/task.c
+kernel/task.h
+kernel/task_manage.c
+
+library/histogram.c
+library/log_output.c
+library/strerror.c
+library/t_perror.c
+library/vasyslog.c
+
+sample/Makefile
+sample/sample1.arxml
+sample/sample1.yaml
+sample/sample1.c
+sample/sample1.h
+sample/sample2.c
+sample/sample2.h
+sample/sample.h
+sample/Rte_Type.h
+
+sysmod/banner.c
+sysmod/banner.h
+sysmod/chkobj.c
+sysmod/serial.c
+sysmod/serial.h
+sysmod/syslog.c
+sysmod/syslog.h
+
+utils/applyrename
+utils/genrename
+utils/gensvc_atk
+utils/gentest
+utils/makedep
+utils/makerelease
+
+INCLUDE utils/abrex/MANIFEST
+
+INCLUDE arch/logtrace/MANIFEST
+INCLUDE arch/gcc/MANIFEST
+
Index: /atk2-sc3-1.4.0-ntisr/README.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/README.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/README.txt	(revision 172)
@@ -0,0 +1,119 @@
+
+		TOPPERS/ATK2-SC3ï¼Release 1.4.0ï¼
+        ï¼ATK2-SC3 Readmeãã¡ã¤ã«ï¼
+
+æ¬ãã¡ã¤ã«ã§ã¯ï¼ATK2-SC3 ãä½¿ç¨ããä¸ã§å¿
+è¦ãªæ
+å ±ãç´¹ä»ãã¾ãï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2011-2013 by Spansion LLC, USA
+Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2011-2015 by Witz Corporation
+Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: README.txt 503 2015-12-23 07:50:20Z ertl-ishikawa $
+----------------------------------------------------------------------
+
+ATK2-SC3ã¯ï¼ãAUTOSAR R4.0 Rev 3ãä»æ§ã«æºæ ããï¼ã¹ã±ã¼ã©ããªãã£ã¯ã©
+ã¹3ã®æ©è½ãå®è£
+ãããªã¢ã«ã¿ã¤ã ã«ã¼ãã«ã§ãï¼ã¾ãï¼ã¹ã±ã¼ã©ããªãã£ã¯
+ã©ã¹3ã«ã¤ãã¦ã¯ç¬èªã«å®ç¾©ããæ©è½ã¬ãã«ã«ãããï¼ã¬ãã«2ãæ¡ç¨ãã¦ãã¾
+ãï¼æ©è½ã¬ãã«ã«ã¤ãã¦ã¯ãæ¬¡ä¸ä»£è»è¼ã·ã¹ãã åãRTOSå¤é¨ä»æ§æ¸ããåç
+§
+ãã ãã)ï¼
+
+ãã¸ã§ãã¬ã¼ã¿ã®ãã¼ã¸ã§ã³ã«é¢ããæ³¨æã
+
+ATK2-SC3 Release 1.4.0ä»¥éã§ã¯ï¼TOPPERSæ°ä¸ä»£ã«ã¼ãã«ç¨ã³ã³ãã£ã®ã¥ã¬ã¼
+ã¿ï¼cfgï¼(ã¸ã§ãã¬ã¼ã¿ã¨å¼ã¶)ã®ææ°çï¼1.9.5ï¼ã®æ©è½ãç¨ãã¦ããï¼
+1.9.4ä»¥åã®ãã¼ã¸ã§ã³ã®ã¸ã§ãã¬ã¼ã¿ã§ã¯åä½ããªãã®ã§æ³¨æãããã¨ï¼
+
+ãæåã«èª­ãã¹ããã­ã¥ã¡ã³ãã
+
+ATK2-SC3ã®ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«ãï¼doc/user.txtã«ããã¾ãï¼SC3ã«ã¼ãã«
+ãä½¿ç¨ããå ´åã«ã¯ï¼ã¾ãã¯ãã®ãã­ã¥ã¡ã³ããããèª­ã¿ä¸ããï¼
+
+ããã¡ã¤ã«ã®é²è¦§ã«ããã£ã¦ã
+
+ATK2-SC3ã®ãã­ã¥ã¡ã³ãï¼ãã¬ã¼ã³ãã­ã¹ããã¡ã¤ã«ï¼ããã³ã½ã¼ã¹ãã¡ã¤ã«
+ãèª­ãéã«ã¯ï¼TABã4ã«è¨­å®ãã¦ãã ããï¼
+
+ãå©ç¨æ¡ä»¶ã
+
+ATK2-SC3ã®å©ç¨æ¡ä»¶ã¯ï¼åãã¡ã¤ã«ã®å
+é ­ã«è¡¨ç¤ºããã¦ããTOPPERSã©ã¤ã»ã³
+ã¹ã§ãï¼TOPPERSã©ã¤ã»ã³ã¹ã«é¢ããFAQãï¼ä»¥ä¸ã®ãã¼ã¸ã«ããã¾ãï¼
+
+    http://www.toppers.jp/faq/faq_ct12.html
+
+ãè³ªåã»ãã°ã¬ãã¼ãã»æè¦ç­ã®éä»å
+ã
+
+ATK2-SC3ãããè¯ããã®ã«ããããã®ãæè¦ç­ãæ­è¿ãã¾ãï¼ATK2-SC3ã«é¢
+ããè³ªåããã°ã¬ãã¼ãï¼ãæè¦ç­ã¯ï¼TOPPERSãã­ã¸ã§ã¯ãã®ä¼å¡ã¯TOPPERS
+éçºè
+ã¡ã¼ãªã³ã°ãªã¹ãï¼dev@toppers.jpï¼å®ã«ï¼ãã®ä»ã®æ¹ã¯TOPPERSã¦ã¼
+ã¶ã¼ãºã¡ã¼ãªã³ã°ãªã¹ãï¼users@toppers.jpï¼å®ã«ãé¡ããã¾ãï¼
+
+TOPPERSã¦ã¼ã¶ã¼ãºã¡ã¼ãªã³ã°ãªã¹ãã¸ã®ç»é²æ¹æ³ã«ã¤ãã¦ã¯ï¼ä»¥ä¸ã®ãã¼ã¸
+ã«èª¬æãããã¾ãï¼
+
+    http://www.toppers.jp/community.html
+
+ããã¼ãã£ã³ã°ã«ããã£ã¦ã
+
+ATK2-SC3ãï¼TOPPERSãã­ã¸ã§ã¯ãããå
+¬éãããã¨ãåæã«ï¼æªãµãã¼ãã®
+ã¿ã¼ã²ããã«ãã¼ãã£ã³ã°ãããå ´åã«ã¯ï¼ããããããç¸è«ãã ããã¨å¹¸ã
+ã§ãï¼
+
+ä»¥ä¸
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/Compiler.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/Compiler.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/Compiler.h	(revision 172)
@@ -0,0 +1,119 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Compiler.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã³ã³ãã¤ã©ä¾å­å®ç¾©
+ */
+
+#ifndef TOPPERS_COMPILER_H
+#define TOPPERS_COMPILER_H
+
+#include "Compiler_Cfg.h"
+
+#define AUTOMATIC
+#define TYPEDEF
+#define NULL_PTR	((void *) 0)
+
+#define FUNC(rettype, memclass)						rettype
+#define FUNC_P2CONST(rettype, ptrclass, memclass)	const rettype *
+#define FUNC_P2VAR(rettype, ptrclass, memclass)		rettype *
+#define P2VAR(ptrtype, memclass, ptrclass)			ptrtype *
+#define P2CONST(ptrtype, memclass, ptrclass)		const ptrtype *
+#define CONSTP2VAR(ptrtype, memclass, ptrclass)		ptrtype * const
+#define CONSTP2CONST(ptrtype, memclass, ptrclass)	const ptrtype * const
+#define P2FUNC(rettype, ptrclass, fctname)			rettype (*fctname)
+#define CONST(consttype, memclass)					const consttype
+#define VAR(vartype, memclass)						vartype
+
+/*
+ *	CXã§ã¯ï¼ã¤ã³ã©ã¤ã³é¢æ°ã¯ã#pragmaããå©ç¨ãã¦ãé¢æ°å®ç¾©ã®åã«
+ *	ã¤ã³ã©ã¤ã³åããã·ã³ãã«ãäºãæå®ããªããã°ãªããªãï¼
+ *	ã¤ã³ã©ã¤ã³åããã·ã³ãã«ã¯ï¼"xxx_inline_symbol.h"ã«ã¦å®ç¾©ãï¼
+ *	ãã®ããï¼ãInlineãã·ã³ãã«ã¯ç©ºãã¯ã­ã¨ãã¦å®è£
+ããï¼
+ */
+#define INLINE
+#define LOCAL_INLINE	static
+
+/* ã¤ã³ã©ã¤ã³æå®ã·ã³ãã«ã®ç»é²	*/
+#include "target_inline_symbols.h"
+
+//#define asm		__asm
+//#define Asm		__asm  /* ã¤ã³ã©ã¤ã³ã¢ã»ã³ãã©ï¼æé©åææ­¢ï¼*/
+
+#define NoReturn
+
+/* ã³ã³ãã¤ã©ä¾å­ã®ãã¼ã¿åã®å®ç¾© */
+#ifndef TOPPERS_MACRO_ONLY
+
+#include <limits.h>
+
+/*
+ *  ç©ºã©ãã«ã®å®ç¾©
+ *    cxã§ã¯å¤§ããã¼ã­ã®é
+åã¯ã³ã³ãã¤ã«ã¨ã©ã¼ã«ãªãããã
+ *    ããã§å¥éå®ç¾©ããã
+ */
+#define TOPPERS_EMPTY_LABEL(x, y)	x y[1]
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_COMPILER_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/Compiler_Cfg.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/Compiler_Cfg.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/Compiler_Cfg.h	(revision 172)
@@ -0,0 +1,98 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Compiler_Cfg.h 166 2015-06-04 07:11:25Z t_ishikawa $
+ */
+
+#ifndef TOPPERS_COMPILER_CFG_H
+#define TOPPERS_COMPILER_CFG_H
+
+/*
+ *  ATK2å
+±éå®ç¾©
+ */
+#ifndef UINT_C
+#define UINT_C(val)		(val ## U)      /* ç¬¦å·ç¡ãæ´æ°åã®å®æ°ãä½ããã¯ã­ */
+#endif /* UINT_C */
+
+/*
+ *  åã«é¢ããæ
+å ±ãåãåºãããã®ãã¯ã­
+ */
+#ifndef offsetof
+#define offsetof(structure, field)	((uintptr) & (((structure *) 0)->field))
+#endif /* offsetof */
+
+#ifndef alignof
+#define alignof(type)	offsetof(struct { uint8 field1; type field2; }, field2)
+#endif /* alignof */
+#ifndef ALIGNED_TYPE    /* ã¢ã©ã¤ã³ã¡ã³ãã®ãã§ãã¯ */
+#define aligntypeof(type)	offsetof(struct { uint8 field1; type field2; }, field2)
+#define ALIGNED_TYPE(addr, type)	(boolean)((((uintptr) (addr)) & (alignof(type) - 1U)) == 0U)
+#endif /* ALIGNED_TYPE */
+
+
+#endif /* TOPPERS_COMPILER_CFG_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/MANIFEST	(revision 172)
@@ -0,0 +1,30 @@
+PACKAGE atk2-sc3
+
+MANIFEST
+common.py
+Compiler.h
+Compiler_Cfg.h
+configure_body.py
+gcc2ccrh.rb
+kernel_inline_symbols.h
+post_atk2.py
+post_cfg.py
+pre_cfg.py
+tool_cfg1_out.h
+updatepath.py
+stdint.h
+
+sample/Rte_Type.h
+sample/sample.h
+sample/sample1.arxml
+sample/sample1.c
+sample/sample1.h
+sample/sample1.yaml
+sample/sample2.c
+sample/sample2.h
+sample/sample_asm.asm
+
+ldscript.tf
+post_cfg_pass4.py
+tool_svc.h
+
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/common.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/common.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/common.py	(revision 172)
@@ -0,0 +1,404 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: common.py 182 2015-06-24 07:14:37Z t_ishikawa $
+#
+
+#
+# variable definition
+#
+INCLUDES = []
+CFG1_DEF_TABLES = []
+
+#
+# set cfg and cfg kernel param
+#
+CFG = SRCDIR + "cfg/cfg/cfg.exe"
+CFG_KERNEL = "atk2"
+
+#
+# files for each project 
+#
+app_files = []
+app_configuration_files = ['Os_Lcfg_asm.asm', 'Os_Lcfg.c', 'kernel_mem.c', 'ioc.c']
+app_sysmod_files = ['sysmod/banner.c', 'sysmod/serial.c', 'sysmod/syslog.c']
+app_library_files = ['library/log_output.c', 'library/strerror.c', 'library/t_perror.c', 'library/vasyslog.c']
+
+kernel_kernel_files = ['kernel/alarm.c','kernel/counter.c','kernel/counter_manage.c','kernel/event.c','kernel/interrupt.c','kernel/interrupt_manage.c','kernel/osctl.c','kernel/osctl_manage.c','kernel/resource.c','kernel/scheduletable.c','kernel/task.c','kernel/task_manage.c','kernel/ioc_manage.c','kernel/memory.c','kernel/osap.c','kernel/svc_table.c']
+
+cfg_files = []
+cfg_configuration_files = ['cfg1_out.c']
+
+#
+# pre/postbuiled file
+#
+cfg_pre_python_files = ['arch/ccrh/pre_cfg.py']
+cfg_post_python_files = ['arch/ccrh/post_cfg.py']
+#atk2_sc3_post_python_files = ['arch/ccrh/post_atk2.py']
+cfg_pass4_post_python_files = ['arch/ccrh/post_cfg_pass4.py']
+# atk2_sc3_pre_python_files = ['cfg/ldscript.py']
+
+#
+# cubesuite+ depend files
+#
+atk2_sc3_rel_includes = [".","cfg"]
+cfg_rel_includes = [".."]
+kernel_rel_includes = ["..","..\cfg"]
+
+#
+# library
+#
+#atk2_sc3_lib_includes = []
+atk2_sc3_lib_files = [r'kernel\%BuildModeName%\kernel']
+cfg_pass4_lib_files = [r'..\kernel\%BuildModeName%\kernel']
+
+#
+# cx define
+#
+kernel_define = ['ALLFUNC', 'TOPPERS_LABEL_ASM', 'USE_CCRH', 'MPU_REGION_NUM=%d' % (MPU_REGION_NUM)]
+
+#
+# cx additional option
+#  -Xno_warning=20177 : Suppress warnings no refer label(exit_no_errorhooh, d_exit_no_errorhook) 
+kernel_c_addopt = ['-Xno_warning=20177']
+#  -Xno_warning=50013 : Use r1 register as source register
+kernel_asm_addopt = ['-Xno_warning=50013']
+
+#
+# Set cfg path and srdir path
+#
+cfg = proj_rel_dir + CFG
+srcdir = proj_rel_dir + SRCDIR
+
+#
+# soucre target file
+#
+
+f = open(src_abs_path + r'/log', 'w')
+f.write(srcdir + "target/" + TARGET + "/target.py")
+f.close()
+execfile(srcdir + "target/" + TARGET + "/target.py")
+
+#
+# merge files
+#
+app_files.append(statup_file)
+app_files = app_files + app_sysmod_files + app_library_files
+kernel_files = kernel_kernel_files + kernel_target_files + kernel_arch_files
+
+#
+# Set include path and cfg1_def_table
+#
+INCLUDES = USER_INCLUDE + ["", "arch", "include", "kernel", "arch", "sysmod", "library"] + INCLUDES
+CFG1_DEF_TABLES = ["kernel/kernel_def.csv"] + CFG1_DEF_TABLES
+
+API_TABLE = "kernel/kernel.csv"
+INI_FILE  = "kernel/kernel.ini"
+
+CFG_TF = "target/" + TARGET + "/target.tf"
+CFG_OFFSET_TF = "target/" + TARGET + "/target_offset.tf"
+CFG_MEM_TF = "target/" + TARGET + "/target_mem.tf"
+
+#
+# cfg input files
+#
+cfg_rel_files = []
+cfg_input_str = ""
+for cfg_filename in CFGNAME:
+	cfg_rel_file = cfg_filename + '.arxml'
+
+ 	cfg_list = [proj_rel_dir + cfg_rel_file]
+ 	for inc_path in INCLUDES:
+ 		cfg_list = cfg_list + [src_abs_path + '/' + inc_path  + '/' + cfg_rel_file]
+
+ 	flg = 0
+ 	for cfg_rel_file in cfg_list:
+ 		if os.path.exists(cfg_rel_file):
+			cfg_rel_files.append(cfg_rel_file)
+ 			flg = 1
+ 			break
+
+	if flg == 0:
+		print "WARNING!! : Not Exist %s" % cfg_filename
+
+cfg_input_str = " ".join(cfg_rel_files)
+
+#
+# make cfg include path
+#
+cfg_includes = ""
+for include in INCLUDES:
+	cfg_includes = cfg_includes + " -I" + srcdir + include
+
+#
+# make cfg1_def_table
+#
+cfg_cfg1_def_tables = ""
+for cfg1_def_table in CFG1_DEF_TABLES:
+	cfg_cfg1_def_tables = cfg_cfg1_def_tables + " --cfg1-def-table " + srcdir + cfg1_def_table
+
+#
+# Set api_table
+#
+cfg_api_table = srcdir + API_TABLE
+
+#
+# Set ini_file
+#
+cfg_ini_file = srcdir + INI_FILE
+
+#
+# Set tf 
+#
+cfg_tf =  srcdir + CFG_TF
+
+#
+# Set offset tf 
+#
+cfg_offset_tf =  srcdir + CFG_OFFSET_TF
+
+#
+# Set check tf 
+#
+cfg_mem_tf =  srcdir + CFG_MEM_TF
+
+#
+#
+# Functions
+#
+#
+import re
+
+#
+# Set Cx Includes
+# 
+def SetCxIncludes(inputstr, include_list, rel_include_list, relpath):
+	cx_includes = ""
+	for include in rel_include_list:
+		include_list.append(relpath + include)
+	for include in include_list:
+		cx_includes = cx_includes + include + "\n"
+	cx_includes = cx_includes.replace('/', r'\\')
+	pattern_pre = r'(\s\<AdditionalIncludePaths-0\>)[\s\S]+?(\</AdditionalIncludePaths-0\>)'
+	pattern_post = r'\1' + cx_includes + r'\2'
+	inputstr = re.sub (pattern_pre, pattern_post, inputstr)
+	return inputstr
+
+#
+# ChangeSetItemXml
+#
+def ChangeItemXml(inputstr, xml_pattern, newitemstr):
+	pattern_pre = r'<' + xml_pattern + r'>[\s\S]+?</' + xml_pattern + '>'
+	pattern_post = '<' + xml_pattern + '>' + newitemstr + '</' + xml_pattern + '>'
+	inputstr = re.sub (pattern_pre, pattern_post, inputstr)
+	return inputstr
+
+#
+# NewSetItemXml
+#
+def NewSetItemXml(inputstr, xml_pattern, newitemstr):
+	pattern_pre = r'\<' + xml_pattern + r' /\>'
+	pattern_post = r'<' + xml_pattern + r'>' + newitemstr + '</' + xml_pattern + r'>'
+	inputstr = re.sub (pattern_pre, pattern_post, inputstr)
+	return inputstr
+
+#
+# NewSetItemXmlOnce
+#
+def NewSetItemXmlOnce(inputstr, xml_pattern, newitemstr):
+	pattern_pre = r'\<' + xml_pattern + r' /\>'
+	pattern_post = r'<' + xml_pattern + r'>' + newitemstr + '</' + xml_pattern + r'>'
+	inputstr = re.sub (pattern_pre, pattern_post, inputstr, 1)
+	return inputstr
+
+#
+# New set Cx Include
+#
+def NewSetCxIncludes(inputstr, include_list, rel_include_list, relpath):
+	cx_includes = ""
+	for include in rel_include_list:
+		include_list.append(relpath + include)
+	for include in include_list:
+		cx_includes = cx_includes + include + "\n"
+	cx_includes = cx_includes.replace('/', r'\\')
+	return NewSetItemXml(inputstr, 'AdditionalIncludePaths-0', cx_includes)
+
+def NewSetCCRHIncludes(inputstr, include_list, rel_include_list, relpath):
+	ccrh_includes = ""
+	for include in rel_include_list:
+		include_list.append(relpath + include)
+	for include in include_list:
+		ccrh_includes = ccrh_includes + include + "\n"
+	ccrh_includes = ccrh_includes.replace('/', r'\\')
+	return NewSetItemXml(inputstr, 'COptionI-0', ccrh_includes)
+
+#
+# New set library Include
+#
+def NewSetLibIncludes(inputstr, include_list, rel_include_list, relpath):
+	lib_includes = ""
+	for include in rel_include_list:
+		include_list.append(relpath + include)
+	for include in include_list:
+		lib_includes = lib_includes + include + "\n"
+	lib_includes = lib_includes.replace('/', r'\\')
+	return NewSetItemXml(inputstr, 'AdditionalLibraryPaths-0', lib_includes)
+
+#
+# New set library files
+#
+def NewSetLibFiles(inputstr, file_list):
+	lib_files = ""
+	for file in file_list:
+		lib_files = lib_files + file + "\n"
+	lib_files = lib_files.replace('/', r'\\')
+	return NewSetItemXml(inputstr, 'LinkOptionLibrary-0', lib_files)
+
+#
+# New set prebuild
+#
+def NewSetPrebuild(inputstr, rel_command_list, relpath):
+	command_str = ''
+	for command in rel_command_list:
+		command_str = command_str + relpath + command
+	command_str = r'#!python\ncommon.Source("' + command_str + r'")\n'
+	return NewSetItemXml(inputstr, 'PreBuildCommands-0', command_str)
+
+
+#
+# New set postbuild
+#
+def NewSetPostbuild(inputstr, rel_command_list, relpath):
+	command_str = ''
+	for command in rel_command_list:
+		command_str = command_str + relpath + command
+	command_str = r'#!python\ncommon.Source("' + command_str + r'")\n'
+	return NewSetItemXml(inputstr, 'PostBuildCommands-0', command_str)
+
+
+#
+# New set Define
+#
+def NewSetDefine(inputstr, define_list):
+	define_str = ''
+	for define in define_list:
+		define_str = define_str + define + '\n'
+	return NewSetItemXml(inputstr, 'COptionD-0', define_str)
+
+#
+# New set additional options
+#
+def NewSetCAddOpt(inputstr, option_list):
+	option_str = ''
+	for option in option_list:
+		option_str = option_str + option + ' '
+	return NewSetItemXmlOnce(inputstr, 'COptionOtherAdditionalOptions-0', option_str)
+
+def NewSetAsmAddOpt(inputstr, option_list):
+	option_str = ''
+	for option in option_list:
+		option_str = option_str + option + ' '
+	return NewSetItemXmlOnce(inputstr, 'AsmOptionOtherAdditionalOptions-0', option_str)
+
+#
+# Set target file relative path
+#
+def SetTargetFileRelativePath(inputstr, file_list, relpath):
+	relpath_win = re.sub(r'/',r'\\\\', relpath)
+	for file_path in file_list:
+		file_path = re.sub(r'/',r'\\\\',file_path)
+		pattern_pre = r'(\s\<RelativePath\>).+?' + file_path + r'(\</RelativePath\>)'
+		pattern_post = r'\1' + relpath_win + file_path + r'\2'
+		inputstr = re.sub (pattern_pre, pattern_post, inputstr)
+	return inputstr
+
+
+#
+# Set python file relative path
+#
+def SetPythonFileRelativePath(inputstr, file_list, relpath):
+	for file_path in file_list:
+		pattern_pre = r'".+?' + file_path + r'"'
+		pattern_post = r'"' + relpath + file_path + r'"'
+		inputstr = re.sub (pattern_pre, pattern_post, inputstr)
+	return inputstr
+
+def ReadFile(filename):
+	f = open(filename, "r")
+	str = f.read()
+	f.close()
+	return str
+
+def WriteFile(filename, str):
+	f = open(filename, "w")
+	f.write(str)
+	f.close()
+
+def WriteFile_B(filename, str):
+	f = open(filename, "wb")
+	f.write(str)
+	f.close()
+
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/MANIFEST	(revision 172)
@@ -0,0 +1,7 @@
+PACKAGE atk2-sc3
+
+MANIFEST
+configure.mtpj
+configure.py
+def.py
+README.txt
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/README.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/README.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/README.txt	(revision 172)
@@ -0,0 +1,142 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼CS+ç¨ãã­ã¸ã§ã¯ãçæã¹ã¯ãªããããã¥ã¢ã«ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯CS+ç¨ãã­ã¸ã§ã¯ãçæã¹ã¯ãªããã®æ
+å ±ãè¨è¿°ãããã®
+ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: README.txt 187 2015-06-25 03:39:04Z t_ishikawa $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+CS+ç¨ãã­ã¸ã§ã¯ãçæã¹ã¯ãªããã¯ï¼RH850ç¨ã®ATK2ã®ãã­ã¸ã§ã¯ããä½æã
+ãã¹ã¯ãªããã§ããï¼
+                
+åä½ç¢ºèªãè¡ã£ãCS+ã®ãã¼ã¸ã§ã³ã¯æ¬¡ã®éãã§ããï¼
+
+  CS+ V3.00.00
+  
+âä½¿ç¨æ¹æ³
+
+ä»¥ä¸ã®æé ã§ã¿ã¼ã²ããç¨ã®ãã­ã¸ã§ã¯ããã¡ã¤ã«ãçæããï¼
+
+1.æ¬ãã©ã«ã(configure)ãé©å½ãªå ´æã«ã³ãã¼ããï¼ä»¥ä¸ã®ãã¡ã¤ã«ãå«ã¾
+  ãã¦ããï¼
+  ./configure.mtpj
+  ./configure.py
+  ./def.py
+  ./README.txt
+
+2.def.pyã®ç·¨é
+  ä»¥ä¸ã®def.pyã®è¨­å®å¤ãåèã«è¨­å®ããï¼
+  
+3.configure.mtpjãããã«ã¯ãªãã¯
+  configure.py ãå®è¡ããï¼atk2-sc1.mtpjãä½æããéãããï¼
+  
+4.ã¢ã¯ãã£ããã­ã¸ã§ã¯ããå¤æ´
+  ã¢ã¯ãã£ããã­ã¸ã§ã¯ããatk2-sc1ã«å¤æ´ããï¼  
+
+  
+ãã­ã¸ã§ã¯ããã¡ã¤ã«çæå¾ã¯ï¼atk2-sc1.mtpj ãä½¿ç¨ããï¼ãªãï¼ãã­ã¸ã§
+ã¯ããã¡ã¤ã«çæå¾ã¯configure.mtpjã¨configure.pyã¯åé¤å¯è½ã§ããï¼
+
+
+âdef.pyã®è¨­å®å¤
+
+ã»SRCDIR
+ ã»ATK2ã®ã½ã¼ã¹ã³ã¼ãã®ãããã¨ã®ç¸å¯¾ä½ç½®
+   ./atk2-sc1/yyy/xxx/ ã«ã³ãã¼ããå ´åã¯ï¼ï¼
+   
+    SRCDIR = "../../"
+   ã¨ãªãï¼
+   
+ã»CFGNAME
+ ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«åã®æå®ï¼
+   å
+¥åã¨ãã¦å¿
+è¦ãªXMLãã¡ã¤ã«åãå
+¨ã¦æå®ï¼
+
+ã»TARGET 
+ ã»ã¿ã¼ã²ããã®æå®ï¼./target ä»¥ä¸ã®ããããã®ãã©ã«ãåï¼
+ 
+ã»TARGET_MCU
+ ã»ã¿ã¼ã²ããMCUåã®æå®ï¼
+ 
+ã»app_app_files
+ ã»ã¢ããªã±ã¼ã·ã§ã³ãã¡ã¤ã«ã®æå®ï¼
+ 
+ã»USER_INCLUDE
+ ã»ã¤ã³ã¯ã«ã¼ããã¹ã®æå®
+  
+ã»COPY_SAMPLE1  
+ ã»sample1ã®ãã¡ã¤ã«ã./sampleããã³ãã¼ãããæå®ï¼
+
+âãã­ã¸ã§ã¯ãæ§æ
+
+atk2-sc1 : ããããã­ã¸ã§ã¯ã
+ cfg : ãµããã­ã¸ã§ã¯ã ã³ã³ãã£ã®ã¥ã¬ã¼ã¿å®è¡
+ kernel : ãµããã­ã¸ã§ã¯ã ã«ã¼ãã«ãã«ãç¨
+
+âå¤æ´å±¥æ­´
+
+2014/10/14
+ã»CS+ V3.00.00 å¯¾å¿
+
+2014/05/01
+ã»ã¿ã¼ã²ãããã©ã«ãåãv850e2_gccããv850_gccã«å¤æ´ï¼
+ã»sample1ãã³ãã¼ããéã«ï¼Rte_Type.h ãå¯¾è±¡ã«è¿½å ï¼
+ã»ã«ã¼ãã«ãã«ãæã® Rte_Type.h ã®ã¤ã³ã¯ã«ã¼ãã®ããï¼Rte_Type.h ãç½®
+  ãã¦ãããã©ã«ããã«ã¼ãã«ãã«ãæã®ã¤ã³ã¯ã«ã¼ãå¯¾è±¡ã¨ããï¼
+
+ä»¥ä¸ï¼
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/configure.mtpj
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/configure.mtpj	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/configure.mtpj	(revision 172)
@@ -0,0 +1,657 @@
+<CubeSuiteProject>
+  <ProductVersion>5.00.00.00</ProductVersion>
+  <Class Guid="68f4a651-b9cd-473b-a595-b00447132ffa">
+    <Instance Guid="00000000-0000-0000-0000-000000000000">
+      <FormatVersion>2.0</FormatVersion>
+      <FileVersion>5.0</FileVersion>
+      <ProjectGuid>fc14105a-99d7-4099-85fc-3fdf494938ac</ProjectGuid>
+      <ProjectItemGuid>f1401139-cdf1-485d-85c1-2d01c8a4ce27</ProjectItemGuid>
+      <FileCategoryGuid>49223984-0f18-4fa1-87ff-477e5fa60939</FileCategoryGuid>
+      <Property>fb98844b-2c27-4275-9804-f6e63e204da0</Property>
+      <ActiveProjectGuid>fc14105a-99d7-4099-85fc-3fdf494938ac</ActiveProjectGuid>
+    </Instance>
+  </Class>
+  <Class Guid="fb98844b-2c27-4275-9804-f6e63e204da0">
+    <Instance Guid="fb98844b-2c27-4275-9804-f6e63e204da0">
+      <MemoCount>0</MemoCount>
+    </Instance>
+  </Class>
+  <Class Guid="8fb9c1f6-d351-4d10-8d99-bf5b3015b84c">
+    <Instance Guid="00000000-0000-0000-0000-000000000000">
+      <UsingPlatformGuid>fcd52ed6-c16c-4b11-992f-2929aa870dec</UsingPlatformGuid>
+    </Instance>
+  </Class>
+  <Class Guid="c325714f-8f51-484b-9e96-b4b59c0fb263">
+    <Instance Guid="c325714f-8f51-484b-9e96-b4b59c0fb263">
+      <DeviceManager>096f2041-c115-4158-959e-885938314c77</DeviceManager>
+    </Instance>
+  </Class>
+  <Class Guid="096f2041-c115-4158-959e-885938314c77">
+    <Instance Guid="096f2041-c115-4158-959e-885938314c77">
+      <DataFormatVersion>1.0</DataFormatVersion>
+    </Instance>
+    <Instance Guid="1268cda7-f509-4a4f-8552-a413adafabfb">
+      <DeviceName>R7F701035xAFP</DeviceName>
+      <MemoCount>0</MemoCount>
+    </Instance>
+  </Class>
+  <Class Guid="c21e0010-0644-48ec-a5d2-2b06674b0390">
+    <Instance Guid="c21e0010-0644-48ec-a5d2-2b06674b0390">
+      <IsStructuredNaming>True</IsStructuredNaming>
+    </Instance>
+  </Class>
+  <Class Guid="873c9a58-9bc5-439a-b476-78629a4553ed">
+    <Instance Guid="873c9a58-9bc5-439a-b476-78629a4553ed">
+      <ProjectDeviceChangedCounter>0</ProjectDeviceChangedCounter>
+      <ProjectInitialDeviceName>R7F701035xAFP</ProjectInitialDeviceName>
+    </Instance>
+  </Class>
+  <Class Guid="c3835e31-dea3-4c93-b02b-d2db997f7630">
+    <Instance Guid="c3835e31-dea3-4c93-b02b-d2db997f7630">
+      <BuildToolManager>eb3b4b69-af1a-4dc1-b2bc-4b81a50fb2a4</BuildToolManager>
+    </Instance>
+  </Class>
+  <Class Guid="eb3b4b69-af1a-4dc1-b2bc-4b81a50fb2a4">
+    <Instance Guid="eb3b4b69-af1a-4dc1-b2bc-4b81a50fb2a4">
+      <DataFormatVersion>1.6</DataFormatVersion>
+      <BuildModeCount>1</BuildModeCount>
+      <BuildMode0>RABlAGYAYQB1AGwAdABCAHUAaQBsAGQA</BuildMode0>
+      <BatchBuildFlag0>False</BatchBuildFlag0>
+      <CurrentBuildMode>DefaultBuild</CurrentBuildMode>
+      <SourceItemCount>0</SourceItemCount>
+      <LastDeviceChangedCounter>0</LastDeviceChangedCounter>
+    </Instance>
+    <Instance Guid="989d6783-59a0-4525-8ee4-a067fda90fe2">
+      <AsmOptionI-DefaultValue />
+      <BuildMode-DefaultValue>DefaultBuild</BuildMode-DefaultValue>
+      <COptionOsize-DefaultValue>Default</COptionOsize-DefaultValue>
+      <GeneralOptionOutput-DefaultValue>LoadModuleFile</GeneralOptionOutput-DefaultValue>
+      <GeneralOptionResetVectorAddress-DefaultValue>0</GeneralOptionResetVectorAddress-DefaultValue>
+      <GeneralOptionSimultaneousBuild-DefaultValue>True</GeneralOptionSimultaneousBuild-DefaultValue>
+      <GeneralOptionUpdateIO-DefaultValue>False</GeneralOptionUpdateIO-DefaultValue>
+      <GeneralOptionXerrorFile-DefaultValue>False</GeneralOptionXerrorFile-DefaultValue>
+      <GeneralOptionXregMode-DefaultValue>RegisterMode32</GeneralOptionXregMode-DefaultValue>
+      <HexOptionOutput-DefaultValue>True</HexOptionOutput-DefaultValue>
+      <LibOptionForm-DefaultValue>LibraryU</LibOptionForm-DefaultValue>
+      <LinkOptionLibrary-DefaultValue />
+      <Memo-DefaultValue />
+      <OutputMessageFormat-DefaultValue>%TargetFiles%</OutputMessageFormat-DefaultValue>
+      <AsmOptionISystem-DefaultValue />
+      <COptionI-DefaultValue />
+      <CompilerVersion-DefaultValue>
+
+0</CompilerVersion-DefaultValue>
+      <FormatBuildOptionList-DefaultValue>%TargetFiles% : %Program% %Options%</FormatBuildOptionList-DefaultValue>
+      <GeneralOptionEnableParallelBuilding-DefaultValue>False</GeneralOptionEnableParallelBuilding-DefaultValue>
+      <GeneralOptionLastDevice-DefaultValue />
+      <GeneralOptionResetVectorAddressPE2-DefaultValue>0</GeneralOptionResetVectorAddressPE2-DefaultValue>
+      <GeneralOptionXcommon-DefaultValue>RH850</GeneralOptionXcommon-DefaultValue>
+      <GeneralOptionXerrorFolder-DefaultValue>%BuildModeName%</GeneralOptionXerrorFolder-DefaultValue>
+      <GeneralOptionXnoWarning-DefaultValue />
+      <GeneralOptionXreserveR2-DefaultValue>False</GeneralOptionXreserveR2-DefaultValue>
+      <HexOptionForm-DefaultValue>Stype</HexOptionForm-DefaultValue>
+      <LibOptionOutputFolder-DefaultValue>%BuildModeName%</LibOptionOutputFolder-DefaultValue>
+      <LinkOptionOutputFolder-DefaultValue>%BuildModeName%</LinkOptionOutputFolder-DefaultValue>
+      <AsmOptionD-DefaultValue />
+      <COptionISystem-DefaultValue />
+      <DependencyFileExistCheckingType-DefaultValue>Rebuild</DependencyFileExistCheckingType-DefaultValue>
+      <GeneralOptionCoreCPU-DefaultValue>G3K</GeneralOptionCoreCPU-DefaultValue>
+      <GeneralOptionCurrentDevice-DefaultValue>DR7F701035.DVF, V1.30</GeneralOptionCurrentDevice-DefaultValue>
+      <GeneralOptionResetVectorAddressPE3-DefaultValue>0</GeneralOptionResetVectorAddressPE3-DefaultValue>
+      <GeneralOptionXep-DefaultValue>None</GeneralOptionXep-DefaultValue>
+      <GeneralOptionXerrorFileName-DefaultValue>%ProjectName%.err</GeneralOptionXerrorFileName-DefaultValue>
+      <HexOptionOutputFolder-DefaultValue>%BuildModeName%</HexOptionOutputFolder-DefaultValue>
+      <LibOptionOutputFileName-DefaultValue>%ProjectName%.lib</LibOptionOutputFileName-DefaultValue>
+      <LinkOptionOutputFileName-DefaultValue>%ProjectName%.abs</LinkOptionOutputFileName-DefaultValue>
+      <COptionD-DefaultValue />
+      <GeneralOptionOutputBitIOR-DefaultValue>False</GeneralOptionOutputBitIOR-DefaultValue>
+      <GeneralOptionResetVectorAddressPE4-DefaultValue>0</GeneralOptionResetVectorAddressPE4-DefaultValue>
+      <GeneralOptionXcref-DefaultValue>False</GeneralOptionXcref-DefaultValue>
+      <HexOptionOutputFileName-DefaultValue>%ProjectName%.mot</HexOptionOutputFileName-DefaultValue>
+      <LibOptionLibraryStandard-DefaultValue>False</LibOptionLibraryStandard-DefaultValue>
+      <LinkOptionLibraryStandard-DefaultValue>True</LinkOptionLibraryStandard-DefaultValue>
+      <PreBuildCommands-DefaultValue />
+      <GeneralOptionResetVectorAddressPE5-DefaultValue>0</GeneralOptionResetVectorAddressPE5-DefaultValue>
+      <GeneralOptionXobjPath-DefaultValue>%BuildModeName%</GeneralOptionXobjPath-DefaultValue>
+      <HexOptionDivisionOutputFile-DefaultValue />
+      <LibOptionLibraryStandard2-DefaultValue>NotUse</LibOptionLibraryStandard2-DefaultValue>
+      <LinkOptionLibraryStandard2-DefaultValue>Use</LinkOptionLibraryStandard2-DefaultValue>
+      <PostBuildCommands-DefaultValue />
+      <GeneralOptionResetVectorAddressPE6-DefaultValue>0</GeneralOptionResetVectorAddressPE6-DefaultValue>
+      <LibOptionLibraryLibC-DefaultValue>False</LibOptionLibraryLibC-DefaultValue>
+      <LinkOptionLibraryLibC-DefaultValue>True</LinkOptionLibraryLibC-DefaultValue>
+      <GeneralOptionOtherAdditionalOptions-DefaultValue />
+      <GeneralOptionResetVectorAddressPE7-DefaultValue>0</GeneralOptionResetVectorAddressPE7-DefaultValue>
+      <LibOptionLibraryLibM-DefaultValue>False</LibOptionLibraryLibM-DefaultValue>
+      <LinkOptionLibraryLibM-DefaultValue>True</LinkOptionLibraryLibM-DefaultValue>
+      <LibOptionLibraryLibMF-DefaultValue>False</LibOptionLibraryLibMF-DefaultValue>
+      <LinkOptionLibraryLibMF-DefaultValue>True</LinkOptionLibraryLibMF-DefaultValue>
+      <LibOptionLibraryStandardMathematics-DefaultValue>False</LibOptionLibraryStandardMathematics-DefaultValue>
+      <LinkOptionLibraryStandardMathematics-DefaultValue>True</LinkOptionLibraryStandardMathematics-DefaultValue>
+      <LibOptionLibraryLibSetJmp-DefaultValue>False</LibOptionLibraryLibSetJmp-DefaultValue>
+      <LinkOptionLibraryLibSetJmp-DefaultValue>False</LinkOptionLibraryLibSetJmp-DefaultValue>
+      <IsLockedByUser>False</IsLockedByUser>
+      <TimeTagModified--0>-8587732238333657134</TimeTagModified--0>
+      <BuildMode-0>DefaultBuild</BuildMode-0>
+      <Memo-0 />
+      <PreBuildCommands-0 />
+      <PostBuildCommands-0 />
+      <GeneralOptionOutput-0>LoadModuleFile</GeneralOptionOutput-0>
+      <GeneralOptionResetVectorAddress-0>0</GeneralOptionResetVectorAddress-0>
+      <GeneralOptionSimultaneousBuild-0>True</GeneralOptionSimultaneousBuild-0>
+      <GeneralOptionUpdateIO-0>False</GeneralOptionUpdateIO-0>
+      <GeneralOptionXerrorFile-0>False</GeneralOptionXerrorFile-0>
+      <GeneralOptionXregMode-0>RegisterMode32</GeneralOptionXregMode-0>
+      <OutputMessageFormat-0>%TargetFiles%</OutputMessageFormat-0>
+      <CompilerVersion-0>
+
+0</CompilerVersion-0>
+      <FormatBuildOptionList-0>%TargetFiles% : %Program% %Options%</FormatBuildOptionList-0>
+      <GeneralOptionEnableParallelBuilding-0>False</GeneralOptionEnableParallelBuilding-0>
+      <GeneralOptionLastDevice-0 />
+      <GeneralOptionResetVectorAddressPE2-0>0</GeneralOptionResetVectorAddressPE2-0>
+      <GeneralOptionXcommon-0>RH850</GeneralOptionXcommon-0>
+      <GeneralOptionXerrorFolder-0>%BuildModeName%</GeneralOptionXerrorFolder-0>
+      <GeneralOptionXnoWarning-0 />
+      <GeneralOptionXreserveR2-0>False</GeneralOptionXreserveR2-0>
+      <DependencyFileExistCheckingType-0>Rebuild</DependencyFileExistCheckingType-0>
+      <GeneralOptionCoreCPU-0>G3K</GeneralOptionCoreCPU-0>
+      <GeneralOptionCurrentDevice-0>DR7F701035.DVF, V1.30</GeneralOptionCurrentDevice-0>
+      <GeneralOptionResetVectorAddressPE3-0>0</GeneralOptionResetVectorAddressPE3-0>
+      <GeneralOptionXep-0>None</GeneralOptionXep-0>
+      <GeneralOptionXerrorFileName-0>%ProjectName%.err</GeneralOptionXerrorFileName-0>
+      <GeneralOptionOutputBitIOR-0>False</GeneralOptionOutputBitIOR-0>
+      <GeneralOptionResetVectorAddressPE4-0>0</GeneralOptionResetVectorAddressPE4-0>
+      <GeneralOptionXcref-0>False</GeneralOptionXcref-0>
+      <GeneralOptionResetVectorAddressPE5-0>0</GeneralOptionResetVectorAddressPE5-0>
+      <GeneralOptionXobjPath-0>%BuildModeName%</GeneralOptionXobjPath-0>
+      <GeneralOptionResetVectorAddressPE6-0>0</GeneralOptionResetVectorAddressPE6-0>
+      <GeneralOptionOtherAdditionalOptions-0 />
+      <GeneralOptionResetVectorAddressPE7-0>0</GeneralOptionResetVectorAddressPE7-0>
+      <LastCompilerVersion-0>V1.02.00</LastCompilerVersion-0>
+      <GeneralOptionResetVectorAddressD-0>0</GeneralOptionResetVectorAddressD-0>
+    </Instance>
+    <Instance Guid="24e7db6c-6f3c-483e-b3af-c4be92050d3b">
+      <COptionG-DefaultValue>True</COptionG-DefaultValue>
+      <COptionI-DefaultValue />
+      <COptionOsize-DefaultValue>Default</COptionOsize-DefaultValue>
+      <COptionPreCompileCommands-DefaultValue />
+      <COptionXansi-DefaultValue>False</COptionXansi-DefaultValue>
+      <COptionXasmPath-DefaultValue>False</COptionXasmPath-DefaultValue>
+      <COptionXcharacterSet-DefaultValue>Auto</COptionXcharacterSet-DefaultValue>
+      <COptionXmisra2004-DefaultValue>None</COptionXmisra2004-DefaultValue>
+      <COptionXpack-DefaultValue>None</COptionXpack-DefaultValue>
+      <COptionXprnPath-DefaultValue>False</COptionXprnPath-DefaultValue>
+      <COptionISystem-DefaultValue />
+      <COptionOdeleteStaticFunc-DefaultValue>None</COptionOdeleteStaticFunc-DefaultValue>
+      <COptionPostCompileCommands-DefaultValue />
+      <COptionXalign-DefaultValue>Align2</COptionXalign-DefaultValue>
+      <COptionXasmPathValue-DefaultValue>%BuildModeName%</COptionXasmPathValue-DefaultValue>
+      <COptionXenumType-DefaultValue>SignedInteger</COptionXenumType-DefaultValue>
+      <COptionXmisra2004RuleFile-DefaultValue />
+      <COptionXprnPathValue-DefaultValue>%BuildModeName%</COptionXprnPathValue-DefaultValue>
+      <COptionOinline-DefaultValue>FitToOptimization</COptionOinline-DefaultValue>
+      <COptionOtherAdditionalOptions-DefaultValue />
+      <COptionP-DefaultValue>False</COptionP-DefaultValue>
+      <COptionXbitOrder-DefaultValue>None</COptionXbitOrder-DefaultValue>
+      <COptionXmisra2004RuleNumberApply-DefaultValue />
+      <COptionXpreinclude-DefaultValue />
+      <COptionXvolatile-DefaultValue>False</COptionXvolatile-DefaultValue>
+      <COptionD-DefaultValue />
+      <COptionOinlineSize-DefaultValue>100</COptionOinlineSize-DefaultValue>
+      <COptionXcheck-DefaultValue>None</COptionXcheck-DefaultValue>
+      <COptionXmisra2004RuleNumberIgnore-DefaultValue />
+      <COptionXpassSource-DefaultValue>False</COptionXpassSource-DefaultValue>
+      <COptionXprepPath-DefaultValue>%BuildModeName%</COptionXprepPath-DefaultValue>
+      <COptionOpipeline-DefaultValue>None</COptionOpipeline-DefaultValue>
+      <COptionU-DefaultValue />
+      <COptionXmisra2004RuleNumberRequiredAdd-DefaultValue />
+      <COptionXswitch-DefaultValue>Auto</COptionXswitch-DefaultValue>
+      <COptionOtailCall-DefaultValue>None</COptionOtailCall-DefaultValue>
+      <COptionXfloat-DefaultValue>None</COptionXfloat-DefaultValue>
+      <COptionXmisra2004RuleNumberRequiredRemove-DefaultValue />
+      <COptionXpreprocessComment-DefaultValue>False</COptionXpreprocessComment-DefaultValue>
+      <COptionMap-DefaultValue>None</COptionMap-DefaultValue>
+      <COptionXignoreFilesMisra-DefaultValue />
+      <COptionXpreprocessLine-DefaultValue>False</COptionXpreprocessLine-DefaultValue>
+      <COptionXround-DefaultValue>Nearest</COptionXround-DefaultValue>
+      <COptionXcheckLanguageExtension-DefaultValue>False</COptionXcheckLanguageExtension-DefaultValue>
+      <COptionXdblSize-DefaultValue>DoublePrecision</COptionXdblSize-DefaultValue>
+      <COptionXintermodule-DefaultValue>None</COptionXintermodule-DefaultValue>
+      <COptionXaliasAnsi-DefaultValue>False</COptionXaliasAnsi-DefaultValue>
+      <COptionXdiv-DefaultValue>False</COptionXdiv-DefaultValue>
+      <COptionXcheckDivOv-DefaultValue>False</COptionXcheckDivOv-DefaultValue>
+      <COptionXinlineStrcpy-DefaultValue>False</COptionXinlineStrcpy-DefaultValue>
+      <COptionXcheckDivOvValue-DefaultValue>1</COptionXcheckDivOvValue-DefaultValue>
+      <COptionXmergeString-DefaultValue>False</COptionXmergeString-DefaultValue>
+      <COptionXuseFmaf-DefaultValue>False</COptionXuseFmaf-DefaultValue>
+      <COptionXunorderedCmpf-DefaultValue>False</COptionXunorderedCmpf-DefaultValue>
+      <COptionXcallJump-DefaultValue>None</COptionXcallJump-DefaultValue>
+      <COptionXfarJump-DefaultValue />
+      <COptionXsectionData-DefaultValue>None</COptionXsectionData-DefaultValue>
+      <COptionXsectionConst-DefaultValue>None</COptionXsectionConst-DefaultValue>
+      <COptionXmultiLevel-DefaultValue>Level0</COptionXmultiLevel-DefaultValue>
+      <IsLockedByUser>False</IsLockedByUser>
+      <TimeTagModified--0>-8587883378283186953</TimeTagModified--0>
+      <COptionG-0>True</COptionG-0>
+      <COptionI-0 />
+      <COptionOsize-0>Default</COptionOsize-0>
+      <COptionPreCompileCommands-0 />
+      <COptionXansi-0>False</COptionXansi-0>
+      <COptionXasmPath-0>False</COptionXasmPath-0>
+      <COptionXcharacterSet-0>Auto</COptionXcharacterSet-0>
+      <COptionXmisra2004-0>None</COptionXmisra2004-0>
+      <COptionXpack-0>None</COptionXpack-0>
+      <COptionXprnPath-0>False</COptionXprnPath-0>
+      <COptionISystem-0 />
+      <COptionOdeleteStaticFunc-0>None</COptionOdeleteStaticFunc-0>
+      <COptionPostCompileCommands-0 />
+      <COptionXalign-0>Align2</COptionXalign-0>
+      <COptionXasmPathValue-0>%BuildModeName%</COptionXasmPathValue-0>
+      <COptionXenumType-0>SignedInteger</COptionXenumType-0>
+      <COptionXmisra2004RuleFile-0 />
+      <COptionXprnPathValue-0>%BuildModeName%</COptionXprnPathValue-0>
+      <COptionOinline-0>FitToOptimization</COptionOinline-0>
+      <COptionOtherAdditionalOptions-0 />
+      <COptionP-0>False</COptionP-0>
+      <COptionXbitOrder-0>None</COptionXbitOrder-0>
+      <COptionXmisra2004RuleNumberApply-0 />
+      <COptionXpreinclude-0 />
+      <COptionXvolatile-0>False</COptionXvolatile-0>
+      <COptionD-0 />
+      <COptionOinlineSize-0>100</COptionOinlineSize-0>
+      <COptionXcheck-0>None</COptionXcheck-0>
+      <COptionXmisra2004RuleNumberIgnore-0 />
+      <COptionXpassSource-0>False</COptionXpassSource-0>
+      <COptionXprepPath-0>%BuildModeName%</COptionXprepPath-0>
+      <COptionOpipeline-0>None</COptionOpipeline-0>
+      <COptionU-0 />
+      <COptionXmisra2004RuleNumberRequiredAdd-0 />
+      <COptionXswitch-0>Auto</COptionXswitch-0>
+      <COptionOtailCall-0>None</COptionOtailCall-0>
+      <COptionXfloat-0>None</COptionXfloat-0>
+      <COptionXmisra2004RuleNumberRequiredRemove-0 />
+      <COptionXpreprocessComment-0>False</COptionXpreprocessComment-0>
+      <COptionMap-0>None</COptionMap-0>
+      <COptionXignoreFilesMisra-0 />
+      <COptionXpreprocessLine-0>False</COptionXpreprocessLine-0>
+      <COptionXround-0>Nearest</COptionXround-0>
+      <COptionXcheckLanguageExtension-0>False</COptionXcheckLanguageExtension-0>
+      <COptionXdblSize-0>DoublePrecision</COptionXdblSize-0>
+      <COptionXintermodule-0>None</COptionXintermodule-0>
+      <COptionXaliasAnsi-0>False</COptionXaliasAnsi-0>
+      <COptionXdiv-0>False</COptionXdiv-0>
+      <COptionXcheckDivOv-0>False</COptionXcheckDivOv-0>
+      <COptionXinlineStrcpy-0>False</COptionXinlineStrcpy-0>
+      <COptionXcheckDivOvValue-0>1</COptionXcheckDivOvValue-0>
+      <COptionXmergeString-0>False</COptionXmergeString-0>
+      <COptionXuseFmaf-0>False</COptionXuseFmaf-0>
+      <COptionXunorderedCmpf-0>False</COptionXunorderedCmpf-0>
+      <COptionXcallJump-0>None</COptionXcallJump-0>
+      <COptionXfarJump-0 />
+      <COptionXsectionData-0>None</COptionXsectionData-0>
+      <COptionXsectionConst-0>None</COptionXsectionConst-0>
+      <COptionXmultiLevel-0>Level0</COptionXmultiLevel-0>
+    </Instance>
+    <Instance Guid="55f70bbd-5f8f-404f-854e-5da727c86621">
+      <AsmOptionPreAssembleCommands-DefaultValue />
+      <COptionG-DefaultValue>True</COptionG-DefaultValue>
+      <COptionI-DefaultValue />
+      <COptionXasmFarJump-DefaultValue>False</COptionXasmFarJump-DefaultValue>
+      <COptionXcharacterSet-DefaultValue>Auto</COptionXcharacterSet-DefaultValue>
+      <COptionXprnPath-DefaultValue>False</COptionXprnPath-DefaultValue>
+      <AsmOptionPostAssembleCommands-DefaultValue />
+      <COptionISystem-DefaultValue />
+      <COptionXprnPathValue-DefaultValue>%BuildModeName%</COptionXprnPathValue-DefaultValue>
+      <AsmOptionOtherAdditionalOptions-DefaultValue />
+      <COptionD-DefaultValue />
+      <COptionU-DefaultValue />
+      <IsLockedByUser>False</IsLockedByUser>
+      <TimeTagModified--0>-8587883378283186953</TimeTagModified--0>
+      <AsmOptionPreAssembleCommands-0 />
+      <COptionG-0>True</COptionG-0>
+      <COptionI-0 />
+      <COptionXasmFarJump-0>False</COptionXasmFarJump-0>
+      <COptionXcharacterSet-0>Auto</COptionXcharacterSet-0>
+      <COptionXprnPath-0>False</COptionXprnPath-0>
+      <AsmOptionPostAssembleCommands-0 />
+      <COptionISystem-0 />
+      <COptionXprnPathValue-0>%BuildModeName%</COptionXprnPathValue-0>
+      <AsmOptionOtherAdditionalOptions-0 />
+      <COptionD-0 />
+      <COptionU-0 />
+    </Instance>
+    <Instance Guid="82d7e767-9e1b-43e5-a62d-4a892fa42000">
+      <LinkOptionCpu-DefaultValue>False</LinkOptionCpu-DefaultValue>
+      <LinkOptionDebug-DefaultValue>Debug</LinkOptionDebug-DefaultValue>
+      <LinkOptionEntry-DefaultValue>False</LinkOptionEntry-DefaultValue>
+      <LinkOptionInput-DefaultValue />
+      <LinkOptionLibrary-DefaultValue />
+      <LinkOptionListShow-DefaultValue>List</LinkOptionListShow-DefaultValue>
+      <LinkOptionMap-DefaultValue>False</LinkOptionMap-DefaultValue>
+      <LinkOptionMessage-DefaultValue>False</LinkOptionMessage-DefaultValue>
+      <LinkOptionOutputFolder-DefaultValue>%BuildModeName%</LinkOptionOutputFolder-DefaultValue>
+      <LinkOptionStack-DefaultValue>False</LinkOptionStack-DefaultValue>
+      <LinkOptionStart-DefaultValue>RESET,EIINTTBL,.const,.INIT_DSEC.const,.INIT_BSEC.const,.text,.data/00000000,.data.R,.bss,.stack.bss/FEDE0000</LinkOptionStart-DefaultValue>
+      <LinkOptionBinary-DefaultValue />
+      <LinkOptionCompress-DefaultValue>False</LinkOptionCompress-DefaultValue>
+      <LinkOptionCpuInformation-DefaultValue />
+      <LinkOptionEntryPoint-DefaultValue />
+      <LinkOptionLibrarySystem-DefaultValue />
+      <LinkOptionMemory-DefaultValue>False</LinkOptionMemory-DefaultValue>
+      <LinkOptionNoMessageErrorNumber-DefaultValue />
+      <LinkOptionOutputFileName-DefaultValue>%ProjectName%.abs</LinkOptionOutputFileName-DefaultValue>
+      <LinkOptionShowSymbol-DefaultValue>False</LinkOptionShowSymbol-DefaultValue>
+      <LinkOptionStartUp-DefaultValue />
+      <LinkOptionDefine-DefaultValue />
+      <LinkOptionFSymbol-DefaultValue />
+      <LinkOptionHide-DefaultValue>False</LinkOptionHide-DefaultValue>
+      <LinkOptionLibraryStandard-DefaultValue>True</LinkOptionLibraryStandard-DefaultValue>
+      <LinkOptionMsgUnused-DefaultValue>False</LinkOptionMsgUnused-DefaultValue>
+      <LinkOptionPadding-DefaultValue>False</LinkOptionPadding-DefaultValue>
+      <LinkOptionShowReference-DefaultValue>False</LinkOptionShowReference-DefaultValue>
+      <LinkOptionTotalSize-DefaultValue>False</LinkOptionTotalSize-DefaultValue>
+      <LinkOptionChangeMessageInformation-DefaultValue>None</LinkOptionChangeMessageInformation-DefaultValue>
+      <LinkOptionLibraryStandard2-DefaultValue>Use</LinkOptionLibraryStandard2-DefaultValue>
+      <LinkOptionLogo-DefaultValue>False</LinkOptionLogo-DefaultValue>
+      <LinkOptionOverrunFetch-DefaultValue>False</LinkOptionOverrunFetch-DefaultValue>
+      <LinkOptionOverwriteSymbol-DefaultValue>True</LinkOptionOverwriteSymbol-DefaultValue>
+      <LinkOptionShowXreference-DefaultValue>False</LinkOptionShowXreference-DefaultValue>
+      <LinkOptionAlignedSection-DefaultValue />
+      <LinkOptionChangeMessageInformationNumber-DefaultValue />
+      <LinkOptionLibraryLibC-DefaultValue>True</LinkOptionLibraryLibC-DefaultValue>
+      <LinkOptionPreLinkCommands-DefaultValue />
+      <LinkOptionShowTotalSize-DefaultValue>False</LinkOptionShowTotalSize-DefaultValue>
+      <LinkOptionChangeMessageWarning-DefaultValue>None</LinkOptionChangeMessageWarning-DefaultValue>
+      <LinkOptionLibraryLibM-DefaultValue>True</LinkOptionLibraryLibM-DefaultValue>
+      <LinkOptionPostLinkCommands-DefaultValue />
+      <LinkOptionRom-DefaultValue>.data=.data.R
+</LinkOptionRom-DefaultValue>
+      <LinkOptionShowStruct-DefaultValue>False</LinkOptionShowStruct-DefaultValue>
+      <LinkOptionChangeMessageWarningNumber-DefaultValue />
+      <LinkOptionLibraryLibMF-DefaultValue>True</LinkOptionLibraryLibMF-DefaultValue>
+      <LinkOptionOtherAdditionalOptions-DefaultValue />
+      <LinkOptionChangeMessageError-DefaultValue>None</LinkOptionChangeMessageError-DefaultValue>
+      <LinkOptionLibraryStandardMathematics-DefaultValue>True</LinkOptionLibraryStandardMathematics-DefaultValue>
+      <LinkOptionChangeMessageErrorNumber-DefaultValue />
+      <LinkOptionLibraryLibSetJmp-DefaultValue>False</LinkOptionLibraryLibSetJmp-DefaultValue>
+      <IsLockedByUser>False</IsLockedByUser>
+      <TimeTagModified--0>-8587732238333637133</TimeTagModified--0>
+      <LinkOptionCpu-0>False</LinkOptionCpu-0>
+      <LinkOptionDebug-0>Debug</LinkOptionDebug-0>
+      <LinkOptionEntry-0>False</LinkOptionEntry-0>
+      <LinkOptionInput-0 />
+      <LinkOptionLibrary-0 />
+      <LinkOptionListShow-0>List</LinkOptionListShow-0>
+      <LinkOptionMap-0>False</LinkOptionMap-0>
+      <LinkOptionMessage-0>False</LinkOptionMessage-0>
+      <LinkOptionOutputFolder-0>%BuildModeName%</LinkOptionOutputFolder-0>
+      <LinkOptionStack-0>False</LinkOptionStack-0>
+      <LinkOptionStart-0>RESET,EIINTTBL,.const,.INIT_DSEC.const,.INIT_BSEC.const,.text,.data/00000000,.data.R,.bss,.stack.bss/FEDE0000</LinkOptionStart-0>
+      <LinkOptionBinary-0 />
+      <LinkOptionCompress-0>False</LinkOptionCompress-0>
+      <LinkOptionCpuInformation-0 />
+      <LinkOptionEntryPoint-0 />
+      <LinkOptionLibrarySystem-0 />
+      <LinkOptionMemory-0>False</LinkOptionMemory-0>
+      <LinkOptionNoMessageErrorNumber-0 />
+      <LinkOptionOutputFileName-0>%ProjectName%.abs</LinkOptionOutputFileName-0>
+      <LinkOptionShowSymbol-0>False</LinkOptionShowSymbol-0>
+      <LinkOptionStartUp-0 />
+      <LinkOptionDefine-0 />
+      <LinkOptionFSymbol-0 />
+      <LinkOptionHide-0>False</LinkOptionHide-0>
+      <LinkOptionLibraryStandard-0>True</LinkOptionLibraryStandard-0>
+      <LinkOptionMsgUnused-0>False</LinkOptionMsgUnused-0>
+      <LinkOptionPadding-0>False</LinkOptionPadding-0>
+      <LinkOptionShowReference-0>False</LinkOptionShowReference-0>
+      <LinkOptionTotalSize-0>False</LinkOptionTotalSize-0>
+      <LinkOptionChangeMessageInformation-0>None</LinkOptionChangeMessageInformation-0>
+      <LinkOptionLibraryStandard2-0>UseCompatibleV101</LinkOptionLibraryStandard2-0>
+      <LinkOptionLogo-0>False</LinkOptionLogo-0>
+      <LinkOptionOverrunFetch-0>False</LinkOptionOverrunFetch-0>
+      <LinkOptionOverwriteSymbol-0>True</LinkOptionOverwriteSymbol-0>
+      <LinkOptionShowXreference-0>False</LinkOptionShowXreference-0>
+      <LinkOptionAlignedSection-0 />
+      <LinkOptionChangeMessageInformationNumber-0 />
+      <LinkOptionLibraryLibC-0>True</LinkOptionLibraryLibC-0>
+      <LinkOptionPreLinkCommands-0 />
+      <LinkOptionShowTotalSize-0>False</LinkOptionShowTotalSize-0>
+      <LinkOptionChangeMessageWarning-0>None</LinkOptionChangeMessageWarning-0>
+      <LinkOptionLibraryLibM-0>True</LinkOptionLibraryLibM-0>
+      <LinkOptionPostLinkCommands-0 />
+      <LinkOptionRom-0>.data=.data.R
+</LinkOptionRom-0>
+      <LinkOptionShowStruct-0>False</LinkOptionShowStruct-0>
+      <LinkOptionChangeMessageWarningNumber-0 />
+      <LinkOptionLibraryLibMF-0>True</LinkOptionLibraryLibMF-0>
+      <LinkOptionOtherAdditionalOptions-0 />
+      <LinkOptionChangeMessageError-0>None</LinkOptionChangeMessageError-0>
+      <LinkOptionLibraryStandardMathematics-0>True</LinkOptionLibraryStandardMathematics-0>
+      <LinkOptionChangeMessageErrorNumber-0 />
+      <LinkOptionLibraryLibSetJmp-0>False</LinkOptionLibraryLibSetJmp-0>
+    </Instance>
+    <Instance Guid="cd7ca0dd-4e03-43a0-b849-b72bd0bf0bd1">
+      <HexOptionForm-DefaultValue>Stype</HexOptionForm-DefaultValue>
+      <HexOptionOtherAdditionalOptions-DefaultValue />
+      <HexOptionOutput-DefaultValue>True</HexOptionOutput-DefaultValue>
+      <HexOptionSameLinkMessage-DefaultValue>True</HexOptionSameLinkMessage-DefaultValue>
+      <HexOptionMessage-DefaultValue>False</HexOptionMessage-DefaultValue>
+      <HexOptionOutputFolder-DefaultValue>%BuildModeName%</HexOptionOutputFolder-DefaultValue>
+      <HexOptionRecordH-DefaultValue>None</HexOptionRecordH-DefaultValue>
+      <HexOptionNoMessageErrorNumber-DefaultValue />
+      <HexOptionOutputFileName-DefaultValue>%ProjectName%.mot</HexOptionOutputFileName-DefaultValue>
+      <HexOptionRecordS-DefaultValue>None</HexOptionRecordS-DefaultValue>
+      <HexOptionChangeMessageInformation-DefaultValue>None</HexOptionChangeMessageInformation-DefaultValue>
+      <HexOptionDivisionOutputFile-DefaultValue />
+      <HexOptionSpace-DefaultValue>None</HexOptionSpace-DefaultValue>
+      <HexOptionChangeMessageInformationNumber-DefaultValue />
+      <HexOptionSpaceValue-DefaultValue>FF</HexOptionSpaceValue-DefaultValue>
+      <HexOptionUseObject-DefaultValue>False</HexOptionUseObject-DefaultValue>
+      <HexOptionByteCount-DefaultValue>False</HexOptionByteCount-DefaultValue>
+      <HexOptionChangeMessageWarning-DefaultValue>None</HexOptionChangeMessageWarning-DefaultValue>
+      <HexOptionOutputFolderForUnitedHexFile-DefaultValue>%BuildModeName%_merged</HexOptionOutputFolderForUnitedHexFile-DefaultValue>
+      <HexOptionByteCountValue-DefaultValue>FF</HexOptionByteCountValue-DefaultValue>
+      <HexOptionChangeMessageWarningNumber-DefaultValue />
+      <HexOptionChangeMessageError-DefaultValue>None</HexOptionChangeMessageError-DefaultValue>
+      <HexOptionS9-DefaultValue>False</HexOptionS9-DefaultValue>
+      <HexOptionChangeMessageErrorNumber-DefaultValue />
+      <IsLockedByUser>False</IsLockedByUser>
+      <TimeTagModified--0>-8587883378283186953</TimeTagModified--0>
+      <HexOptionForm-0>Stype</HexOptionForm-0>
+      <HexOptionOtherAdditionalOptions-0 />
+      <HexOptionOutput-0>True</HexOptionOutput-0>
+      <HexOptionSameLinkMessage-0>True</HexOptionSameLinkMessage-0>
+      <HexOptionMessage-0>False</HexOptionMessage-0>
+      <HexOptionOutputFolder-0>%BuildModeName%</HexOptionOutputFolder-0>
+      <HexOptionRecordH-0>None</HexOptionRecordH-0>
+      <HexOptionNoMessageErrorNumber-0 />
+      <HexOptionOutputFileName-0>%ProjectName%.mot</HexOptionOutputFileName-0>
+      <HexOptionRecordS-0>None</HexOptionRecordS-0>
+      <HexOptionChangeMessageInformation-0>None</HexOptionChangeMessageInformation-0>
+      <HexOptionDivisionOutputFile-0 />
+      <HexOptionSpace-0>None</HexOptionSpace-0>
+      <HexOptionChangeMessageInformationNumber-0 />
+      <HexOptionSpaceValue-0>FF</HexOptionSpaceValue-0>
+      <HexOptionUseObject-0>False</HexOptionUseObject-0>
+      <HexOptionByteCount-0>False</HexOptionByteCount-0>
+      <HexOptionChangeMessageWarning-0>None</HexOptionChangeMessageWarning-0>
+      <HexOptionOutputFolderForUnitedHexFile-0>%BuildModeName%_merged</HexOptionOutputFolderForUnitedHexFile-0>
+      <HexOptionByteCountValue-0>FF</HexOptionByteCountValue-0>
+      <HexOptionChangeMessageWarningNumber-0 />
+      <HexOptionChangeMessageError-0>None</HexOptionChangeMessageError-0>
+      <HexOptionS9-0>False</HexOptionS9-0>
+      <HexOptionChangeMessageErrorNumber-0 />
+    </Instance>
+    <Instance Guid="625fdef6-79e0-476f-ae26-6cde275afb59">
+      <LibOptionDebug-DefaultValue>Debug</LibOptionDebug-DefaultValue>
+      <LibOptionForm-DefaultValue>LibraryU</LibOptionForm-DefaultValue>
+      <LibOptionInput-DefaultValue />
+      <LibOptionLibrary-DefaultValue />
+      <LibOptionListShow-DefaultValue>None</LibOptionListShow-DefaultValue>
+      <LibOptionMemory-DefaultValue>False</LibOptionMemory-DefaultValue>
+      <LibOptionMessage-DefaultValue>False</LibOptionMessage-DefaultValue>
+      <LibOptionBinary-DefaultValue />
+      <LibOptionHide-DefaultValue>False</LibOptionHide-DefaultValue>
+      <LibOptionLibrarySystem-DefaultValue />
+      <LibOptionNoMessageErrorNumber-DefaultValue />
+      <LibOptionOutputFolder-DefaultValue>%BuildModeName%</LibOptionOutputFolder-DefaultValue>
+      <LibOptionShowSymbol-DefaultValue>False</LibOptionShowSymbol-DefaultValue>
+      <LibOptionTotalSize-DefaultValue>False</LibOptionTotalSize-DefaultValue>
+      <LibOptionLibraryStandard-DefaultValue>False</LibOptionLibraryStandard-DefaultValue>
+      <LibOptionLogo-DefaultValue>False</LibOptionLogo-DefaultValue>
+      <LibOptionOutputFileName-DefaultValue>%ProjectName%.lib</LibOptionOutputFileName-DefaultValue>
+      <LibOptionShowSection-DefaultValue>False</LibOptionShowSection-DefaultValue>
+      <LibOptionChangeMessageInformation-DefaultValue>None</LibOptionChangeMessageInformation-DefaultValue>
+      <LibOptionLibraryStandard2-DefaultValue>NotUse</LibOptionLibraryStandard2-DefaultValue>
+      <LibOptionPreLibCommands-DefaultValue />
+      <LibOptionShowXreference-DefaultValue>False</LibOptionShowXreference-DefaultValue>
+      <LibOptionChangeMessageInformationNumber-DefaultValue />
+      <LibOptionLibraryLibC-DefaultValue>False</LibOptionLibraryLibC-DefaultValue>
+      <LibOptionPostLibCommands-DefaultValue />
+      <LibOptionShowTotalSize-DefaultValue>False</LibOptionShowTotalSize-DefaultValue>
+      <LibOptionChangeMessageWarning-DefaultValue>None</LibOptionChangeMessageWarning-DefaultValue>
+      <LibOptionLibraryLibM-DefaultValue>False</LibOptionLibraryLibM-DefaultValue>
+      <LibOptionOtherAdditionalOptions-DefaultValue />
+      <LibOptionChangeMessageWarningNumber-DefaultValue />
+      <LibOptionLibraryLibMF-DefaultValue>False</LibOptionLibraryLibMF-DefaultValue>
+      <LibOptionChangeMessageError-DefaultValue>None</LibOptionChangeMessageError-DefaultValue>
+      <LibOptionLibraryStandardMathematics-DefaultValue>False</LibOptionLibraryStandardMathematics-DefaultValue>
+      <LibOptionChangeMessageErrorNumber-DefaultValue />
+      <LibOptionLibraryLibSetJmp-DefaultValue>False</LibOptionLibraryLibSetJmp-DefaultValue>
+      <IsLockedByUser>False</IsLockedByUser>
+      <TimeTagModified--0>-8587883378283186953</TimeTagModified--0>
+      <LibOptionDebug-0>Debug</LibOptionDebug-0>
+      <LibOptionForm-0>LibraryU</LibOptionForm-0>
+      <LibOptionInput-0 />
+      <LibOptionLibrary-0 />
+      <LibOptionListShow-0>None</LibOptionListShow-0>
+      <LibOptionMemory-0>False</LibOptionMemory-0>
+      <LibOptionMessage-0>False</LibOptionMessage-0>
+      <LibOptionBinary-0 />
+      <LibOptionHide-0>False</LibOptionHide-0>
+      <LibOptionLibrarySystem-0 />
+      <LibOptionNoMessageErrorNumber-0 />
+      <LibOptionOutputFolder-0>%BuildModeName%</LibOptionOutputFolder-0>
+      <LibOptionShowSymbol-0>False</LibOptionShowSymbol-0>
+      <LibOptionTotalSize-0>False</LibOptionTotalSize-0>
+      <LibOptionLibraryStandard-0>False</LibOptionLibraryStandard-0>
+      <LibOptionLogo-0>False</LibOptionLogo-0>
+      <LibOptionOutputFileName-0>%ProjectName%.lib</LibOptionOutputFileName-0>
+      <LibOptionShowSection-0>False</LibOptionShowSection-0>
+      <LibOptionChangeMessageInformation-0>None</LibOptionChangeMessageInformation-0>
+      <LibOptionLibraryStandard2-0>NotUse</LibOptionLibraryStandard2-0>
+      <LibOptionPreLibCommands-0 />
+      <LibOptionShowXreference-0>False</LibOptionShowXreference-0>
+      <LibOptionChangeMessageInformationNumber-0 />
+      <LibOptionLibraryLibC-0>False</LibOptionLibraryLibC-0>
+      <LibOptionPostLibCommands-0 />
+      <LibOptionShowTotalSize-0>False</LibOptionShowTotalSize-0>
+      <LibOptionChangeMessageWarning-0>None</LibOptionChangeMessageWarning-0>
+      <LibOptionLibraryLibM-0>False</LibOptionLibraryLibM-0>
+      <LibOptionOtherAdditionalOptions-0 />
+      <LibOptionChangeMessageWarningNumber-0 />
+      <LibOptionLibraryLibMF-0>False</LibOptionLibraryLibMF-0>
+      <LibOptionChangeMessageError-0>None</LibOptionChangeMessageError-0>
+      <LibOptionLibraryStandardMathematics-0>False</LibOptionLibraryStandardMathematics-0>
+      <LibOptionChangeMessageErrorNumber-0 />
+      <LibOptionLibraryLibSetJmp-0>False</LibOptionLibraryLibSetJmp-0>
+    </Instance>
+    <Instance Guid="95c30d64-f6f4-42dc-8c58-59f49088d7ac">
+      <GeneratorOptionUpdateIO-DefaultValue>None</GeneratorOptionUpdateIO-DefaultValue>
+      <GeneratorOtherAdditionalOptions-DefaultValue />
+      <GeneratorOptionLastDevice-DefaultValue />
+      <GeneratorOptionCurrentDevice-DefaultValue>DR7F701035.DVF, V1.30</GeneratorOptionCurrentDevice-DefaultValue>
+      <GeneratorOptionOutputBitIOR-DefaultValue>False</GeneratorOptionOutputBitIOR-DefaultValue>
+      <IsLockedByUser>False</IsLockedByUser>
+      <TimeTagModified--0>-8587883378283186953</TimeTagModified--0>
+      <GeneratorOptionUpdateIO-0>None</GeneratorOptionUpdateIO-0>
+      <GeneratorOtherAdditionalOptions-0 />
+      <GeneratorOptionLastDevice-0 />
+      <GeneratorOptionCurrentDevice-0>DR7F701035.DVF, V1.30</GeneratorOptionCurrentDevice-0>
+      <GeneratorOptionOutputBitIOR-0>False</GeneratorOptionOutputBitIOR-0>
+    </Instance>
+  </Class>
+  <Class Guid="44fa27c9-0aa0-4297-bd3b-2c5c5bdb8881">
+    <Instance Guid="44fa27c9-0aa0-4297-bd3b-2c5c5bdb8881">
+      <IsLibraryMode>False</IsLibraryMode>
+      <StartUpCategoryItem>00000000-0000-0000-0000-000000000000</StartUpCategoryItem>
+    </Instance>
+  </Class>
+  <Class Guid="a29a09ee-92c3-4ce7-9586-a1b058043f92">
+    <Instance Guid="a29a09ee-92c3-4ce7-9586-a1b058043f92">
+      <ProjectGeneratr-GeneratedFile0 />
+    </Instance>
+  </Class>
+  <Class Guid="b6e7b682-852c-4e65-8b76-ac439b49487d">
+    <Instance Guid="b6e7b682-852c-4e65-8b76-ac439b49487d">
+      <IsBootLoader>False</IsBootLoader>
+    </Instance>
+  </Class>
+  <Class Guid="8b5af363-dcc2-48e6-919c-6cdb80d50173">
+    <Instance Guid="8b5af363-dcc2-48e6-919c-6cdb80d50173">
+      <DataFormatVersionPlugin>1.0</DataFormatVersionPlugin>
+      <DataFormatVersionDebugger>1.0</DataFormatVersionDebugger>
+    </Instance>
+  </Class>
+  <Class Guid="932085a2-9361-4df9-a3f7-12e6de7681a8">
+    <Instance Guid="932085a2-9361-4df9-a3f7-12e6de7681a8">
+      <DebugToolManager>f2aacdac-89aa-4f89-8fbf-25090bc24c51</DebugToolManager>
+    </Instance>
+  </Class>
+  <Class Guid="e4df8d71-236e-4af2-aaea-56345a08da25">
+    <Instance Guid="d0534c29-4366-4056-9e09-bb28c173fcf6">
+      <DeviceChangedCounter>0</DeviceChangedCounter>
+      <DeviceName>R7F701035xAFP</DeviceName>
+      <DebuggerProperty-EssentialProperty-Clock-MainClockFrequency>320000</DebuggerProperty-EssentialProperty-Clock-MainClockFrequency>
+      <DebuggerProperty-EssentialProperty-Clock-SelectTimerTraceClockFrequency>SelectCpuClockFrequency</DebuggerProperty-EssentialProperty-Clock-SelectTimerTraceClockFrequency>
+      <DebuggerProperty-EssentialProperty-Clock-UnitOfTimerTraceClockFrequency>MHz</DebuggerProperty-EssentialProperty-Clock-UnitOfTimerTraceClockFrequency>
+      <DebuggerProperty-EssentialProperty-Clock-TimerTraceClockFrequency>8000000</DebuggerProperty-EssentialProperty-Clock-TimerTraceClockFrequency>
+      <DebuggerProperty-EssentialProperty-Configuration-UseSimulatorConfigurationFile>No</DebuggerProperty-EssentialProperty-Configuration-UseSimulatorConfigurationFile>
+      <DebuggerProperty-EssentialProperty-Configuration-SimulatorConfigurationFile />
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-Length>1</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-Length>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-DebuggerGuid />
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-FileName>DefaultBuild\configure.abs</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-FileName>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-FileType>LoadModuleFile</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-FileType>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-Offset>0</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-Offset>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-StartAddress>0</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-StartAddress>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-ObjectDownload>True</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-ObjectDownload>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-SymbolDownload>True</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-SymbolDownload>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-UsePicPidOffset>False</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-UsePicPidOffset>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-PicOffset>0</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-PicOffset>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-PidOffset>0</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-PidOffset>
+      <DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-GenerateInformationForInputCompletion>True</DebuggerProperty-DownloadProperty-DebugInformation-DownloadFiles-DownloadItem0-GenerateInformationForInputCompletion>
+      <DebuggerProperty-DownloadProperty-DebugInformation-CpuReset>True</DebuggerProperty-DownloadProperty-DebugInformation-CpuReset>
+      <DebuggerProperty-DownloadProperty-DebugInformation-FlashErase>False</DebuggerProperty-DownloadProperty-DebugInformation-FlashErase>
+      <DebuggerProperty-DownloadProperty-DebugInformation-EventCorrection>SuspendEvent</DebuggerProperty-DownloadProperty-DebugInformation-EventCorrection>
+      <DebuggerProperty-DownloadProperty-DebugInformation-SkipStartup>True</DebuggerProperty-DownloadProperty-DebugInformation-SkipStartup>
+      <DebuggerProperty-DownloadProperty-DebugInformation-MainSymbol>XwBtAGEAaQBuAA==</DebuggerProperty-DownloadProperty-DebugInformation-MainSymbol>
+      <DebuggerProperty-DownloadProperty-DebugInformation-MaxLoaderMemorySize>500</DebuggerProperty-DownloadProperty-DebugInformation-MaxLoaderMemorySize>
+      <DebuggerProperty-OptionalProperty-AccessMemory-UpdateDisplayInExecution>Yes</DebuggerProperty-OptionalProperty-AccessMemory-UpdateDisplayInExecution>
+      <DebuggerProperty-OptionalProperty-AccessMemory-UpdateInterval>500</DebuggerProperty-OptionalProperty-AccessMemory-UpdateInterval>
+      <DebuggerProperty-OptionalProperty-Trace-UseTrace>No</DebuggerProperty-OptionalProperty-Trace-UseTrace>
+      <DebuggerProperty-OptionalProperty-Trace-ClearTraceMemory>Yes</DebuggerProperty-OptionalProperty-Trace-ClearTraceMemory>
+      <DebuggerProperty-OptionalProperty-Trace-TraceMode>Free</DebuggerProperty-OptionalProperty-Trace-TraceMode>
+      <DebuggerProperty-OptionalProperty-Trace-AddUptimeTag>No</DebuggerProperty-OptionalProperty-Trace-AddUptimeTag>
+      <DebuggerProperty-OptionalProperty-Trace-TraceMemorySize>4096</DebuggerProperty-OptionalProperty-Trace-TraceMemorySize>
+      <DebuggerProperty-OptionalProperty-Trace-TraceRate>0</DebuggerProperty-OptionalProperty-Trace-TraceRate>
+      <DebuggerProperty-OptionalProperty-Timer-UseTimer>No</DebuggerProperty-OptionalProperty-Timer-UseTimer>
+      <DebuggerProperty-OptionalProperty-Coverage-UseCoverage>No</DebuggerProperty-OptionalProperty-Coverage-UseCoverage>
+      <DebuggerProperty-OptionalProperty-Coverage-ReuseCoverageData>No</DebuggerProperty-OptionalProperty-Coverage-ReuseCoverageData>
+      <DebuggerProperty-OptionalProperty-Coverage-CoverageAreaAddress>1048576</DebuggerProperty-OptionalProperty-Coverage-CoverageAreaAddress>
+      <DebuggerProperty-HookProperty-HookTransaction-Downloading-Length>0</DebuggerProperty-HookProperty-HookTransaction-Downloading-Length>
+      <DebuggerProperty-HookProperty-HookTransaction-Downloaded-Length>0</DebuggerProperty-HookProperty-HookTransaction-Downloaded-Length>
+      <DebuggerProperty-HookProperty-HookTransaction-Reset-Length>0</DebuggerProperty-HookProperty-HookTransaction-Reset-Length>
+      <DebuggerProperty-HookProperty-HookTransaction-Going-Length>0</DebuggerProperty-HookProperty-HookTransaction-Going-Length>
+      <DebuggerProperty-HookProperty-HookTransaction-Broke-Length>0</DebuggerProperty-HookProperty-HookTransaction-Broke-Length>
+      <DebuggerProperty-HookProperty-HookTransaction-Connected-Length>0</DebuggerProperty-HookProperty-HookTransaction-Connected-Length>
+      <DebuggerProperty-HookProperty-HookTransaction-Disconnecting-Length>0</DebuggerProperty-HookProperty-HookTransaction-Disconnecting-Length>
+      <Debugger-DebugTarget-ProcessorElementNumber>1</Debugger-DebugTarget-ProcessorElementNumber>
+    </Instance>
+  </Class>
+  <Class Guid="2a2c2a43-ecdb-4e88-80bd-e75f3e33db90">
+    <Instance Guid="2a2c2a43-ecdb-4e88-80bd-e75f3e33db90">
+      <ProductVersion>5.00.00.00</ProductVersion>
+    </Instance>
+  </Class>
+</CubeSuiteProject>
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/configure.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/configure.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/configure.py	(revision 172)
@@ -0,0 +1,85 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: configure.py 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+import os.path
+import os
+
+os.chdir(os.path.dirname(project.Path))
+
+# set relative path from top proj
+proj_rel_dir = ""
+
+# call definition file
+common.Source("./def.py")
+
+# path
+src_abs_path = os.path.abspath(SRCDIR)
+
+# call common file
+common.Source(src_abs_path + "/arch/ccrh/configure_body.py")
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/def.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/def.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure/def.py	(revision 172)
@@ -0,0 +1,97 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: def.py 182 2015-06-24 07:14:37Z t_ishikawa $
+#
+
+# Source Dir
+SRCDIR = "../"
+
+# Configfile name
+CFGNAME = ['sample1','target_hw_counter','target_serial','uart', 'target_mem', 'prc_mem']
+
+# Target board
+#TARGET = "fl850f1l_ccrh"
+TARGET = "hsbrh850f1l_ccrh"
+
+# Target mcu
+#TARGET_MCU = 'R7F701035xAFP'
+TARGET_MCU = 'R7F701025xAFP'
+
+# Application files
+app_app_files = ['sample1.c', 'sample2.c', 'sample_asm.asm']
+
+# Addition Dir list (relative path from srcdir)
+USER_INCLUDE = []
+
+# Addition Macro Definitions
+USER_MACRO = ['USE_KERNEL_LIBRARY_SYSLOG']
+
+# Copy sample1
+COPY_SAMPLE1 = True
+
+# MPU Region
+MPU_REGION_NUM = 4
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure_body.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure_body.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/configure_body.py	(revision 172)
@@ -0,0 +1,341 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: configure_body.py 182 2015-06-24 07:14:37Z t_ishikawa $
+#
+
+import os.path
+import os
+import shutil
+
+# call common file
+common.Source(src_abs_path + "/arch/ccrh/common.py")
+
+src_abs_path = os.path.abspath(SRCDIR)
+wd_abs_path = os.path.abspath('.')
+cfg_mtsp = wd_abs_path + r"\cfg\cfg.mtsp"
+kernel_mtsp = wd_abs_path + r"\kernel\kernel.mtsp"
+cfg_pass4_mtsp = wd_abs_path + r"\cfg_pass4\cfg_pass4.mtsp"
+atk2_sc3_mtpj = wd_abs_path + r"\atk2-sc3.mtpj"
+
+if COPY_SAMPLE1:
+	shutil.copy(src_abs_path + r'/sample/sample1.c', '.')
+	shutil.copy(src_abs_path + r'/sample/sample2.c', '.')
+	shutil.copy(src_abs_path + r'/sample/sample.h', '.')
+	shutil.copy(src_abs_path + r'/sample/sample1.h', '.')
+	shutil.copy(src_abs_path + r'/sample/sample2.h', '.')
+	shutil.copy(src_abs_path + r'/sample/sample1.arxml', '.')
+	shutil.copy(src_abs_path + r'/sample/Rte_Type.h', '.')
+	shutil.copy(src_abs_path + r'/sample/sample_asm.asm', '.')
+
+#
+# close project
+#
+#project.Close() 
+print wd_abs_path + "\\atk2-sc3"
+project.Create(wd_abs_path + "\\atk2-sc3",
+				MicomType.RH850, 
+				TARGET_MCU, 
+				ProjectKind.Empty,
+				Compiler.CC_RH,
+				False)
+
+project.Create(wd_abs_path + "\\cfg\\cfg",
+				MicomType.RH850, 
+				TARGET_MCU, 
+				ProjectKind.Empty,
+				Compiler.CC_RH,
+				True)
+
+project.Create(wd_abs_path + "\\kernel\\kernel",
+				MicomType.RH850, 
+				TARGET_MCU, 
+				ProjectKind.Library,
+				Compiler.CC_RH,
+				True)
+
+project.Create(wd_abs_path + "\\cfg_pass4\\cfg_pass4",
+				MicomType.RH850, 
+				TARGET_MCU, 
+				ProjectKind.Empty,
+				Compiler.CC_RH,
+				True)
+
+#
+# Change debug tool
+#
+debugger.DebugTool.Change(DebugTool.E1Lpd)
+
+#
+# Add files for atk2-sc3 project
+#
+for file in app_app_files:
+	project.File.Add(wd_abs_path + "\\" + file, u"app")
+
+for file in app_sysmod_files:
+	project.File.Add(src_abs_path + "\\" + file, u"sysmod")
+
+for file in app_library_files:
+	project.File.Add(src_abs_path + "\\" + file, u"library")
+
+for file in app_configuration_files:
+        if file == 'kernel_mem.c':
+	    project.File.Add(wd_abs_path + "\\cfg_pass4\\" + file, u"configuration4")
+        else:
+            project.File.Add(wd_abs_path + "\\cfg\\" + file, u"configuration")
+
+str = src_abs_path + '\\' + statup_file
+project.File.Add(str, u"ã¹ã¿ã¼ãã¢ãã")
+
+#
+# Add files fot cfg project
+#
+project.Change(cfg_mtsp)
+
+file_list = project.File.Information()
+for file in file_list:
+	project.File.Remove(file)
+
+str = src_abs_path + '\\' + statup_file
+project.File.Add(str, u"ã¹ã¿ã¼ãã¢ãã")
+
+for file in cfg_configuration_files:
+	project.File.Add(wd_abs_path + "\\cfg\\" + file, u"configuration")
+
+#
+# Add files fot kernel project
+#
+project.Change(kernel_mtsp)
+
+file_list = project.File.Information()
+for file in file_list:
+	project.File.Remove(file)
+
+for file in kernel_kernel_files:
+	project.File.Add(src_abs_path + "\\" + file, u"kernel")
+
+for file in kernel_arch_files:
+	project.File.Add(src_abs_path + "\\" + file, u"arch")
+
+for file in kernel_target_files:
+	project.File.Add(src_abs_path + "\\" + file, u"target")
+
+#
+# Add files for cfg_pass4 project
+#
+project.Change(cfg_pass4_mtsp)
+
+file_list = project.File.Information()
+for file in file_list:
+	project.File.Remove(file)
+
+for file in app_app_files:
+	project.File.Add(wd_abs_path + "\\" + file, u"app")
+
+for file in app_sysmod_files:
+	project.File.Add(src_abs_path + "\\" + file, u"sysmod")
+
+for file in app_library_files:
+	project.File.Add(src_abs_path + "\\" + file, u"library")
+
+for file in app_configuration_files:
+        if file == 'kernel_mem.c':
+            file = 'kernel_mem2.c'
+	project.File.Add(wd_abs_path + "\\cfg\\" + file, u"configuration")
+
+str = src_abs_path + '\\' + statup_file
+project.File.Add(str, u"ã¹ã¿ã¼ãã¢ãã")
+
+project.Close(True)
+
+#
+# Modify atk2-sc3.mtpfj
+#
+inputstr = ReadFile('atk2-sc3.mtpj')
+
+# Set cx include path
+inputstr = NewSetCCRHIncludes(inputstr, atk2_sc3_rel_includes, INCLUDES, SRCDIR)
+# Set libary path and file
+#inputstr = NewSetLibIncludes(inputstr, atk2_sc3_lib_includes, [], SRCDIR)
+inputstr = NewSetLibFiles(inputstr, atk2_sc3_lib_files)
+# change Option
+inputstr = ChangeItemXml(inputstr, 'OutputMessageFormat-0', '%Program% %Options%')
+#inputstr = ChangeItemXml(inputstr, 'UseProEpiRuntimeLibrary-0', 'False')
+#inputstr = ChangeItemXml(inputstr, 'HexadecimalFileFormat-0','MotrolaSType32Bit')
+inputstr = ChangeItemXml(inputstr, 'HexOptionOutputFileName-0', r'%ProjectName%.srec')
+#inputstr = ChangeItemXml(inputstr, 'OutputLinkMapFile-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'LinkOptionPadding-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'LinkOptionShowSymbol-0', 'True')
+#inputstr = ChangeItemXml(inputstr, 'OutputSymbolInformationToLinkMapFile-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'DebuggerProperty-EssentialProperty-Clock-MainClockGeneration', MAIN_CLK)
+inputstr = ChangeItemXml(inputstr, 'GeneralOptionXreserveR2-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'COptionOsize-0', 'AdvancedSpeed')
+# Change linkoption if link_option is exist.
+try:
+	link_option = link_option
+	inputstr = ChangeItemXml(inputstr, 'LinkOptionStart-0', link_option)
+except NameError:
+	link_option = ''
+
+
+                                    
+# Set user macro definitions
+inputstr = NewSetDefine(inputstr, USER_MACRO)
+
+# Set Prebuild/Postbuile
+# inputstr = NewSetPrebuild(inputstr, atk2_sc3_pre_python_files, "./")
+
+WriteFile('atk2-sc3.mtpj', inputstr)
+
+#
+# Modify ./cfg/cfg.mtsp
+#
+inputstr = ReadFile('./cfg/cfg.mtsp')
+
+# Set cx include path
+inputstr = NewSetCCRHIncludes(inputstr, cfg_rel_includes, INCLUDES, "../" + SRCDIR)
+
+# change Option
+inputstr = ChangeItemXml(inputstr, 'OutputMessageFormat-0', '%Program% %Options%')
+#inputstr = ChangeItemXml(inputstr, 'UseProEpiRuntimeLibrary-0', 'False')
+#inputstr = ChangeItemXml(inputstr, 'HexadecimalFileFormat-0','MotrolaSType32Bit')
+inputstr = ChangeItemXml(inputstr, 'HexOptionOutputFileName-0', 'cfg1_out.srec')
+#inputstr = ChangeItemXml(inputstr, 'OutputLinkMapFile-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'LinkOptionShowSymbol-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'HexOptionOutputFolder-0', '.')
+
+# Set Prebuild/Postbuile
+inputstr = NewSetPrebuild(inputstr, cfg_pre_python_files, "../" + SRCDIR)
+inputstr = NewSetPostbuild(inputstr, cfg_post_python_files, "../" + SRCDIR)
+
+# Set user macro definitions
+inputstr = NewSetDefine(inputstr, USER_MACRO)
+
+WriteFile('./cfg/cfg.mtsp', inputstr)
+
+#
+# Mofity ./kernel/kernel.mtsp
+#
+inputstr = ReadFile('./kernel/kernel.mtsp')
+
+# Add user macro definitions
+kernel_define = kernel_define + USER_MACRO
+
+# Set cx include path
+inputstr = NewSetCCRHIncludes(inputstr, kernel_rel_includes, INCLUDES, "../" + SRCDIR)
+# Set cx define
+inputstr = NewSetDefine(inputstr, kernel_define)
+# Set cx addition option
+inputstr = NewSetCAddOpt(inputstr, kernel_c_addopt)
+inputstr = NewSetAsmAddOpt(inputstr, kernel_asm_addopt)
+
+# change Option
+inputstr = ChangeItemXml(inputstr, 'OutputMessageFormat-0', '%Program% %Options%')
+#inputstr = ChangeItemXml(inputstr, 'UseProEpiRuntimeLibrary-0', 'False')
+inputstr = ChangeItemXml(inputstr, 'GeneralOptionXreserveR2-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'COptionOsize-0', 'AdvancedSpeed')
+
+WriteFile('./kernel/kernel.mtsp', inputstr)
+
+#
+# Modify cfg_pass4.mtpfj
+#
+inputstr = ReadFile('./cfg_pass4/cfg_pass4.mtsp')
+
+# Set cx include path
+inputstr = NewSetCCRHIncludes(inputstr, kernel_rel_includes, INCLUDES, "../" + SRCDIR)
+# Set libary path and file
+#inputstr = NewSetLibIncludes(inputstr, atk2_sc3_lib_includes, [], SRCDIR)
+inputstr = NewSetLibFiles(inputstr, cfg_pass4_lib_files)
+# change Option
+inputstr = ChangeItemXml(inputstr, 'OutputMessageFormat-0', '%Program% %Options%')
+#inputstr = ChangeItemXml(inputstr, 'UseProEpiRuntimeLibrary-0', 'False')
+#inputstr = ChangeItemXml(inputstr, 'HexadecimalFileFormat-0','MotrolaSType32Bit')
+inputstr = ChangeItemXml(inputstr, 'HexOptionOutputFileName-0', r'%ProjectName%.srec')
+#inputstr = ChangeItemXml(inputstr, 'OutputLinkMapFile-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'LinkOptionPadding-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'LinkOptionShowSymbol-0', 'True')
+#inputstr = ChangeItemXml(inputstr, 'OutputSymbolInformationToLinkMapFile-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'DebuggerProperty-EssentialProperty-Clock-MainClockGeneration', MAIN_CLK)
+inputstr = ChangeItemXml(inputstr, 'GeneralOptionXreserveR2-0', 'True')
+inputstr = ChangeItemXml(inputstr, 'COptionOsize-0', 'AdvancedSpeed')
+# Change linkoption if link_option is exist.
+try:
+	link_option = link_option
+	inputstr = ChangeItemXml(inputstr, 'LinkOptionStart-0', link_option)
+except NameError:
+	link_option = ''
+                                    
+# Set user macro definitions
+inputstr = NewSetDefine(inputstr, USER_MACRO)
+
+# Set Prebuild/Postbuile
+inputstr = NewSetPostbuild(inputstr, cfg_pass4_post_python_files, "../" + SRCDIR)
+
+WriteFile('./cfg_pass4/cfg_pass4.mtsp', inputstr)
+
+project.Open(wd_abs_path + r'\atk2-sc3.mtpj')
+project.Change(atk2_sc3_mtpj)
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/gcc2ccrh.rb
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/gcc2ccrh.rb	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/gcc2ccrh.rb	(revision 172)
@@ -0,0 +1,68 @@
+#! ruby -Ku
+
+if ARGV.size != 1 then
+    puts "Argment Error!"
+    exit
+end
+
+#Input from gcc file
+begin
+    gcc_asm_file = open(ARGV[0])
+rescue
+    puts "File Open Error!"
+    exit
+end
+
+
+cx_asm = ""
+
+#Convert 
+while line = gcc_asm_file.gets
+    line = line.gsub('.section .reset.text', "RESET .cseg text")
+    
+    line = line.sub('/*', ';/*')
+    
+    line = line.sub(/^(\s*)\*/, '\1;*')
+    
+    line = line.sub(/.macro\s+(\w+)/, '\1 .macro')
+    
+    line = line.sub(/#include\s+[<"](.+)[>"]/, '$include (\1)')
+    
+    line = line.sub('.global', '.extern')    
+
+    line = line.sub('.globl', '.public')    
+    
+    line = line.gsub(/AMARG\((\w+)\)/, '\1')
+    
+    line = line.gsub(/FLABEL\((\w+)\)/, '\1:')
+        
+    line = line.gsub('~', '!')
+    
+    line = line.gsub('#ifdef', '$ifdef')
+    
+    line = line.gsub('#ifndef', '$ifndef')    
+    
+    line = line.gsub('#endif', '$endif')
+    
+    line = line.gsub('#else', '$else')    
+
+    line = line.gsub('#elif', '$elseif')    
+    
+    line = line.gsub('.section', '.cseg')
+    
+    line = line.gsub(/\.endr/i, '.endm')
+    
+    line = line.gsub(/\.text/i, 'text')
+
+    line = line.gsub('.word', '.dw')
+    
+    cx_asm = cx_asm  + line
+end
+
+cx_asm_file_name = File::basename(ARGV[0].sub(".S", ".asm"))
+print sprintf("Output %s\n", cx_asm_file_name)
+
+#Output to asm file
+File.open(cx_asm_file_name, 'w') {|file|
+ file.write cx_asm 
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/kernel_inline_symbols.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/kernel_inline_symbols.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/kernel_inline_symbols.h	(revision 172)
@@ -0,0 +1,108 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: kernel_inline_symbols.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã³ã³ãã¤ã©ä¾å­å®ç¾©
+ */
+
+#ifndef KERNEL_INLINE_SYMBOL_H
+#define KERNEL_INLINE_SYMBOL_H
+
+/*
+ *	å
+±éã¤ã³ã¯ã«ã¼ãã®Inlineé¢æ°ã®ã·ã³ãã«ç»é²
+ */
+
+/* queue.h	*/
+#pragma inline queue_initialize
+#pragma inline queue_insert_prev
+#pragma inline queue_insert_next
+#pragma inline queue_delete
+#pragma inline queue_delete_next
+#pragma inline queue_empty
+
+/*
+ *	ã¿ã¼ã²ããéä¾å­é¨ã®Inlineé¢æ°ã®ã·ã³ãã«ç»é²
+ */
+
+/* counter.h	*/
+#pragma inline add_tick
+#pragma inline diff_tick
+#pragma inline get_curval
+
+/* task.c	*/
+#pragma inline bitmap_search
+#pragma inline primap_empty
+#pragma inline primap_search
+#pragma inline primap_set
+#pragma inline primap_clear
+
+/* t_syslog.h	*/
+#pragma inline syslog
+#pragma inline _syslog_0
+#pragma inline _syslog_1
+#pragma inline _syslog_2
+#pragma inline _syslog_3
+#pragma inline _syslog_4
+#pragma inline _syslog_5
+#pragma inline _syslog_6
+
+#endif /* KERNEL_INLINE_SYMBOL_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/ldscript.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/ldscript.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/ldscript.tf	(revision 172)
@@ -0,0 +1,216 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  AUTOSARï¼AUTomotive Open System ARchitectureï¼ã¯ï¼AUTOSARä»æ§ã«åºã¥
+$  ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«
+$  ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: ldscript.tf 189 2015-06-26 01:54:57Z t_ishikawa $
+$
+
+$ =====================================================================
+$  ãªã³ã«ã¹ã¯ãªããï¼ldscript.pyï¼ã®çæ
+$ =====================================================================
+
+$
+$  çæãããã¡ã¤ã«ã®æå®
+$
+$FILE "ldscript.py"$
+# This file is generated by ccrh/ldscript.tf$NL$
+$NL$
+import os.path$NL$
+import os$NL$
+import shutil$NL$
+os.chdir(os.path.dirname(project.Path))$NL$
+proj_rel_dir = "../"$NL$
+common.Source(proj_rel_dir + "def.py")$NL$
+src_abs_path = os.path.abspath(proj_rel_dir + SRCDIR)$NL$
+# call common file$NL$
+common.Source(src_abs_path + "/arch/ccrh/common.py")$NL$
+$NL$
+
+$
+$  å¤æ°ã®åæå
+$
+$reset_lma = 0$
+
+$provide_gp = 0$
+$data_flg = 0$
+
+$reg_initdata = REG.REGNAME[STANDARD_ROM]$
+$ROMtoRAMsection = "ROMtoRAMsection"$
+$AlignSection = "AlignSection"$
+
+# initialize variables$NL$
+$FOREACH regid REG.ORDER_LIST$
+    $REG.REGNAME[regid]$ = []$NL$
+$END$
+$ROMtoRAMsection$ = []$NL$
+$AlignSection$ = []$NL$
+$NL$
+
+$
+$  ãªã³ã¯æå®ã®çæ
+$
+# preprocess for OsMemorySection$NL$
+$ ã¿ã¼ã²ããä¾å­ã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$IF ISFUNCTION("GENERATE_SECTION_FIRST")$
+	$GENERATE_SECTION_FIRST()$
+$END$
+
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid]$
+$		// ã»ã¯ã·ã§ã³ã®éå§è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+$           // ã»ã¯ã·ã§ã³ãé
+ç½®ãããªã¼ã¸ã§ã³ã®åå¾
+            $reg = REG.REGNAME[MO.MEMREG[moid]]$
+			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+                $AlignSection$.append("$MO.SECTION[moid]$.R")$NL$
+            $END$
+            $AlignSection$.append("$MO.SECTION[moid]$")$NL$
+        $END$
+
+$		// ãªã³ã¯ãããã¡ã¤ã«è¨è¿°ã®çæ
+		$section_dscr = SECTION_DESCRIPTION(MO.SECTION[moid])$
+		$IF MO.TYPE[moid] == TOPPERS_ATTSEC$
+			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+                $reg$.append("$MO.SECTION[moid]$.R")$NL$
+                $reg_initdata$.append("$MO.SECTION[moid]$")$NL$
+                $ROMtoRAMsection$.append($FORMAT("\'%1%=%1%.R\'", MO.SECTION[moid])$)$NL$
+            $ELSE$
+                $reg$.append("$MO.SECTION[moid]$")$NL$
+            $END$
+		$ELSE$
+$           // ã¦ã¼ã¶ã¹ã¿ãã¯é å 
+			$reg$.append("$MO.SECTION[moid]$")$NL$
+		$END$
+
+$		// ã¢ã©ã¤ã³è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x20) != 0$
+			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+                $AlignSection$.append("$MO.SECTION[moid]$.R")$NL$
+            $END$
+            $AlignSection$.append("$MO.SECTION[moid]$")$NL$
+		$END$
+
+$		// ã¡ã¢ãªãªã¼ã¸ã§ã³æ«ã§ã¢ã©ã¤ã³ãããããã®ããã¼ã»ã¯ã·ã§ã³ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x80) != 0$
+			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+                $AlignSection$.append("$MO.SECTION[moid]$.R")$NL$
+            $END$
+            $AlignSection$.append("$MO.SECTION[moid]$")$NL$
+		$END$
+
+        $preid = moid$
+	$END$
+$END$
+$NL$
+
+# preprocess for OsLinkSection$NL$
+$FOREACH lsid RANGE(1, numls)$
+    $REG.REGNAME[LNKSEC.MEMREG[lsid]]$.append("$LNKSEC.SECTION[lsid]$")$NL$
+$END$
+$NL$
+
+sections = ""$NL$
+$FOREACH regid REG.ORDER_LIST$
+    if sections != "":$NL$
+    $TAB$sections += ","$NL$
+    sections += ",".join($REG.REGNAME[regid]$)$NL$
+    sections += $FORMAT("\"/%x\"", +REG.BASE[regid])$$NL$ 
+$END$
+
+$NL$
+wd_abs_path = os.path.abspath('..')$NL$
+project.Change(wd_abs_path + r'\atk2-sc3.mtpj')$NL$
+project.Close(True)$NL$
+inputstr = ReadFile('../atk2-sc3.mtpj')$NL$
+print sections$NL$
+# build.Link.SectionStartAddress = sections$NL$
+inputstr = NewSetItemXml(inputstr, 'LinkOptionStart-0', sections)$NL$
+inputstr = ChangeItemXml(inputstr, 'LinkOptionStart-0', sections)$NL$
+print $ROMtoRAMsection$$NL$
+# build.Link.SectionROMtoRAM = $ROMtoRAMsection$$NL$
+inputstr = NewSetItemXml(inputstr, 'LinkOptionRom-0', "\n".join($ROMtoRAMsection$))$NL$
+inputstr = ChangeItemXml(inputstr, 'LinkOptionRom-0', "\n".join($ROMtoRAMsection$))$NL$
+print sorted(set($AlignSection$), key=$AlignSection$.index)$NL$
+# build.Link.SectionAlignment = sorted(set($AlignSection$), key=$AlignSection$.index)$NL$
+inputstr = NewSetItemXml(inputstr, 'LinkOptionAlignedSection-0', 
+            "\n".join(sorted(set($AlignSection$), key=$AlignSection$.index)))$NL$
+inputstr = ChangeItemXml(inputstr, 'LinkOptionAlignedSection-0', 
+            "\n".join(sorted(set($AlignSection$), key=$AlignSection$.index)))$NL$
+WriteFile('../atk2-sc3.mtpj', inputstr)$NL$
+$NL$
+inputstr = ReadFile('../cfg_pass4/cfg_pass4.mtsp')$NL$
+print sections$NL$
+# build.Link.SectionStartAddress = sections$NL$
+inputstr = NewSetItemXml(inputstr, 'LinkOptionStart-0', sections)$NL$
+inputstr = ChangeItemXml(inputstr, 'LinkOptionStart-0', sections)$NL$
+print $ROMtoRAMsection$$NL$
+# build.Link.SectionROMtoRAM = $ROMtoRAMsection$$NL$
+inputstr = NewSetItemXml(inputstr, 'LinkOptionRom-0', "\n".join($ROMtoRAMsection$))$NL$
+inputstr = ChangeItemXml(inputstr, 'LinkOptionRom-0', "\n".join($ROMtoRAMsection$))$NL$
+print sorted(set($AlignSection$), key=$AlignSection$.index)$NL$
+# build.Link.SectionAlignment = sorted(set($AlignSection$), key=$AlignSection$.index)$NL$
+inputstr = NewSetItemXml(inputstr, 'LinkOptionAlignedSection-0', 
+            "\n".join(sorted(set($AlignSection$), key=$AlignSection$.index)))$NL$
+inputstr = ChangeItemXml(inputstr, 'LinkOptionAlignedSection-0', 
+            "\n".join(sorted(set($AlignSection$), key=$AlignSection$.index)))$NL$
+WriteFile('../cfg_pass4/cfg_pass4.mtsp', inputstr)$NL$
+$NL$
+wd_abs_path = os.path.abspath('..')$NL$
+project.Open(wd_abs_path + r'\atk2-sc3.mtpj')$NL$
+project.Change(wd_abs_path + r'\cfg\cfg.mtsp')$NL$
+$NL$
+
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_atk2.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_atk2.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_atk2.py	(revision 172)
@@ -0,0 +1,146 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: post_atk2.py 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+import subprocess
+import os
+import sys
+import re  # for regular expression
+import shutil
+
+# set relative path from top proj
+proj_rel_dir = ""
+
+# call definition file
+common.Source("./def.py")
+
+# path
+src_abs_path = os.path.abspath(SRCDIR)
+
+# call common file
+common.Source(src_abs_path + "/arch/ccrh/common.py")
+
+#
+# convert map file
+#
+inputfile = open("./DefaultBuild/atk2-sc1.map")
+outputfile = open("./DefaultBuild/atk2-sc1.syms", 'w')
+
+r = re.compile("^\s+([0-9a-f]+)\s+[0-9a-f]+\s+\w+\s+,\w+\s+\*\s+")
+line = inputfile.readline() 
+pre_line = line
+while line:
+    line = line.replace('\r\n','')   #delete newline
+    m = r.search(line)
+    if m:
+        outputfile.write(m.group(1) + " T " + pre_line + "\n")
+    pre_line = line
+    line = inputfile.readline()
+
+inputfile.close()
+outputfile.close()
+
+#
+# copy pass 1 generated files
+#
+print "Copy pass 1 generated file"
+shutil.copy("./cfg/cfg1_out.srec", ".")
+shutil.copy("./cfg/cfg1_out.syms", ".")
+shutil.copy("./cfg/cfg2_out.tf", ".")
+
+#
+# Execute cfg path 3
+#
+# make command
+cfg_command = cfg + " --pass 3 " + "--kernel " + CFG_KERNEL 
+cfg_command += " --api-table " + cfg_api_table
+cfg_command += " " + cfg_cfg1_def_tables + cfg_includes 
+cfg_command += " --rom-image ./DefaultBuild/atk2-sc1.srec --symbol-table ./DefaultBuild/atk2-sc1.syms"
+cfg_command += " -T " + cfg_check_tf
+cfg_command += " --ini-file " + cfg_ini_file
+cfg_command += " " + cfg_input_str
+
+print cfg_command
+
+# Execute 
+try:
+   output = subprocess.check_output(cfg_command, stderr=subprocess.STDOUT,)
+except subprocess.CalledProcessError, e:
+    print "ERROR!! : ", e.output
+    sys.exit()
+
+output.replace('\r','')
+print output
+
+#
+# dlete pass 1 generated files
+#
+print "Delete pass 1 generated file"
+os.remove("cfg1_out.srec")
+os.remove("cfg1_out.syms")
+os.remove("cfg2_out.tf")
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_cfg.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_cfg.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_cfg.py	(revision 172)
@@ -0,0 +1,178 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: post_cfg.py 181 2015-06-12 10:02:03Z t_ishikawa $
+#
+
+import subprocess
+import os
+import sys
+import re  # for regular expression
+import shutil
+import os.path
+
+# set relative path from top proj
+proj_rel_dir = "../"
+
+# call definition file
+common.Source(proj_rel_dir + "def.py")
+
+# path
+src_abs_path = os.path.abspath(proj_rel_dir + SRCDIR)
+
+# call common file
+common.Source(src_abs_path + "/arch/ccrh/common.py")
+
+#
+# convert map file
+#
+inputfile = open("./DefaultBuild/cfg.map")
+outputfile = open("cfg1_out.syms", 'w')
+
+r = re.compile("^\s+([0-9a-f]+)\s+[0-9a-f]+\s+\w+\s+,\w+\s+\*\s+")
+line = inputfile.readline() 
+pre_line = line
+while line:
+    line = line.replace('\r\n','')   #delete newline
+    m = r.search(line)
+    if m:
+        outputfile.write(m.group(1) + " T " + pre_line + "\n")
+    pre_line = line
+    line = inputfile.readline()
+
+inputfile.close()
+outputfile.close()
+
+# remove Os_Lcfg.c
+if os.path.isfile('Os_Lcfg.c'):
+	os.remove('Os_Lcfg.c')
+
+#
+# Execute cfg path 2
+#
+# make command
+cfg_command = cfg + " --pass 2 " + "--kernel " + CFG_KERNEL 
+cfg_command += " --api-table " + cfg_api_table
+cfg_command += " " + cfg_cfg1_def_tables + cfg_includes 
+cfg_command += " -T " + cfg_tf
+cfg_command += " --ini-file " + cfg_ini_file
+cfg_command += " " + cfg_input_str
+
+print cfg_command
+
+# Execute 
+try:
+   output = subprocess.check_output(cfg_command, stderr=subprocess.STDOUT,)
+except subprocess.CalledProcessError, e:
+    print "ERROR!! : ", e.output
+    sys.exit()
+
+output.replace('\r','')
+print output
+
+#
+# mov Os_Cfg_tmp.h Os_Cfg.h
+#
+import filecmp
+if not os.path.isfile(r'Os_Cfg.h'):
+	print "Rename Os_Cfg_tmp.h to Os_Cfg.h"
+	shutil.move("Os_Cfg_tmp.h", "Os_Cfg.h")
+else:
+	print "compare Os_Cfg_tmp.h and Os_Cfg.h"
+	if not filecmp.cmp(r'Os_Cfg_tmp.h', r'Os_Cfg.h'):
+		print "Rename Os_Cfg_tmp.h to Os_Cfg.h"
+		shutil.move("Os_Cfg_tmp.h", "Os_Cfg.h")
+	else:
+		print "Delete Os_Cfg_tmp.h"
+		os.remove("Os_Cfg_tmp.h")
+
+#
+# Execute cfg path 3
+#
+# make command
+cfg_command = cfg + " --pass 3 " + "--kernel " + CFG_KERNEL 
+cfg_command += " --api-table " + cfg_api_table
+cfg_command += " " + cfg_cfg1_def_tables + cfg_includes 
+cfg_command += " --rom-image cfg1_out.srec --symbol-table cfg1_out.syms"
+cfg_command += " -T " + cfg_offset_tf
+cfg_command += " --ini-file " + cfg_ini_file
+cfg_command += " " + cfg_input_str
+
+
+print cfg_command
+
+# Execute 
+try:
+   output = subprocess.check_output(cfg_command, stderr=subprocess.STDOUT,)
+except subprocess.CalledProcessError, e:
+    print "ERROR!! : ", e.output
+    sys.exit()
+
+output.replace('\r','')
+print output
+
+common.Source("./ldscript.py")
+
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_cfg_pass4.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_cfg_pass4.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/post_cfg_pass4.py	(revision 172)
@@ -0,0 +1,140 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: post_cfg_pass4.py 181 2015-06-12 10:02:03Z t_ishikawa $
+#
+
+import subprocess
+import os
+import sys
+import re  # for regular expression
+import shutil
+
+# set relative path from top proj
+proj_rel_dir = "../"
+
+# call definition file
+common.Source(proj_rel_dir + "def.py")
+
+# path
+src_abs_path = os.path.abspath(proj_rel_dir + SRCDIR)
+
+# call common file
+common.Source(src_abs_path + "/arch/ccrh/common.py")
+
+#
+# convert map file
+#
+inputfile = open("./DefaultBuild/cfg_pass4.map")
+outputfile = open("./DefaultBuild/cfg_pass4.syms", 'w')
+
+r = re.compile("^\s+([0-9a-f]+)\s+[0-9a-f]+\s+\w+\s+,\w+\s+\*\s+")
+line = inputfile.readline() 
+pre_line = line
+while line:
+    line = line.replace('\r\n','')   #delete newline
+    m = r.search(line)
+    if m:
+        outputfile.write(m.group(1) + " T " + pre_line + "\n")
+    pre_line = line
+    line = inputfile.readline()
+
+inputfile.close()
+outputfile.close()
+
+#
+# copy pass 1 generated files
+#
+print "Copy pass 1 generated file"
+shutil.copy("../cfg/cfg1_out.srec", ".")
+shutil.copy("../cfg/cfg1_out.syms", ".")
+shutil.copy("../cfg/cfg2_out.tf", ".")
+shutil.copy("../cfg/cfg2_out.tf", "./cfg3_out.tf")
+
+#
+# Execute cfg path 3
+#
+# make command
+cfg_command = cfg + " --pass 4 " + "--kernel " + CFG_KERNEL 
+cfg_command += " --api-table " + cfg_api_table
+cfg_command += " " + cfg_cfg1_def_tables + cfg_includes 
+cfg_command += " --rom-image ./DefaultBuild/cfg_pass4.srec --symbol-table ./DefaultBuild/cfg_pass4.syms"
+cfg_command += " -T " + cfg_mem_tf
+cfg_command += " --ini-file " + cfg_ini_file
+cfg_command += " " + cfg_input_str
+
+print cfg_command
+
+# Execute 
+try:
+   output = subprocess.check_output(cfg_command, stderr=subprocess.STDOUT,)
+except subprocess.CalledProcessError, e:
+    print "ERROR!! : ", e.output
+    sys.exit()
+
+output.replace('\r','')
+print output
+
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/pre_cfg.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/pre_cfg.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/pre_cfg.py	(revision 172)
@@ -0,0 +1,105 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: pre_cfg.py 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+import subprocess
+import os
+import sys
+
+# set relative path from top proj
+proj_rel_dir = "../"
+
+# call definition file
+common.Source(proj_rel_dir + "def.py")
+
+# path
+src_abs_path = os.path.abspath(proj_rel_dir + SRCDIR)
+
+# call common file
+common.Source(src_abs_path + "/arch/ccrh/common.py")
+
+#
+# make command
+#
+cfg_command = cfg + " --pass 1 " + "--kernel " + CFG_KERNEL 
+cfg_command += " --api-table " + cfg_api_table
+cfg_command += " " + cfg_cfg1_def_tables + cfg_includes 
+cfg_command += " --ini-file " + cfg_ini_file
+cfg_command += " " + cfg_input_str
+
+print cfg_command
+
+#
+# Execute cfg path 1
+#
+try:
+   output = subprocess.check_output(cfg_command, stderr=subprocess.STDOUT,)
+except subprocess.CalledProcessError, e:
+    print "ERROR!! : ", e.output
+
+print output
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/Rte_Type.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/Rte_Type.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/Rte_Type.h	(revision 172)
@@ -0,0 +1,75 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Rte_Type.h 115 2014-12-10 01:33:17Z t_ishikawa $
+ */
+
+/*
+ *  ãµã³ãã«ç¨ããããã¡ã¤ã«(Rte_Type.hã¯RTEã¸ã§ãã¬ã¼ã¿ãçæãã)
+ */
+
+#ifndef RTE_TYPE_H
+#define RTE_TYPE_H
+
+#endif /* RTE_TYPE_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample.h	(revision 172)
@@ -0,0 +1,134 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample.h 115 2014-12-10 01:33:17Z t_ishikawa $
+ */
+
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã ã®å
+±éããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE_H
+#define TOPPERS_SAMPLE_H
+
+#include "Os.h"
+#include "t_syslog.h"
+#include "t_stdlib.h"
+#include "sysmod/serial.h"
+#include "sysmod/syslog.h"
+
+#include "sysmod/banner.h"
+#include "target_sysmod.h"
+#include "target_serial.h"
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®å®ç¾©
+ */
+#include "target_test.h"
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  ãã©ã¡ã¼ã¿æ§é ä½ã®å®ç¾©
+ *  ä¿¡é ¼é¢æ°æä¾è
+ãããããã¡ã¤ã«ã§æä¾ãã
+ */
+struct parameter_struct {
+	sint32		*name1;
+	sint32		name2;
+	TaskType	task_no;
+	StatusType	ercd;
+	StatusType	return_value;   /* è¿æ»å¤ã¯æ§é ä½ã«å«ã */
+};
+
+extern void TaskProk(uint8 task_no);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.arxml	(revision 172)
@@ -0,0 +1,2322 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>ImplementationDataTypes</SHORT-NAME>
+			<ELEMENTS>
+				<IMPLEMENTATION-DATA-TYPE>
+					<SHORT-NAME>uint8</SHORT-NAME>
+					<CATEGORY>VALUE</CATEGORY>
+				</IMPLEMENTATION-DATA-TYPE>
+			</ELEMENTS>
+		</AR-PACKAGE>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>sample1.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>sample2.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsOS</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsStackMonitoring</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsUseGetServiceId</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsUseParameterAccess</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsScalabilityClass</DEFINITION-REF>
+									<VALUE>SC3</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsStatus</DEFINITION-REF>
+									<VALUE>EXTENDED</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsHooks</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsErrorHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPostTaskHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPreTaskHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsProtectionHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsShutdownHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsStartupHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsHookStack</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack/OsHookStackSize</DEFINITION-REF>
+											<VALUE>512</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>TskLevelRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>STANDARD</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>CntRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>STANDARD</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>GroupRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>INTERNAL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NonPriTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task6</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_00</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task7</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_00</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>14</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>HighPriorityTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>15</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>4</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>7</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T2Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainCycArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActTskArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmActivateTask</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>12</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T3Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task4</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>6</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/GroupRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>scheduletable1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration</DEFINITION-REF>
+									<VALUE>60</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_0</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>20</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T10Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableSync</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy</DEFINITION-REF>
+											<VALUE>NONE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task5</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/GroupRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>scheduletable2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration</DEFINITION-REF>
+									<VALUE>50</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_0</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>20</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>30</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_2</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>40</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableSync</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy</DEFINITION-REF>
+											<VALUE>NONE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SetEvtArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task3</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T3Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleAlm1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmIncrementCounter</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter/OsAlarmIncrementCounterRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SchtblSampleCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleAlm2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task10</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T10Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task11</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task12</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task13</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_1</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task14</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_1</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask4</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainEvt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T2Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T3Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsEvent/OsEventMask</DEFINITION-REF>
+									<VALUE>65536</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T10Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T11Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T12Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>KT_osap1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NonPriTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task6</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task7</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt1</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt2</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt2</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt3</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt3</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt4</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt4</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>actioctask3</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_actioctask3</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>KT_osap2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask4</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecu/Os/sdata_trusted</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>actioctask4</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_actioctask4</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NT_osap1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/HighPriorityTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task4</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task5</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task13</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task14</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainCycArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActTskArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SetEvtArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleAlm1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleAlm2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/scheduletable1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/scheduletable2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecu/Os/sbss_nt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsLinkSection</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionName</DEFINITION-REF>
+									<VALUE>.stack_section</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>text_shared</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.text</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>const_shared</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.const</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>data_shared</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.data</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>DATA</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>sdata_trusted</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.sdata</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>DATA</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>bss_shared</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.bss</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>BSS</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>sbss_nt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.sbss</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>BSS</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task8</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>592</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task9</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>768</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActOtherOSAPTskArmCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActOtherOSAPTskArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArmCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmActivateTask</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task4</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>5</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>0</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NT_osap2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task8</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task9</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArmCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IOC</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc</DEFINITION-REF>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>IOC_QUE</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocBufferLength</DEFINITION-REF>
+											<VALUE>3</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_DATA</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_RCV</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_SND0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_SND1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>IOC_DEQUE</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>10</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>2</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>20</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_RCV</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap2</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_SND</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.arxml.true
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.arxml.true	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.arxml.true	(revision 172)
@@ -0,0 +1,2330 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>ImplementationDataTypes</SHORT-NAME>
+			<ELEMENTS>
+				<IMPLEMENTATION-DATA-TYPE>
+					<SHORT-NAME>uint8</SHORT-NAME>
+					<CATEGORY>VALUE</CATEGORY>
+				</IMPLEMENTATION-DATA-TYPE>
+			</ELEMENTS>
+		</AR-PACKAGE>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>sample1.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>sample2.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsOS</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsStackMonitoring</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsUseGetServiceId</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsUseParameterAccess</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsScalabilityClass</DEFINITION-REF>
+									<VALUE>SC3</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsMemoryProtectionLevel</DEFINITION-REF>
+									<VALUE>Level2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsViolationHandlingLevel</DEFINITION-REF>
+									<VALUE>Level2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsStatus</DEFINITION-REF>
+									<VALUE>EXTENDED</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsHooks</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsErrorHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPostTaskHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPreTaskHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsProtectionHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsShutdownHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsStartupHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsHookStack</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack/OsHookStackSize</DEFINITION-REF>
+											<VALUE>0x200</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>TskLevelRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>STANDARD</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>CntRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>STANDARD</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>GroupRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>INTERNAL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NonPriTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task6</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_00</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task7</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_00</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>14</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>HighPriorityTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>15</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>4</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>7</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T2Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainCycArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActTskArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmActivateTask</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>12</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T3Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task4</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>6</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/GroupRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>scheduletable1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration</DEFINITION-REF>
+									<VALUE>60</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_0</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>20</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T10Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableSync</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy</DEFINITION-REF>
+											<VALUE>NONE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task5</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/GroupRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>scheduletable2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration</DEFINITION-REF>
+									<VALUE>50</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_0</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>20</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>30</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_2</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>40</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableSync</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy</DEFINITION-REF>
+											<VALUE>NONE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SetEvtArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task3</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T3Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleAlm1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmIncrementCounter</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter/OsAlarmIncrementCounterRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SchtblSampleCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleAlm2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task10</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T10Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task11</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task12</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task13</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_2</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task14</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_2</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask4</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainEvt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T2Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T3Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsEvent/OsEventMask</DEFINITION-REF>
+									<VALUE>65536</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T10Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T11Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T12Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>KT_osap1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NonPriTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task6</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task7</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt1</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt2</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt2</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt3</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt3</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt4</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt4</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>actioctask3</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_actioctask3</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>KT_osap2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask4</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecu/Os/sdata_trusted</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>actioctask4</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_actioctask4</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NT_osap1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/HighPriorityTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task4</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task5</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task13</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task14</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainCycArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActTskArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SetEvtArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleAlm1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleAlm2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/scheduletable1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/scheduletable2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecu/Os/sbss_nt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsLinkSection</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionName</DEFINITION-REF>
+									<VALUE>.stack_section</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>text_shared</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.text</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>const_shared</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.const</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>data_shared</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.data</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>DATA</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>sdata_trusted</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.sdata</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>DATA</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>bss_shared</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.bss</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>BSS</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>sbss_nt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.sbss</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>BSS</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task8</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x250</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task9</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>0x300</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>0x200</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActOtherOSAPTskArmCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActOtherOSAPTskArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArmCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmActivateTask</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task4</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>5</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>0</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NT_osap2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task8</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task9</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArmCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IOC</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc</DEFINITION-REF>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>IOC_QUE</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocBufferLength</DEFINITION-REF>
+											<VALUE>3</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_DATA</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_RCV</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_SND0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_SND1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>IOC_DEQUE</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>10</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>2</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>20</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_RCV</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap2</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_SND</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.c	(revision 172)
@@ -0,0 +1,1470 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)æ½¤ãª(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample1.c 181 2015-06-12 10:02:03Z t_ishikawa $
+ */
+
+/*
+ *		ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®æ¬ä½
+ *
+ *  ATK2-SC3ã®åºæ¬çãªåä½ãç¢ºèªããããã®ãµã³ãã«ãã­ã°ã©ã ï¼
+ *
+ *  ãã­ã°ã©ã ã®æ¦è¦ï¼PCã¨ãã¼ãéã§ã·ãªã¢ã«éä¿¡ãè¡ãï¼ã¦ã¼ã¶å
+¥å
+ *  ã³ãã³ãã«å¿ããåä½ã¨ã­ã°åºåãè¡ãªãï¼
+ *
+ *  ï¼ã³ãã³ãä¸è¦§ï¼
+ *  ã»ã¿ã¹ã¯æå®
+ *    '1' : ä»¥éã®ã³ãã³ãã Task1 ã«å¯¾ãã¦è¡ã
+ *    '2' : ä»¥éã®ã³ãã³ãã Task2 ã«å¯¾ãã¦è¡ã
+ *    '3' : ä»¥éã®ã³ãã³ãã Task3 ã«å¯¾ãã¦è¡ã
+ *    '4' : ä»¥éã®ã³ãã³ãã Task4 ã«å¯¾ãã¦è¡ã
+ *    '5' : ä»¥éã®ã³ãã³ãã Task5 ã«å¯¾ãã¦è¡ã
+ *    '6' : ä»¥éã®ã³ãã³ãã Task6 ã«å¯¾ãã¦è¡ã
+ *    '7' : ä»¥éã®ã³ãã³ãã Task7 ã«å¯¾ãã¦è¡ã
+ *    '8' : ä»¥éã®ã³ãã³ãã Task8 ã«å¯¾ãã¦è¡ã(ä¸é¨ã¿ã¹ã¯ç®¡çã³ãã³ãä½¿ç¨ã§ããªã)
+ *    '9' : ä»¥éã®ã³ãã³ãã Task9 ã«å¯¾ãã¦è¡ã(ä¸é¨ã¿ã¹ã¯ç®¡çã³ãã³ãä½¿ç¨ã§ããªã)
+ *  ã»ã¿ã¹ã¯ç®¡çæ©è½
+ *    'a' : ActivateTask ã«ã¦ã¿ã¹ã¯ãèµ·åããï¼
+ *    'A' : TerminateTask ã«ã¦ã¿ã¹ã¯ãçµäºããï¼
+ *    '!'(Shift+1) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task1 ãèµ·åãã
+ *    '"'(Shift+2) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task2 ãèµ·åãã
+ *    '#'(Shift+3) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task3 ãèµ·åãã
+ *    '$'(Shift+4) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task4 ãèµ·åãã
+ *    '%'(Shift+5) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task5 ãèµ·åãã
+ *    's' : ãã³ããªã¨ã³ããã£ãå±æ§ã§ããã¿ã¹ã¯ MainTask ã«ã¦æé«
+ *          åªå
+åº¦ã¿ã¹ã¯ HighPriorityTask ãèµ·åãï¼Schedule ã«ã¦
+ *          åã¹ã±ã¸ã¥ã¼ãªã³ã°ãè¡ãï¼
+ *    'S' : ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯ NonPriTask ãèµ·åãã
+ *          ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯ NonPriTask ã«ã¦æé«åªå
+åº¦
+ *          ã¿ã¹ã¯ HighPriorityTask ãèµ·åãï¼ã¿ã¹ã¯çµäºãã
+ *    'y' : ã¿ã¹ã¯11(ã¹ã¿ãã¯å
+±æ)ãå¼ã³åºãï¼ä¿¡é ¼é¢æ°ã§å¦çãè¡ã
+ *    'Y' : ã¿ã¹ã¯12(ã¹ã¿ãã¯å
+±æ)ãå¼ã³åºãï¼ä¿¡é ¼é¢æ°ã§å¦çãè¡ã
+ *          ã¿ã¹ã¯ä¸æ­£çµäºã«ããï¼ã¨ã©ã¼ã³ã¼ãã¯E_OS_MISSINGENDã§
+ *          ã¨ã©ã¼ããã¯ãå¼ã°ãã
+ *    'z' : å®è¡ä¸­ã®ã¿ã¹ã¯ãã GetTaskID ãå®è¡ãã¦ï¼å®è¡ç¶æ
+ã® TaskID ãåå¾ãã
+ *    'Z' : ã¡ã¤ã³ã¿ã¹ã¯ãã GetTaskState ãå®è¡ãã¦ï¼å¯¾è±¡ã¿ã¹ã¯ã®ç¶æ
+ãåå¾ãã
+ *    'x' : divå½ä»¤ãå®è¡ãã¦ï¼æªå®ç¾©å½ä»¤ä¾å¤ãçºçããã
+ *  ã»å²è¾¼ã¿ç®¡çæ©è½
+ *    'd' : DisableAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãã¼å¤ã3åè¡¨
+ *          ç¤ºãï¼ EnableAllInterrupts ãå®è¡ãã
+ *    'D' : SuspendAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãã¼å¤ã3åè¡¨
+ *          ç¤ºãï¼ããã« SuspendAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤
+ *          ãã¼å¤ã3åè¡¨ç¤ºãï¼ResumeAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿
+ *          ã¿ã¤ãã¼å¤ã3åè¡¨ç¤ºãï¼ResumeAllInterrupts ãå®è¡ãã
+ *    'f' : SuspendOSInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãã¼å¤ã3åè¡¨
+ *          ç¤ºãï¼ããã« SuspendOSInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤
+ *          ãã¼å¤ã3åè¡¨ç¤ºãï¼ããã« SuspendAllInterruptsãå®è¡
+ *          å¾ï¼å²è¾¼ã¿ã¿ã¤ãã¼å¤ã3åè¡¨ç¤ºãï¼ ResumeAllInterrupts
+ *          ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãã¼å¤ã3åè¡¨ç¤ºãï¼
+ *          ResumeOSInterrupts ãå®è¡å¾å²è¾¼ã¿ã¿ã¤ãã¼å¤ã3åè¡¨ç¤ºãï¼
+ *          ResumeOSInterrupts ãå®è¡ãã
+ *    'T' : å²è¾¼ã¿ã¿ã¤ãã¼å¤ã3åè¡¨ç¤ºãã
+ *  ã»ãªã½ã¼ã¹ç®¡çæ©è½
+ *    'k' : GetResource ã«ã¦ãªã½ã¼ã¹ TskLevelRes ãåå¾ããï¼ãªãï¼
+ *          Task3 ã¯ï¼ãã®ãªã½ã¼ã¹ããåªå
+åº¦ãé«ãããã¨ã©ã¼ã¨ãªã
+ *    'K' : ReleaseResource ã«ã¦ãªã½ã¼ã¹ TskLevelRes ãè§£æ¾ãã
+ *    'i' : GetResource ã«ã¦ãªã½ã¼ã¹ CntRes ãåå¾å¾ï¼å²è¾¼ã¿
+ *          ã¿ã¤ãã¼å¤ã3åè¡¨ç¤ºãï¼ReleaseResource ã«ã¦ãªã½ã¼ã¹
+ *          CntRes ãè§£æ¾ãã
+ *  ã»ã¤ãã³ãå¶å¾¡æ©è½
+ *    'e' : SetEvent ã«ã¦ã¤ãã³ããè¨­å®ããï¼Task2 ã¨ Task3 ä»¥å¤ã¯
+ *          å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'w' : ClearEvent ã«ã¦èªã¿ã¹ã¯ã®ã¤ãã³ããã¯ãªã¢ããï¼Task2 ã¨
+ *          Task3 ä»¥å¤ã¯å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'E' : GetEvent ã«ã¦ã¤ãã³ãç¶æ
+ãåå¾ããï¼Task2 ã¨ Task3
+ *          ä»¥å¤ã¯å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'W' : WaitEvent ã«ã¦èªã¿ã¹ã¯ã®ã¤ãã³ããå¾
+ã¤ï¼Task3 ã¨ Task4
+ *          ä»¥å¤ã¯ã¨ã©ã¼ã¨ãªã
+ *  ã»ã¢ã©ã¼ã æ©è½
+ *    'b' : GetAlarmBase ã«ã¦ã¢ã©ã¼ã  MainCycArm ã®ã¢ã©ã¼ã ãã¼ã¹
+ *          æ
+å ±ãåå¾ãã
+ *    'B' : GetAlarm ã«ã¦ã¢ã©ã¼ã  MainCycArm ã®æ®ãã«ã¦ã³ãå¤ã2å
+ *          é£ç¶ã§åå¾ãã
+ *    'v' : SetRelAlarm ã«ã¦ã¢ã©ã¼ã  ActTskArm ãèµ·åãï¼500ms å¾ã«
+ *          ã¿ã¹ã¯ Task1 ãèµ·åãã
+ *    'V' : SetRelAlarm ã«ã¦ã¢ã©ã¼ã  SetEvtArm ãèµ·åãï¼500ms å¾ã«
+ *          ã¤ãã³ã T3Evt ãè¨­å®ãã
+ *    'h' : CancelAlarm ã«ã¦ã¢ã©ã¼ã  ActTskArm ãã­ã£ã³ã»ã«ãã
+ *  ã»ã«ã¦ã³ã¿æä½æ©è½
+ *    'c' : ã¿ã¹ã¯ã«ã¦ IncrementCounter ãå®è¡ãï¼ã«ã¦ã³ã¿ SampleCnt
+ *          ã«ã·ã°ãã«éç¥ãã
+ *          1 ã·ã°ãã«ã§ã¢ã©ã¼ã  SampleArm ãæºäºãï¼ã³ã¼ã«ããã¯ã
+ *          å®è¡ãã
+ *    'C' : ã¿ã¹ã¯ã«ã¦ IncrementCounter ãå®è¡ãï¼ã«ã¦ã³ã¿ SampleCnt2
+ *          ã«ã·ã°ãã«éç¥ãã
+ *          1 ã·ã°ãã«ã§ã¢ã©ã¼ã  SampleArm1 ãæºäºãï¼SampleCnt3 ã
+ *          ã¤ã³ã¯ãªã¡ã³ãããï¼ SampleCnt3 ã¯ 1 ã·ã°ãã«ã§ SampleAlm2
+ *          ãæºäºãã³ã¼ã«ããã¯ãå®è¡ãã
+ *    'j' : ã¿ã¹ã¯ã«ã¦ GetCounterValue ãå®è¡ãã
+ *          åå¾ããå¤ã¯ä¿å­ãã
+ *    'J' : ã¿ã¹ã¯ã«ã¦ GetEalsedCounterValue ãå®è¡ãã
+ *          å
+ã®å¤ã¯ååã®GetCounterValue ã¾ãã¯ GetEalsedCounterValue ã«ã¦åå¾
+ *          ããå¤ã¨ããï¼ååï¼ã¾ãã¯ï¼GetCounterValueãå®è¡ãã¦ããªãå ´åã¯0
+ *          ã¨ãã
+ *
+ *    'r' : ã¿ã¹ã¯ã«ã¦ GetISRIDãå®è¡ãã
+ *          ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã¯GetISRIDãå¼åºããå ´åã¯ã¨ã©ã¼ã¨ãã¦
+ *          INVALID_ISRãè¿å´ããã
+ *
+ *          å²è¾¼ã¿ã³ã³ãã­ã¹ãããã®GetISRIDçºè¡ã¯ï¼SystemTimerCntã®ã³ã¼ã«ããã¯
+ *          ã«ã¼ãã³ï¼'n' ã³ãã³ãã§å®è¡ï¼ã«ã¦è¡ã
+ *
+ *          ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®GetISRIDçºè¡ã¯ï¼SampleCnt2ã®ã³ã¼ã«ããã¯
+ *          ã«ã¼ãã³ï¼'C' ã¾ãã¯ 'c' ã³ãã³ãã§å®è¡ï¼ã«ã¦è¡ã
+ *
+ *  ã»ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«å¶å¾¡æ©è½
+ *    't' : ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«åä½å¶å¾¡ON/OFF
+ *
+ *        'i' : SchtblSampleCntã«ã¦ã³ã¿ãã¤ã³ã¯ãªã¡ã³ããã
+ *              SchtblSampleCntã«ã¦ã³ã¿ã¯ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®é§åã«ã¦ã³ã¿
+ *        '1' : ä»¥éã®ã³ãã³ãã scheduletable1 ã«å¯¾ãã¦è¡ã(ããã©ã«ãå¤)
+ *        '2' : ä»¥éã®ã³ãã³ãã scheduletable2 ã«å¯¾ãã¦è¡ã
+ *        '3' : ä»¥éã®ã³ãã³ãã scheduletable3(å­å¨ããªãID) ã«å¯¾ãã¦è¡ã
+ *              ã³ãã³ãã®ã¨ã©ã¼ç¢ºèªã«ãä½¿ç¨ãã
+ *        's' : StartScheduleTableRelãå®è¡ãï¼ç¸å¯¾å¤(5)ã§ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãéå§ãã
+ *        'S' : StartScheduleTableAbsãå®è¡ãï¼çµ¶å¯¾å¤(5)ã§ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãéå§ãã
+ *        'f' : StopScheduleTableãå®è¡ãï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãåæ­¢ãã
+ *        'n' : NextScheduleTableãå®è¡ãï¼scheduletable2ã«åæ¿ãã
+ *        'N' : NextScheduleTableãå®è¡ãï¼scheduletable1ã«åæ¿ãã
+ *        'g' : GetScheduleTableStatusãå®è¡ãï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¶æ
+ãåå¾ãã
+ *        'q' : ShutdownOS( E_OK ) OSå®è¡å¶å¾¡æ©è½ã®'q'ã¨åç­æ©è½
+ *        'Q' : ShutdownOS( E_OS_STATE ) OSå®è¡å¶å¾¡æ©è½ã®'Q'ã¨åç­æ©è½
+ *
+ *  ã»OSå®è¡å¶å¾¡æ©è½
+ *    'p' : GetActiveApplicationMode ã«ã¦ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã
+ *          åå¾ãã
+ *    'q' : ShutdownOS ãã³ã¼ã E_OK ã§å®è¡ãï¼ãµã³ãã«ãã­ã°ã©ã ã
+ *          çµäºãã
+ *    'Q' : ShutdownOS ãã³ã¼ã E_OS_STATE ã§å®è¡ãï¼ãµã³ãã«ãã­ã°ã©ã 
+ *          ãçµäºãã
+ *
+ *  ã»IOCéåä¿¡æ©è½
+ *    'I' : IOCéåä¿¡ã¢ã¼ã
+ *
+ *        IOC APIãä½¿ç¨ããã¿ã¹ã¯(IocTaskX)ãé¸æ
+ *        '1' : IocTask1(NT_osap1ã«æå±)
+ *        '2' : IocTask2(NT_osap2ã«æå±)
+ *        '3' : IocTask3(KT_osap1ã«æå±)
+ *        '4' : IocTask4(KT_osap2ã«æå±)
+ *
+ *        IOC APIãé¸æ
+ *        '1' : IocSend_IOC_QUE_0(uint8 in1)
+ *        '2' : IocSend_IOC_QUE_1(uint8 in1)
+ *        '3' : IocWriteGroup_IOC_DEQUE(uint8 in1, uint8 in2, uint8 in3)
+ *        '4' : IocReceive_IOC_QUE(uint8 *out1)
+ *        '5' : IocReadGroup_IOC_DEQUE(uint8 *out1, uint8 *out2, uint8 *out3)
+ *        '6' : IocEmptyQueue_IOC_QUE(void)
+ *
+ *        éä¿¡APIé¸ææï¼éä¿¡ãã¼ã¿ãå
+¥åãã
+ *
+ *  ï¼ãªãã¸ã§ã¯ãä¸è¦§ï¼
+ *  ã»OS
+ *    ã¹ã¿ã¼ãã¢ããããã¯ï¼ä½¿ç¨
+ *    ã·ã£ãããã¦ã³ããã¯ï¼ä½¿ç¨
+ *    ã¨ã©ã¼ããã¯ï¼ä½¿ç¨
+ *    ãã¬ã¿ã¹ã¯ããã¯ï¼æªä½¿ç¨
+ *    ãã¹ãã¿ã¹ã¯ããã¯ï¼æªä½¿ç¨
+ *  ã»ã¿ã¹ã¯
+ *    ã¡ã¤ã³ã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼MainTask
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã³ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode1, AppMode2, AppMode3
+ *      æ¦è¦ï¼ã¦ã¼ã¶ã¤ã³ã¿ãã§ã¼ã¹ï¼ã·ãªã¢ã«IOããã³ãã³ããåä¿¡ãï¼
+ *            ããã«å¯¾å¿ããåä½ãè¡ãªãï¼
+ *            å¨æã¢ã©ã¼ã  MainCycArm ã«ããï¼10msãã¨ã«å¾
+ã¡è§£é¤ã
+ *            ã³ãã³ãã®åä¿¡æç¡ããã¼ãªã³ã°ãã
+ *            ã¤ãã³ãï¼IDï¼MainEvtï¼ãé¢é£ä»ãã¦ãã
+ *    æé«åªå
+åº¦ã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼HighPriorityTask
+ *      åªå
+åº¦ï¼15
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã­ã°ãåºåãã¦çµäºããï¼ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *            ããèµ·åããï¼ããªã¨ã³ãããã¦ãããã©ããã®ç¢ºèªç¨
+ *    ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼NonPriTask
+ *      åªå
+åº¦ï¼1
+ *      å¤éèµ·åæ°ï¼8
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã³ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼èµ·åã­ã°ãåºåãï¼æé«åªå
+åº¦ã¿ã¹ã¯ HighPriorityTask ã
+ *            èµ·åå¾ï¼çµäºã­ã°ãåºåãã¦ã¿ã¹ã¯ãçµäºãã
+ *    ã¿ã¹ã¯1
+ *      ã¿ã¹ã¯IDï¼Task1
+ *      åªå
+åº¦ï¼4
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode2
+ *      å¤éèµ·åæ°ï¼8
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯2
+ *      ã¿ã¹ã¯IDï¼Task2
+ *      åªå
+åº¦ï¼7
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            ã¤ãã³ã T2Evt ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯3
+ *      ã¿ã¹ã¯IDï¼Task3
+ *      åªå
+åº¦ï¼12
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode3
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ã¤ãã³ãå¾
+ã¡ãããã¨ãå¯è½ã§ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            ã¤ãã³ã T3Evt ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯4
+ *      ã¿ã¹ã¯IDï¼Task4
+ *      åªå
+åº¦ï¼6
+ *      å¤éèµ·åæ°ï¼5
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            å
+é¨ãªã½ã¼ã¹ GroupRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯5
+ *      ã¿ã¹ã¯IDï¼Task5
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼5
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            å
+é¨ãªã½ã¼ã¹ GroupRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯6
+ *      ã¿ã¹ã¯IDï¼Task6
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼-
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            SC3ã§ã¯ã·ã¹ãã ã¿ã¹ã¯ã¨ãã¦èµ·å
+ *            èµ·åããããã¨å³æé¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            ä½åº¦èµ·åãã¦ãOKã¨ãªã
+ *            Task7ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯7
+ *      ã¿ã¹ã¯IDï¼Task7
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼-
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            SC3ã§ã¯ã¦ã¼ã¶ã¿ã¹ã¯ã¨ãã¦èµ·å
+ *            èµ·åããããã¨å³æé¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            ä½åº¦èµ·åãã¦ãOKã¨ãªã
+ *            Task6ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯8
+ *      ã¿ã¹ã¯IDï¼Task8
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåããï¼ã¢ã¯ã»ã¹æ¨©éã®ãªãTask1ã«å¯¾ãã¦
+ *            GetTaskState()ãçºè¡ãã¦ï¼ã¨ã©ã¼ããã¯ãä¸ãã
+ *    ã¿ã¹ã¯9
+ *      ã¿ã¹ã¯IDï¼Task9
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¢ã¯ã»ã¹æ¨©éã®ããTask2ã«å¯¾ãã¦
+ *            GetTaskState()ãçºè¡ãã¦ï¼Task2ã®ã¹ãã¼ã¿ã¹ãåºåãã
+ *    ã¿ã¹ã¯10
+ *      ã¿ã¹ã¯IDï¼Task10
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T10Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯11
+ *      ã¿ã¹ã¯IDï¼Task11
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T11Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯12
+ *      ã¿ã¹ã¯IDï¼Task12
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T12Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯13
+ *      ã¿ã¹ã¯IDï¼Task13
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨(ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½)
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *            èµ·åããããä¿¡é ¼é¢æ°å®è¡å¾TerminateTaskã§çµäºãã
+ *            Task12ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯14
+ *      ã¿ã¹ã¯IDï¼Task14
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨(ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½)
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *            èµ·åããããä¿¡é ¼é¢æ°å®è¡å¾é¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            Task11ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    IocTask1
+ *      ã¿ã¹ã¯IDï¼IocTask1
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask2
+ *      ã¿ã¹ã¯IDï¼IocTask2
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask3
+ *      ã¿ã¹ã¯IDï¼IocTask3
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask4
+ *      ã¿ã¹ã¯IDï¼IocTask4
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *
+ *  ã»å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³
+ *    ã·ãªã¢ã«IOåä¿¡å²è¾¼ã¿
+ *      ISRIDï¼RxHwSerialInt
+ *      åªå
+åº¦ï¼2
+ *      ã«ãã´ãªï¼2
+ *      æ¦è¦ï¼ã³ãã³ããåä¿¡ãã
+ *  ã»ãªã½ã¼ã¹
+ *    ã¿ã¹ã¯ã¬ãã«ãªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼TskLevelRes
+ *      ãã­ããã£ï¼æ¨æº
+ *    ã¿ã¹ã¯ç¨ã«ã¦ã³ã¿ãªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼CntRes
+ *      ãã­ããã£ï¼æ¨æº
+ *    ã¿ã¹ã¯ã°ã«ã¼ããªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼GroupRes
+ *      ãã­ããã£ï¼å
+é¨
+ *  ã»ã¤ãã³ã
+ *    ã¡ã¤ã³ã¿ã¹ã¯ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼MainEvt
+ *    ã¿ã¹ã¯2ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼T2Evt
+ *    ã¿ã¹ã¯3ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼T3Evt
+ *  ã»ã«ã¦ã³ã¿
+ *    ã·ã¹ãã ã¿ã¤ãã«ã¦ã³ã¿
+ *      ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã«ã¦ã³ãå¤ï¼0æ½¤ãª999
+ *      å ç®å¤ï¼1
+ *    ãµã³ãã«ã«ã¦ã³ã¿
+ *      ã«ã¦ã³ã¿IDï¼SampleCnt
+ *      ã«ã¦ã³ãå¤ï¼0æ½¤ãª99
+ *      å ç®å¤ï¼10
+ *  ã»ã¢ã©ã¼ã 
+ *    ã¡ã¤ã³å¨æã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼MainCycArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¤ãã³ãè¨­å® MainEvt
+ *      èªåèµ·åï¼AppMode1, AppMode2, AppMode3
+ *      è¨­å®ï¼ã«ã¦ã³ã¿100ï¼å¨æ100
+ *    ã¿ã¹ã¯èµ·åã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼ActTskArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¿ã¹ã¯èµ·å Task1
+ *      èªåèµ·åï¼ãªã
+ *    ã¤ãã³ãè¨­å®ã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼SetEvtArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¤ãã³ãè¨­å® T3Evt
+ *      èªåèµ·åï¼ãªã
+ *    IncrementCounterç¢ºèªç¨ã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼SampleArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼SampleCnt
+ *      ã¢ã¯ã·ã§ã³ï¼ã³ã¼ã«ããã¯é¢æ°å®è¡
+ *      èªåèµ·åï¼ãªã
+ *    ä»OSAPæå±ã¿ã¹ã¯èµ·åã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼ActOtherOSAPTskArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼SchtblSampleCnt
+ *      ã¢ã¯ã·ã§ã³ï¼ã¿ã¹ã¯èµ·å Task4
+ *      èªåèµ·åï¼AppMode1, AppMode2, AppMode3
+ *      è¨­å®ï¼ã«ã¦ã³ã¿5ï¼å¨æ0(åçº)
+ *  ã»ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ã
+ *    èªåèµ·åãªãã¢ã¼ã(MainTaskã®ã¿èªåèµ·å)
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode1
+ *    Task1èªåèµ·åã¢ã¼ã
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode2
+ *    Task3èªåèµ·åã¢ã¼ã
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode3
+ *  ã»ä¿¡é ¼é¢æ°
+ *    ä¿¡é ¼é¢æ°tfnt1
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *      ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ *    ä¿¡é ¼é¢æ°tfnt2
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *      ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ *    ä¿¡é ¼é¢æ°tfnt3
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããã®ShutdownOSã
+ *      åãä»ãã
+ *    ä¿¡é ¼é¢æ°tfnt4
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããä¿¡é ¼OSã¢ããª
+ *      ã±ã¼ã·ã§ã³ã«æå±ããã¿ã¹ã¯ãèµ·åãã
+ *
+ *  æ¬ãã¡ã¤ã«ã¯ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«
+ *  æå±ãã¦ãããªãã¸ã§ã¯ã,sample2.cã§ã¯
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ãã¦ãã
+ *  ãªãã¸ã§ã¯ããè¨è¿°ãã¦ãã
+ */
+
+#define TOPPERS_SVC_FUNCCALL
+
+#include "sample.h"
+#include "sample1.h"
+#include "Ioc.h"
+#include "target_hw_counter.h"
+
+#define GetAppModeInfo()	(0)
+
+/*
+ *  ãã­ãã¯ã·ã§ã³çºçæã®å¦çã¬ãã«
+ */
+#ifdef CFG_USE_PROTECTIONHOOK
+static const char8	*faulty_context_tbl[5] = {
+	"FC_INVALID",
+	"FC_TASK",
+	"FC_C2ISR",
+	"FC_SYSTEM_HOOK",
+	"FC_TRUSTED_FUNC"
+};
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+/*
+ *  ãã¡ã¤ã«åï¼è¡çªå·ã®åç
+§ç¨ã®å¤æ°
+ */
+extern const char8	*fatal_file_name;   /* ãã¡ã¤ã«å */
+extern sint32		fatal_line_num;     /* è¡çªå· */
+
+/*
+ *  å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+sint32 main(void);
+
+#pragma section kernel
+StackType stack_00[COUNT_STK_T(0x200)];
+#pragma section default
+
+#pragma section gp_disp16
+uint8 sbss_test;
+uint8 sdata_test = 100;
+#pragma section default
+
+extern uint8 GetCommand(void);
+extern void PutActTsk(uint8 task_no);
+extern void PutActNonPriTsk(void);
+extern void PutTermTsk(uint8 task_no);
+extern void PutChainTsk(uint8 from_task_no, uint8 to_task_no);
+extern void PutSchedule(void);
+extern void PutTaskID(void);
+extern void PutTaskState(uint8 task_no);
+extern void PutDisAllInt(void);
+extern void PutSusAllInt(void);
+extern void PutSusOSInt(void);
+extern void PutHwCnt3(void);
+extern void PutGetCntRes(void);
+extern void PutGetTskRes(void);
+extern void PutRelTskRes(void);
+extern void PutSetEvt(uint8 task_no);
+extern void PutClrEvt(uint8 task_no);
+extern void PutGetEvt(uint8 task_no);
+extern void PutWaitEvt(uint8 task_no);
+extern void PutArmBase(void);
+extern void PutArmTick(void);
+extern void PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no);
+extern void PutCanArm(void);
+extern void PutAppMode(void);
+extern void PutActIocTsk(void);
+extern void schedule_table_sample_routine(void);
+
+TASK(IocTask3);
+TASK(IocTask4);
+static void IocProk2(void);
+static uint8 GetCommandNoWait1(void);
+
+/*
+ *  å
+é¨ãã¼ã¿ãããã¡
+ */
+extern volatile uint8 command_tbl[14];                   /* ã³ãã³ãå¼æ¸¡ããã¼ãã« */
+
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#define error_log_ioc(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+
+#define	error_log_ioc(api)										   \
+	{															   \
+		StatusType ercd;										   \
+		ercd = api;     /* åAPIå®è¡ */							   \
+		if (ercd != E_OK) {										   \
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd)); \
+		}														   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt1
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *    ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt1, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	sint32					*p1;
+	sint32					p2;
+
+	p1 = local->name1;
+	p2 = local->name2;
+
+	local->return_value = (StatusType) ((*p1 * 2) + p2);
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt2
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *    ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt2, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	sint32					*p1;
+	sint32					p2;
+
+	p1 = local->name1;
+	p2 = local->name2;
+
+	local->return_value = (StatusType) ((*p1 * 4) + p2);
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt3
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããã®ShutdownOSã
+ *    åãä»ãã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt3, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	StatusType				ercd;
+
+	ercd = local->ercd;
+	ShutdownOS(ercd);
+
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt4
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããä¿¡é ¼OSã¢ããª
+ *    ã±ã¼ã·ã§ã³ã«æå±ããã¿ã¹ã¯ãèµ·åãã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt4, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	TaskType				task_no;
+
+	task_no = local->task_no;
+
+	error_log(ActivateTask(task_no));
+
+	return(E_OK);
+}
+
+/*
+ *  ã¡ã¤ã³ã¿ã¹ã¯
+ *
+ *  ã¦ã¼ã¶ã³ãã³ãã®åä¿¡ã¨ï¼ã³ãã³ããã¨ã®å¦çå®è¡
+ */
+TASK(MainTask)
+{
+	uint8					command;
+	uint8					task_no;
+	uint32					i;
+	struct parameter_struct	local;
+
+	TickType				val = 0U;
+	TickType				eval = 0U;
+
+	/*
+	 *  ã¿ã¹ã¯çªå·ã»ã³ãã³ããããã¡åæå
+	 */
+	task_no = (uint8) (0);
+	for (i = 0U; i < (sizeof(command_tbl) / sizeof(command_tbl[0])); i++) {
+		command_tbl[i] = 0U;
+	}
+
+	/*
+	 *  MainCycArmãå¨æã¢ã©ã¼ã ã¨ãã¦è¨­å®
+	 */
+	SetRelAlarm(MainCycArm, TICK_FOR_10MS, TICK_FOR_10MS);
+
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+		WaitEvent(MainEvt);     /* 10msã®ä½æ¥­æéå¾
+ã¡ */
+		ClearEvent(MainEvt);
+
+		/*
+		 *  å
+¥åã³ãã³ãåå¾
+		 */
+		syslog(LOG_INFO, "Input Command:");
+		command = GetCommand();
+
+		/*
+		 *  å
+¥åã³ãã³ããã§ãã¯
+		 */
+		if ((command <= (uint8) (0x1fU)) || (command >= (uint8) (0x80U))) {
+			syslog(LOG_INFO, "Not ASCII character");
+		}
+		else {
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", command);
+#endif /* OMIT_ECHO */
+
+			/*
+			 *  ã³ãã³ãå¤å¥
+			 */
+			switch (command) {
+			case '1':
+			case '2':
+			case '3':
+			case '4':
+			case '5':
+			case '6':
+			case '7':
+			case '8':
+			case '9':
+				/*
+				 *  å¦çå¯¾è±¡ã¿ã¹ã¯ã®å¤æ´
+				 */
+				task_no = (uint8) (command - '1');
+				break;
+			case 'A':
+			case '!':
+			case '"':
+			case '#':
+			case '$':
+			case '%':
+			case 'z':
+			case 'k':
+			case 'K':
+			case 'l':
+			case 'i':
+			case 'w':
+			case 'W':
+				/*
+				 *  ã¿ã¹ã¯ã¸ã®ã³ãã³ãéç¥
+				 */
+				command_tbl[task_no] = command;
+				break;
+			/*
+			 *  ä»¥éã¯ã¡ã¤ã³ã¿ã¹ã¯ã§ã³ãã³ãå¦ç
+			 */
+			case 'a':
+				PutActTsk(task_no);
+				break;
+			case 's':
+				PutSchedule();
+				break;
+			case 'S':
+				PutActNonPriTsk();
+				break;
+			case 'Z':
+				PutTaskState(task_no);
+				break;
+			case 'x':
+				syslog(LOG_INFO, "call RAISE_CPU_EXCEPTION");
+				RAISE_CPU_EXCEPTION;
+				break;
+			case 'd':
+				PutDisAllInt();
+				break;
+			case 'D':
+				PutSusAllInt();
+				break;
+			case 'f':
+				PutSusOSInt();
+				break;
+			case 'T':
+				PutHwCnt3();
+				break;
+			case 'e':
+				PutSetEvt(task_no);
+				break;
+			case 'E':
+				PutGetEvt(task_no);
+				break;
+			case 'b':
+				PutArmBase();
+				break;
+			case 'B':
+				PutArmTick();
+				PutArmTick();
+				break;
+			case 'v':
+				/* SetRelAlarm(ActTskArm, 500, 0)ãå®è¡ */
+				PutSetRel(0U, 0U, 0U);
+				break;
+			case 'V':
+				/* SetRelAlarm(SetEvtArm, 500, 0)ãå®è¡ */
+				PutSetRel(1U, 0U, 0U);
+				break;
+			case 'h':
+				/* CancelAlarm(CallBackArm)ãå®è¡ */
+				PutCanArm();
+				break;
+			case 'c':
+				syslog(LOG_INFO, "Call IncrementCounter(SampleCnt)");
+				IncrementCounter(SampleCnt);
+				break;
+			case 'C':
+				syslog(LOG_INFO, "Call IncrementCounter(SampleCnt2)");
+				IncrementCounter(SampleCnt2);
+				break;
+			case 'j':
+				syslog(LOG_INFO, "GetCounterValue(MAIN_HW_COUNTER, val)");
+				GetCounterValue(MAIN_HW_COUNTER, &val);
+				syslog(LOG_INFO, " val = %d", val);
+				break;
+			case 'J':
+				syslog(LOG_INFO, "Pre val = %d", val);
+				syslog(LOG_INFO, "GetElapsedValue(MAIN_HW_COUNTER, val ,eval)");
+				GetElapsedValue(MAIN_HW_COUNTER, &val, &eval);
+				syslog(LOG_INFO, " val = %d", val);
+				syslog(LOG_INFO, " eval = %d", eval);
+				break;
+			case 'r':
+				syslog(LOG_INFO, "GetISRID() Call from Task Context");
+				syslog(LOG_INFO, "GetISRID() = %d", GetISRID());
+				break;
+			case 'p':
+				PutAppMode();
+				break;
+			case 't':
+				schedule_table_sample_routine();
+				break;
+			case 'q':
+				local.ercd = E_OK;
+				CallTrustedFunction(tfnt3, &local); /* ShutdownOS( E_OK ) */
+				break;
+			case 'Q':
+				local.ercd = E_OS_STATE;
+				CallTrustedFunction(tfnt3, &local); /* ShutdownOS( E_OS_STATE ) */
+				break;
+			case 'y':
+				PutActTsk(10U);
+				break;
+			case 'Y':
+				PutActTsk(11U);
+				break;
+			case 'I':
+				PutActIocTsk();
+				break;
+			default:
+				/* ä¸è¨ã®ã³ãã³ãä»¥å¤ã®å ´åï¼å¦çãè¡ããªã */
+				break;
+			}
+		}
+	}
+
+	/*
+	 *  ããã«ã¯ããªã
+	 */
+	syslog(LOG_INFO, "MainTask TERMINATE");
+	error_log(TerminateTask());
+}   /* TASK( MainTask ) */
+
+/*
+ *  ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *
+ *  å®è¡ä¸­ã¯ããªã¨ã³ããããªããã¨ã®ç¢ºèªç¨
+ */
+TASK(NonPriTask)
+{
+	syslog(LOG_INFO, "NonPriTask ACTIVATE");
+	syslog(LOG_INFO, "Call ActivateTask(HighPriorityTask)");
+	error_log(ActivateTask(HighPriorityTask));
+	syslog(LOG_INFO, "NonPriTask TERMINATE");
+
+	error_log(TerminateTask());
+}   /* TASK( NonPriTask ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯6
+ */
+TASK(Task6)
+{
+	TaskProk(5U);
+}   /* TASK( Task6 ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯7
+ */
+TASK(Task7)
+{
+	TaskProk(6U);
+}   /* TASK( Task7 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯3
+ */
+TASK(IocTask3)
+{
+	syslog(LOG_INFO, "IocTask3 ACTIVATE");
+
+	IocProk2();
+
+	syslog(LOG_INFO, "IocTask3 TERMINATE");
+	TerminateTask();
+}   /* TASK( IocTask3 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯4
+ */
+TASK(IocTask4)
+{
+	syslog(LOG_INFO, "IocTask4 ACTIVATE");
+
+	IocProk2();
+
+	syslog(LOG_INFO, "IocTask4 TERMINATE");
+	TerminateTask();
+}   /* TASK( IocTask4 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ */
+static void
+IocProk2(void)
+{
+	uint8			api;        /* ã³ãã³ãåä¿¡ãããã¡(API) */
+	uint8			data[3];    /* éä¿¡ãããã¡ */
+
+	volatile sint32 i;
+	Std_ReturnType	ercd;
+
+	syslog(LOG_INFO, "Select IOC API:");
+	api = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", api);
+#endif /* OMIT_ECHO */
+
+	switch (api) {
+	case '1':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_0");
+		error_log_ioc(IocSend_IOC_QUE_0(data[0]));
+		break;
+	case '2':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_1");
+		error_log_ioc(IocSend_IOC_QUE_1(data[0]));
+		break;
+	case '3':
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "Input send data%d:", i);
+			data[i] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", data[i]);
+#endif /* OMIT_ECHO */
+		}
+		syslog(LOG_INFO, "Call IocWriteGroup_IOC_DEQUE");
+		error_log_ioc(IocWriteGroup_IOC_DEQUE(data[0], data[1], data[2]));
+		break;
+	case '4':
+		syslog(LOG_INFO, "Call IocReceive_IOC_QUE");
+		ercd = IocReceive_IOC_QUE(&data[0]);
+#if !defined(CFG_USE_ERRORHOOK)
+		if (ercd != E_OK) {
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd));
+		}
+#endif /* !defined( CFG_USE_ERRORHOOK ) */
+		if ((ercd == IOC_E_OK) || (ercd == IOC_E_LOST_DATA)) {
+			syslog(LOG_INFO, "recv data:%c", data[0]);
+		}
+		break;
+	case '5':
+		syslog(LOG_INFO, "Call IocReadGroup_IOC_DEQUE");
+		error_log_ioc(IocReadGroup_IOC_DEQUE(&data[0], &data[1], &data[2]));
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "recv data%d:%c", i, data[i]);
+		}
+		break;
+	case '6':
+		syslog(LOG_INFO, "Call IocEmptyQueue_IOC_QUE");
+		error_log_ioc(IocEmptyQueue_IOC_QUE());
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* IocProk2 */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç(ã¦ã§ã¤ãç¡ã)
+ */
+uint8
+GetCommandNoWait1(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommandNoWait1 */
+
+/*
+ *  ã¦ã¼ã¶ã¡ã¤ã³é¢æ°
+ *
+ *  ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®å¤æ­ã¨ï¼ã«ã¼ãã«èµ·å
+ */
+sint32
+main(void)
+{
+	AppModeType	crt_app_mode;
+
+	/*
+	 *  ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®å¤æ­
+	 */
+	switch (GetAppModeInfo()) {
+	case 0:
+		crt_app_mode = AppMode1;
+		break;
+	case 1:
+		crt_app_mode = AppMode2;
+		break;
+	default:
+		crt_app_mode = AppMode3;
+		break;
+	}
+
+	/*
+	 *  ã«ã¼ãã«èµ·å
+	 */
+	StartOS(crt_app_mode);
+
+	while (1) {
+	}
+}   /* main */
+
+/*
+ *  ã¨ã©ã¼ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_ERRORHOOK
+void
+ErrorHook(StatusType Error)
+{
+
+	/*
+	 *  ã¨ã©ã¼è¦å ãã¨ã®ãã©ã¡ã¼ã¿ã­ã°åºå
+	 */
+	switch (OSErrorGetServiceId()) {
+	case OSServiceId_ActivateTask:
+		syslog(LOG_INFO, "Error:%s=ActivateTask(%d)", atk2_strerror(Error), OSError_ActivateTask_TaskID());
+		break;
+	case OSServiceId_TerminateTask:
+		syslog(LOG_INFO, "Error:%s=TerminateTask()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ChainTask:
+		syslog(LOG_INFO, "Error:%s=ChainTask(%d)", atk2_strerror(Error), OSError_ChainTask_TaskID());
+		break;
+	case OSServiceId_Schedule:
+		syslog(LOG_INFO, "Error:%s=Schedule()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetTaskID:
+		syslog(LOG_INFO, "Error:%s=GetTaskID(0x%p)", atk2_strerror(Error), OSError_GetTaskID_TaskID());
+		break;
+	case OSServiceId_GetTaskState:
+		syslog(LOG_INFO, "Error:%s=GetTaskState(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetTaskState_TaskID(), OSError_GetTaskState_State());
+		break;
+	case OSServiceId_EnableAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=EnableAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_DisableAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=DisableAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ResumeAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=ResumeAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_SuspendAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=SuspendAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ResumeOSInterrupts:
+		syslog(LOG_INFO, "Error:%s=ResumeOSInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_SuspendOSInterrupts:
+		syslog(LOG_INFO, "Error:%s=SuspendOSInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetISRID:
+		syslog(LOG_INFO, "Error:%s=GetISRID()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetResource:
+		syslog(LOG_INFO, "Error:%s=GetResource(%d)", atk2_strerror(Error), OSError_GetResource_ResID());
+		break;
+	case OSServiceId_ReleaseResource:
+		syslog(LOG_INFO, "Error:%s=ReleaseResource(%d)", atk2_strerror(Error), OSError_ReleaseResource_ResID());
+		break;
+	case OSServiceId_SetEvent:
+		syslog(LOG_INFO, "Error:%s=SetEvent(%d, 0x%x)", atk2_strerror(Error),
+			   OSError_SetEvent_TaskID(), OSError_SetEvent_Mask());
+		break;
+	case OSServiceId_ClearEvent:
+		syslog(LOG_INFO, "Error:%s=ClearEvent(0x%x)", atk2_strerror(Error), OSError_ClearEvent_Mask());
+		break;
+	case OSServiceId_GetEvent:
+		syslog(LOG_INFO, "Error:%s=GetEvent(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetEvent_TaskID(), OSError_GetEvent_Event());
+		break;
+	case OSServiceId_WaitEvent:
+		syslog(LOG_INFO, "Error:%s=WaitEvent(0x%x)", atk2_strerror(Error), OSError_WaitEvent_Mask());
+		break;
+	case OSServiceId_GetAlarmBase:
+		syslog(LOG_INFO, "Error:%s=GetAlarmBase(0x%p)", atk2_strerror(Error), OSError_GetAlarmBase_AlarmID());
+		break;
+	case OSServiceId_GetAlarm:
+		syslog(LOG_INFO, "Error:%s=GetAlarm(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetAlarm_AlarmID(), OSError_GetAlarm_Tick());
+		break;
+	case OSServiceId_SetRelAlarm:
+		syslog(LOG_INFO, "Error:%s=SetRelAlarm(%d, %d, %d)", atk2_strerror(Error),
+			   OSError_SetRelAlarm_AlarmID(), OSError_SetRelAlarm_increment(), OSError_SetRelAlarm_cycle());
+		break;
+	case OSServiceId_SetAbsAlarm:
+		syslog(LOG_INFO, "Error:%s=SetAbsAlarm(%d, %d, %d)", atk2_strerror(Error),
+			   OSError_SetAbsAlarm_AlarmID(), OSError_SetAbsAlarm_start(), OSError_SetAbsAlarm_cycle());
+		break;
+	case OSServiceId_CancelAlarm:
+		syslog(LOG_INFO, "Error:%s=CancelAlarm(%d)", atk2_strerror(Error), OSError_CancelAlarm_AlarmID());
+		break;
+	case OSServiceId_StartScheduleTableRel:
+		syslog(LOG_INFO, "Error:%s=StartScheduleTableRel(%d, %d)", atk2_strerror(Error),
+			   OSError_StartScheduleTableRel_ScheduleTableID(), OSError_StartScheduleTableRel_Offset());
+		break;
+	case OSServiceId_StartScheduleTableAbs:
+		syslog(LOG_INFO, "Error:%s=StartScheduleTableAbs(%d, %d)", atk2_strerror(Error),
+			   OSError_StartScheduleTableAbs_ScheduleTableID(), OSError_StartScheduleTableAbs_Start());
+		break;
+	case OSServiceId_StopScheduleTable:
+		syslog(LOG_INFO, "Error:%s=StopScheduleTable(%d)", atk2_strerror(Error), OSError_StopScheduleTable_ScheduleTableID());
+		break;
+	case OSServiceId_NextScheduleTable:
+		syslog(LOG_INFO, "Error:%s=NextScheduleTable(%d, %d)", atk2_strerror(Error),
+			   OSError_NextScheduleTable_ScheduleTableID_From(), OSError_NextScheduleTable_ScheduleTableID_To());
+		break;
+	case OSServiceId_GetScheduleTableStatus:
+		syslog(LOG_INFO, "Error:%s=GetScheduleTableStatus(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetScheduleTableStatus_ScheduleTableID(), OSError_GetScheduleTableStatus_ScheduleStatus());
+		break;
+	case OSServiceId_GetActiveApplicationMode:
+		syslog(LOG_INFO, "Error:%s=GetActiveApplicationMode()", atk2_strerror(Error));
+		break;
+	case OSServiceId_StartOS:
+		syslog(LOG_INFO, "Error:%s=StartOS()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ShutdownOS:
+		syslog(LOG_INFO, "Error:%s=ShutdownOS()", atk2_strerror(Error));
+		break;
+	case OSServiceId_IncrementCounter:
+		syslog(LOG_INFO, "Error:%s=IncrementCounter(%d)", atk2_strerror(Error), OSError_IncrementCounter_CounterID());
+		break;
+	case OSServiceId_TaskMissingEnd:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Send:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Write:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_SendGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_WriteGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Receive:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Read:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_ReceiveGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_ReadGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_EmptyQueue:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	default:
+		syslog(LOG_INFO, "Error:%s=UnKnownFunc()", atk2_strerror(Error));
+		break;
+	}
+
+}
+#endif /* CFG_USE_ERRORHOOK */
+
+/*
+ *  ãã¬ã¿ã¹ã¯ããã¯ã«ã¼ãã³
+ *
+ *  Task13/Task14å®è¡åã®ãã¬ã¿ã¹ã¯ããã¯ã®å ´åï¼ã¡ãã»ã¼ã¸ãåºå
+ */
+#ifdef CFG_USE_PRETASKHOOK
+void
+PreTaskHook(void)
+{
+	TaskType tskid;
+
+	GetTaskID(&tskid);
+	if (tskid == Task13) {
+		syslog(LOG_INFO, "\nPreTaskHook before Task13!\n");
+	}
+	if (tskid == Task14) {
+		syslog(LOG_INFO, "\nPreTaskHook before Task14!\n");
+	}
+}
+#endif /* CFG_USE_PRETASKHOOK */
+
+/*
+ *  ãã¹ãã¿ã¹ã¯ããã¯ã«ã¼ãã³
+ *
+ *  Task13/Task14å®è¡å¾ã®ãã¹ãã¿ã¹ã¯ããã¯ã®å ´åï¼ã¡ãã»ã¼ã¸ãåºå
+ */
+#ifdef CFG_USE_POSTTASKHOOK
+void
+PostTaskHook(void)
+{
+	TaskType tskid;
+
+	GetTaskID(&tskid);
+	if (tskid == Task13) {
+		syslog(LOG_INFO, "\nPostTaskHook after Task13!\n");
+	}
+	if (tskid == Task14) {
+		syslog(LOG_INFO, "\nPostTaskHook after Task14!\n");
+	}
+}
+#endif /* CFG_USE_POSTTASKHOOK */
+
+/*
+ *  ã¹ã¿ã¼ãã¢ããããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_STARTUPHOOK
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+extern void target_timer_initialize(void);
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+
+void
+StartupHook(void)
+{
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+	target_timer_initialize();
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+	syslog_initialize();
+	syslog_msk_log(LOG_UPTO(LOG_INFO));
+	InitSerial();
+	print_banner();
+}
+#endif /* CFG_USE_STARTUPHOOK */
+
+/*
+ *  ã·ã£ãããã¦ã³ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_SHUTDOWNHOOK
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+extern void target_timer_terminate(void);
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+
+void
+ShutdownHook(StatusType Error)
+{
+	/* çµäºã­ã°åºå */
+	syslog(LOG_INFO, "Sample System ShutDown");
+	syslog(LOG_INFO, "ShutDownCode:%s", atk2_strerror(Error));
+	syslog(LOG_INFO, "");
+
+	if (Error == E_OS_SYS_ASSERT_FATAL) {
+		syslog(LOG_INFO, "fatal_file_name:%s", fatal_file_name);
+		syslog(LOG_INFO, "fatal_line_num:%d", fatal_line_num);
+	}
+
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+	target_timer_terminate();
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+	TermSerial();
+
+}
+#endif /* CFG_USE_SHUTDOWNHOOK */
+
+/*
+ *  ãã­ãã¯ã·ã§ã³ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_PROTECTIONHOOK
+ProtectionReturnType
+ProtectionHook(StatusType FatalError)
+{
+	StatusType			ercd;
+	FaultyContextType	faulty_context;
+	TaskType			taskid;
+
+	syslog(LOG_INFO, "ProtectionHook");
+
+	if (FatalError == E_OS_STACKFAULT) {
+		syslog(LOG_INFO, "E_OS_STACKFAULT");
+		ercd = PRO_SHUTDOWN;
+	}
+	else if (FatalError == E_OS_PROTECTION_EXCEPTION) {
+		faulty_context = GetFaultyContext();
+		syslog(LOG_INFO, "E_OS_PROTECTION_EXCEPTION and GetFaultyContext() = %s", faulty_context_tbl[faulty_context]);
+
+		switch (faulty_context) {
+		case FC_TASK:
+			ercd = GetTaskID(&taskid);
+			if (taskid == MainTask) {
+				ercd = PRO_IGNORE;
+			}
+			else {
+				ercd = PRO_TERMINATETASKISR;
+			}
+			break;
+		case FC_C2ISR:
+			ercd = PRO_TERMINATETASKISR;
+			break;
+		case FC_SYSTEM_HOOK:
+			ercd = PRO_IGNORE;
+			break;
+		case FC_TRUSTED_FUNC:
+			ercd = PRO_IGNORE;
+			break;
+		case FC_INVALID:
+			ercd = PRO_SHUTDOWN;
+			break;
+		default:
+			ercd = PRO_SHUTDOWN;
+			syslog(LOG_INFO, "unknown error fo GetFaultyContext() = %d", faulty_context);
+		}
+	}
+	else {
+		ercd = PRO_SHUTDOWN;
+	}
+
+	return(ercd);
+}
+#endif /* CFG_USE_PROTECTIONHOOK */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.h	(revision 172)
@@ -0,0 +1,90 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample1.h 115 2014-12-10 01:33:17Z t_ishikawa $
+ */
+
+/*
+ *		ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE1_H
+#define TOPPERS_SAMPLE1_H
+
+#include "target_test.h"
+
+#define TIMER_ISR_PARAM		(TIMER_CONTROL_CONT | TIMER_CONTROL_ITO | TIMER_CONTROL_START)
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+extern StackType stack_00[COUNT_STK_T(0x200)];
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE1_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample1.yaml	(revision 172)
@@ -0,0 +1,668 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: sample1.yaml 170 2015-06-04 08:23:01Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    OsInclude1:
+      DefinitionRef: OsInclude
+      OsIncludeFileName: sample1.h
+    OsInclude2:
+      DefinitionRef: OsInclude
+      OsIncludeFileName: sample2.h
+    OsOS:
+      OsStackMonitoring: true
+      OsUseGetServiceId: true
+      OsUseParameterAccess: true
+      OsScalabilityClass: SC3
+      OsStatus: EXTENDED
+      OsHooks:
+        OsErrorHook: true
+        OsPostTaskHook: true
+        OsPreTaskHook: true
+        OsProtectionHook: true
+        OsShutdownHook: true
+        OsStartupHook: true
+      OsHookStack:
+        OsHookStackSize: 0x200
+    TskLevelRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: STANDARD
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    CntRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: STANDARD
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    GroupRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: INTERNAL
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    SampleCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleCnt2:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleCnt3:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    NonPriTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 8
+      OsTaskPriority: 1
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: NON
+    Task6:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 0x200
+      OsTaskStackStartAddress: stack_00
+      OsTaskSchedule: FULL
+    Task7:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 0x200
+      OsTaskStackStartAddress: stack_00
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+    MainTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 14
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/MainEvt
+      OsTaskAutostart:
+        OsTaskAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+    HighPriorityTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 15
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+    Task1:
+      DefinitionRef: OsTask
+      OsTaskActivation: 8
+      OsTaskPriority: 4
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+      OsTaskResourceRef:
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+      OsTaskAutostart:
+        OsTaskAppModeRef: /Ecuc/Os/AppMode2
+    Task2:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 7
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+      OsTaskResourceRef:
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+      OsTaskEventRef: /Ecuc/Os/T2Evt
+    MainCycArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/MainTask
+          OsAlarmSetEventRef: /Ecuc/Os/MainEvt
+    ActTskArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmActivateTask:
+          OsAlarmActivateTaskRef: /Ecuc/Os/Task1
+    Task3:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 12
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+      OsTaskResourceRef: /Ecuc/Os/CntRes
+      OsTaskEventRef: /Ecuc/Os/T3Evt
+      OsTaskAutostart:
+        OsTaskAppModeRef: /Ecuc/Os/AppMode3
+    Task4:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 6
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+      OsTaskResourceRef:
+        - /Ecuc/Os/GroupRes
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+    scheduletable1:
+      DefinitionRef: OsScheduleTable
+      OsScheduleTableDuration: 60
+      OsScheduleTableRepeating: true
+      OsScheduleTableCounterRef: /Ecuc/Os/SchtblSampleCnt
+      OsScheduleTableExpiryPoint_0:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 10
+        OsScheduleTableTaskActivation_0:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task10
+        OsScheduleTableTaskActivation_1:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task11
+        OsScheduleTableTaskActivation_2:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableExpiryPoint_1:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 20
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T10Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task10
+        OsScheduleTableEventSetting_1:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T11Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task11
+        OsScheduleTableEventSetting_2:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T12Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableSync:
+        OsScheduleTblSyncStrategy: NONE
+    Task5:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+      OsTaskResourceRef:
+        - /Ecuc/Os/GroupRes
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+    scheduletable2:
+      DefinitionRef: OsScheduleTable
+      OsScheduleTableDuration: 50
+      OsScheduleTableRepeating: true
+      OsScheduleTableCounterRef: /Ecuc/Os/SchtblSampleCnt
+      OsScheduleTableExpiryPoint_0:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 20
+        OsScheduleTableTaskActivation_0:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task12
+        OsScheduleTableTaskActivation_1:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task11
+      OsScheduleTableExpiryPoint_1:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 30
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T12Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableExpiryPoint_2:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 40
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T11Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task11
+      OsScheduleTableSync:
+        OsScheduleTblSyncStrategy: NONE
+    SetEvtArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/Task3
+          OsAlarmSetEventRef: /Ecuc/Os/T3Evt
+    SampleAlm1:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/SampleCnt2
+      OsAlarmAction:
+        OsAlarmIncrementCounter:
+          OsAlarmIncrementCounterRef: /Ecuc/Os/SampleCnt3
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 10
+        OsAlarmCycleTime: 10
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    SchtblSampleCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleAlm2:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/SampleCnt3
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/MainTask
+          OsAlarmSetEventRef: /Ecuc/Os/MainEvt
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 10
+        OsAlarmCycleTime: 10
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    Task10:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T10Evt
+    Task11:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T11Evt
+    Task12:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T12Evt
+    Task13:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 0x200
+      OsTaskStackStartAddress: stack_1
+      OsTaskSystemStackSize: 0x200
+      OsTaskSystemStackStartAddress: stack_2
+      OsTaskSchedule: FULL
+    Task14:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 0x200
+      OsTaskStackStartAddress: stack_1
+      OsTaskSystemStackSize: 0x200
+      OsTaskSystemStackStartAddress: stack_2
+      OsTaskSchedule: FULL
+    IocTask1:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+    IocTask2:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+    IocTask3:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+    IocTask4:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 0x200
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+    AppMode1:
+      DefinitionRef: OsAppMode
+    AppMode2:
+      DefinitionRef: OsAppMode
+    AppMode3:
+      DefinitionRef: OsAppMode
+    MainEvt:
+      DefinitionRef: OsEvent
+    T2Evt:
+      DefinitionRef: OsEvent
+    T3Evt:
+      DefinitionRef: OsEvent
+      OsEventMask: 0x00010000
+    T10Evt:
+      DefinitionRef: OsEvent
+    T11Evt:
+      DefinitionRef: OsEvent
+    T12Evt:
+      DefinitionRef: OsEvent
+    KT_osap1:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppTaskRef:
+        - /Ecuc/Os/MainTask
+        - /Ecuc/Os/NonPriTask
+        - /Ecuc/Os/Task6
+        - /Ecuc/Os/Task7
+        - /Ecuc/Os/IocTask3
+      tfnt1:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt1
+      tfnt2:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt2
+      tfnt3:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt3
+      tfnt4:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt4
+      actioctask3:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_actioctask3
+    KT_osap2:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppTaskRef: /Ecuc/Os/IocTask4
+      OsAppMemorySectionRef: /Ecu/Os/sdata_trusted
+      actioctask4:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_actioctask4
+    NT_osap1:
+      DefinitionRef: OsApplication
+      OsTrusted: false
+      OsAppCounterRef:
+        - /Ecuc/Os/SampleCnt
+        - /Ecuc/Os/SchtblSampleCnt
+        - /Ecuc/Os/SampleCnt2
+        - /Ecuc/Os/SampleCnt3
+      OsAppTaskRef:
+        - /Ecuc/Os/HighPriorityTask
+        - /Ecuc/Os/Task1
+        - /Ecuc/Os/Task2
+        - /Ecuc/Os/Task3
+        - /Ecuc/Os/Task4
+        - /Ecuc/Os/Task5
+        - /Ecuc/Os/Task10
+        - /Ecuc/Os/Task11
+        - /Ecuc/Os/Task12
+        - /Ecuc/Os/Task13
+        - /Ecuc/Os/Task14
+        - /Ecuc/Os/IocTask1
+      OsAppAlarmRef:
+        - /Ecuc/Os/MainCycArm
+        - /Ecuc/Os/ActTskArm
+        - /Ecuc/Os/SetEvtArm
+        - /Ecuc/Os/SampleAlm1
+        - /Ecuc/Os/SampleAlm2
+      OsAppScheduleTableRef:
+        - /Ecuc/Os/scheduletable1
+        - /Ecuc/Os/scheduletable2
+      OsAppMemorySectionRef: /Ecu/Os/sbss_nt
+    OsLinkSection:
+      OsLinkSectionName: .stack_section
+      OsLinkSectionMemoryRegionRef: /Ecuc/Os/RAM
+    text_shared:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: ".text"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/FLASH
+      OsMemorySectionWriteable: false
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: true
+      OsMemorySectionShort: false
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    const_shared:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: ".const"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/FLASH
+      OsMemorySectionWriteable: false
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: true
+      OsMemorySectionShort: false
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    data_shared:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: ".data"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: false
+      OsMemorySectionInitialize: DATA
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: true
+    sdata_trusted:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: ".sdata"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: true
+      OsMemorySectionInitialize: DATA
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: true
+    bss_shared:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: ".bss"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: false
+      OsMemorySectionInitialize: BSS
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: true
+    sbss_nt:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: ".sbss"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: true
+      OsMemorySectionInitialize: BSS
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: true
+    Task8:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 0x250
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+    Task9:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 0x300
+      OsTaskSystemStackSize: 0x200
+      OsTaskSchedule: FULL
+    ActOtherOSAPTskArmCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    ActOtherOSAPTskArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/ActOtherOSAPTskArmCnt
+      OsAlarmAction:
+        OsAlarmActivateTask:
+          OsAlarmActivateTaskRef: /Ecuc/Os/Task4
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 5
+        OsAlarmCycleTime: 0
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    NT_osap2:
+      DefinitionRef: OsApplication
+      OsTrusted: false
+      OsAppTaskRef:
+        - /Ecuc/Os/Task8
+        - /Ecuc/Os/Task9
+        - /Ecuc/Os/IocTask2
+      OsAppCounterRef: /Ecuc/Os/ActOtherOSAPTskArmCnt
+      OsAppAlarmRef: /Ecuc/Os/ActOtherOSAPTskArm
+    IOC:
+      DefinitionRef: OsIoc
+      IOC_QUE:
+        DefinitionRef: OsIocCommunication
+        OsIocBufferLength: 3
+        IOC_QUE_DATA:
+          DefinitionRef: OsIocDataProperties
+          OsIocInitValue: 1
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_QUE_RCV:
+          DefinitionRef: OsIocReceiverProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocReceivingOsApplicationRef: /Ecuc/Os/NT_osap2
+        IOC_QUE_SND0:
+          DefinitionRef: OsIocSenderProperties
+          OsIocSenderId: 0
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/NT_osap1
+        IOC_QUE_SND1:
+          DefinitionRef: OsIocSenderProperties
+          OsIocSenderId: 1
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/KT_osap1
+      IOC_DEQUE:
+        DefinitionRef: OsIocCommunication
+        IOC_DEQUE_DATA0:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 0
+          OsIocInitValue: 0
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_DATA1:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 1
+          OsIocInitValue: 10
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_DATA2:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 2
+          OsIocInitValue: 20
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_RCV:
+          DefinitionRef: OsIocReceiverProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocReceivingOsApplicationRef: /Ecuc/Os/KT_osap2
+        IOC_DEQUE_SND:
+          DefinitionRef: OsIocSenderProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/KT_osap1
+
+IMPLEMENTATION-DATA-TYPE:
+  uint8:
+    CATEGORY: VALUE
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample2.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample2.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample2.c	(revision 172)
@@ -0,0 +1,1173 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)æ½¤ãª(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample2.c 181 2015-06-12 10:02:03Z t_ishikawa $
+ */
+
+/*
+ *		éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®æ¬ä½
+ *
+ *  ãµã³ãã«ãã­ã°ã©ã ã®åä½ã¯sample1.cã®ã³ã¡ã³ãåç
+§
+ *  æ¬ãã¡ã¤ã«ã¯éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ãã¦ãã
+ *  ãªãã¸ã§ã¯ããè¨è¿°ãã¦ãã
+ */
+
+#include "sample.h"
+#include "sample2.h"
+#include "Ioc.h"
+
+#define GetHwCnt(x, y)
+
+/*
+ *  å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+uint8 GetCommand(void);
+void PutActTsk(uint8 task_no);
+void PutActNonPriTsk(void);
+void PutTermTsk(uint8 task_no);
+void PutChainTsk(uint8 from_task_no, uint8 to_task_no);
+void PutSchedule(void);
+void PutTaskID(void);
+void PutTaskState(uint8 task_no);
+void PutDisAllInt(void);
+void PutSusAllInt(void);
+void PutSusOSInt(void);
+void PutHwCnt3(void);
+void PutGetCntRes(void);
+void PutGetTskRes(void);
+void PutRelTskRes(void);
+void PutSetEvt(uint8 task_no);
+void PutClrEvt(uint8 task_no);
+void PutGetEvt(uint8 task_no);
+void PutWaitEvt(uint8 task_no);
+void PutArmBase(void);
+void PutArmTick(void);
+void PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no);
+void PutCanArm(void);
+void PutAppMode(void);
+void schedule_table_sample_routine(void);
+
+TASK(IocTask1);
+TASK(IocTask2);
+static void IocProk1(void);
+static uint8 GetCommandNoWait2(void);
+
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#define error_log_ioc(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+
+#define	error_log_ioc(api)										   \
+	{															   \
+		StatusType ercd;										   \
+		ercd = api;     /* åAPIå®è¡ */							   \
+		if (ercd != E_OK) {										   \
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd)); \
+		}														   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  å
+é¨ãã¼ã¿ãããã¡
+ */
+volatile uint8				command_tbl[14]; /* ã³ãã³ãå¼æ¸¡ããã¼ãã« */
+
+/*
+ *  å
+é¨å®æ°ãã¼ã¿ãã¼ãã«
+ */
+/* ç¡å¹ã¤ãã³ããã¹ã¯å¤ */
+#define invalid_mask	(EventMaskType) (0)
+
+/* ã¤ãã³ããã¹ã¯ãã¼ãã« */
+static const EventMaskType	event_mask_tbl[5] = {
+	invalid_mask,
+	T2Evt,
+	T3Evt,
+	invalid_mask,
+	invalid_mask
+};
+
+/* ã¿ã¹ã¯IDãã¼ãã« */
+static const TaskType		task_id_tbl[14] = {
+	Task1,
+	Task2,
+	Task3,
+	Task4,
+	Task5,
+	Task6,
+	Task7,
+	Task8,
+	Task9,
+	Task10,
+	Task11,
+	Task12,
+	Task13,
+	Task14
+};
+
+/* ã¢ã©ã¼ã IDãã¼ãã« */
+static const AlarmType		alarm_id_tbl[2] = {
+	ActTskArm,
+	SetEvtArm
+};
+
+/* ãã£ãã¯å¤ãã¼ãã« */
+static const TickType		tick_tbl[2] = {
+	(TickType) 500,
+	(TickType) 900
+};
+
+/* ãµã¤ã¯ã«å¤ãã¼ãã« */
+static const TickType		cycle_tbl[2] = {
+	(TickType) 0,
+	(TickType) COUNTER_MIN_CYCLE
+};
+
+/* ã¤ãã³ããã¹ã¯åæå­åãã¼ãã« */
+static const char8			*event_name_tbl[5] = {
+	"Invalid",
+	"T2Evt",
+	"T3Evt",
+	"Invalid",
+	"Invalid"
+};
+
+/* ã¿ã¹ã¯åæå­åãã¼ãã« */
+static const char8			*task_name_tbl[14] = {
+	"Task1",
+	"Task2",
+	"Task3",
+	"Task4",
+	"Task5",
+	"Task6",
+	"Task7",
+	"Task8",
+	"Task9",
+	"Task10",
+	"Task11",
+	"Task12"
+	"Task13"
+	"Task14"
+};
+
+/* ã¿ã¹ã¯ç¶æ
+æå­åãã¼ãã« */
+static const char8			*task_state_tbl[4] = {
+	"SUSPENDED",
+	"RUNNING",
+	"READY",
+	"WAITING"
+};
+
+/* ã¢ã©ã¼ã åæå­åãã¼ãã« */
+static const char8			*alarm_name_tbl[2] = {
+	"ActTskArm",
+	"SetEvtArm"
+};
+
+#pragma section sample1.stack
+StackType stack_1[COUNT_STK_T(0x200)];
+#pragma section default
+#pragma section kernel
+StackType stack_2[COUNT_STK_T(0x200)];
+#pragma section default
+
+/*
+ *  æé«åªå
+åº¦ã¿ã¹ã¯
+ *
+ *  åã¿ã¹ã¯ã®ããªã¨ã³ããç¢ºèªç¨
+ */
+TASK(HighPriorityTask)
+{
+	syslog(LOG_INFO, "HighPriorityTask ACTIVATE");
+	error_log(TerminateTask());
+}   /* TASK( HighPriorityTask ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯1
+ */
+TASK(Task1)
+{
+	TaskProk(0U);
+}   /* TASK( Task1 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯2
+ */
+TASK(Task2)
+{
+	TaskProk(1U);
+}   /* TASK( Task2 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯3
+ */
+TASK(Task3)
+{
+	TaskProk(2U);
+}   /* TASK( Task3 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯4
+ */
+TASK(Task4)
+{
+	TaskProk(3U);
+}   /* TASK( Task4 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯5
+ */
+TASK(Task5)
+{
+	TaskProk(4U);
+}   /* TASK( Task5 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ *  ã¡ã¤ã³ã¿ã¹ã¯ããéç¥ãããã³ãã³ããã¨ã®å¦çå®è¡
+ */
+extern uint8 sbss_test;
+extern uint8 sdata_test;
+void
+TaskProk(uint8 task_no)
+{
+	uint8 command;          /* ã³ãã³ãéé¿ãããã¡ */
+
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "%s ACTIVATE", task_name_tbl[task_no]);
+	syslog(LOG_INFO, "sbss_test is %d", sbss_test);
+	sbss_test++;
+
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+
+		/*
+		 *  ã³ãã³ãåå¾
+		 */
+		while (command_tbl[task_no] == '\0') {
+		}
+		command = command_tbl[task_no];
+		command_tbl[task_no] = 0U;
+
+		/*
+		 *  ã³ãã³ãå¤å®
+		 */
+		switch (command) {
+		case 'A':
+			PutTermTsk(task_no);
+			break;
+		case '!':
+		case '"':
+		case '#':
+		case '$':
+		case '%':
+			PutChainTsk(task_no, (command - '!'));
+			break;
+		case 'z':
+			PutTaskID();
+			break;
+		case 'k':
+			PutGetTskRes();
+			break;
+		case 'K':
+			PutRelTskRes();
+			break;
+		case 'i':
+			PutGetCntRes();
+			break;
+		case 'w':
+			if (task_no < 5U) {
+				PutClrEvt(task_no);
+			}
+			break;
+		case 'W':
+			if (task_no < 5U) {
+				PutWaitEvt(task_no);
+			}
+			break;
+		default:
+			/* ä¸è¨ã®ã³ãã³ãä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã */
+			break;
+		}
+	}
+}   /* TaskProk */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç
+ */
+uint8
+GetCommand(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		WaitEvent(MainEvt);     /* 10msã¦ã§ã¤ã */
+		ClearEvent(MainEvt);
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommand */
+
+/*
+ *  ActivateTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutActTsk(uint8 task_no)
+{
+	struct parameter_struct local;
+
+	syslog(LOG_INFO, "Call ActivateTask(%s)", task_name_tbl[task_no]);
+
+	if (task_no < 5U) {
+		error_log(ActivateTask(task_id_tbl[task_no]));
+	}
+	else {
+		local.task_no = task_id_tbl[task_no];
+		CallTrustedFunction(tfnt4, &local); /* ActivateTask(task_name_tbl[task_no]) */
+	}
+
+}   /* PutActTsk	*/
+
+/*
+ *  ActivateTask å®è¡(NonPriTask)ã»ã­ã°åºåå¦ç
+ */
+void
+PutActNonPriTsk(void)
+{
+	struct parameter_struct local;
+
+	syslog(LOG_INFO, "Call ActivateTask(NonPriTask)");
+
+	local.task_no = NonPriTask;
+	CallTrustedFunction(tfnt4, &local); /* ActivateTask(NonPriTask) */
+
+}   /* PutActNonPriTsk	*/
+
+/*
+ *  TerminateTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutTermTsk(uint8 task_no)
+{
+	StatusType ercd;        /* ã¨ã©ã¼ã³ã¼ã */
+
+	syslog(LOG_INFO, "%s TERMINATE", task_name_tbl[task_no]);
+
+	ercd = TerminateTask();
+	ShutdownOS(ercd);
+}
+
+/*
+ *  ChainTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutChainTsk(uint8 from_task_no, uint8 to_task_no)
+{
+	StatusType ercd;            /* ã¨ã©ã¼ã³ã¼ã */
+
+	syslog(LOG_INFO, "Call ChainTask(%s)", task_name_tbl[to_task_no]);
+	syslog(LOG_INFO, "%s TERMINATE", task_name_tbl[from_task_no]);
+
+	ercd = ChainTask(task_id_tbl[to_task_no]);
+	if (ercd == E_OS_LIMIT) {
+		syslog(LOG_INFO, "Call TerminateTask()");
+		syslog(LOG_INFO, "Because of ChainTask E_OS_LIMIT return");
+		ercd = TerminateTask();
+	}
+	ShutdownOS(ercd);
+}   /* PutChainTsk */
+
+/*
+ *  Schedule å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSchedule(void)
+{
+	syslog(LOG_INFO, "Call ActivateTask(HighPriorityTask)");
+
+	error_log(ActivateTask(HighPriorityTask));
+	syslog(LOG_INFO, "Call Schedule()");
+
+	error_log(Schedule());
+	syslog(LOG_INFO, "Retrun Schedule()");
+}   /* PutSchedule	*/
+
+/*
+ *  GetTaskID å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutTaskID(void)
+{
+	TaskType task_id;           /* ã¿ã¹ã¯IDåå¾ãããã¡ */
+
+	error_log(GetTaskID(&task_id));
+
+	syslog(LOG_INFO, "TaskID:%d", task_id);
+}   /* PutTaskID	*/
+
+/*
+ *  GetTaskState å®è¡ã»ã­ã°åºåå¦ç
+ *  Task1æ½¤ãªTask5ï¼Task7åå¾æã¨ã©ã¼ã¨ãªããªã
+ *  Task6åå¾æã¨ã©ã¼ã¨ãªã
+ */
+void
+PutTaskState(uint8 task_no)
+{
+	TaskStateType state;        /* ã¿ã¹ã¯IDåå¾ãããã¡ */
+
+	error_log(GetTaskState(task_id_tbl[task_no], &state));
+
+	syslog(LOG_INFO, task_name_tbl[task_no]);
+	syslog(LOG_INFO, " State:%s", task_state_tbl[state]);
+}   /* PutTaskState	*/
+
+/*
+ *  DisableAllInterrupts/EnableAllInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutDisAllInt(void)
+{
+	syslog(LOG_INFO, "Call DisableAllInterrupts");
+
+	DisableAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call EnableAllInterrupts");
+
+	EnableAllInterrupts();
+}   /* PutDisAllInt	*/
+
+/*
+ *  SuspendAllInterrupts/ResumeAllInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSusAllInt(void)
+{
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+}   /* PutSusAllInt	*/
+
+/*
+ *  SuspendOSInterrupts/ResumeOSInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSusOSInt(void)
+{
+	syslog(LOG_INFO, "Call SuspendOSInterrupts");
+
+	SuspendOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendOSInterrupts");
+
+	SuspendOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeOSInterrupts");
+
+	ResumeOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeOSInterrupts");
+
+	ResumeOSInterrupts();
+}   /* PutSusOSInt */
+
+/*
+ *  å²è¾¼ã¿åä½ãã¹ãç¨HWã«ã¦ã³ã¿å¤ã®ã­ã°åºåå¦ç
+ */
+void
+PutHwCnt3(void)
+{
+	uint32	isr1_cnt = 0U;      /* C1ISR ã«ã¦ã³ãå¤åå¾ãããã¡ */
+	uint32	isr2_cnt = 0U;      /* C2ISR ã«ã¦ã³ãå¤åå¾ãããã¡ */
+	uint8	cnt;                /* åºååæ°ã«ã¦ã³ã¿ */
+
+	for (cnt = 0U; cnt < 3U; cnt++) {
+		GetHwCnt(&isr1_cnt, &isr2_cnt);
+		syslog(LOG_INFO, "C1ISR Cnt:%d, C2ISR Cnt:%d",
+			   isr1_cnt, isr2_cnt);
+	}
+}   /* PutHwCnt3 */
+
+/*
+ *  GetResource/ReleaseResource å®è¡(å²è¾¼ã¿ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetCntRes(void)
+{
+	syslog(LOG_INFO, "Call GetResource(CntRes)");
+	error_log(GetResource(CntRes));
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ReleaseResource(CntRes)");
+
+	error_log(ReleaseResource(CntRes));
+}   /* PutGetCntRes	*/
+
+/*
+ *  GetResource å®è¡(ã¿ã¹ã¯ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetTskRes(void)
+{
+	syslog(LOG_INFO, "Call GetResource(TskLevelRes)");
+
+	error_log(GetResource(TskLevelRes));
+}   /* PutGetTskRes */
+
+/*
+ *  ReleaseResource å®è¡(ã¿ã¹ã¯ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutRelTskRes(void)
+{
+	syslog(LOG_INFO, "Call ReleaseResource(TskLevelRes)");
+
+	error_log(ReleaseResource(TskLevelRes));
+}
+
+/*
+ *  SetEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSetEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call SetEvent(%s, %s)",
+		   task_name_tbl[task_no], event_name_tbl[task_no]);
+
+	error_log(SetEvent(task_id_tbl[task_no], event_mask_tbl[task_no]));
+}   /* PutSetEvt */
+
+/*
+ *  ClearEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutClrEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call ClearEvent(%s)", event_name_tbl[task_no]);
+
+	error_log(ClearEvent(event_mask_tbl[task_no]));
+}   /* PutClrEvt */
+
+/*
+ *  GetEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetEvt(uint8 task_no)
+{
+	EventMaskType mask;             /* ã¤ãã³ããã¹ã¯åå¾ãããã¡ */
+
+	error_log(GetEvent(task_id_tbl[task_no], &mask));
+
+	syslog(LOG_INFO, "%s Event Mask:0x%x", task_name_tbl[task_no], mask);
+}   /* PutGetEvt */
+
+/*
+ *  WaitEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutWaitEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call WaitEvent(%s)", event_name_tbl[task_no]);
+
+	error_log(WaitEvent(event_mask_tbl[task_no]));
+	syslog(LOG_INFO, "Return WaitEvent(%s)", event_name_tbl[task_no]);
+}   /* PutWaitEvt */
+
+/*
+ *  GetAlarmBase å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutArmBase(void)
+{
+	AlarmBaseType info;             /* ã¢ã©ã¼ã ãã¼ã¹æ
+å ±åå¾ãããã¡ */
+
+	error_log(GetAlarmBase(MainCycArm, &info));
+
+	syslog(LOG_INFO, "MainCycArm Base:");
+	syslog(LOG_INFO, "\tMAXALLOWEDVALUE=%d", info.maxallowedvalue);
+	syslog(LOG_INFO, "\tTICKSPERBASE=%d", info.ticksperbase);
+	syslog(LOG_INFO, "\tMINCYCLE=%d", info.mincycle);
+}   /* PutArmBase */
+
+/*
+ *  PutArmTick å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutArmTick(void)
+{
+	TickType tick;              /* æ®ããã£ãã¯åå¾ãããã¡ */
+
+	error_log(GetAlarm(MainCycArm, &tick));
+
+	syslog(LOG_INFO, "MainCycArm Tick:%d", tick);
+}   /* PutArmTick */
+
+/*
+ *  SetRelAlarm å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no)
+{
+	syslog(LOG_INFO, "Call SetRelAlarm(%s, %d, %d)",
+		   alarm_name_tbl[alarm_no], tick_tbl[tick_no], cycle_tbl[cycle_no]);
+
+	error_log(SetRelAlarm(alarm_id_tbl[alarm_no],
+						  tick_tbl[tick_no], cycle_tbl[cycle_no]));
+}   /* PutSetRel	*/
+
+/*
+ *  CancelAlarm å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutCanArm(void)
+{
+	syslog(LOG_INFO, "Call CancelAlarm(ActTskArm)");
+
+	error_log(CancelAlarm(ActTskArm));
+}   /* PutCanArm */
+
+/*
+ *  GetActiveApplicationMode å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutAppMode(void)
+{
+	switch (GetActiveApplicationMode()) {
+	case AppMode1:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode1");
+		break;
+	case AppMode2:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode2");
+		break;
+	case AppMode3:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode3");
+		break;
+	default:
+		syslog(LOG_INFO, "ActiveApplicationMode:Non");
+		break;
+	}
+}   /* PutAppMode */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãã¹ãç¨ã¡ã¤ã³ã«ã¼ã
+ *
+ *  ã¦ã¼ã¶ã³ãã³ãã®åä¿¡ã¨ï¼ã³ãã³ããã¨ã®å¦çå®è¡
+ */
+void
+schedule_table_sample_routine(void)
+{
+	uint8					command;                /* ã³ãã³ããããã¡ */
+	ScheduleTableType		scheduletable_id;       /* ã³ãã³ãå¼æ°ãããã¡ */
+	ScheduleTableStatusType	status;                 /* ã¹ã±ã¸ã¥ã¼ã«ç¶æ
+å¼æ° */
+	TickType				val;                    /* ã«ã¦ã³ã¿ã®ç¾å¨å¤ */
+	uint8					flag = FALSE;           /* ãªã¿ã¼ã³ãããå¤å®ããããã®ãã©ã° */
+
+	syslog(LOG_INFO, "\t[ schedule table sample routine IN, press 't' OUT ]");
+	syslog(LOG_INFO, "");
+
+	scheduletable_id = scheduletable1;
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+
+		WaitEvent(MainEvt);     /* 10msã®ä½æ¥­æéå¾
+ã¡ */
+		ClearEvent(MainEvt);
+
+		/*
+		 *  å
+¥åã³ãã³ãåå¾
+		 */
+		syslog(LOG_INFO, "Input Command:");
+		command = GetCommand();
+		syslog(LOG_INFO, "%c", command);
+
+		/*
+		 *  ã³ãã³ãå¤å®
+		 */
+		switch (command) {
+		case '1':
+			scheduletable_id = scheduletable1;
+			break;
+		case '2':
+			scheduletable_id = scheduletable2;
+			break;
+		case 'i':
+			IncrementCounter(SchtblSampleCnt);
+			val = 0U;
+			GetCounterValue(SchtblSampleCnt, &val);
+			if ((val % 5U) == 0U) {
+				syslog(LOG_INFO, "\tGetCounterValue(SchtblSampleCnt ) = %d", val);
+			}
+			break;
+		case 's':
+			syslog(LOG_INFO, "\tStartScheduleTableRel(scheduletable%d, 5)", scheduletable_id + 1U);
+			error_log(StartScheduleTableRel(scheduletable_id, 5U));
+			break;
+		case 'S':
+			syslog(LOG_INFO, "\tStartScheduleTableAbs(scheduletable%d, 5)", scheduletable_id + 1U);
+			error_log(StartScheduleTableAbs(scheduletable_id, 5U));
+			break;
+		case 'f':
+			syslog(LOG_INFO, "\tStopScheduleTable(scheduletable%d)", scheduletable_id + 1U);
+			error_log(StopScheduleTable(scheduletable_id));
+			break;
+		case 'n':
+			syslog(LOG_INFO, "\tNextScheduleTable(scheduletable%d, scheduletable%d)", scheduletable_id + 1U, scheduletable2 + 1U);
+			error_log(NextScheduleTable(scheduletable_id, scheduletable2));
+			break;
+		case 'N':
+			syslog(LOG_INFO, "\tNextScheduleTable(scheduletable%d, scheduletable%d)", scheduletable_id + 1U, scheduletable1 + 1U);
+			error_log(NextScheduleTable(scheduletable_id, scheduletable1));
+			break;
+		case 'g':
+			status = 0U;
+			syslog(LOG_INFO, "\tGetScheduleTableStatus(scheduletable%d, status)", scheduletable_id + 1U);
+			error_log(GetScheduleTableStatus(scheduletable_id, &status));
+			syslog(LOG_INFO, "\tstatus = %d", status);
+			break;
+		case 't':
+			syslog(LOG_INFO, "\t[ schedule table sample routine OUT, press 't' IN ]");
+			flag = TRUE;
+			break;
+		default:
+			/* ã³ãã³ããä¸è¨ã®ã±ã¼ã¹ä»¥å¤ãªãå¦çã¯è¡ããªã */
+			break;
+		}
+		/*  ãã©ã°ãç«ã£ã¦ããå ´åï¼ãªã¿ã¼ã³ãã  */
+		if (flag == TRUE) {
+			return;
+		}
+	}
+}   /* schedule_table_sample_routine */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯6
+ */
+TASK(Task10)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task10 ACTIVATE");
+	WaitEvent(T10Evt);
+	syslog(LOG_INFO, "Task10 FINISH");
+	TerminateTask();
+}   /* TASK( Task10 ) */
+
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯7
+ */
+TASK(Task11)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task11 ACTIVATE");
+	WaitEvent(T11Evt);
+	syslog(LOG_INFO, "Task11 FINISH");
+	TerminateTask();
+}   /* TASK( Task11 ) */
+
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯8
+ */
+TASK(Task12)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task12 ACTIVATE");
+	WaitEvent(T12Evt);
+	syslog(LOG_INFO, "Task12 FINISH");
+	TerminateTask();
+}   /* TASK( Task12 ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨ã¿ã¹ã¯11
+ */
+TASK(Task13)
+{
+	struct parameter_struct	local;
+	sint32					pp = 10;
+
+	local.name1 = (sint32 *) &pp;
+	local.name2 = 2;
+
+	CallTrustedFunction(tfnt1, &local); /* 10*2 + 2 = 22 */
+	syslog(LOG_NOTICE, "Task13 tfnt1 ret = %d", local.return_value);
+
+	TerminateTask();
+}   /* TASK( Task13 ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨ã¿ã¹ã¯12
+ */
+TASK(Task14)
+{
+	struct parameter_struct	local;
+	sint32					pp = 20;
+
+	local.name1 = (sint32 *) &pp;
+	local.name2 = 4;
+
+	CallTrustedFunction(tfnt2, &local); /* 20*4 + 4 = 84 */
+	syslog(LOG_NOTICE, "Task14 tfnt2 ret = %d", local.return_value);
+
+}   /* TASK( Task14 ) */
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³éã¢ã¯ã»ã¹æ¨©ç¢ºèªç¨ã¿ã¹ã¯
+ */
+TASK(Task8)
+{
+	TaskStateType state;
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task8 ACTIVATE");
+	syslog(LOG_INFO, "sbss_test is %d", sbss_test);
+	sbss_test++;
+	if (E_OK == GetTaskState(Task1, &state)) {
+		syslog(LOG_INFO, "GetTaskState(Task1, &state), state = %s", task_state_tbl[state]);
+	}
+	syslog(LOG_INFO, "Task8 FINISH");
+	TerminateTask();
+}   /* TASK( Task8 ) */
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³éã¢ã¯ã»ã¹æ¨©ç¢ºèªç¨ã¿ã¹ã¯
+ */
+TASK(Task9)
+{
+	TaskStateType state;
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task9 ACTIVATE");
+	syslog(LOG_INFO, "sdata_test is %d", sdata_test);
+	sdata_test++;
+	if (E_OK == GetTaskState(Task2, &state)) {
+		syslog(LOG_INFO, "GetTaskState(Task2, &state), state = %s", task_state_tbl[state]);
+	}
+	syslog(LOG_INFO, "Task9 FINISH");
+	TerminateTask();
+}   /* TASK( Task8 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯1
+ */
+TASK(IocTask1)
+{
+	syslog(LOG_INFO, "IocTask1 ACTIVATE");
+
+	IocProk1();
+
+	syslog(LOG_INFO, "IocTask1 TERMINATE");
+
+	TerminateTask();
+}   /* TASK( IocTask1 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯2
+ */
+TASK(IocTask2)
+{
+	syslog(LOG_INFO, "IocTask2 ACTIVATE");
+
+	IocProk1();
+
+	syslog(LOG_INFO, "IocTask2 TERMINATE");
+
+	TerminateTask();
+}   /* TASK( IocTask2 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ */
+static void
+IocProk1(void)
+{
+	uint8			api;        /* ã³ãã³ãåä¿¡ãããã¡(API) */
+	uint8			data[3];    /* éä¿¡ãããã¡ */
+
+	volatile sint32 i;
+	Std_ReturnType	ercd;
+
+	syslog(LOG_INFO, "Select IOC API:");
+	api = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", api);
+#endif /* OMIT_ECHO */
+
+	switch (api) {
+	case '1':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_0");
+		error_log_ioc(IocSend_IOC_QUE_0(data[0]));
+		break;
+	case '2':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_1");
+		error_log_ioc(IocSend_IOC_QUE_1(data[0]));
+		break;
+	case '3':
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "Input send data%d:", i);
+			data[i] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", data[i]);
+#endif /* OMIT_ECHO */
+		}
+		syslog(LOG_INFO, "Call IocWriteGroup_IOC_DEQUE");
+		error_log_ioc(IocWriteGroup_IOC_DEQUE(data[0], data[1], data[2]));
+		break;
+	case '4':
+		syslog(LOG_INFO, "Call IocReceive_IOC_QUE");
+		ercd = IocReceive_IOC_QUE(&data[0]);
+#if !defined(CFG_USE_ERRORHOOK)
+		if (ercd != E_OK) {
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd));
+		}
+#endif /* !defined( CFG_USE_ERRORHOOK ) */
+		if ((ercd == IOC_E_OK) || (ercd == IOC_E_LOST_DATA)) {
+			syslog(LOG_INFO, "recv data:%c", data[0]);
+		}
+		break;
+	case '5':
+		syslog(LOG_INFO, "Call IocReadGroup_IOC_DEQUE");
+		error_log_ioc(IocReadGroup_IOC_DEQUE(&data[0], &data[1], &data[2]));
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "recv data%d:%c", i, data[i]);
+		}
+		break;
+	case '6':
+		syslog(LOG_INFO, "Call IocEmptyQueue_IOC_QUE");
+		error_log_ioc(IocEmptyQueue_IOC_QUE());
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* IocProk1 */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç(ã¦ã§ã¤ãç¡ã)
+ */
+uint8
+GetCommandNoWait2(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommandNoWait2 */
+
+
+/*
+ *  ActivateTask(IOCç¨) å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutActIocTsk(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	syslog(LOG_INFO, "Select IocTask:");
+	command = GetCommand();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", command);
+#endif /* OMIT_ECHO */
+
+	switch (command) {
+	case '1':
+		error_log(ActivateTask(IocTask1));
+		break;
+	case '2':
+		error_log(ActivateTask(IocTask2));
+		break;
+	case '3':
+		error_log(CallTrustedFunction(actioctask3, NULL));
+		break;
+	case '4':
+		error_log(CallTrustedFunction(actioctask4, NULL));
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* PutActIocTsk	*/
+
+TRUSTEDFUNCTION(TRUSTED_actioctask3, FunctionIndex, FunctionParams)
+{
+	error_log(ActivateTask(IocTask3));
+
+	return(E_OK);
+}
+
+TRUSTEDFUNCTION(TRUSTED_actioctask4, FunctionIndex, FunctionParams)
+{
+	error_log(ActivateTask(IocTask4));
+
+	return(E_OK);
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample2.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample2.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample2.h	(revision 172)
@@ -0,0 +1,89 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample2.h 115 2014-12-10 01:33:17Z t_ishikawa $
+ */
+
+/*
+ *		éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE2_H
+#define TOPPERS_SAMPLE2_H
+
+#include "target_test.h"
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+extern StackType	stack_1[COUNT_STK_T(0x200)];
+extern StackType	stack_2[COUNT_STK_T(0x200)];
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE2_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample_asm.asm
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample_asm.asm	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/sample/sample_asm.asm	(revision 172)
@@ -0,0 +1,78 @@
+;/*
+ ;*  TOPPERS ATK2
+ ;*      Toyohashi Open Platform for Embedded Real-Time Systems
+ ;*      Automotive Kernel Version 2
+ ;*
+ ;*  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ ;*              Graduate School of Information Science, Nagoya Univ., JAPAN
+ ;*  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ ;*  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ ;*  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ ;*  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ ;*  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ ;*  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ ;*  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ ;*  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ ;*  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ ;*      å
+è²¬ãããã¨ï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ ;*  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ ;*  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ ;*  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ;*  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ;*  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ;*  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ;*  ã®è²¬ä»»ãè² ããªãï¼
+ ;*
+ ;*  $Id: start.asm 187 2015-06-25 03:39:04Z t_ishikawa $
+ ;*/
+
+;-----------------------------------------------------------------------------
+;	dummy section to avoid linker warning
+;-----------------------------------------------------------------------------
+	.section	"sample1.stack.bss", bss
+	.align 16
+.L.dummy.sample1.stack.bss:
+
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/stdint.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/stdint.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/stdint.h	(revision 172)
@@ -0,0 +1,74 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: stdint.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		CC-RHã¯stdint.hããªãããï¼å¿
+è¦ãªãã®ã®ã¿å®ç¾©
+ */
+
+#ifndef TOPPERS_STDINT_H
+#define TOPPERS_STDINT_H
+
+#define INT64_MIN 	(-9223372036854775807LL-1LL)
+#define INT64_MAX 	 9223372036854775807LL
+#define UINT64_MAX 	18446744073709551615ULL
+
+#endif /* TOPPERS_STDINT_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/tool_cfg1_out.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/tool_cfg1_out.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/tool_cfg1_out.h	(revision 172)
@@ -0,0 +1,88 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-13 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: tool_cfg1_out.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ */
+
+/*
+ *	CXã³ã³ãã¤ã©ã§ã¯ï¼æ¡ä»¶ã«ãã£ã¦ã¯ãæå³ããã¤ã³ã©ã¤ã³åãç¡å¹åãããã
+ *	ã±ã¼ã¹ãå­å¨ããï¼ãã®ããï¼ããããã¡ã¤ã«ããå¼ã³åºãããå¯è½æ§ã®ãã
+ *	ã¹ã¿ããæ¬ãã¡ã¤ã«ã§å®ç¾©ããï¼
+ */
+
+/*
+ *  counter.h
+ */
+const CounterType	tnum_hardcounter;
+CNTCB				cntcb_table[];
+const HWCNTINIB		hwcntinib_table[];
+
+/*
+ *  kernel_impl.h
+ */
+void
+internal_shutdownos(StatusType ercd)
+{
+}
+const char8			*fatal_file_name = NULL;
+sint32				fatal_line_num = 0;
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/tool_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/tool_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/tool_svc.h	(revision 172)
@@ -0,0 +1,558 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: tool_svc.h 182 2015-06-24 07:14:37Z t_ishikawa $
+ */
+
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#ifndef TOPPERS_TOOL_SVC_H
+#define TOPPERS_TOOL_SVC_H
+
+#define SVC_TRAP(system_service) _trap_ ## system_service
+
+#ifndef TOPPERS_SVC_FUNCCALL
+#define StartOS _trap_StartOS
+#define ShutdownOS _trap_ShutdownOS
+#define ActivateTask _trap_ActivateTask
+#define TerminateTask _trap_TerminateTask
+#define ChainTask _trap_ChainTask
+#define Schedule _trap_Schedule
+#define GetTaskID _trap_GetTaskID
+#define GetTaskState _trap_GetTaskState
+#define EnableAllInterrupts _trap_EnableAllInterrupts
+#define DisableAllInterrupts _kernel_DisableAllInterrupts
+#define ResumeAllInterrupts _trap_ResumeAllInterrupts
+#define SuspendAllInterrupts _trap_SuspendAllInterrupts
+#define ResumeOSInterrupts _trap_ResumeOSInterrupts
+#define SuspendOSInterrupts _trap_SuspendOSInterrupts
+#define GetISRID _trap_GetISRID
+#define DisableInterruptSource _trap_DisableInterruptSource
+#define EnableInterruptSource _trap_EnableInterruptSource
+#define GetResource _trap_GetResource
+#define ReleaseResource _trap_ReleaseResource
+#define SetEvent _trap_SetEvent
+#define ClearEvent _trap_ClearEvent
+#define GetEvent _trap_GetEvent
+#define WaitEvent _trap_WaitEvent
+#define GetAlarmBase _trap_GetAlarmBase
+#define GetAlarm _trap_GetAlarm
+#define SetRelAlarm _trap_SetRelAlarm
+#define SetAbsAlarm _trap_SetAbsAlarm
+#define CancelAlarm _trap_CancelAlarm
+#define IncrementCounter _trap_IncrementCounter
+#define GetCounterValue _trap_GetCounterValue
+#define GetElapsedValue _trap_GetElapsedValue
+#define CheckISRMemoryAccess _trap_CheckISRMemoryAccess
+#define CheckTaskMemoryAccess _trap_CheckTaskMemoryAccess
+#define CheckTaskAccess _trap_CheckTaskAccess
+#define CheckISRAccess _trap_CheckISRAccess
+#define CheckAlarmAccess _trap_CheckAlarmAccess
+#define CheckResourceAccess _trap_CheckResourceAccess
+#define CheckCounterAccess _trap_CheckCounterAccess
+#define CheckScheduleTableAccess _trap_CheckScheduleTableAccess
+#define CheckTaskOwnership _trap_CheckTaskOwnership
+#define CheckISROwnership _trap_CheckISROwnership
+#define CheckAlarmOwnership _trap_CheckAlarmOwnership
+#define CheckCounterOwnership _trap_CheckCounterOwnership
+#define CheckScheduleTableOwnership _trap_CheckScheduleTableOwnership
+#define GetApplicationID _trap_GetApplicationID
+#define CallTrustedFunction _trap_CallTrustedFunction
+#define GetApplicationState _trap_GetApplicationState
+#define GetActiveApplicationMode _trap_GetActiveApplicationMode
+#define StartScheduleTableRel _trap_StartScheduleTableRel
+#define StartScheduleTableAbs _trap_StartScheduleTableAbs
+#define StopScheduleTable _trap_StopScheduleTable
+#define NextScheduleTable _trap_NextScheduleTable
+#define GetScheduleTableStatus _trap_GetScheduleTableStatus
+#define GetFaultyContext _trap_GetFaultyContext
+#define ioc_send_generic _trap_ioc_send_generic
+#define ioc_write_generic _trap_ioc_write_generic
+#define ioc_receive_generic _trap_ioc_receive_generic
+#define ioc_read_generic _trap_ioc_read_generic
+#define ioc_empty_queue_generic _trap_ioc_empty_queue_generic
+#define AllowAccess _trap_AllowAccess
+#define TerminateApplication _trap_TerminateApplication
+#endif
+
+#ifndef TOPPERS_MACRO_ONLY
+
+#pragma inline _trap_StartOS
+LOCAL_INLINE void
+_trap_StartOS(AppModeType Mode)
+{
+	 CAL_SVC_1N(void, TFN_STARTOS, AppModeType, Mode);
+}
+
+#pragma inline _trap_ShutdownOS
+LOCAL_INLINE void
+_trap_ShutdownOS(StatusType Error)
+{
+	 CAL_SVC_1N(void, TFN_SHUTDOWNOS, StatusType, Error);
+}
+
+#pragma inline _trap_ActivateTask
+LOCAL_INLINE StatusType
+_trap_ActivateTask(TaskType TaskID)
+{
+	return CAL_SVC_1M(StatusType, TFN_ACTIVATETASK, TaskType, TaskID);
+}
+
+#pragma inline _trap_TerminateTask
+LOCAL_INLINE StatusType
+_trap_TerminateTask(void)
+{
+	return CAL_SVC_0M(StatusType, TFN_TERMINATETASK);
+}
+
+#pragma inline _trap_ChainTask
+LOCAL_INLINE StatusType
+_trap_ChainTask(TaskType TaskID)
+{
+	return CAL_SVC_1M(StatusType, TFN_CHAINTASK, TaskType, TaskID);
+}
+
+#pragma inline _trap_Schedule
+LOCAL_INLINE StatusType
+_trap_Schedule(void)
+{
+	return CAL_SVC_0M(StatusType, TFN_SCHEDULE);
+}
+
+#pragma inline _trap_GetTaskID
+LOCAL_INLINE StatusType
+_trap_GetTaskID(TaskRefType TaskID)
+{
+	return CAL_SVC_1M(StatusType, TFN_GETTASKID, TaskRefType, TaskID);
+}
+
+#pragma inline _trap_GetTaskState
+LOCAL_INLINE StatusType
+_trap_GetTaskState(TaskType TaskID, TaskStateRefType State)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETTASKSTATE, TaskType, TaskID, TaskStateRefType, State);
+}
+
+#pragma inline _trap_EnableAllInterrupts
+LOCAL_INLINE void
+_trap_EnableAllInterrupts(void)
+{
+	 CAL_SVC_0N(void, TFN_ENABLEALLINTERRUPTS);
+}
+
+#pragma inline _trap_DisableAllInterrupts
+LOCAL_INLINE void
+_trap_DisableAllInterrupts(void)
+{
+	 _kernel_DisableAllInterrupts();
+}
+
+#pragma inline _trap_ResumeAllInterrupts
+LOCAL_INLINE void
+_trap_ResumeAllInterrupts(void)
+{
+	 CAL_SVC_0N(void, TFN_RESUMEALLINTERRUPTS);
+}
+
+#pragma inline _trap_SuspendAllInterrupts
+LOCAL_INLINE void
+_trap_SuspendAllInterrupts(void)
+{
+	 CAL_SVC_0N(void, TFN_SUSPENDALLINTERRUPTS);
+}
+
+#pragma inline _trap_ResumeOSInterrupts
+LOCAL_INLINE void
+_trap_ResumeOSInterrupts(void)
+{
+	 CAL_SVC_0N(void, TFN_RESUMEOSINTERRUPTS);
+}
+
+#pragma inline _trap_SuspendOSInterrupts
+LOCAL_INLINE void
+_trap_SuspendOSInterrupts(void)
+{
+	 CAL_SVC_0N(void, TFN_SUSPENDOSINTERRUPTS);
+}
+
+#pragma inline _trap_GetISRID
+LOCAL_INLINE ISRType
+_trap_GetISRID(void)
+{
+	return CAL_SVC_0M(ISRType, TFN_GETISRID);
+}
+
+#pragma inline _trap_DisableInterruptSource
+LOCAL_INLINE StatusType
+_trap_DisableInterruptSource(ISRType DisableISR)
+{
+	return CAL_SVC_1M(StatusType, TFN_DISABLEINTERRUPTSOURCE, ISRType, DisableISR);
+}
+
+#pragma inline _trap_EnableInterruptSource
+LOCAL_INLINE StatusType
+_trap_EnableInterruptSource(ISRType EnableISR)
+{
+	return CAL_SVC_1M(StatusType, TFN_ENABLEINTERRUPTSOURCE, ISRType, EnableISR);
+}
+
+#pragma inline _trap_GetResource
+LOCAL_INLINE StatusType
+_trap_GetResource(ResourceType ResID)
+{
+	return CAL_SVC_1M(StatusType, TFN_GETRESOURCE, ResourceType, ResID);
+}
+
+#pragma inline _trap_ReleaseResource
+LOCAL_INLINE StatusType
+_trap_ReleaseResource(ResourceType ResID)
+{
+	return CAL_SVC_1M(StatusType, TFN_RELEASERESOURCE, ResourceType, ResID);
+}
+
+#pragma inline _trap_SetEvent
+LOCAL_INLINE StatusType
+_trap_SetEvent(TaskType TaskID, EventMaskType Mask)
+{
+	return CAL_SVC_2M(StatusType, TFN_SETEVENT, TaskType, TaskID, EventMaskType, Mask);
+}
+
+#pragma inline _trap_ClearEvent
+LOCAL_INLINE StatusType
+_trap_ClearEvent(EventMaskType Mask)
+{
+	return CAL_SVC_1M(StatusType, TFN_CLEAREVENT, EventMaskType, Mask);
+}
+
+#pragma inline _trap_GetEvent
+LOCAL_INLINE StatusType
+_trap_GetEvent(TaskType TaskID, EventMaskRefType Event)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETEVENT, TaskType, TaskID, EventMaskRefType, Event);
+}
+
+#pragma inline _trap_WaitEvent
+LOCAL_INLINE StatusType
+_trap_WaitEvent(EventMaskType Mask)
+{
+	return CAL_SVC_1M(StatusType, TFN_WAITEVENT, EventMaskType, Mask);
+}
+
+#pragma inline _trap_GetAlarmBase
+LOCAL_INLINE StatusType
+_trap_GetAlarmBase(AlarmType AlarmID, AlarmBaseRefType Info)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETALARMBASE, AlarmType, AlarmID, AlarmBaseRefType, Info);
+}
+
+#pragma inline _trap_GetAlarm
+LOCAL_INLINE StatusType
+_trap_GetAlarm(AlarmType AlarmID, TickRefType Tick)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETALARM, AlarmType, AlarmID, TickRefType, Tick);
+}
+
+#pragma inline _trap_SetRelAlarm
+LOCAL_INLINE StatusType
+_trap_SetRelAlarm(AlarmType AlarmID, TickType increment, TickType cycle)
+{
+	return CAL_SVC_3M(StatusType, TFN_SETRELALARM, AlarmType, AlarmID, TickType, increment, TickType, cycle);
+}
+
+#pragma inline _trap_SetAbsAlarm
+LOCAL_INLINE StatusType
+_trap_SetAbsAlarm(AlarmType AlarmID, TickType start, TickType cycle)
+{
+	return CAL_SVC_3M(StatusType, TFN_SETABSALARM, AlarmType, AlarmID, TickType, start, TickType, cycle);
+}
+
+#pragma inline _trap_CancelAlarm
+LOCAL_INLINE StatusType
+_trap_CancelAlarm(AlarmType AlarmID)
+{
+	return CAL_SVC_1M(StatusType, TFN_CANCELALARM, AlarmType, AlarmID);
+}
+
+#pragma inline _trap_IncrementCounter
+LOCAL_INLINE StatusType
+_trap_IncrementCounter(CounterType CounterID)
+{
+	return CAL_SVC_1M(StatusType, TFN_INCREMENTCOUNTER, CounterType, CounterID);
+}
+
+#pragma inline _trap_GetCounterValue
+LOCAL_INLINE StatusType
+_trap_GetCounterValue(CounterType CounterID, TickRefType Value)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETCOUNTERVALUE, CounterType, CounterID, TickRefType, Value);
+}
+
+#pragma inline _trap_GetElapsedValue
+LOCAL_INLINE StatusType
+_trap_GetElapsedValue(CounterType CounterID, TickRefType Value, TickRefType ElapsedValue)
+{
+	return CAL_SVC_3M(StatusType, TFN_GETELAPSEDVALUE, CounterType, CounterID, TickRefType, Value, TickRefType, ElapsedValue);
+}
+
+#pragma inline _trap_CheckISRMemoryAccess
+LOCAL_INLINE AccessType
+_trap_CheckISRMemoryAccess(ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size)
+{
+	return CAL_SVC_3M(AccessType, TFN_CHECKISRMEMORYACCESS, ISRType, ISRID, MemoryStartAddressType, Address, MemorySizeType, Size);
+}
+
+#pragma inline _trap_CheckTaskMemoryAccess
+LOCAL_INLINE AccessType
+_trap_CheckTaskMemoryAccess(TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size)
+{
+	return CAL_SVC_3M(AccessType, TFN_CHECKTASKMEMORYACCESS, TaskType, TaskID, MemoryStartAddressType, Address, MemorySizeType, Size);
+}
+
+#pragma inline _trap_CheckTaskAccess
+LOCAL_INLINE ObjectAccessType
+_trap_CheckTaskAccess(ApplicationType ApplID, TaskType TaskID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKTASKACCESS, ApplicationType, ApplID, TaskType, TaskID);
+}
+
+#pragma inline _trap_CheckISRAccess
+LOCAL_INLINE ObjectAccessType
+_trap_CheckISRAccess(ApplicationType ApplID, ISRType ISRID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKISRACCESS, ApplicationType, ApplID, ISRType, ISRID);
+}
+
+#pragma inline _trap_CheckAlarmAccess
+LOCAL_INLINE ObjectAccessType
+_trap_CheckAlarmAccess(ApplicationType ApplID, AlarmType AlarmID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKALARMACCESS, ApplicationType, ApplID, AlarmType, AlarmID);
+}
+
+#pragma inline _trap_CheckResourceAccess
+LOCAL_INLINE ObjectAccessType
+_trap_CheckResourceAccess(ApplicationType ApplID, ResourceType ResID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKRESOURCEACCESS, ApplicationType, ApplID, ResourceType, ResID);
+}
+
+#pragma inline _trap_CheckCounterAccess
+LOCAL_INLINE ObjectAccessType
+_trap_CheckCounterAccess(ApplicationType ApplID, CounterType CounterID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKCOUNTERACCESS, ApplicationType, ApplID, CounterType, CounterID);
+}
+
+#pragma inline _trap_CheckScheduleTableAccess
+LOCAL_INLINE ObjectAccessType
+_trap_CheckScheduleTableAccess(ApplicationType ApplID, ScheduleTableType ScheduleTableID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKSCHEDULETABLEACCESS, ApplicationType, ApplID, ScheduleTableType, ScheduleTableID);
+}
+
+#pragma inline _trap_CheckTaskOwnership
+LOCAL_INLINE ApplicationType
+_trap_CheckTaskOwnership(TaskType TaskID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKTASKOWNERSHIP, TaskType, TaskID);
+}
+
+#pragma inline _trap_CheckISROwnership
+LOCAL_INLINE ApplicationType
+_trap_CheckISROwnership(ISRType ISRID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKISROWNERSHIP, ISRType, ISRID);
+}
+
+#pragma inline _trap_CheckAlarmOwnership
+LOCAL_INLINE ApplicationType
+_trap_CheckAlarmOwnership(AlarmType AlarmID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKALARMOWNERSHIP, AlarmType, AlarmID);
+}
+
+#pragma inline _trap_CheckCounterOwnership
+LOCAL_INLINE ApplicationType
+_trap_CheckCounterOwnership(CounterType CounterID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKCOUNTEROWNERSHIP, CounterType, CounterID);
+}
+
+#pragma inline _trap_CheckScheduleTableOwnership
+LOCAL_INLINE ApplicationType
+_trap_CheckScheduleTableOwnership(ScheduleTableType ScheduleTableID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKSCHEDULETABLEOWNERSHIP, ScheduleTableType, ScheduleTableID);
+}
+
+#pragma inline _trap_GetApplicationID
+LOCAL_INLINE ApplicationType
+_trap_GetApplicationID(void)
+{
+	return CAL_SVC_0M(ApplicationType, TFN_GETAPPLICATIONID);
+}
+
+#pragma inline _trap_CallTrustedFunction
+LOCAL_INLINE StatusType
+_trap_CallTrustedFunction(TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams)
+{
+	return CAL_SVC_2M(StatusType, TFN_CALLTRUSTEDFUNCTION, TrustedFunctionIndexType, FunctionIndex, TrustedFunctionParameterRefType, FunctionParams);
+}
+
+#pragma inline _trap_GetApplicationState
+LOCAL_INLINE StatusType
+_trap_GetApplicationState(ApplicationType Application, ApplicationStateRefType Value)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETAPPLICATIONSTATE, ApplicationType, Application, ApplicationStateRefType, Value);
+}
+
+#pragma inline _trap_GetActiveApplicationMode
+LOCAL_INLINE AppModeType
+_trap_GetActiveApplicationMode(void)
+{
+	return CAL_SVC_0M(AppModeType, TFN_GETACTIVEAPPLICATIONMODE);
+}
+
+#pragma inline _trap_StartScheduleTableRel
+LOCAL_INLINE StatusType
+_trap_StartScheduleTableRel(ScheduleTableType ScheduleTableID, TickType Offset)
+{
+	return CAL_SVC_2M(StatusType, TFN_STARTSCHEDULETABLEREL, ScheduleTableType, ScheduleTableID, TickType, Offset);
+}
+
+#pragma inline _trap_StartScheduleTableAbs
+LOCAL_INLINE StatusType
+_trap_StartScheduleTableAbs(ScheduleTableType ScheduleTableID, TickType Start)
+{
+	return CAL_SVC_2M(StatusType, TFN_STARTSCHEDULETABLEABS, ScheduleTableType, ScheduleTableID, TickType, Start);
+}
+
+#pragma inline _trap_StopScheduleTable
+LOCAL_INLINE StatusType
+_trap_StopScheduleTable(ScheduleTableType ScheduleTableID)
+{
+	return CAL_SVC_1M(StatusType, TFN_STOPSCHEDULETABLE, ScheduleTableType, ScheduleTableID);
+}
+
+#pragma inline _trap_NextScheduleTable
+LOCAL_INLINE StatusType
+_trap_NextScheduleTable(ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To)
+{
+	return CAL_SVC_2M(StatusType, TFN_NEXTSCHEDULETABLE, ScheduleTableType, ScheduleTableID_From, ScheduleTableType, ScheduleTableID_To);
+}
+
+#pragma inline _trap_GetScheduleTableStatus
+LOCAL_INLINE StatusType
+_trap_GetScheduleTableStatus(ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETSCHEDULETABLESTATUS, ScheduleTableType, ScheduleTableID, ScheduleTableStatusRefType, ScheduleStatus);
+}
+
+#pragma inline _trap_GetFaultyContext
+LOCAL_INLINE FaultyContextType
+_trap_GetFaultyContext(void)
+{
+	return CAL_SVC_0M(FaultyContextType, TFN_GETFAULTYCONTEXT);
+}
+
+#pragma inline _trap_ioc_send_generic
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_send_generic(IocType IocWrapperId, const void *in)
+{
+	return CAL_SVC_2M(Std_ReturnType, TFN_IOC_SEND_GENERIC, IocType, IocWrapperId, const void *, in);
+}
+
+#pragma inline _trap_ioc_write_generic
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_write_generic(IocType IocWrapperId, const void *in)
+{
+	return CAL_SVC_2M(Std_ReturnType, TFN_IOC_WRITE_GENERIC, IocType, IocWrapperId, const void *, in);
+}
+
+#pragma inline _trap_ioc_receive_generic
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_receive_generic(IocType IocId, void *out)
+{
+	return CAL_SVC_2M(Std_ReturnType, TFN_IOC_RECEIVE_GENERIC, IocType, IocId, void *, out);
+}
+
+#pragma inline _trap_ioc_read_generic
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_read_generic(IocType IocId, void *out)
+{
+	return CAL_SVC_2M(Std_ReturnType, TFN_IOC_READ_GENERIC, IocType, IocId, void *, out);
+}
+
+#pragma inline _trap_ioc_empty_queue_generic
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_empty_queue_generic(IocType IocId)
+{
+	return CAL_SVC_1M(Std_ReturnType, TFN_IOC_EMPTY_QUEUE_GENERIC, IocType, IocId);
+}
+
+#pragma inline _trap_AllowAccess
+LOCAL_INLINE StatusType
+_trap_AllowAccess(void)
+{
+	return CAL_SVC_0M(StatusType, TFN_ALLOWACCESS);
+}
+
+#pragma inline _trap_TerminateApplication
+LOCAL_INLINE StatusType
+_trap_TerminateApplication(ApplicationType Application, RestartType RestartOption)
+{
+	return CAL_SVC_2M(StatusType, TFN_TERMINATEAPPLICATION, ApplicationType, Application, RestartType, RestartOption);
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_TOOL_SVC_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ccrh/updatepath.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ccrh/updatepath.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ccrh/updatepath.py	(revision 172)
@@ -0,0 +1,86 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: updatepath.py 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+import os
+
+os.chdir(os.path.dirname(project.Path))
+
+ADDITIONAL_INCLUDES = []
+
+# set relative path from top proj
+proj_rel_dir = ""
+
+# call definition file
+execfile("./def.py")
+
+# path
+src_abs_path = os.path.abspath(SRCDIR)
+
+# call common file
+execfile(src_abs_path + "/arch/cx/common.py")
Index: /atk2-sc3-1.4.0-ntisr/arch/gcc/Compiler.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/gcc/Compiler.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/gcc/Compiler.h	(revision 172)
@@ -0,0 +1,107 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Compiler.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã³ã³ãã¤ã©ä¾å­å®ç¾©
+ */
+
+#ifndef TOPPERS_COMPILER_H
+#define TOPPERS_COMPILER_H
+
+#include "Compiler_Cfg.h"
+
+#define AUTOMATIC
+#define TYPEDEF
+#define NULL_PTR	((void *) 0)
+
+#define FUNC(rettype, memclass)						rettype
+#define FUNC_P2CONST(rettype, ptrclass, memclass)	const rettype *
+#define FUNC_P2VAR(rettype, ptrclass, memclass)		rettype *
+#define P2VAR(ptrtype, memclass, ptrclass)			ptrtype *
+#define P2CONST(ptrtype, memclass, ptrclass)		const ptrtype *
+#define CONSTP2VAR(ptrtype, memclass, ptrclass)		ptrtype * const
+#define CONSTP2CONST(ptrtype, memclass, ptrclass)	const ptrtype * const
+#define P2FUNC(rettype, ptrclass, fctname)			rettype (*fctname)
+#define CONST(consttype, memclass)					const consttype
+#define VAR(vartype, memclass)						vartype
+
+#define INLINE			__inline__
+#define LOCAL_INLINE	static __inline__
+
+#define Asm		__asm__ volatile    /* ã¤ã³ã©ã¤ã³ã¢ã»ã³ãã©ï¼æé©åææ­¢ï¼*/
+
+#define NoReturn	__attribute__((__noreturn__))
+
+#define DEFINE_VAR_SEC(type, var, sec)	type __attribute__((section(sec))) var
+
+#endif /* TOPPERS_COMPILER_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/gcc/Compiler_Cfg.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/gcc/Compiler_Cfg.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/gcc/Compiler_Cfg.h	(revision 172)
@@ -0,0 +1,101 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Compiler_Cfg.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+#ifndef TOPPERS_COMPILER_CFG_H
+#define TOPPERS_COMPILER_CFG_H
+
+/*
+ *  ATK2å
+±éå®ç¾©
+ */
+#ifndef UINT_C
+#define UINT_C(val)		(val ## U)      /* ç¬¦å·ç¡ãæ´æ°åã®å®æ°ãä½ããã¯ã­ */
+#endif /* UINT_C */
+
+/*
+ *  åã«é¢ããæ
+å ±ãåãåºãããã®ãã¯ã­
+ */
+#ifndef offsetof
+#define offsetof(structure, field)	((uintptr) & (((structure *) 0)->field))
+#endif /* offsetof */
+
+#ifndef alignof
+#define alignof(type)	offsetof(struct { uint8 field1; type field2; }, field2)
+#endif /* alignof */
+
+#ifndef ALIGNED_TYPE    /* ã¢ã©ã¤ã³ã¡ã³ãã®ãã§ãã¯ */
+#define ALIGNED_TYPE(addr, type)	(boolean) ((((uintptr) (addr)) & (alignof(type) - 1U)) == 0U)
+#endif /* ALIGNED_TYPE */
+
+#endif /* TOPPERS_COMPILER_CFG_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/gcc/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/gcc/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/gcc/MANIFEST	(revision 172)
@@ -0,0 +1,7 @@
+PACKAGE atk2-sc3
+
+MANIFEST
+Compiler.h
+Compiler_Cfg.h
+ldscript.tf
+tool_svc.h
Index: /atk2-sc3-1.4.0-ntisr/arch/gcc/ldscript.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/gcc/ldscript.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/gcc/ldscript.tf	(revision 172)
@@ -0,0 +1,348 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2007-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by Spansion LLC, USA
+$  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2015 by Witz Corporation
+$  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+$  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+$  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+$  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: ldscript.tf 425 2015-12-07 08:06:19Z witz-itoyo $
+$
+
+$ =====================================================================
+$  ä»®ã®ãªã³ã«ã¹ã¯ãªããï¼cfg2_out.ldï¼ã®çæ
+$ =====================================================================
+
+$
+$  çæãããã¡ã¤ã«ã®æå®
+$
+$FILE "cfg2_out.ld"$
+
+$
+$  ã¿ã¼ã²ããä¾å­ã®OUTPUTè¨è¿°ã®çæ
+$
+$IF ISFUNCTION("GENERATE_OUTPUT")$
+	$GENERATE_OUTPUT()$
+$END$
+
+$
+$  MEMORYè¨è¿°ã®çæ
+$
+MEMORY {$NL$
+$FOREACH reg REG.ORDER_LIST$
+	$TAB$$FORMAT("%s : ORIGIN = 0x%x, LENGTH = 0x%x",
+				REG.REGNAME[reg], +REG.BASE[reg], +REG.SIZE[reg])$$NL$
+$END$
+$IF ISFUNCTION("GENERATE_MEMORY")$
+	$GENERATE_MEMORY()$
+$END$
+}$NL$
+$NL$
+
+$
+$  ã¿ã¼ã²ããä¾å­ã®PROVIDEè¨è¿°ã®çæ
+$
+$IF ISFUNCTION("GENERATE_PROVIDE")$
+	$GENERATE_PROVIDE()$
+$END$
+
+$
+$  å¤æ°ã®åæå
+$
+$reset_lma = 0$
+
+$provide_gp = 0$
+
+$
+$  ãªã³ã¯æå®ã®çæ
+$
+SECTIONS {$NL$
+$ ã¿ã¼ã²ããä¾å­ã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$IF ISFUNCTION("GENERATE_SECTION_FIRST")$
+	$GENERATE_SECTION_FIRST()$
+$END$
+
+$IF TOPPERS_LABEL_ASM$
+	$PREFIX_START = "___start_"$
+	$PREFIX_END   = "___end_"$
+	$PREFIX_LIMIT = "___limit_"$
+$ELSE$
+	$PREFIX_START = "__start_"$
+	$PREFIX_END   = "__end_"$
+	$PREFIX_LIMIT = "__limit_"$
+$END$
+
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid]$
+$		// ã»ã¯ã·ã§ã³ã®éå§è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+			$TAB$.$MO.SLABEL[moid]$$SPC$
+			$IF (MO.SEFLAG[moid] & 0x40) == 0$
+				ALIGN($TARGET_SEC_ALIGN_STR$)$SPC$
+			$END$
+			$IF (MO.MEMATR[moid] & TA_NOWRITE) == 0
+							&& (MO.MEMATR[moid] & TA_MEMINI) == 0$
+				(NOLOAD)$SPC$
+			$END$
+			:$SPC$
+			$IF !EQ(MO.ILABEL[moid], "")$
+				ALIGN($TARGET_SEC_ALIGN_STR$)$SPC$
+			$END$
+			{$NL$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®éå§ã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x400) != 0$
+			$IF ISFUNCTION("GENERATE_GP_LABEL")$
+				$GENERATE_GP_LABEL()$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x100) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$TAB$$PREFIX_START$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$TAB$$PREFIX_START$ssrpw_all = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x10) != 0$
+			$IF !EQ(MO.PLABEL[moid], "")$
+				$TAB$$TAB$$PREFIX_START$$MO.PLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+			$IF !EQ(MO.SLABEL[moid], ALT(omit_start_slabel,""))$
+				$TAB$$TAB$$PREFIX_START$$MO.SLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x04) != 0$
+			$IF (MO.SEFLAG[moid] & 0x01) == 0$
+				$NL$
+			$END$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])
+					&& !EQ(MO.MLABEL[moid], ALT(omit_start_mlabel,""))$
+				$TAB$$TAB$$PREFIX_START$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+			$TAB$$TAB$
+		$END$
+
+$		// ãªã³ã¯ãããã¡ã¤ã«è¨è¿°ã®çæ
+		$section_dscr = SECTION_DESCRIPTION(MO.SECTION[moid])$
+		$IF MO.TYPE[moid] == TOPPERS_ATTMOD$
+			$IF EQ(MO.MODULE[moid], "kernel_mem.o")$
+				kernel_mem2.o
+			$ELSE$
+				$MO.MODULE[moid]$
+			$END$
+			($section_dscr$)$SPC$
+		$ELIF MO.TYPE[moid] == TOPPERS_ATTSEC$
+			*($section_dscr$)$SPC$
+		$ELSE$
+$			// ã¦ã¼ã¶ã¹ã¿ãã¯é å
+			Os_Lcfg.o($section_dscr$)$SPC$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®çµäºã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x08) != 0$
+			$NL$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])$
+				$TAB$$TAB$$PREFIX_END$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$$TAB$$PREFIX_END$$MO.SLABEL[moid]$ = .;$NL$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$TAB$$PREFIX_END$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$TAB$$PREFIX_END$ssrpw_all = .;$NL$
+			$END$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã®çµäºè¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$} > $REG.REGNAME[MO.MEMREG[moid]]$
+			$IF !OMIT_IDATA$
+				$IF !EQ(MO.ILABEL[moid], "")$
+					$SPC$AT > $REG.REGNAME[STANDARD_ROM]$
+					$reset_lma = 1$
+				$ELIF reset_lma$
+					$SPC$AT > $REG.REGNAME[MO.MEMREG[moid]]$
+					$reset_lma = 0$
+				$END$
+			$END$
+			$IF ISFUNCTION("TARGET_CODE_FILLER")$
+				$TARGET_CODE_FILLER(moid)$
+			$END$
+			$NL$
+			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+				$TAB$$PREFIX_START$$MO.ILABEL[moid]$ = LOADADDR(.$MO.SLABEL[moid]$);$NL$
+			$END$
+		$END$
+
+$		// ã¢ã©ã¤ã³è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x20) != 0$
+			$TAB$. = ALIGN($TARGET_PAGE_SIZE_STR$);$NL$
+		$ELIF (MO.SEFLAG[moid] & 0x08) != 0$
+$			// ã»ã¯ã·ã§ã³ãç¶ç¶ãã¦ããå ´åã«ã¯ï¼TABã1ã¤åºå
+			$IF (MO.SEFLAG[moid] & 0x02) == 0$$TAB$$END$
+			$TAB$. = ALIGN($TARGET_SEC_ALIGN_STR$);$NL$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®ä¸éã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x08) != 0$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])$
+$				// ã»ã¯ã·ã§ã³ãç¶ç¶ãã¦ããå ´åã«ã¯ï¼TABã1ã¤åºå
+				$IF (MO.SEFLAG[moid] & 0x02) == 0$$TAB$$END$
+				$TAB$$PREFIX_LIMIT$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$$PREFIX_LIMIT$$MO.SLABEL[moid]$ = .;$NL$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x20) != 0$
+			$IF !EQ(MO.PLABEL[moid], "")$
+				$TAB$$PREFIX_LIMIT$$MO.PLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$PREFIX_LIMIT$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$PREFIX_LIMIT$ssrpw_all = .;$NL$
+			$END$
+		$END$
+
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$NL$
+		$END$
+
+$		// ã¡ã¢ãªãªã¼ã¸ã§ã³æ«ã§ã¢ã©ã¤ã³ãããããã®ããã¼ã»ã¯ã·ã§ã³ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x80) != 0$
+			$TAB$.$REG.REGNAME[MO.MEMREG[moid]]$_align$SPC$
+					ALIGN($TARGET_SEC_ALIGN_STR$) : {$NL$
+			$TAB$$TAB$__$REG.REGNAME[MO.MEMREG[moid]]$_align = .;$NL$
+			$TAB$} > $REG.REGNAME[MO.MEMREG[moid]]$$NL$
+			$NL$
+		$END$
+	$END$
+$END$
+
+$FOREACH lsid RANGE(1, numls)$
+	$TAB$$LNKSEC.SECTION[lsid]$ : {$NL$
+	$TAB$$TAB$*($LNKSEC.SECTION[lsid]$)$NL$
+	$TAB$} > $REG.REGNAME[LNKSEC.MEMREG[lsid]]$$NL$
+	$NL$
+$END$
+
+$	// C++testã§å¿
+è¦ãªæ¨æºã©ã¤ãã©ãªã§ä½¿ç¨ããã»ã¯ã·ã§ã³
+$TAB$.dummy_rom_for_cpptest : {$NL$
+$TAB$$TAB$*(.ctors.65535) *(.eh_frame)$NL$
+$TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+$TAB$. = ALIGN(64);$NL$$NL$
+$TAB$.dummy_ram_for_cpptest : {$NL$
+$TAB$$TAB$_end = .;$NL$
+$TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+$TAB$. = ALIGN(64);$NL$$NL$
+
+$TAB$/DISCARD/ : {$NL$
+$TAB$$TAB$*(.rel.dyn)$NL$
+$TAB$}$NL$
+$NL$
+
+$TAB$/* DWARF debug sections.$NL$
+$TAB$Symbols in the DWARF debugging sections are relative to $NL$
+$TAB$the beginning of the section so we begin them at 0.  */$NL$
+$NL$
+$TAB$/* DWARF 1 */$NL$
+$TAB$.debug          0 : { *(.debug) }$NL$
+$TAB$.line           0 : { *(.line) }$NL$
+$NL$
+$TAB$/* GNU DWARF 1 extensions */$NL$
+$TAB$.debug_srcinfo  0 : { *(.debug_srcinfo) }$NL$
+$TAB$.debug_sfnames  0 : { *(.debug_sfnames) }$NL$
+$NL$
+$TAB$/* DWARF 1.1 and DWARF 2 */$NL$
+$TAB$.debug_aranges  0 : { *(.debug_aranges) }$NL$
+$TAB$.debug_pubnames 0 : { *(.debug_pubnames) }$NL$
+$NL$
+$TAB$/* DWARF 2 */$NL$
+$TAB$.debug_info     0 : { *(.debug_info) }$NL$
+$TAB$.debug_abbrev   0 : { *(.debug_abbrev) }$NL$
+$TAB$.debug_line     0 : { *(.debug_line) }$NL$
+$TAB$.debug_frame    0 : { *(.debug_frame) }$NL$
+$TAB$.debug_str      0 : { *(.debug_str) }$NL$
+$TAB$.debug_loc      0 : { *(.debug_loc) }$NL$
+$TAB$.debug_macinfo  0 : { *(.debug_macinfo) }$NL$
+$TAB$.debug_ranges   0 : { *(.debug_ranges) }$NL$
+$NL$
+$TAB$/* SGI/MIPS DWARF 2 extensions */$NL$
+$TAB$.debug_weaknames 0 : { *(.debug_weaknames) }$NL$
+$TAB$.debug_funcnames 0 : { *(.debug_funcnames) }$NL$
+$TAB$.debug_typenames 0 : { *(.debug_typenames) }$NL$
+$TAB$.debug_varnames  0 : { *(.debug_varnames) }$NL$
+$NL$
+}$NL$
Index: /atk2-sc3-1.4.0-ntisr/arch/gcc/tool_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/gcc/tool_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/gcc/tool_svc.h	(revision 172)
@@ -0,0 +1,515 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: tool_svc.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#ifndef TOPPERS_TOOL_SVC_H
+#define TOPPERS_TOOL_SVC_H
+
+#define SVC_TRAP(system_service)	_trap_ ## system_service
+
+#ifndef TOPPERS_SVC_FUNCCALL
+#define StartOS						_trap_StartOS
+#define ShutdownOS					_trap_ShutdownOS
+#define ActivateTask				_trap_ActivateTask
+#define TerminateTask				_trap_TerminateTask
+#define ChainTask					_trap_ChainTask
+#define Schedule					_trap_Schedule
+#define GetTaskID					_trap_GetTaskID
+#define GetTaskState				_trap_GetTaskState
+#define EnableAllInterrupts			_trap_EnableAllInterrupts
+#define DisableAllInterrupts		_kernel_DisableAllInterrupts
+#define ResumeAllInterrupts			_trap_ResumeAllInterrupts
+#define SuspendAllInterrupts		_trap_SuspendAllInterrupts
+#define ResumeOSInterrupts			_trap_ResumeOSInterrupts
+#define SuspendOSInterrupts			_trap_SuspendOSInterrupts
+#define GetISRID					_trap_GetISRID
+#define DisableInterruptSource		_trap_DisableInterruptSource
+#define EnableInterruptSource		_trap_EnableInterruptSource
+#define GetResource					_trap_GetResource
+#define ReleaseResource				_trap_ReleaseResource
+#define SetEvent					_trap_SetEvent
+#define ClearEvent					_trap_ClearEvent
+#define GetEvent					_trap_GetEvent
+#define WaitEvent					_trap_WaitEvent
+#define GetAlarmBase				_trap_GetAlarmBase
+#define GetAlarm					_trap_GetAlarm
+#define SetRelAlarm					_trap_SetRelAlarm
+#define SetAbsAlarm					_trap_SetAbsAlarm
+#define CancelAlarm					_trap_CancelAlarm
+#define IncrementCounter			_trap_IncrementCounter
+#define GetCounterValue				_trap_GetCounterValue
+#define GetElapsedValue				_trap_GetElapsedValue
+#define CheckISRMemoryAccess		_trap_CheckISRMemoryAccess
+#define CheckTaskMemoryAccess		_trap_CheckTaskMemoryAccess
+#define CheckTaskAccess				_trap_CheckTaskAccess
+#define CheckISRAccess				_trap_CheckISRAccess
+#define CheckAlarmAccess			_trap_CheckAlarmAccess
+#define CheckResourceAccess			_trap_CheckResourceAccess
+#define CheckCounterAccess			_trap_CheckCounterAccess
+#define CheckScheduleTableAccess	_trap_CheckScheduleTableAccess
+#define CheckTaskOwnership			_trap_CheckTaskOwnership
+#define CheckISROwnership			_trap_CheckISROwnership
+#define CheckAlarmOwnership			_trap_CheckAlarmOwnership
+#define CheckCounterOwnership		_trap_CheckCounterOwnership
+#define CheckScheduleTableOwnership	_trap_CheckScheduleTableOwnership
+#define GetApplicationID			_trap_GetApplicationID
+#define CallTrustedFunction			_trap_CallTrustedFunction
+#define GetApplicationState			_trap_GetApplicationState
+#define GetActiveApplicationMode	_trap_GetActiveApplicationMode
+#define StartScheduleTableRel		_trap_StartScheduleTableRel
+#define StartScheduleTableAbs		_trap_StartScheduleTableAbs
+#define StopScheduleTable			_trap_StopScheduleTable
+#define NextScheduleTable			_trap_NextScheduleTable
+#define GetScheduleTableStatus		_trap_GetScheduleTableStatus
+#define GetFaultyContext			_trap_GetFaultyContext
+#define ioc_send_generic			_trap_ioc_send_generic
+#define ioc_write_generic			_trap_ioc_write_generic
+#define ioc_receive_generic			_trap_ioc_receive_generic
+#define ioc_read_generic			_trap_ioc_read_generic
+#define ioc_empty_queue_generic		_trap_ioc_empty_queue_generic
+#define AllowAccess					_trap_AllowAccess
+#define TerminateApplication		_trap_TerminateApplication
+#endif
+
+#ifndef TOPPERS_MACRO_ONLY
+
+LOCAL_INLINE void
+_trap_StartOS(AppModeType Mode)
+{
+	CAL_SVC_1N(void, TFN_STARTOS, AppModeType, Mode);
+}
+
+LOCAL_INLINE void
+_trap_ShutdownOS(StatusType Error)
+{
+	CAL_SVC_1N(void, TFN_SHUTDOWNOS, StatusType, Error);
+}
+
+LOCAL_INLINE StatusType
+_trap_ActivateTask(TaskType TaskID)
+{
+	CAL_SVC_1M(StatusType, TFN_ACTIVATETASK, TaskType, TaskID);
+}
+
+LOCAL_INLINE StatusType
+_trap_TerminateTask(void)
+{
+	CAL_SVC_0M(StatusType, TFN_TERMINATETASK);
+}
+
+LOCAL_INLINE StatusType
+_trap_ChainTask(TaskType TaskID)
+{
+	CAL_SVC_1M(StatusType, TFN_CHAINTASK, TaskType, TaskID);
+}
+
+LOCAL_INLINE StatusType
+_trap_Schedule(void)
+{
+	CAL_SVC_0M(StatusType, TFN_SCHEDULE);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetTaskID(TaskRefType TaskID)
+{
+	CAL_SVC_1M(StatusType, TFN_GETTASKID, TaskRefType, TaskID);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetTaskState(TaskType TaskID, TaskStateRefType State)
+{
+	CAL_SVC_2M(StatusType, TFN_GETTASKSTATE, TaskType, TaskID, TaskStateRefType, State);
+}
+
+LOCAL_INLINE void
+_trap_EnableAllInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_ENABLEALLINTERRUPTS);
+}
+
+LOCAL_INLINE void
+_trap_DisableAllInterrupts(void)
+{
+	_kernel_DisableAllInterrupts();
+}
+
+LOCAL_INLINE void
+_trap_ResumeAllInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_RESUMEALLINTERRUPTS);
+}
+
+LOCAL_INLINE void
+_trap_SuspendAllInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_SUSPENDALLINTERRUPTS);
+}
+
+LOCAL_INLINE void
+_trap_ResumeOSInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_RESUMEOSINTERRUPTS);
+}
+
+LOCAL_INLINE void
+_trap_SuspendOSInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_SUSPENDOSINTERRUPTS);
+}
+
+LOCAL_INLINE ISRType
+_trap_GetISRID(void)
+{
+	CAL_SVC_0M(ISRType, TFN_GETISRID);
+}
+
+LOCAL_INLINE StatusType
+_trap_DisableInterruptSource(ISRType DisableISR)
+{
+	CAL_SVC_1M(StatusType, TFN_DISABLEINTERRUPTSOURCE, ISRType, DisableISR);
+}
+
+LOCAL_INLINE StatusType
+_trap_EnableInterruptSource(ISRType EnableISR)
+{
+	CAL_SVC_1M(StatusType, TFN_ENABLEINTERRUPTSOURCE, ISRType, EnableISR);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetResource(ResourceType ResID)
+{
+	CAL_SVC_1M(StatusType, TFN_GETRESOURCE, ResourceType, ResID);
+}
+
+LOCAL_INLINE StatusType
+_trap_ReleaseResource(ResourceType ResID)
+{
+	CAL_SVC_1M(StatusType, TFN_RELEASERESOURCE, ResourceType, ResID);
+}
+
+LOCAL_INLINE StatusType
+_trap_SetEvent(TaskType TaskID, EventMaskType Mask)
+{
+	CAL_SVC_2M(StatusType, TFN_SETEVENT, TaskType, TaskID, EventMaskType, Mask);
+}
+
+LOCAL_INLINE StatusType
+_trap_ClearEvent(EventMaskType Mask)
+{
+	CAL_SVC_1M(StatusType, TFN_CLEAREVENT, EventMaskType, Mask);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetEvent(TaskType TaskID, EventMaskRefType Event)
+{
+	CAL_SVC_2M(StatusType, TFN_GETEVENT, TaskType, TaskID, EventMaskRefType, Event);
+}
+
+LOCAL_INLINE StatusType
+_trap_WaitEvent(EventMaskType Mask)
+{
+	CAL_SVC_1M(StatusType, TFN_WAITEVENT, EventMaskType, Mask);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetAlarmBase(AlarmType AlarmID, AlarmBaseRefType Info)
+{
+	CAL_SVC_2M(StatusType, TFN_GETALARMBASE, AlarmType, AlarmID, AlarmBaseRefType, Info);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetAlarm(AlarmType AlarmID, TickRefType Tick)
+{
+	CAL_SVC_2M(StatusType, TFN_GETALARM, AlarmType, AlarmID, TickRefType, Tick);
+}
+
+LOCAL_INLINE StatusType
+_trap_SetRelAlarm(AlarmType AlarmID, TickType increment, TickType cycle)
+{
+	CAL_SVC_3M(StatusType, TFN_SETRELALARM, AlarmType, AlarmID, TickType, increment, TickType, cycle);
+}
+
+LOCAL_INLINE StatusType
+_trap_SetAbsAlarm(AlarmType AlarmID, TickType start, TickType cycle)
+{
+	CAL_SVC_3M(StatusType, TFN_SETABSALARM, AlarmType, AlarmID, TickType, start, TickType, cycle);
+}
+
+LOCAL_INLINE StatusType
+_trap_CancelAlarm(AlarmType AlarmID)
+{
+	CAL_SVC_1M(StatusType, TFN_CANCELALARM, AlarmType, AlarmID);
+}
+
+LOCAL_INLINE StatusType
+_trap_IncrementCounter(CounterType CounterID)
+{
+	CAL_SVC_1M(StatusType, TFN_INCREMENTCOUNTER, CounterType, CounterID);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetCounterValue(CounterType CounterID, TickRefType Value)
+{
+	CAL_SVC_2M(StatusType, TFN_GETCOUNTERVALUE, CounterType, CounterID, TickRefType, Value);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetElapsedValue(CounterType CounterID, TickRefType Value, TickRefType ElapsedValue)
+{
+	CAL_SVC_3M(StatusType, TFN_GETELAPSEDVALUE, CounterType, CounterID, TickRefType, Value, TickRefType, ElapsedValue);
+}
+
+LOCAL_INLINE AccessType
+_trap_CheckISRMemoryAccess(ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size)
+{
+	CAL_SVC_3M(AccessType, TFN_CHECKISRMEMORYACCESS, ISRType, ISRID, MemoryStartAddressType, Address, MemorySizeType, Size);
+}
+
+LOCAL_INLINE AccessType
+_trap_CheckTaskMemoryAccess(TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size)
+{
+	CAL_SVC_3M(AccessType, TFN_CHECKTASKMEMORYACCESS, TaskType, TaskID, MemoryStartAddressType, Address, MemorySizeType, Size);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckTaskAccess(ApplicationType ApplID, TaskType TaskID)
+{
+	CAL_SVC_2M(ObjectAccessType, TFN_CHECKTASKACCESS, ApplicationType, ApplID, TaskType, TaskID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckISRAccess(ApplicationType ApplID, ISRType ISRID)
+{
+	CAL_SVC_2M(ObjectAccessType, TFN_CHECKISRACCESS, ApplicationType, ApplID, ISRType, ISRID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckAlarmAccess(ApplicationType ApplID, AlarmType AlarmID)
+{
+	CAL_SVC_2M(ObjectAccessType, TFN_CHECKALARMACCESS, ApplicationType, ApplID, AlarmType, AlarmID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckResourceAccess(ApplicationType ApplID, ResourceType ResID)
+{
+	CAL_SVC_2M(ObjectAccessType, TFN_CHECKRESOURCEACCESS, ApplicationType, ApplID, ResourceType, ResID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckCounterAccess(ApplicationType ApplID, CounterType CounterID)
+{
+	CAL_SVC_2M(ObjectAccessType, TFN_CHECKCOUNTERACCESS, ApplicationType, ApplID, CounterType, CounterID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckScheduleTableAccess(ApplicationType ApplID, ScheduleTableType ScheduleTableID)
+{
+	CAL_SVC_2M(ObjectAccessType, TFN_CHECKSCHEDULETABLEACCESS, ApplicationType, ApplID, ScheduleTableType, ScheduleTableID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckTaskOwnership(TaskType TaskID)
+{
+	CAL_SVC_1M(ApplicationType, TFN_CHECKTASKOWNERSHIP, TaskType, TaskID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckISROwnership(ISRType ISRID)
+{
+	CAL_SVC_1M(ApplicationType, TFN_CHECKISROWNERSHIP, ISRType, ISRID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckAlarmOwnership(AlarmType AlarmID)
+{
+	CAL_SVC_1M(ApplicationType, TFN_CHECKALARMOWNERSHIP, AlarmType, AlarmID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckCounterOwnership(CounterType CounterID)
+{
+	CAL_SVC_1M(ApplicationType, TFN_CHECKCOUNTEROWNERSHIP, CounterType, CounterID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckScheduleTableOwnership(ScheduleTableType ScheduleTableID)
+{
+	CAL_SVC_1M(ApplicationType, TFN_CHECKSCHEDULETABLEOWNERSHIP, ScheduleTableType, ScheduleTableID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_GetApplicationID(void)
+{
+	CAL_SVC_0M(ApplicationType, TFN_GETAPPLICATIONID);
+}
+
+LOCAL_INLINE StatusType
+_trap_CallTrustedFunction(TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams)
+{
+	CAL_SVC_2M(StatusType, TFN_CALLTRUSTEDFUNCTION, TrustedFunctionIndexType, FunctionIndex, TrustedFunctionParameterRefType, FunctionParams);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetApplicationState(ApplicationType Application, ApplicationStateRefType Value)
+{
+	CAL_SVC_2M(StatusType, TFN_GETAPPLICATIONSTATE, ApplicationType, Application, ApplicationStateRefType, Value);
+}
+
+LOCAL_INLINE AppModeType
+_trap_GetActiveApplicationMode(void)
+{
+	CAL_SVC_0M(AppModeType, TFN_GETACTIVEAPPLICATIONMODE);
+}
+
+LOCAL_INLINE StatusType
+_trap_StartScheduleTableRel(ScheduleTableType ScheduleTableID, TickType Offset)
+{
+	CAL_SVC_2M(StatusType, TFN_STARTSCHEDULETABLEREL, ScheduleTableType, ScheduleTableID, TickType, Offset);
+}
+
+LOCAL_INLINE StatusType
+_trap_StartScheduleTableAbs(ScheduleTableType ScheduleTableID, TickType Start)
+{
+	CAL_SVC_2M(StatusType, TFN_STARTSCHEDULETABLEABS, ScheduleTableType, ScheduleTableID, TickType, Start);
+}
+
+LOCAL_INLINE StatusType
+_trap_StopScheduleTable(ScheduleTableType ScheduleTableID)
+{
+	CAL_SVC_1M(StatusType, TFN_STOPSCHEDULETABLE, ScheduleTableType, ScheduleTableID);
+}
+
+LOCAL_INLINE StatusType
+_trap_NextScheduleTable(ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To)
+{
+	CAL_SVC_2M(StatusType, TFN_NEXTSCHEDULETABLE, ScheduleTableType, ScheduleTableID_From, ScheduleTableType, ScheduleTableID_To);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetScheduleTableStatus(ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus)
+{
+	CAL_SVC_2M(StatusType, TFN_GETSCHEDULETABLESTATUS, ScheduleTableType, ScheduleTableID, ScheduleTableStatusRefType, ScheduleStatus);
+}
+
+LOCAL_INLINE FaultyContextType
+_trap_GetFaultyContext(void)
+{
+	CAL_SVC_0M(FaultyContextType, TFN_GETFAULTYCONTEXT);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_send_generic(IocType IocWrapperId, const void *in)
+{
+	CAL_SVC_2M(Std_ReturnType, TFN_IOC_SEND_GENERIC, IocType, IocWrapperId, const void *, in);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_write_generic(IocType IocWrapperId, const void *in)
+{
+	CAL_SVC_2M(Std_ReturnType, TFN_IOC_WRITE_GENERIC, IocType, IocWrapperId, const void *, in);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_receive_generic(IocType IocId, void *out)
+{
+	CAL_SVC_2M(Std_ReturnType, TFN_IOC_RECEIVE_GENERIC, IocType, IocId, void *, out);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_read_generic(IocType IocId, void *out)
+{
+	CAL_SVC_2M(Std_ReturnType, TFN_IOC_READ_GENERIC, IocType, IocId, void *, out);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_empty_queue_generic(IocType IocId)
+{
+	CAL_SVC_1M(Std_ReturnType, TFN_IOC_EMPTY_QUEUE_GENERIC, IocType, IocId);
+}
+
+LOCAL_INLINE StatusType
+_trap_AllowAccess(void)
+{
+	CAL_SVC_0M(StatusType, TFN_ALLOWACCESS);
+}
+
+LOCAL_INLINE StatusType
+_trap_TerminateApplication(ApplicationType Application, RestartType RestartOption)
+{
+	CAL_SVC_2M(StatusType, TFN_TERMINATEAPPLICATION, ApplicationType, Application, RestartType, RestartOption);
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_TOOL_SVC_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ghs/Compiler.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ghs/Compiler.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ghs/Compiler.h	(revision 172)
@@ -0,0 +1,120 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: Compiler.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ã³ã³ãã¤ã©ä¾å­å®ç¾©
+ */
+
+#ifndef TOPPERS_COMPILER_H
+#define TOPPERS_COMPILER_H
+
+#include "Compiler_Cfg.h"
+
+#define AUTOMATIC
+#define TYPEDEF
+#define NULL_PTR	((void *) 0)
+
+#define FUNC(rettype, memclass)						rettype
+#define FUNC_P2CONST(rettype, ptrclass, memclass)	const rettype *
+#define FUNC_P2VAR(rettype, ptrclass, memclass)		rettype *
+#define P2VAR(ptrtype, memclass, ptrclass)			ptrtype *
+#define P2CONST(ptrtype, memclass, ptrclass)		const ptrtype *
+#define CONSTP2VAR(ptrtype, memclass, ptrclass)		ptrtype * const
+#define CONSTP2CONST(ptrtype, memclass, ptrclass)	const ptrtype * const
+#define P2FUNC(rettype, ptrclass, fctname)			rettype (*fctname)
+#define CONST(consttype, memclass)					const consttype
+#define VAR(vartype, memclass)						vartype
+
+#define INLINE			__inline__
+#define LOCAL_INLINE	static __inline__
+
+#define Asm		asm     /* ã¤ã³ã©ã¤ã³ã¢ã»ã³ãã©ï¼æé©åææ­¢ï¼*/
+
+#define NoReturn	__attribute__((__noreturn__))
+
+/* ã³ã³ãã¤ã©ä¾å­ã®ãã¼ã¿åã®å®ç¾© */
+#ifndef TOPPERS_MACRO_ONLY
+
+#include <limits.h>
+
+/*
+ *  ç©ºã©ãã«ã®å®ç¾©
+ *    ghsã§ã¯å¤§ããã¼ã­ã®é
+åã¯ã³ã³ãã¤ã«ã¨ã©ã¼ã«ãªãããã
+ *    ããã§å¥éå®ç¾©ããã
+ */
+#define TOPPERS_EMPTY_LABEL(x, y)	x y[1]
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+
+
+
+
+#endif /* TOPPERS_COMPILER_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ghs/Compiler_Cfg.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ghs/Compiler_Cfg.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ghs/Compiler_Cfg.h	(revision 172)
@@ -0,0 +1,97 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: Compiler_Cfg.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+#ifndef TOPPERS_COMPILER_CFG_H
+#define TOPPERS_COMPILER_CFG_H
+
+/*
+ *  ATK2å
+±éå®ç¾©
+ */
+#ifndef UINT_C
+#define UINT_C(val)		(val ## U)      /* ç¬¦å·ç¡ãæ´æ°åã®å®æ°ãä½ããã¯ã­ */
+#endif /* UINT_C */
+
+/*
+ *  åã«é¢ããæ
+å ±ãåãåºãããã®ãã¯ã­
+ */
+#ifndef offsetof
+#define offsetof(structure, field)	((uintptr) & (((structure *) 0)->field))
+#endif /* offsetof */
+
+#ifndef alignof
+#define alignof(type)	offsetof(struct { uint8 field1; type field2; }, field2)
+#endif /* alignof */
+#ifndef ALIGNED_TYPE    /* ã¢ã©ã¤ã³ã¡ã³ãã®ãã§ãã¯ */
+#define aligntypeof(type)	offsetof(struct { uint8 field1; type field2; }, field2)
+#define ALIGNED_TYPE(addr, type)	(boolean)((((uintptr) (addr)) & (alignof(type) - 1U)) == 0U)
+#endif /* ALIGNED_TYPE */
+
+#endif /* TOPPERS_COMPILER_CFG_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/ghs/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ghs/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ghs/MANIFEST	(revision 172)
@@ -0,0 +1,8 @@
+PACKAGE atk2-sc3
+
+MANIFEST
+Compiler.h
+Compiler_Cfg.h
+ldscript.tf
+tool_svc.h
+
Index: /atk2-sc3-1.4.0-ntisr/arch/ghs/ldscript.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ghs/ldscript.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ghs/ldscript.tf	(revision 172)
@@ -0,0 +1,370 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2007-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2013 by FUJISOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by FUJITSU VLSI LIMITED, JAPAN
+$  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2013 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2013 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2013 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2013 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  AUTOSARï¼AUTomotive Open System ARchitectureï¼ã¯ï¼AUTOSARä»æ§ã«åºã¥
+$  ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«
+$  ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: ldscript.tf 115 2014-12-10 01:33:17Z t_ishikawa $
+$
+
+$ =====================================================================
+$  ä»®ã®ãªã³ã«ã¹ã¯ãªããï¼cfg2_out.ldï¼ã®çæ
+$ =====================================================================
+
+$
+$  çæãããã¡ã¤ã«ã®æå®
+$
+$FILE "cfg2_out.ld"$
+
+$
+$  ã¿ã¼ã²ããä¾å­ã®OUTPUTè¨è¿°ã®çæ
+$
+$IF ISFUNCTION("GENERATE_OUTPUT")$
+	$GENERATE_OUTPUT()$
+$END$
+
+$
+$  MEMORYè¨è¿°ã®çæ
+$
+MEMORY {$NL$
+$FOREACH reg REG.ORDER_LIST$
+	$TAB$$FORMAT("%s : ORIGIN = 0x%x, LENGTH = 0x%x",
+				REG.REGNAME[reg], +REG.BASE[reg], +REG.SIZE[reg])$$NL$
+$END$
+$IF ISFUNCTION("GENERATE_MEMORY")$
+	$GENERATE_MEMORY()$
+$END$
+}$NL$
+$NL$
+
+$
+$  å¤æ°ã®åæå
+$
+$reset_lma = 0$
+$provide_gp = 0$
+
+$
+$  ãªã³ã¯æå®ã®çæ
+$
+SECTIONS {$NL$
+$
+$  ã¿ã¼ã²ããä¾å­ã®PROVIDEè¨è¿°ã®çæ
+$
+$IF ISFUNCTION("GENERATE_PROVIDE")$
+	$GENERATE_PROVIDE()$
+$END$
+
+$ ã¿ã¼ã²ããä¾å­ã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$IF ISFUNCTION("GENERATE_SECTION_FIRST")$
+	$GENERATE_SECTION_FIRST()$
+$END$
+
+$IF TOPPERS_LABEL_ASM$
+	$PREFIX_START = "___start_"$
+	$PREFIX_END   = "___end_"$
+	$PREFIX_LIMIT = "___limit_"$
+$ELSE$
+	$PREFIX_START = "__start_"$
+	$PREFIX_END   = "__end_"$
+	$PREFIX_LIMIT = "__limit_"$
+$END$
+
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid]$
+$		// ã»ã¯ã·ã§ã³ã®éå§è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+$           // small data section ã®å
+é ­ã«.rosdataã»ã¯ã·ã§ã³ãé
+ç½®ããããã®
+$           // ããã¼ã»ã¯ã·ã§ã³é
+ç½®
+            $IF (MO.SEFLAG[moid] & 0x400) != 0$
+$                $TAB$.rosdata : {$NL$
+                $TAB$.sdabase  : {$NL$
+                $TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+                $NL$$NL$
+                $TAB$.rosdata : {$NL$
+                $TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+                $NL$$NL$
+			$END$
+$           // .idataã»ã¯ã·ã§ã³ãé
+ç½®ããããã®è¨è¿°
+$           // ããã³ã¢ã©ã¤ã³è¨è¿°
+			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+                $TAB$.ROM_NOCOPY.$MO.SLABEL[moid]$ ROM(.$MO.SLABEL[moid]$): {$NL$
+                $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+                $TAB$$PREFIX_START$$MO.ILABEL[moid]$ = ADDR(.ROM_NOCOPY.$MO.SLABEL[moid]$);$NL$
+			$END$
+			$TAB$.$MO.SLABEL[moid]$$SPC$
+			$IF (MO.SEFLAG[moid] & 0x40) == 0$
+                ALIGN($TARGET_SEC_ALIGN_STR$)$SPC$
+			$END$
+			$IF (MO.MEMATR[moid] & TA_NOWRITE) == 0
+							&& (MO.MEMATR[moid] & TA_MEMINI) == 0$
+				(NOLOAD)$SPC$
+			$END$
+			:$SPC$
+			{$NL$
+        $END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®éå§ã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x400) != 0$
+			$IF ISFUNCTION("GENERATE_GP_LABEL")$
+				$GENERATE_GP_LABEL()$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x100) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$TAB$$PREFIX_START$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$TAB$$PREFIX_START$ssrpw_all = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x10) != 0$
+			$IF !EQ(MO.PLABEL[moid], "")$
+				$TAB$$TAB$$PREFIX_START$$MO.PLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+			$IF !EQ(MO.SLABEL[moid], ALT(omit_start_slabel,""))$
+				$TAB$$TAB$$PREFIX_START$$MO.SLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x04) != 0$
+			$IF (MO.SEFLAG[moid] & 0x01) == 0$
+				$NL$
+			$END$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])
+					&& !EQ(MO.MLABEL[moid], ALT(omit_start_mlabel,""))$
+				$TAB$$TAB$$PREFIX_START$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+			$TAB$$TAB$
+		$END$
+
+$		// ãªã³ã¯ãããã¡ã¤ã«è¨è¿°ã®çæ
+		$section_dscr = SECTION_DESCRIPTION(MO.SECTION[moid])$
+		$IF MO.TYPE[moid] == TOPPERS_ATTMOD$
+			$IF EQ(MO.MODULE[moid], "kernel_mem.o")$
+                $FOREACH sec section_dscr$
+                    kernel_mem2.o($sec$)$SPC$
+                $END$
+			$ELSE$
+				$module_name = REGEX_REPLACE(MO.MODULE[moid],"\.a$","\.a(\*")$
+                $FOREACH sec section_dscr$
+                    $module_name$($sec$)$SPC$
+                    $IF !EQ(MO.MODULE[moid], module_name)$
+                        )
+                    $END$
+                $END$
+                $SPC$
+			$END$
+		$ELIF MO.TYPE[moid] == TOPPERS_ATTSEC$
+            *($section_dscr$)$SPC$
+		$ELSE$
+$			// ã¦ã¼ã¶ã¹ã¿ãã¯é å
+			Os_Lcfg.o($section_dscr$)$SPC$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®çµäºã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x08) != 0$
+			$NL$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])$
+				$TAB$$TAB$$PREFIX_END$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$$TAB$$PREFIX_END$$MO.SLABEL[moid]$ = .;$NL$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$TAB$$PREFIX_END$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$TAB$$PREFIX_END$ssrpw_all = .;$NL$
+			$END$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã®çµäºè¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$} > $REG.REGNAME[MO.MEMREG[moid]]$
+			$IF !OMIT_IDATA$
+                $SPC$
+				$IF !EQ(MO.ILABEL[moid], "")$
+					$reset_lma = 1$
+				$ELIF reset_lma$
+					$reset_lma = 0$
+				$END$
+			$END$
+			$IF ISFUNCTION("TARGET_CODE_FILLER")$
+				$TARGET_CODE_FILLER(moid)$
+			$END$
+			$NL$
+$           // =begin deleted for ghs
+$ 			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+$ 				$TAB$$PREFIX_START$$MO.ILABEL[moid]$ = LOADADDR(.$MO.SLABEL[moid]$);$NL$
+$ 			$END$
+$           // =end deleted for ghs
+		$END$
+
+$		// ã¢ã©ã¤ã³è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x20) != 0$
+			$TAB$. = ALIGN($TARGET_PAGE_SIZE_STR$);$NL$
+		$ELIF (MO.SEFLAG[moid] & 0x08) != 0$
+$			// ã»ã¯ã·ã§ã³ãç¶ç¶ãã¦ããå ´åã«ã¯ï¼TABã1ã¤åºå
+			$IF (MO.SEFLAG[moid] & 0x02) == 0$$TAB$$END$
+			$TAB$. = ALIGN($TARGET_SEC_ALIGN_STR$);$NL$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®ä¸éã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x08) != 0$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])$
+$				// ã»ã¯ã·ã§ã³ãç¶ç¶ãã¦ããå ´åã«ã¯ï¼TABã1ã¤åºå
+				$IF (MO.SEFLAG[moid] & 0x02) == 0$$TAB$$END$
+				$TAB$$PREFIX_LIMIT$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$$PREFIX_LIMIT$$MO.SLABEL[moid]$ = .;$NL$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x20) != 0$
+			$IF !EQ(MO.PLABEL[moid], "")$
+				$TAB$$PREFIX_LIMIT$$MO.PLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$PREFIX_LIMIT$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$PREFIX_LIMIT$ssrpw_all = .;$NL$
+			$END$
+		$END$
+
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$NL$
+		$END$
+
+$		// ã¡ã¢ãªãªã¼ã¸ã§ã³æ«ã§ã¢ã©ã¤ã³ãããããã®ããã¼ã»ã¯ã·ã§ã³ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x80) != 0$
+			$TAB$.$REG.REGNAME[MO.MEMREG[moid]]$_align$SPC$
+					ALIGN($TARGET_SEC_ALIGN_STR$) : {$NL$
+			$TAB$$TAB$__$REG.REGNAME[MO.MEMREG[moid]]$_align = .;$NL$
+$           // ä¸­èº«ãç©ºã®åºåã»ã¯ã·ã§ã³ã¯ãªã³ã«ã«ãã£ã¦ç¡è¦ãããããï¼
+$           // ããã¼ã®ãã¼ã¿ãå
+¥ãã¦ãã
+            $TAB$$TAB$. += 1; /*dummy*/$NL$
+			$TAB$} > $REG.REGNAME[MO.MEMREG[moid]]$ $NL$
+			$TAB$. = ALIGN($TARGET_SEC_ALIGN_STR$);$NL$
+			$TAB$___$REG.REGNAME[MO.MEMREG[moid]]$_align = .;$NL$
+			$NL$
+		$END$
+
+        $preid = moid$
+	$END$
+$END$
+
+$FOREACH lsid RANGE(1, numls)$
+	$TAB$$LNKSEC.SECTION[lsid]$ ALIGN(16) : {$NL$
+	$TAB$$TAB$*($LNKSEC.SECTION[lsid]$)$NL$
+	$TAB$} > $REG.REGNAME[LNKSEC.MEMREG[lsid]]$$NL$
+	$NL$
+$END$
+
+$	// C++testã§å¿
+è¦ãªæ¨æºã©ã¤ãã©ãªã§ä½¿ç¨ããã»ã¯ã·ã§ã³
+$TAB$.dummy_rom_for_cpptest : {$NL$
+$TAB$$TAB$*(.ctors.65535) *(.eh_frame)$NL$
+$TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+$TAB$. = ALIGN(64);$NL$$NL$
+$TAB$.dummy_ram_for_cpptest : {$NL$
+$TAB$$TAB$_end = .;$NL$
+$TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+$TAB$. = ALIGN(64);$NL$$NL$
+
+$TAB$.tdata ALIGN (4) :$NL$
+$TAB${$NL$
+$TAB$	PROVIDE(__ep = .);$NL$
+$TAB$	*(.tbyte)$NL$
+$TAB$	*(.tcommon_byte)$NL$
+$TAB$	*(.tdata)$NL$
+$TAB$	*(.tbss)$NL$
+$TAB$	*(.tcommon)$NL$
+$TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+$NL$$NL$
+
+$TAB$/DISCARD/ : {$NL$
+$TAB$$TAB$*(.rel.dyn)$NL$
+$TAB$}$NL$
+$NL$
+
+$TAB$/* DWARF debug sections.$NL$
+$TAB$Symbols in the DWARF debugging sections are relative to $NL$
+$TAB$the beginning of the section so we begin them at 0.  */$NL$
+$NL$
+$TAB$/* DWARF 1 */$NL$
+$TAB$.debug          0 : { *(.debug) }$NL$
+$TAB$.line           0 : { *(.line) }$NL$
+$NL$
+$TAB$/* GNU DWARF 1 extensions */$NL$
+$TAB$.debug_srcinfo  0 : { *(.debug_srcinfo) }$NL$
+$TAB$.debug_sfnames  0 : { *(.debug_sfnames) }$NL$
+$NL$
+}$NL$
Index: /atk2-sc3-1.4.0-ntisr/arch/ghs/tool_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/ghs/tool_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/ghs/tool_svc.h	(revision 172)
@@ -0,0 +1,505 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2013 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: tool_svc.h 115 2014-12-10 01:33:17Z t_ishikawa $
+ */
+
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#ifndef TOPPERS_TOOL_SVC_H
+#define TOPPERS_TOOL_SVC_H
+
+#define SVC_TRAP(system_service)	_trap_ ## system_service
+
+#ifndef TOPPERS_SVC_FUNCCALL
+#define StartOS						_trap_StartOS
+#define ShutdownOS					_trap_ShutdownOS
+#define ActivateTask				_trap_ActivateTask
+#define TerminateTask				_trap_TerminateTask
+#define ChainTask					_trap_ChainTask
+#define Schedule					_trap_Schedule
+#define GetTaskID					_trap_GetTaskID
+#define GetTaskState				_trap_GetTaskState
+#define EnableAllInterrupts			_trap_EnableAllInterrupts
+#define DisableAllInterrupts		_kernel_DisableAllInterrupts
+#define ResumeAllInterrupts			_trap_ResumeAllInterrupts
+#define SuspendAllInterrupts		_trap_SuspendAllInterrupts
+#define ResumeOSInterrupts			_trap_ResumeOSInterrupts
+#define SuspendOSInterrupts			_trap_SuspendOSInterrupts
+#define GetISRID					_trap_GetISRID
+#define DisableInterruptSource		_trap_DisableInterruptSource
+#define EnableInterruptSource		_trap_EnableInterruptSource
+#define GetResource					_trap_GetResource
+#define ReleaseResource				_trap_ReleaseResource
+#define SetEvent					_trap_SetEvent
+#define ClearEvent					_trap_ClearEvent
+#define GetEvent					_trap_GetEvent
+#define WaitEvent					_trap_WaitEvent
+#define GetAlarmBase				_trap_GetAlarmBase
+#define GetAlarm					_trap_GetAlarm
+#define SetRelAlarm					_trap_SetRelAlarm
+#define SetAbsAlarm					_trap_SetAbsAlarm
+#define CancelAlarm					_trap_CancelAlarm
+#define IncrementCounter			_trap_IncrementCounter
+#define GetCounterValue				_trap_GetCounterValue
+#define GetElapsedValue				_trap_GetElapsedValue
+#define CheckISRMemoryAccess		_trap_CheckISRMemoryAccess
+#define CheckTaskMemoryAccess		_trap_CheckTaskMemoryAccess
+#define CheckTaskAccess				_trap_CheckTaskAccess
+#define CheckISRAccess				_trap_CheckISRAccess
+#define CheckAlarmAccess			_trap_CheckAlarmAccess
+#define CheckResourceAccess			_trap_CheckResourceAccess
+#define CheckCounterAccess			_trap_CheckCounterAccess
+#define CheckScheduleTableAccess	_trap_CheckScheduleTableAccess
+#define CheckTaskOwnership			_trap_CheckTaskOwnership
+#define CheckISROwnership			_trap_CheckISROwnership
+#define CheckAlarmOwnership			_trap_CheckAlarmOwnership
+#define CheckCounterOwnership		_trap_CheckCounterOwnership
+#define CheckScheduleTableOwnership	_trap_CheckScheduleTableOwnership
+#define GetApplicationID			_trap_GetApplicationID
+#define CallTrustedFunction			_trap_CallTrustedFunction
+#define GetApplicationState			_trap_GetApplicationState
+#define GetActiveApplicationMode	_trap_GetActiveApplicationMode
+#define StartScheduleTableRel		_trap_StartScheduleTableRel
+#define StartScheduleTableAbs		_trap_StartScheduleTableAbs
+#define StopScheduleTable			_trap_StopScheduleTable
+#define NextScheduleTable			_trap_NextScheduleTable
+#define GetScheduleTableStatus		_trap_GetScheduleTableStatus
+#define GetFaultyContext			_trap_GetFaultyContext
+#define ioc_send_generic			_trap_ioc_send_generic
+#define ioc_write_generic			_trap_ioc_write_generic
+#define ioc_receive_generic			_trap_ioc_receive_generic
+#define ioc_read_generic			_trap_ioc_read_generic
+#define ioc_empty_queue_generic		_trap_ioc_empty_queue_generic
+#define AllowAccess					_trap_AllowAccess
+#define TerminateApplication		_trap_TerminateApplication
+#endif
+
+#ifndef TOPPERS_MACRO_ONLY
+
+LOCAL_INLINE void
+_trap_StartOS(AppModeType Mode)
+{
+	CAL_SVC_1N(void, TFN_STARTOS, AppModeType, Mode);
+}
+
+LOCAL_INLINE void
+_trap_ShutdownOS(StatusType Error)
+{
+	CAL_SVC_1N(void, TFN_SHUTDOWNOS, StatusType, Error);
+}
+
+LOCAL_INLINE StatusType
+_trap_ActivateTask(TaskType TaskID)
+{
+	return CAL_SVC_1M(StatusType, TFN_ACTIVATETASK, TaskType, TaskID);
+}
+
+LOCAL_INLINE StatusType
+_trap_TerminateTask(void)
+{
+	return CAL_SVC_0M(StatusType, TFN_TERMINATETASK);
+}
+
+LOCAL_INLINE StatusType
+_trap_ChainTask(TaskType TaskID)
+{
+	return CAL_SVC_1M(StatusType, TFN_CHAINTASK, TaskType, TaskID);
+}
+
+LOCAL_INLINE StatusType
+_trap_Schedule(void)
+{
+	return CAL_SVC_0M(StatusType, TFN_SCHEDULE);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetTaskID(TaskRefType TaskID)
+{
+	return CAL_SVC_1M(StatusType, TFN_GETTASKID, TaskRefType, TaskID);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetTaskState(TaskType TaskID, TaskStateRefType State)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETTASKSTATE, TaskType, TaskID, TaskStateRefType, State);
+}
+
+LOCAL_INLINE void
+_trap_EnableAllInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_ENABLEALLINTERRUPTS);
+}
+
+LOCAL_INLINE void
+_trap_DisableAllInterrupts(void)
+{
+	_kernel_DisableAllInterrupts();
+}
+
+LOCAL_INLINE void
+_trap_ResumeAllInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_RESUMEALLINTERRUPTS);
+}
+
+LOCAL_INLINE void
+_trap_SuspendAllInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_SUSPENDALLINTERRUPTS);
+}
+
+LOCAL_INLINE void
+_trap_ResumeOSInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_RESUMEOSINTERRUPTS);
+}
+
+LOCAL_INLINE void
+_trap_SuspendOSInterrupts(void)
+{
+	CAL_SVC_0N(void, TFN_SUSPENDOSINTERRUPTS);
+}
+
+LOCAL_INLINE ISRType
+_trap_GetISRID(void)
+{
+	return CAL_SVC_0M(ISRType, TFN_GETISRID);
+}
+
+LOCAL_INLINE StatusType
+_trap_DisableInterruptSource(ISRType DisableISR)
+{
+	return CAL_SVC_1M(StatusType, TFN_DISABLEINTERRUPTSOURCE, ISRType, DisableISR);
+}
+
+LOCAL_INLINE StatusType
+_trap_EnableInterruptSource(ISRType EnableISR)
+{
+	return CAL_SVC_1M(StatusType, TFN_ENABLEINTERRUPTSOURCE, ISRType, EnableISR);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetResource(ResourceType ResID)
+{
+	return CAL_SVC_1M(StatusType, TFN_GETRESOURCE, ResourceType, ResID);
+}
+
+LOCAL_INLINE StatusType
+_trap_ReleaseResource(ResourceType ResID)
+{
+	return CAL_SVC_1M(StatusType, TFN_RELEASERESOURCE, ResourceType, ResID);
+}
+
+LOCAL_INLINE StatusType
+_trap_SetEvent(TaskType TaskID, EventMaskType Mask)
+{
+	return CAL_SVC_2M(StatusType, TFN_SETEVENT, TaskType, TaskID, EventMaskType, Mask);
+}
+
+LOCAL_INLINE StatusType
+_trap_ClearEvent(EventMaskType Mask)
+{
+	return CAL_SVC_1M(StatusType, TFN_CLEAREVENT, EventMaskType, Mask);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetEvent(TaskType TaskID, EventMaskRefType Event)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETEVENT, TaskType, TaskID, EventMaskRefType, Event);
+}
+
+LOCAL_INLINE StatusType
+_trap_WaitEvent(EventMaskType Mask)
+{
+	return CAL_SVC_1M(StatusType, TFN_WAITEVENT, EventMaskType, Mask);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetAlarmBase(AlarmType AlarmID, AlarmBaseRefType Info)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETALARMBASE, AlarmType, AlarmID, AlarmBaseRefType, Info);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetAlarm(AlarmType AlarmID, TickRefType Tick)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETALARM, AlarmType, AlarmID, TickRefType, Tick);
+}
+
+LOCAL_INLINE StatusType
+_trap_SetRelAlarm(AlarmType AlarmID, TickType increment, TickType cycle)
+{
+	return CAL_SVC_3M(StatusType, TFN_SETRELALARM, AlarmType, AlarmID, TickType, increment, TickType, cycle);
+}
+
+LOCAL_INLINE StatusType
+_trap_SetAbsAlarm(AlarmType AlarmID, TickType start, TickType cycle)
+{
+	return CAL_SVC_3M(StatusType, TFN_SETABSALARM, AlarmType, AlarmID, TickType, start, TickType, cycle);
+}
+
+LOCAL_INLINE StatusType
+_trap_CancelAlarm(AlarmType AlarmID)
+{
+	return CAL_SVC_1M(StatusType, TFN_CANCELALARM, AlarmType, AlarmID);
+}
+
+LOCAL_INLINE StatusType
+_trap_IncrementCounter(CounterType CounterID)
+{
+	return CAL_SVC_1M(StatusType, TFN_INCREMENTCOUNTER, CounterType, CounterID);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetCounterValue(CounterType CounterID, TickRefType Value)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETCOUNTERVALUE, CounterType, CounterID, TickRefType, Value);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetElapsedValue(CounterType CounterID, TickRefType Value, TickRefType ElapsedValue)
+{
+	return CAL_SVC_3M(StatusType, TFN_GETELAPSEDVALUE, CounterType, CounterID, TickRefType, Value, TickRefType, ElapsedValue);
+}
+
+LOCAL_INLINE AccessType
+_trap_CheckISRMemoryAccess(ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size)
+{
+	return CAL_SVC_3M(AccessType, TFN_CHECKISRMEMORYACCESS, ISRType, ISRID, MemoryStartAddressType, Address, MemorySizeType, Size);
+}
+
+LOCAL_INLINE AccessType
+_trap_CheckTaskMemoryAccess(TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size)
+{
+	return CAL_SVC_3M(AccessType, TFN_CHECKTASKMEMORYACCESS, TaskType, TaskID, MemoryStartAddressType, Address, MemorySizeType, Size);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckTaskAccess(ApplicationType ApplID, TaskType TaskID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKTASKACCESS, ApplicationType, ApplID, TaskType, TaskID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckISRAccess(ApplicationType ApplID, ISRType ISRID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKISRACCESS, ApplicationType, ApplID, ISRType, ISRID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckAlarmAccess(ApplicationType ApplID, AlarmType AlarmID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKALARMACCESS, ApplicationType, ApplID, AlarmType, AlarmID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckResourceAccess(ApplicationType ApplID, ResourceType ResID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKRESOURCEACCESS, ApplicationType, ApplID, ResourceType, ResID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckCounterAccess(ApplicationType ApplID, CounterType CounterID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKCOUNTERACCESS, ApplicationType, ApplID, CounterType, CounterID);
+}
+
+LOCAL_INLINE ObjectAccessType
+_trap_CheckScheduleTableAccess(ApplicationType ApplID, ScheduleTableType ScheduleTableID)
+{
+	return CAL_SVC_2M(ObjectAccessType, TFN_CHECKSCHEDULETABLEACCESS, ApplicationType, ApplID, ScheduleTableType, ScheduleTableID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckTaskOwnership(TaskType TaskID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKTASKOWNERSHIP, TaskType, TaskID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckISROwnership(ISRType ISRID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKISROWNERSHIP, ISRType, ISRID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckAlarmOwnership(AlarmType AlarmID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKALARMOWNERSHIP, AlarmType, AlarmID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckCounterOwnership(CounterType CounterID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKCOUNTEROWNERSHIP, CounterType, CounterID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_CheckScheduleTableOwnership(ScheduleTableType ScheduleTableID)
+{
+	return CAL_SVC_1M(ApplicationType, TFN_CHECKSCHEDULETABLEOWNERSHIP, ScheduleTableType, ScheduleTableID);
+}
+
+LOCAL_INLINE ApplicationType
+_trap_GetApplicationID(void)
+{
+	return CAL_SVC_0M(ApplicationType, TFN_GETAPPLICATIONID);
+}
+
+LOCAL_INLINE StatusType
+_trap_CallTrustedFunction(TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams)
+{
+	return CAL_SVC_2M(StatusType, TFN_CALLTRUSTEDFUNCTION, TrustedFunctionIndexType, FunctionIndex, TrustedFunctionParameterRefType, FunctionParams);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetApplicationState(ApplicationType Application, ApplicationStateRefType Value)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETAPPLICATIONSTATE, ApplicationType, Application, ApplicationStateRefType, Value);
+}
+
+LOCAL_INLINE AppModeType
+_trap_GetActiveApplicationMode(void)
+{
+	return CAL_SVC_0M(AppModeType, TFN_GETACTIVEAPPLICATIONMODE);
+}
+
+LOCAL_INLINE StatusType
+_trap_StartScheduleTableRel(ScheduleTableType ScheduleTableID, TickType Offset)
+{
+	return CAL_SVC_2M(StatusType, TFN_STARTSCHEDULETABLEREL, ScheduleTableType, ScheduleTableID, TickType, Offset);
+}
+
+LOCAL_INLINE StatusType
+_trap_StartScheduleTableAbs(ScheduleTableType ScheduleTableID, TickType Start)
+{
+	return CAL_SVC_2M(StatusType, TFN_STARTSCHEDULETABLEABS, ScheduleTableType, ScheduleTableID, TickType, Start);
+}
+
+LOCAL_INLINE StatusType
+_trap_StopScheduleTable(ScheduleTableType ScheduleTableID)
+{
+	return CAL_SVC_1M(StatusType, TFN_STOPSCHEDULETABLE, ScheduleTableType, ScheduleTableID);
+}
+
+LOCAL_INLINE StatusType
+_trap_NextScheduleTable(ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To)
+{
+	return CAL_SVC_2M(StatusType, TFN_NEXTSCHEDULETABLE, ScheduleTableType, ScheduleTableID_From, ScheduleTableType, ScheduleTableID_To);
+}
+
+LOCAL_INLINE StatusType
+_trap_GetScheduleTableStatus(ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus)
+{
+	return CAL_SVC_2M(StatusType, TFN_GETSCHEDULETABLESTATUS, ScheduleTableType, ScheduleTableID, ScheduleTableStatusRefType, ScheduleStatus);
+}
+
+LOCAL_INLINE FaultyContextType
+_trap_GetFaultyContext(void)
+{
+	return CAL_SVC_0M(FaultyContextType, TFN_GETFAULTYCONTEXT);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_send_generic(IocType IocWrapperId, const void *in)
+{
+	return CAL_SVC_2M(Std_ReturnType, TFN_IOC_SEND_GENERIC, IocType, IocWrapperId, const void *, in);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_write_generic(IocType IocWrapperId, const void *in)
+{
+	return CAL_SVC_2M(Std_ReturnType, TFN_IOC_WRITE_GENERIC, IocType, IocWrapperId, const void *, in);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_receive_generic(IocType IocId, void *out)
+{
+	return CAL_SVC_2M(Std_ReturnType, TFN_IOC_RECEIVE_GENERIC, IocType, IocId, void *, out);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_read_generic(IocType IocId, void *out)
+{
+	return CAL_SVC_2M(Std_ReturnType, TFN_IOC_READ_GENERIC, IocType, IocId, void *, out);
+}
+
+LOCAL_INLINE Std_ReturnType
+_trap_ioc_empty_queue_generic(IocType IocId)
+{
+	return CAL_SVC_1M(Std_ReturnType, TFN_IOC_EMPTY_QUEUE_GENERIC, IocType, IocId);
+}
+
+LOCAL_INLINE StatusType
+_trap_AllowAccess(void)
+{
+	return CAL_SVC_0M(StatusType, TFN_ALLOWACCESS);
+}
+
+LOCAL_INLINE StatusType
+_trap_TerminateApplication(ApplicationType Application, RestartType RestartOption)
+{
+	return CAL_SVC_2M(StatusType, TFN_TERMINATEAPPLICATION, ApplicationType, Application, RestartType, RestartOption);
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_TOOL_SVC_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/logtrace/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/logtrace/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/logtrace/MANIFEST	(revision 172)
@@ -0,0 +1,4 @@
+MANIFEST
+trace_config.c
+trace_config.h
+trace_dump.c
Index: /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_config.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_config.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_config.c	(revision 172)
@@ -0,0 +1,301 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: trace_config.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ãã¬ã¼ã¹ã­ã°æ©è½
+ */
+
+#include "kernel_impl.h"
+#include "task.h"
+
+#include "target_timer.h"
+
+/*
+ *  æ¬æ¥ã¯trace_config.hã«ãã­ãã¿ã¤ãå®£è¨ãç½®ãã¹ãã ãï¼TCBã
+ *  å®ç¾©ãããåãªã®ã§ï¼ã³ã³ãã¤ã«ãéããªãããããã«ç½®ã
+ */
+extern void log_dsp_enter(const TCB *p_tcb);
+extern void log_dsp_leave(const TCB *p_tcb);
+
+/*
+ *  å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+static StatusType trace_wri_log(TRACE *p_trace);
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãããã¡ã¨ããã«ã¢ã¯ã»ã¹ããããã®ãã¤ã³ã¿
+ */
+static TRACE			trace_buffer[TCNT_TRACE_BUFFER];    /* ãã¬ã¼ã¹ã­ã°ãããã¡ */
+static uint32			trace_count;                        /* ãã¬ã¼ã¹ã­ã°ãããã¡ä¸­ã®ã­ã°ã®æ° */
+static uint32			trace_head;                         /* å
+é ­ã®ãã¬ã¼ã¹ã­ã°ã®æ ¼ç´ä½ç½® */
+static uint32			trace_tail;                         /* æ¬¡ã®ãã¬ã¼ã¹ã­ã°ã®æ ¼ç´ä½ç½® */
+static TraceModeType	trace_mode = TRACE_AUTOSTOP;        /* ãã¬ã¼ã¹ã¢ã¼ã */
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°æ©è½ã®åæå
+ */
+void
+trace_initialize(uintptr exinf)
+{
+	TraceModeType mode = ((TraceModeType) exinf);
+
+	trace_count = 0U;
+	trace_head = 0U;
+	trace_tail = 0U;
+	trace_mode = mode;
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®éå§
+ */
+StatusType
+trace_sta_log(TraceModeType mode)
+{
+	if ((mode & TRACE_CLEAR) != 0U) {
+		trace_count = 0U;
+		trace_head = 0U;
+		trace_tail = 0U;
+	}
+	trace_mode = mode;
+	return(E_OK);
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®æ¸è¾¼ã¿
+ */
+static StatusType
+trace_wri_log(TRACE *p_trace)
+{
+	SIL_PRE_LOC;
+
+	if (trace_mode != TRACE_STOP) {
+		SIL_LOC_INT();
+
+		/*
+		 *  ãã¬ã¼ã¹æå»ã®è¨­å®
+		 *
+		 *  LOG_WRI_LOG_ENTERããå¼ã°ããå ´åã«p_trace->logtimãæ¸ãæ
+		 *  ãã¦ãã¾ãã®ã¯æ°æã¡ãæªããï¼wri_logã®æ¹ã§ä¸æ¸ãããããå
+		 *  é¡ã¯ãªã
+		 */
+		p_trace->logtim = GET_UTIM();
+
+		/*
+		 *  ãã¬ã¼ã¹ãããã¡ã«è¨é²
+		 */
+		trace_buffer[trace_tail] = *p_trace;
+		trace_tail++;
+		if (trace_tail >= TCNT_TRACE_BUFFER) {
+			trace_tail = 0U;
+		}
+		if (trace_count < TCNT_TRACE_BUFFER) {
+			trace_count++;
+			if ((trace_count >= TCNT_TRACE_BUFFER)
+				&& ((trace_mode & TRACE_AUTOSTOP) != 0U)) {
+				trace_mode = TRACE_STOP;
+			}
+		}
+		else {
+			trace_head = trace_tail;
+		}
+
+		SIL_UNL_INT();
+	}
+	return(E_OK);
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®èª­åºã
+ */
+StatusType
+trace_rea_log(TRACE *p_trace)
+{
+	StatusType ercd;
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°ãããã¡ããã®ååºã
+	 */
+	if (trace_count > 0U) {
+		*p_trace = trace_buffer[trace_head];
+		trace_count--;
+		trace_head++;
+		if (trace_head >= TCNT_TRACE_BUFFER) {
+			trace_head = 0U;
+		}
+		ercd = E_OK;
+	}
+	else {
+		ercd = E_NOT_OK;
+	}
+
+	SIL_UNL_INT();
+	return(ercd);
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãåºåããããã®ã©ã¤ãã©ãªé¢æ°
+ */
+
+void
+trace_write_0(uint32 type)
+{
+	TRACE trace;
+
+	trace.logtype = type;
+	(void) trace_wri_log(&trace);
+}
+
+void
+trace_write_1(uint32 type, const uintptr arg1)
+{
+	TRACE trace;
+
+	trace.logtype = type;
+	trace.loginfo[0] = arg1;
+	(void) trace_wri_log(&trace);
+}
+
+void
+trace_write_2(uint32 type, uintptr arg1, uintptr arg2)
+{
+	TRACE trace;
+
+	trace.logtype = type;
+	trace.loginfo[0] = arg1;
+	trace.loginfo[1] = arg2;
+	(void) trace_wri_log(&trace);
+}
+
+void
+trace_write_3(uint32 type, uintptr arg1, uintptr arg2, uintptr arg3)
+{
+	TRACE trace;
+
+	trace.logtype = type;
+	trace.loginfo[0] = arg1;
+	trace.loginfo[1] = arg2;
+	trace.loginfo[2] = arg3;
+	(void) trace_wri_log(&trace);
+}
+
+void
+trace_write_4(uint32 type, uintptr arg1, uintptr arg2, uintptr arg3,
+			  uintptr arg4)
+{
+	TRACE trace;
+
+	trace.logtype = type;
+	trace.loginfo[0] = arg1;
+	trace.loginfo[1] = arg2;
+	trace.loginfo[2] = arg3;
+	trace.loginfo[3] = arg4;
+	(void) trace_wri_log(&trace);
+}
+
+void
+trace_write_5(uint32 type, uintptr arg1, uintptr arg2, uintptr arg3,
+			  uintptr arg4, uintptr arg5)
+{
+	TRACE trace;
+
+	trace.logtype = type;
+	trace.loginfo[0] = arg1;
+	trace.loginfo[1] = arg2;
+	trace.loginfo[2] = arg3;
+	trace.loginfo[3] = arg4;
+	trace.loginfo[4] = arg5;
+	(void) trace_wri_log(&trace);
+}
+
+/*
+ *  ã¢ã»ã³ããªè¨èªã§è¨è¿°ãããã³ã¼ããããã¬ã¼ã¹ã­ã°ãåºåããããã®é¢
+ *  æ°
+ */
+void
+log_dsp_enter(const TCB *p_tcb)
+{
+	trace_1(LOG_TYPE_DSP | LOG_ENTER, (const uintptr) p_tcb);
+}
+
+void
+log_dsp_leave(const TCB *p_tcb)
+{
+	trace_1(LOG_TYPE_DSP | LOG_LEAVE, (const uintptr) p_tcb);
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_config.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_config.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_config.h	(revision 172)
@@ -0,0 +1,417 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: trace_config.h 439 2015-12-09 12:33:41Z aisincom-nishioka $
+ */
+
+/*
+ *		ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ */
+
+#ifndef TOPPERS_TRACE_CONFIG_H
+#define TOPPERS_TRACE_CONFIG_H
+
+#ifdef TOPPERS_ENABLE_TRACE
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãããã¡ã®ãµã¤ãº
+ */
+#ifndef TCNT_TRACE_BUFFER
+#define TCNT_TRACE_BUFFER	UINT_C(8192)
+
+#endif /* TCNT_TRACE_BUFFER */
+
+/*
+ *  ãã¬ã¼ã¹æå»ã®åå¾æ¹æ³
+ */
+#ifndef GET_UTIM
+#define GET_UTIM()		(get_tim_utime())
+#endif /* GET_UTIM */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®ãã¼ã¿æ§é 
+ *
+ *  ã·ã¹ãã ã­ã°æ©è½ã®ã­ã°æ
+å ±ã®ãã¼ã¿æ§é ã¨åããã®ãç¨ãã
+ */
+#include "t_syslog.h"
+typedef	SYSLOG TRACE;
+
+typedef	uint32 TraceModeType;                 /* ãµã¼ãã¹ã³ã¼ã«ã®åä½ã¢ã¼ã */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãã¬ã¼ã¹ã¢ã¼ãã®å®ç¾©
+ */
+#define TRACE_STOP			UINT_C(0x00)    /* ãã¬ã¼ã¹åæ­¢ */
+#define TRACE_RINGBUF		UINT_C(0x01)    /* ãªã³ã°ãããã¡ã¢ã¼ã */
+#define TRACE_AUTOSTOP		UINT_C(0x02)    /* èªååæ­¢ã¢ã¼ã */
+#define TRACE_CLEAR			UINT_C(0x04)    /* ãã¬ã¼ã¹ã­ã°ã®ã¯ãªã¢ */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°æ©è½ã®åæå
+ *
+ *  ãã¬ã¼ã¹ã­ã°æ©è½ãåæåããï¼åæåã«ã¼ãã³ã¨ãã¦ç»é²ãããã¨ãæ³
+ *  å®ãã¦ããï¼å¼æ°ã«ããæ¬¡ã®åä½ãè¡ã
+ *
+ *  TRACE_STOPï¼åæåã®ã¿ã§ãã¬ã¼ã¹ã¯éå§ããªã
+ *  TRACE_RINGBUFï¼ãªã³ã°ãããã¡ã¢ã¼ãã§ãã¬ã¼ã¹ãéå§
+ *  TRACE_AUTOSTOPï¼èªååæ­¢ã¢ã¼ãã§ãã¬ã¼ã¹ãéå§
+ */
+extern void trace_initialize(uintptr exinf);
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®éå§
+ *
+ *  ãã¬ã¼ã¹ã­ã°ã®è¨é²ãéå§ï¼åæ­¢ããï¼å¼æ°ã«ããæ¬¡ã®åä½ãè¡ã
+ *
+ *  TRACE_STOPï¼ãã¬ã¼ã¹ãåæ­¢
+ *  TRACE_RINGBUFï¼ãªã³ã°ãããã¡ã¢ã¼ãã§ãã¬ã¼ã¹ãéå§
+ *  TRACE_AUTOSTOPï¼èªååæ­¢ã¢ã¼ãã§ãã¬ã¼ã¹ãéå§
+ *  TRACE_CLEARï¼ãã¬ã¼ã¹ã­ã°ãã¯ãªã¢
+ */
+extern StatusType trace_sta_log(TraceModeType mode);
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®èª­åºã
+ */
+extern StatusType trace_rea_log(TRACE *p_trace);
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®ãã³ãï¼trace_dump.cï¼
+ *
+ *  ãã¬ã¼ã¹ã­ã°ããã³ãããï¼çµäºå¦çã«ã¼ãã³ã¨ãã¦ç»é²ãããã¨ãæ³å®
+ *  ãã¦ããï¼å¼æ°ã¨ãã¦ï¼ãã³ãå
+ã¨ãªãæå­åºåé¢æ°ã¸ã®ãã¤ã³ã¿ãæ¸¡ã
+ *  ã¿ã¼ã²ããä¾å­ã®ä½ã¬ãã«æå­åºåãå©ç¨ããå ´åã«ã¯ï¼target_putcãæ¸¡
+ *  ã
+ */
+extern void trace_dump(void (*exinf)(char8 c));
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãåºåããããã®ã©ã¤ãã©ãªé¢æ°
+ */
+extern void trace_write_0(uint32 type);
+extern void trace_write_1(uint32 type, const uintptr arg1);
+extern void trace_write_2(uint32 type, uintptr arg1, uintptr arg2);
+extern void trace_write_3(uint32 type, uintptr arg1, uintptr arg2, uintptr arg3);
+extern void trace_write_4(uint32 type, uintptr arg1, uintptr arg2, uintptr arg3, uintptr arg4);
+extern void trace_write_5(uint32 type, uintptr arg1, uintptr arg2, uintptr arg3, uintptr arg4, uintptr arg5);
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãåºåããããã®ãã¯ã­
+ */
+
+#define trace_0(type)								trace_write_0((type))
+#define trace_1(type, arg1)							trace_write_1((type), (arg1))
+#define trace_2(type, arg1, arg2)					trace_write_2((type), (arg1), (arg2))
+#define trace_3(type, arg1, arg2, arg3)				trace_write_3((type), (arg1), (arg2), (arg3))
+#define trace_4(type, arg1, arg2, arg3, arg4)		trace_write_4((type), (arg1), (arg2), (arg3), (arg4))
+#define trace_5(type, arg1, arg2, arg3, arg4, arg5)	trace_write_5((type), (arg1), (arg2), (arg3), (arg4), (arg5))
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°æ¹æ³ã®è¨­å®
+ */
+
+/*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®åå¾
+ */
+#define LOG_ISR_ENTER(isrid)	trace_1(LOG_TYPE_ISR | LOG_ENTER, (isrid))
+#define LOG_ISR_LEAVE(isrid)	trace_1(LOG_TYPE_ISR | LOG_LEAVE, (isrid))
+
+/*
+ *  ã¢ã©ã¼ã ãã³ãã©ã®åå¾
+ */
+#define LOG_ALM_ENTER(p_almcb)	trace_1(LOG_TYPE_ALM | LOG_ENTER, (uintptr) (p_almcb))
+#define LOG_ALM_LEAVE(p_almcb)	trace_1(LOG_TYPE_ALM | LOG_LEAVE, (uintptr) (p_almcb))
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦çã®åå¾
+ */
+#define LOG_SCHTBL_ENTER(p_schtblcb)	trace_1(LOG_TYPE_SCHTBL | LOG_ENTER, (uintptr) (p_schtblcb))
+#define LOG_SCHTBL_LEAVE(p_schtblcb)	trace_1(LOG_TYPE_SCHTBL | LOG_LEAVE, (uintptr) (p_schtblcb))
+
+/*
+ *  ã¿ã¹ã¯ã®ç¶æ
+å¤æ´
+ */
+#define LOG_TSKSTAT(p_tcb)	trace_2(LOG_TYPE_TSKSTAT, (uintptr) (p_tcb), (uintptr) (p_tcb)->tstat)
+
+/*
+ *  ãã£ã¹ãããã£ã®åå¾
+ */
+#define LOG_DSP_ENTER(p_tcb)	trace_1(LOG_TYPE_DSP | LOG_ENTER, (p_tcb))
+#define LOG_DSP_LEAVE(p_tcb)	trace_1(LOG_TYPE_DSP | LOG_LEAVE, (p_tcb))
+
+/*
+ * ã¦ã¼ã¶ã¼ãã¼ã¯
+ */
+#define LOG_TYPE_USER_MARK	UINT_C(0x100)
+#define LOG_USER_MARK(str)	trace_1(LOG_TYPE_USER_MARK, &(str))
+
+
+/*
+ *  ã·ã¹ãã ã³ã¼ã«
+ */
+
+/*
+ *  ã¿ã¹ã¯ç®¡çæ©è½
+ */
+
+#define LOG_ACTTSK_ENTER(tskid)			trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_ACTIVATETASK, (uintptr) (tskid))
+#define LOG_ACTTSK_LEAVE(ercd)			trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_ACTIVATETASK, (uintptr) (ercd))
+#define LOG_TERTSK_ENTER()				trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_TERMINATETASK)
+#define LOG_TERTSK_LEAVE(ercd)			trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_TERMINATETASK, (uintptr) (ercd))
+#define LOG_CHNTSK_ENTER(tskid)			trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_CHAINTASK, (uintptr) (tskid))
+#define LOG_CHNTSK_LEAVE(ercd)			trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHAINTASK, (uintptr) (ercd))
+#define LOG_SCHED_ENTER()				trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_SCHEDULE)
+#define LOG_SCHED_LEAVE(ercd)			trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_SCHEDULE, (uintptr) (ercd))
+#define LOG_GETTID_ENTER()				trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_GETTASKID)
+#define LOG_GETTID_LEAVE(ercd, p_tskid)	trace_3(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETTASKID, (uintptr) (ercd), (((ercd) == E_OK) ? (uintptr) (*(p_tskid)) : (0U)))
+#define LOG_GETTST_ENTER(tskid)			trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_GETTASKSTATE, (uintptr) (tskid))
+#define LOG_GETTST_LEAVE(ercd, p_state)	trace_3(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETTASKSTATE, (uintptr) (ercd), (((ercd) == E_OK) ? (uintptr) (*(p_state)) : (0U)))
+
+/*
+ * ã¤ãã³ãæ©è½
+ */
+#define LOG_SETEVT_ENTER(tskid, mask)			trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_SETEVENT, (uintptr) (tskid), (uintptr) (mask))
+#define LOG_SETEVT_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_SETEVENT, (uintptr) (ercd))
+#define LOG_CLREVT_ENTER(p_runtsk, mask)		trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_CLEAREVENT, (uintptr) (p_runtsk), (uintptr) (mask))
+#define LOG_CLREVT_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CLEAREVENT, (uintptr) (ercd))
+#define LOG_GETEVT_ENTER(tskid)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_GETEVENT, (uintptr) (tskid))
+#define LOG_GETEVT_LEAVE(ercd, tskid, p_mask)	trace_4(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETEVENT, (uintptr) (ercd), (uintptr) (tskid), (((ercd) == E_OK) ? (uintptr) (*(p_mask)) : (0U)))
+#define LOG_WAIEVT_ENTER(p_runtsk, mask)		trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_WAITEVENT, (uintptr) (p_runtsk), (uintptr) (mask))
+#define LOG_WAIEVT_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_WAITEVENT, (uintptr) (ercd))
+
+/*
+ * ãªã½ã¼ã¹æ©è½
+ */
+#define LOG_GETRES_ENTER(resid)	trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_GETRESOURCE, (uintptr) (resid))
+#define LOG_GETRES_LEAVE(ercd)	trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETRESOURCE, (uintptr) (ercd))
+#define LOG_RELRES_ENTER(resid)	trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_RELEASERESOURCE, (uintptr) (resid))
+#define LOG_RELRES_LEAVE(ercd)	trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_RELEASERESOURCE, (uintptr) (ercd))
+
+/*
+ * ã¢ã©ã¼ã æ©è½
+ */
+#define LOG_GETALB_ENTER(almid)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_GETALARMBASE, (uintptr) (almid))
+#define LOG_GETALB_LEAVE(ercd, info)			trace_5(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETALARMBASE, (uintptr) (ercd), (((ercd) == E_OK) ? ((info)->maxallowedvalue) : (0U)), (((ercd) == E_OK) ? ((info)->ticksperbase) : (0U)), (((ercd) == E_OK) ? ((info)->mincycle) : (0U)))
+#define LOG_GETALM_ENTER(almid)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_GETALARM, (uintptr) (almid))
+#define LOG_GETALM_LEAVE(ercd, p_tick)			trace_3(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETALARM, (uintptr) (ercd), (((ercd) == E_OK) ? (uintptr) (*(p_tick)) : (0U)))
+#define LOG_SETREL_ENTER(almid, incr, cycle)	trace_4(LOG_TYPE_SVC | LOG_ENTER, TFN_SETRELALARM, (uintptr) (almid), (uintptr) (incr), (uintptr) (cycle))
+#define LOG_SETREL_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_SETRELALARM, (uintptr) (ercd))
+#define LOG_SETABS_ENTER(almid, start, cycle)	trace_4(LOG_TYPE_SVC | LOG_ENTER, TFN_SETABSALARM, (uintptr) (almid), (uintptr) (start), (uintptr) (cycle))
+#define LOG_SETABS_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_SETABSALARM, (uintptr) (ercd))
+#define LOG_CANALM_ENTER(almid)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_CANCELALARM, (uintptr) (almid))
+#define LOG_CANALM_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CANCELALARM, (uintptr) (ercd))
+
+/*
+ * ã«ã¦ã³ã¿æ©è½
+ */
+#define LOG_INCCNT_ENTER(cntid)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_INCREMENTCOUNTER, (uintptr) (cntid))
+#define LOG_INCCNT_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_INCREMENTCOUNTER, (uintptr) (ercd))
+#define LOG_GETCNT_ENTER(cntid)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_GETCOUNTERVALUE, (uintptr) (cntid))
+#define LOG_GETCNT_LEAVE(ercd, p_val)			trace_3(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETCOUNTERVALUE, (uintptr) (ercd), (((ercd) == E_OK) ? (uintptr) (*(p_val)) : (0U)))
+#define LOG_GETEPS_ENTER(cntid, p_val)			trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_GETELAPSEDVALUE, (uintptr) (cntid), (((p_val) == NULL) ? (0U) : *(p_val)))
+#define LOG_GETEPS_LEAVE(ercd, p_val, p_eval)	trace_4(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETELAPSEDVALUE, (uintptr) (ercd), (((ercd) == E_OK) ? (uintptr) (*(p_val)) : (0U)), (((ercd) == E_OK) ? (uintptr) (*(p_eval)) : (0U)))
+
+/*
+ * ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æ©è½
+ */
+#define LOG_STASCHTBLREL_ENTER(schtblid, offset)	trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_STARTSCHEDULETABLEREL, (uintptr) (schtblid), (uintptr) (offset))
+#define LOG_STASCHTBLREL_LEAVE(ercd)				trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_STARTSCHEDULETABLEREL, (uintptr) (ercd))
+#define LOG_STASCHTBLABS_ENTER(schtblid, start)		trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_STARTSCHEDULETABLEABS, (uintptr) (schtblid), (uintptr) (start))
+#define LOG_STASCHTBLABS_LEAVE(ercd)				trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_STARTSCHEDULETABLEABS, (uintptr) (ercd))
+#define LOG_STPSCHTBL_ENTER(schtblid)				trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_STOPSCHEDULETABLE, (uintptr) (schtblid))
+#define LOG_STPSCHTBL_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_STOPSCHEDULETABLE, (uintptr) (ercd))
+#define LOG_NXTSCHTBL_ENTER(from, to)				trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_NEXTSCHEDULETABLE, (uintptr) (from), (uintptr) (to))
+#define LOG_NXTSCHTBL_LEAVE(ercd)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_NEXTSCHEDULETABLE, (uintptr) (ercd))
+#define LOG_GETSCHTBLST_ENTER(schtblid)				trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_GETSCHEDULETABLESTATUS, (uintptr) (schtblid))
+#define LOG_GETSCHTBLST_LEAVE(ercd, p_status)		trace_3(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETSCHEDULETABLESTATUS, (uintptr) (ercd), (((ercd) == E_OK) ? (uintptr) (*(p_status)) : (0U)))
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½
+ */
+#define LOG_DISINT_ENTER()			trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_DISABLEALLINTERRUPTS)
+#define LOG_DISINT_LEAVE()			trace_1(LOG_TYPE_SVC | LOG_LEAVE, TFN_DISABLEALLINTERRUPTS)
+#define LOG_ENAINT_ENTER()			trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_ENABLEALLINTERRUPTS)
+#define LOG_ENAINT_LEAVE()			trace_1(LOG_TYPE_SVC | LOG_LEAVE, TFN_ENABLEALLINTERRUPTS)
+#define LOG_SUSALL_ENTER()			trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_SUSPENDALLINTERRUPTS)
+#define LOG_SUSALL_LEAVE()			trace_1(LOG_TYPE_SVC | LOG_LEAVE, TFN_SUSPENDALLINTERRUPTS)
+#define LOG_RSMALL_ENTER()			trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_RESUMEALLINTERRUPTS)
+#define LOG_RSMALL_LEAVE()			trace_1(LOG_TYPE_SVC | LOG_LEAVE, TFN_RESUMEALLINTERRUPTS)
+#define LOG_SUSOSI_ENTER()			trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_SUSPENDOSINTERRUPTS)
+#define LOG_SUSOSI_LEAVE()			trace_1(LOG_TYPE_SVC | LOG_LEAVE, TFN_SUSPENDOSINTERRUPTS)
+#define LOG_RSMOSI_ENTER()			trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_RESUMEOSINTERRUPTS)
+#define LOG_RSMOSI_LEAVE()			trace_1(LOG_TYPE_SVC | LOG_LEAVE, TFN_RESUMEOSINTERRUPTS)
+#define LOG_GETISRID_ENTER()		trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_GETISRID)
+#define LOG_GETISRID_LEAVE(isrid)	trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETISRID, (uintptr) (isrid))
+#define LOG_DISINTSRC_ENTER(isrid)	trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_DISABLEINTERRUPTSOURCE, (uintptr) (isrid))
+#define LOG_DISINTSRC_LEAVE(ercd)	trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_DISABLEINTERRUPTSOURCE, (uintptr) (ercd))
+#define LOG_ENAINTSRC_ENTER(isrid)	trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_ENABLEINTERRUPTSOURCE, (uintptr) (isrid))
+#define LOG_ENAINTSRC_LEAVE(ercd)	trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_ENABLEINTERRUPTSOURCE, (uintptr) (ercd))
+
+/*
+ *  ã«ã¼ãã«ã®åæåã¨çµäºå¦ç
+ */
+#define LOG_STAOS_ENTER(mode)
+#define LOG_STAOS_LEAVE()
+#define LOG_STUTOS_ENTER(ercd)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_SHUTDOWNOS, (uintptr) (ercd))
+#define LOG_STUTOS_LEAVE()
+#define LOG_GETAAM_ENTER()						trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_GETACTIVEAPPLICATIONMODE)
+#define LOG_GETAAM_LEAVE(mode)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETACTIVEAPPLICATIONMODE, (uintptr) (mode))
+#define LOG_STAHOOK_ENTER()						trace_0(LOG_TYPE_STAHOOK | LOG_ENTER)
+#define LOG_STAHOOK_LEAVE()						trace_0(LOG_TYPE_STAHOOK | LOG_LEAVE)
+#define LOG_ERRHOOK_ENTER(ercd)					trace_1(LOG_TYPE_ERRHOOK | LOG_ENTER, (uintptr) (ercd))
+#define LOG_ERRHOOK_LEAVE()						trace_0(LOG_TYPE_ERRHOOK | LOG_LEAVE)
+#define LOG_PROHOOK_ENTER(ercd)					trace_1(LOG_TYPE_PROHOOK | LOG_ENTER, (uintptr) (ercd))
+#define LOG_PROHOOK_LEAVE(pret)					trace_1(LOG_TYPE_PROHOOK | LOG_LEAVE, (uintptr) (pret))
+#define LOG_SHUTHOOK_ENTER(ercd)				trace_1(LOG_TYPE_SHUTHOOK | LOG_ENTER, (uintptr) (ercd))
+#define LOG_SHUTHOOK_LEAVE()					trace_0(LOG_TYPE_SHUTHOOK | LOG_LEAVE)
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½
+ */
+#define LOG_SYSLOG_WRI_LOG_LEAVE(ercd)
+#define LOG_SYSLOG_REA_LOG_ENTER(p_syslog)
+#define LOG_SYSLOG_REA_LOG_LEAVE(ercd, p_syslog)
+#define LOG_SYSLOG_MSK_LOG_ENTER(lowmask)
+#define LOG_SYSLOG_MSK_LOG_LEAVE(ercd)
+#define LOG_SYSLOG_REF_LOG_ENTER(pk_rlog)
+#define LOG_SYSLOG_REF_LOG_LEAVE(pk_rlog)
+
+/*
+ *  OSAPæ©è½
+ */
+#define LOG_GETOSAPID_ENTER()							trace_1(LOG_TYPE_SVC | LOG_ENTER, TFN_GETAPPLICATIONID)
+#define LOG_GETOSAPID_LEAVE(id)							trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETAPPLICATIONID, (uintptr) (id))
+#define LOG_GETAST_ENTER(id)							trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_GETAPPLICATIONSTATE, (uintptr) (id))
+#define LOG_GETAST_LEAVE(ercd, p_value)					trace_3(LOG_TYPE_SVC | LOG_LEAVE, TFN_GETAPPLICATIONSTATE, (uintptr) (ercd), (((ercd) == E_OK) ? (uintptr) (*(p_value)) : (0U)))
+#define LOG_CALTFN_ENTER(index)							trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_CALLTRUSTEDFUNCTION, (uintptr) (index))
+#define LOG_CALTFN_LEAVE(ercd)							trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CALLTRUSTEDFUNCTION, (uintptr) (ercd))
+#define LOG_TFN_ENTER(index)							trace_1(LOG_TYPE_TFN | LOG_ENTER, (uintptr) (index))
+#define LOG_TFN_LEAVE(index, ercd)						trace_2(LOG_TYPE_TFN | LOG_LEAVE, (uintptr) (index), (uintptr) (ercd))
+#define LOG_CHKTSKACS_ENTER(ApplID, TaskID)				trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKTASKACCESS, (uintptr) (ApplID), (uintptr) (TaskID))
+#define LOG_CHKTSKACS_LEAVE(access)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKTASKACCESS, (uintptr) (access))
+#define LOG_CHKISRACS_ENTER(ApplID, ISRID)				trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKISRACCESS, (uintptr) (ApplID), (uintptr) (ISRID))
+#define LOG_CHKISRACS_LEAVE(access)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKISRACCESS, (uintptr) (access))
+#define LOG_CHKALMACS_ENTER(ApplID, AlarmID)			trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKALARMACCESS, (uintptr) (ApplID), (uintptr) (AlarmID))
+#define LOG_CHKALMACS_LEAVE(access)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKALARMACCESS, (uintptr) (access))
+#define LOG_CHKRESACS_ENTER(ApplID, ResID)				trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKRESOURCEACCESS, (uintptr) (ApplID), (uintptr) (ResID))
+#define LOG_CHKRESACS_LEAVE(access)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKRESOURCEACCESS, (uintptr) (access))
+#define LOG_CHKCNTACS_ENTER(ApplID, CounterID)			trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKCOUNTERACCESS, (uintptr) (ApplID), (uintptr) (CounterID))
+#define LOG_CHKCNTACS_LEAVE(access)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKCOUNTERACCESS, (uintptr) (access))
+#define LOG_CHKSCHTBLACS_ENTER(ApplID, ScheduleTableID)	trace_3(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKSCHEDULETABLEACCESS, (uintptr) (ApplID), (uintptr) (ScheduleTableID))
+#define LOG_CHKSCHTBLACS_LEAVE(access)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKSCHEDULETABLEACCESS, (uintptr) (access))
+#define LOG_CHKTSKOWN_ENTER(TaskID)						trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKTASKOWNERSHIP, (uintptr) (TaskID))
+#define LOG_CHKTSKOWN_LEAVE(owner)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKTASKOWNERSHIP, (uintptr) (owner))
+#define LOG_CHKISROWN_ENTER(ISRID)						trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKISROWNERSHIP, (uintptr) (ISRID))
+#define LOG_CHKISROWN_LEAVE(owner)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKISROWNERSHIP, (uintptr) (owner))
+#define LOG_CHKALMOWN_ENTER(AlarmID)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKALARMOWNERSHIP, (uintptr) (AlarmID))
+#define LOG_CHKALMOWN_LEAVE(owner)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKALARMOWNERSHIP, (uintptr) (owner))
+#define LOG_CHKCNTOWN_ENTER(CounterID)					trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKCOUNTEROWNERSHIP, (uintptr) (CounterID))
+#define LOG_CHKCNTOWN_LEAVE(owner)						trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKCOUNTEROWNERSHIP, (uintptr) (owner))
+#define LOG_CHKSCHTBLOWN_ENTER(ScheduleTableID)			trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKSCHEDULETABLEOWNERSHIP, (uintptr) (ScheduleTableID))
+#define LOG_CHKSCHTBLOWN_LEAVE(owner)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKSCHEDULETABLEOWNERSHIP, (uintptr) (owner))
+
+/*
+ * IOCæ©è½
+ */
+#define LOG_IOCSEND_ENTER(senderid)		trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_IOC_SEND_GENERIC, (uintptr) (senderid))
+#define LOG_IOCSEND_LEAVE(ercd)			trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_IOC_SEND_GENERIC, (uintptr) (ercd))
+#define LOG_IOCWRITE_ENTER(senderid)	trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_IOC_WRITE_GENERIC, (uintptr) (senderid))
+#define LOG_IOCWRITE_LEAVE(ercd)		trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_IOC_WRITE_GENERIC, (uintptr) (ercd))
+#define LOG_IOCRECEIVE_ENTER(iocid)		trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_IOC_RECEIVE_GENERIC, (uintptr) (iocid))
+#define LOG_IOCRECEIVE_LEAVE(ercd)		trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_IOC_RECEIVE_GENERIC, (uintptr) (ercd))
+#define LOG_IOCREAD_ENTER(iocid)		trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_IOC_READ_GENERIC, (uintptr) (iocid))
+#define LOG_IOCREAD_LEAVE(ercd)			trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_IOC_READ_GENERIC, (uintptr) (ercd))
+#define LOG_IOCEMPTYQUEUE_ENTER(iocid)	trace_2(LOG_TYPE_SVC | LOG_ENTER, TFN_IOC_EMPTY_QUEUE_GENERIC, (uintptr) (iocid))
+#define LOG_IOCEMPTUQUEUE_LEAVE(ercd)	trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_IOC_EMPTY_QUEUE_GENERIC, (uintptr) (ercd))
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹é¢é£æ©è½
+ */
+#define LOG_CHKISRMEMACS_ENTER(ISRID, Address, Size)	trace_4(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKISRMEMORYACCESS, (uintptr) (ISRID), (uintptr) (Address), (uintptr) (Size))
+#define LOG_CHKISRMEMACS_LEAVE(access)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKISRMEMORYACCESS, (uintptr) (access))
+#define LOG_CHKTSKMEMACS_ENTER(TaskID, Address, Size)	trace_4(LOG_TYPE_SVC | LOG_ENTER, TFN_CHECKTASKMEMORYACCESS, (uintptr) (TaskID), (uintptr) (Address), (uintptr) (Size))
+#define LOG_CHKTSKMEMACS_LEAVE(access)					trace_2(LOG_TYPE_SVC | LOG_LEAVE, TFN_CHECKTASKMEMORYACCESS, (uintptr) (access))
+
+#endif /* TOPPERS_ENABLE_TRACE */
+
+#endif /* TOPPERS_TRACE_CONFIG_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_dump.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_dump.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/logtrace/trace_dump.c	(revision 172)
@@ -0,0 +1,2168 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2007-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: trace_dump.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ãã¬ã¼ã¹ã­ã°ã®ãã³ã
+ */
+
+#include "kernel_impl.h"
+#include "task.h"
+#include "alarm.h"
+#include "scheduletable.h"
+#include "log_output.h"
+#include "Os_Lcfg.h"
+#include "t_stdlib.h" /* atk2_strerror */
+
+/*
+ *  å¦çåä½ã®ç¨®å¥
+ */
+typedef enum {
+	PR_UNIT_TASK,       /* ã¿ã¹ã¯ */
+	PR_UNIT_ALARM,      /* ã¢ã©ã¼ã æºäºå¦ç */
+	PR_UNIT_ISR,        /* C2ISR */
+	PR_UNIT_SCHTBL,     /* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦ç */
+	PR_UNIT_STA,        /* ã¹ã¿ã¼ãã¢ããããã¯ */
+	PR_UNIT_ERR,        /* ã¨ã©ã¼ããã¯ */
+	PR_UNIT_PRO,        /* ãã­ãã¯ã·ã§ã³ããã¯ */
+	PR_UNIT_SHUT,       /* ã·ã£ãããã¦ã³ããã¯ */
+	PR_UNIT_TFN,        /* ä¿¡é ¼é¢æ° */
+} PR_UNIT_TYPE;
+
+/*
+ *  å¦çåä½ã®ID
+ */
+typedef struct {
+	PR_UNIT_TYPE	type;   /* å¦çåä½ã®ç¨®å¥ */
+	ObjectIDType	id;     /* å¦çåä½ã®ID */
+} OBJ_ID;
+
+
+/* å
+é¨é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */
+static const char8 *trace_proret_str(ProtectionReturnType ret);
+static const char8 *trace_schtblstatus_str(ScheduleTableStatusType status);
+static const char8 *atk2_task_state_str(TaskStateType state);
+static const char8 *atk2_osap_state_str(ApplicationStateType state);
+static const char8 *atk2_access_str(ObjectAccessType access);
+static uintptr trace_get_tskid(uintptr info);
+static const char8 *trace_print_tskenter(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_tskleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_evententer(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_eventleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_resenter(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_resleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_almenter(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_almleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_schtblenter(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_schtblleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_intenter(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_intleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_sysenter(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_sysleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_kerenter(const TRACE *trace, uintptr info[], void (*outputc)(char8 c));
+static const char8 *trace_print_osapenter(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_osapleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_memoryenter(const TRACE *trace, uintptr info[]);
+static void trace_get_memory_access(AccessType access, uintptr info[]);
+static const char8 *trace_print_memoryleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_svcenter(const TRACE *trace, uintptr info[], void (*outputc)(char8 c));
+static const char8 *trace_print_svcleave(const TRACE *trace, uintptr info[]);
+static void trace_set_context(PR_UNIT_TYPE type, ObjectIDType id);
+static void trace_push_context(PR_UNIT_TYPE type, ObjectIDType id);
+static void trace_get_context(uintptr *p_obj_type_str, uintptr *p_id);
+static void trace_pop_context(uintptr *p_obj_type_str, uintptr *p_id);
+static void trace_change_context(PR_UNIT_TYPE type, ObjectIDType id);
+static void trace_resume_context(void);
+static void trace_print(const TRACE *p_trace, void (*outputc)(char8 c));
+static const char8 *trace_print_iocleave(const TRACE *trace, uintptr info[]);
+static const char8 *trace_print_iocenter(const TRACE *trace, uintptr info[]);
+
+/*
+ *  ãã­ãã¯ã·ã§ã³ããã¯ã®è¿ãå¤ãæå­åå¤æ
+ */
+static const char8 *
+trace_proret_str(ProtectionReturnType ret)
+{
+	const char8 *proretstr;
+
+	switch (ret) {
+	case PRO_IGNORE:
+		proretstr = "IGNORE";
+		break;
+	case PRO_SHUTDOWN:
+		proretstr = "SHUTDOWN";
+		break;
+	default:
+		proretstr = "";
+		break;
+	}
+	return(proretstr);
+}
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®ç¶æ
+ãæå­åå¤æ
+ */
+static const char8 *
+trace_schtblstatus_str(ScheduleTableStatusType status)
+{
+	const char8 *schtblstr;
+
+	switch (status) {
+	case SCHEDULETABLE_STOPPED:
+		schtblstr = "STOPPED";
+		break;
+	case SCHEDULETABLE_NEXT:
+		schtblstr = "NEXT";
+		break;
+	case SCHEDULETABLE_WAITING:
+		schtblstr = "WAITING";
+		break;
+	case SCHEDULETABLE_RUNNING:
+		schtblstr = "RUNNING";
+		break;
+	case SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS:
+		schtblstr = "RUNNING_AND_SYNCHRONOUS";
+		break;
+	default:
+		schtblstr = "";
+		break;
+	}
+	return(schtblstr);
+}
+
+/*
+ *  ã¿ã¹ã¯ç¶æ
+ãæå­åå¤æ
+ */
+static const char8 *
+atk2_task_state_str(TaskStateType state)
+{
+	const char8 *taskstatstr;
+
+	switch (state) {
+	case SUSPENDED:
+		taskstatstr = "SUSPENDED";
+		break;
+	case RUNNING:
+		taskstatstr = "RUNNING";
+		break;
+	case READY:
+		taskstatstr = "READY";
+		break;
+	case WAITING:
+		taskstatstr = "WAITING";
+		break;
+	default:
+		taskstatstr = "unknown state";
+		break;
+	}
+	return(taskstatstr);
+}
+
+/*
+ *  OSAPç¶æ
+ãæå­åå¤æ
+ */
+static const char8 *
+atk2_osap_state_str(ApplicationStateType state)
+{
+	const char8 *osapstatstr;
+
+	switch (state) {
+	case APPLICATION_ACCESSIBLE:
+		osapstatstr = "ACCESSIBLE";
+		break;
+	case APPLICATION_RESTARTING:
+		osapstatstr = "RESTARTING";
+		break;
+	case APPLICATION_TERMINATED:
+		osapstatstr = "TERMINATED";
+		break;
+	default:
+		osapstatstr = "unknown state";
+		break;
+	}
+	return(osapstatstr);
+}
+
+/*
+ *  ObjectAccessTypeãæå­åå¤æ
+ */
+static const char8 *
+atk2_access_str(ObjectAccessType access)
+{
+	const char8 *accessstr;
+
+	switch (access) {
+	case ACCESS:
+		accessstr = "ACCESS";
+		break;
+	case NO_ACCESS:
+		accessstr = "NO_ACCESS";
+		break;
+	default:
+		accessstr = "";
+		break;
+	}
+	return(accessstr);
+}
+
+/*
+ *  PR_UNIT_TYPEã®å¦çåä½ç¨®å¥ã«å¯¾å¿ããæå­å
+ */
+static const char8	*obj_type_to_str[] = {
+	"task",
+	"alarm",
+	"isr",
+	"schtbl",
+	"sta",
+	"err",
+	"pro",
+	"shut",
+	"tfn"
+};
+
+/*
+ *  2ã¤ã®å¼æ°ã®å¤§ããæ¹ãè¿ã
+ */
+#define MAX(a, b)	((a) < (b) ? (b) : (a))
+
+/*
+ *  å¦çåä½ã®ãã¹ããç®¡çããã¹ã¿ãã¯
+ */
+static OBJ_ID		context_stack[MAX(4U, 1U + TNUM_ISR2)];
+
+/*
+ *  ã¿ã¹ã¯ãå®è¡ãã¦ããã¢ã©ã¼ã æºäºå¦çï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦çï¼
+ *  ä¿¡é ¼é¢æ°ãç®¡çãã
+ *  ã¢ã©ã¼ã æºäºå¦çã¯IncrementCounterã«ãããã¹ãããå ´åããã
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦çã®ãã¹ãã¯ãªã
+ */
+static OBJ_ID		task_exec[TNUM_TASK][TNUM_ALARM + TNUM_TFN + 1U];
+
+/*
+ *  ã¿ã¹ã¯ãã¢ã©ã¼ã æºäºå¦çï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦çï¼ä¿¡é ¼é¢æ°ã
+ *  å®è¡ãã¦ããå ´åã®ï¼task_exec[task_id][index]ã®indexãç¤ºã
+ *  æºäºå¦çãå®è¡ãã¦ããªãå ´åã¯-1ã«ãã
+ */
+static sint32		task_context_index[TNUM_TASK];
+
+/*
+ *  task_execã®C2ISRç
+ */
+static OBJ_ID		isr_exec[TNUM_ISR2][TNUM_ALARM + TNUM_TFN + 1U];
+
+/*
+ *  task_context_indexã®C2ISRç
+ */
+static sint32		isr_context_index[TNUM_ISR2];
+
+/*
+ *  context_stackã®ç¾å¨ã®ã¤ã³ããã¯ã¹(ãã¹ãæ°)ãç¤ºã
+ */
+static uint32		context_index;
+
+/*
+ *  tcbããã¿ã¹ã¯IDãåå¾
+ */
+static uintptr
+trace_get_tskid(uintptr info)
+{
+	TCB			*p_tcb;
+	TaskType	tskid;
+
+	p_tcb = (TCB *) info;
+	if (p_tcb == NULL) {
+		tskid = 0U;
+	}
+	else {
+		tskid = TSKID(p_tcb);
+	}
+	return((uintptr) tskid);
+}
+
+
+/*
+ *  ã¿ã¹ã¯ç®¡ç - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_tskenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+
+	case TFN_ACTIVATETASK:
+		info[0] = (uintptr) atk2_tskid_str((TaskType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to ActivateTask TaskID=%s(%d).";
+		break;
+
+	case TFN_TERMINATETASK:
+		tracemsg = "enter to TerminateTask.";
+		break;
+
+	case TFN_CHAINTASK:
+		info[0] = (uintptr) atk2_tskid_str((TaskType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to ChainTask TaskID=%s(%d).";
+		break;
+
+	case TFN_SCHEDULE:
+		tracemsg = "enter to Schedule.";
+		break;
+
+	default:
+		tracemsg = "unknown service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ã¿ã¹ã¯ç®¡ç - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_tskleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+
+	case TFN_ACTIVATETASK:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from ActivateTask %s.";
+		break;
+
+	case TFN_TERMINATETASK:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from TerminateTask %s.";
+		break;
+
+	case TFN_CHAINTASK:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from ChainTask %s.";
+		break;
+
+	case TFN_SCHEDULE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from Schedule %s.";
+		break;
+
+	default:
+		tracemsg = "unknown tsk service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ã¤ãã³ãæ©è½ - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_evententer(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_SETEVENT:
+		info[0] = (uintptr) atk2_tskid_str((TaskType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = (uintptr) atk2_evtid_str((TaskType) trace->loginfo[1], (EventMaskType) trace->loginfo[2]);
+		info[3] = trace->loginfo[2];
+		tracemsg = "enter to SetEvent TaskID=%s(%d)/Mask=%s(0x%x).";
+		break;
+
+	case TFN_CLEAREVENT:
+		info[0] = (uintptr) atk2_evtid_str((TaskType) trace_get_tskid(trace->loginfo[1]), (EventMaskType) trace->loginfo[2]);
+		info[1] = trace->loginfo[2];
+		tracemsg = "enter to ClearEvent Mask=%s(0x%x).";
+		break;
+
+	case TFN_GETEVENT:
+		info[0] = (uintptr) atk2_tskid_str((TaskType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to GetEvent TaskID=%s(%d).";
+		break;
+
+	case TFN_WAITEVENT:
+		info[0] = (uintptr) atk2_evtid_str((TaskType) trace_get_tskid(trace->loginfo[1]), (EventMaskType) trace->loginfo[2]);
+		info[1] = trace->loginfo[2];
+		tracemsg = "enter to WaitEvent Mask=%s(0x%x).";
+		break;
+
+	default:
+		tracemsg = "unknown service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ã¤ãã³ãæ©è½ - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_eventleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_SETEVENT:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from SetEvent %s.";
+		break;
+
+	case TFN_CLEAREVENT:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from ClearEvent %s.";
+		break;
+
+	case TFN_GETEVENT:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = (uintptr) atk2_evtid_str((TaskType) trace->loginfo[2], (EventMaskType) trace->loginfo[3]);
+			info[2] = trace->loginfo[3];
+			tracemsg = "leave from GetEvent %s/Mask=%s(0x%x).";
+		}
+		else {
+			tracemsg = "leave from GetEvent %s.";
+		}
+		break;
+
+	case TFN_WAITEVENT:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from WaitEvent %s.";
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ãªã½ã¼ã¹æ©è½ - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_resenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_GETRESOURCE:
+		info[0] = (uintptr) atk2_resid_str((ResourceType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to GetResource ResID=%s(%d).";
+		break;
+
+	case TFN_RELEASERESOURCE:
+		info[0] = (uintptr) atk2_resid_str((ResourceType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to ReleaseResource ResID=%s(%d).";
+		break;
+
+	default:
+		tracemsg = "unknown service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ãªã½ã¼ã¹æ©è½ - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_resleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_GETRESOURCE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from GetResource %s.";
+		break;
+
+	case TFN_RELEASERESOURCE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from ReleaseResource %s.";
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+/*
+ *  ã¢ã©ã¼ã æ©è½ - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_almenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_GETALARMBASE:
+		info[0] = (uintptr) atk2_almid_str((AlarmType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to GetAlarmBase AlarmID=%s(%d).";
+		break;
+
+	case TFN_GETALARM:
+		info[0] = (uintptr) atk2_almid_str((AlarmType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to GetAlarm AlarmID=%s(%d).";
+		break;
+
+	case TFN_SETRELALARM:
+		info[0] = (uintptr) atk2_almid_str((AlarmType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = trace->loginfo[2];
+		info[3] = trace->loginfo[3];
+		tracemsg = "enter to SetRelAlarm AlarmID=%s(%d)/increment=%d/cycle=%d.";
+		break;
+
+	case TFN_SETABSALARM:
+		info[0] = (uintptr) atk2_almid_str((AlarmType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = trace->loginfo[2];
+		info[3] = trace->loginfo[3];
+		tracemsg = "enter to SetAbsAlarm AlarmID=%s(%d)/start=%d/cycle=%d.";
+		break;
+
+	case TFN_CANCELALARM:
+		info[0] = (uintptr) atk2_almid_str((AlarmType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to CancelAlarm AlarmID=%s(%d).";
+		break;
+
+	case TFN_INCREMENTCOUNTER:
+		info[0] = (uintptr) atk2_cntid_str((CounterType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to IncrementCounter CounterID=%s(%d).";
+		break;
+
+	case TFN_GETCOUNTERVALUE:
+		info[0] = (uintptr) atk2_cntid_str((CounterType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to GetCounterValue CounterID=%s(%d).";
+		break;
+
+	case TFN_GETELAPSEDVALUE:
+		info[0] = (uintptr) atk2_cntid_str((CounterType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = trace->loginfo[2];
+		tracemsg = "enter to GetElapsedValue CounterID=%s(%d) Value=%d.";
+		break;
+
+	default:
+		tracemsg = "unknown service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ã¢ã©ã¼ã æ©è½ - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_almleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_GETALARMBASE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = trace->loginfo[2];
+			info[2] = trace->loginfo[3];
+			info[3] = trace->loginfo[4];
+			tracemsg = "leave from GetAlarmBase %s/maxval=%d/tickbase=%d/mincyc=%d.";
+		}
+		else {
+			tracemsg = "leave from GetAlarmBase %s.";
+		}
+		break;
+
+	case TFN_GETALARM:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = trace->loginfo[2];
+			tracemsg = "leave from GetAlarm %s/Tick=%d.";
+		}
+		else {
+			tracemsg = "leave from GetAlarm %s.";
+		}
+		break;
+
+	case TFN_SETRELALARM:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from SetRelAlarm %s.";
+		break;
+
+	case TFN_SETABSALARM:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from SetAbsAlarm %s.";
+		break;
+
+	case TFN_CANCELALARM:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from CancelAlarm %s.";
+		break;
+
+	case TFN_INCREMENTCOUNTER:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from IncrementCounter %s.";
+		break;
+
+	case TFN_GETCOUNTERVALUE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = trace->loginfo[2];
+			tracemsg = "leave from GetCounterValue %s/Value=%d.";
+		}
+		else {
+			tracemsg = "leave from GetCounterValue %s.";
+		}
+		break;
+
+	case TFN_GETELAPSEDVALUE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = trace->loginfo[2];
+			info[2] = trace->loginfo[3];
+			tracemsg = "leave from GetElapsedValue %s/Value=%d/ElapsedValue=%d.";
+		}
+		else {
+			tracemsg = "leave from GetElapsedValue %s.";
+		}
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æ©è½ - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_schtblenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_STARTSCHEDULETABLEREL:
+		info[0] = (uintptr) atk2_schtblid_str((ScheduleTableType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = trace->loginfo[2];
+		tracemsg = "enter to StartScheduleTableRel SchtblID=%s(%d)/offset=%d.";
+		break;
+
+	case TFN_STARTSCHEDULETABLEABS:
+		info[0] = (uintptr) atk2_schtblid_str((ScheduleTableType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = trace->loginfo[2];
+		tracemsg = "enter to StartScheduleTableAbs SchtblID=%s(%d)/start=%d.";
+		break;
+
+	case TFN_STOPSCHEDULETABLE:
+		info[0] = (uintptr) atk2_schtblid_str((ScheduleTableType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to StopScheduleTable SchtblID=%s(%d).";
+		break;
+
+	case TFN_NEXTSCHEDULETABLE:
+		info[0] = (uintptr) atk2_schtblid_str((ScheduleTableType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = (uintptr) atk2_schtblid_str((ScheduleTableType) trace->loginfo[2]);
+		info[3] = trace->loginfo[2];
+		tracemsg = "enter to NextScheduleTable From_ID=%s(%d)/To_ID=%s(%d).";
+		break;
+
+	case TFN_GETSCHEDULETABLESTATUS:
+		info[0] = (uintptr) atk2_schtblid_str((ScheduleTableType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to GetScheduleTableStatus SchtblID=%s(%d).";
+		break;
+
+	default:
+		tracemsg = "unknown service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã« - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_schtblleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_STARTSCHEDULETABLEREL:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from StartScheduleTableRel %s.";
+		break;
+
+	case TFN_STARTSCHEDULETABLEABS:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from StartScheduleTableAbs %s.";
+		break;
+
+	case TFN_STOPSCHEDULETABLE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from StopScheduleTable %s.";
+		break;
+
+	case TFN_NEXTSCHEDULETABLE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from NextScheduleTable %s.";
+		break;
+
+	case TFN_GETSCHEDULETABLESTATUS:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = (uintptr) trace_schtblstatus_str((ScheduleTableStatusType) trace->loginfo[2]);
+			tracemsg = "leave from GetScheduleTableStatus %s/status=%s.";
+		}
+		else {
+			tracemsg = "leave from GetScheduleTableStatus %s.";
+		}
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½ - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_intenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_DISABLEALLINTERRUPTS:
+		tracemsg = "enter to DisableAllInterrupts.";
+		break;
+
+	case TFN_SUSPENDALLINTERRUPTS:
+		tracemsg = "enter to SuspendAllInterrupts.";
+		break;
+
+	case TFN_SUSPENDOSINTERRUPTS:
+		tracemsg = "enter to SuspendOSInterrupts.";
+		break;
+
+	case TFN_ENABLEALLINTERRUPTS:
+		tracemsg = "enter to EnableAllInterrupts.";
+		break;
+
+	case TFN_RESUMEALLINTERRUPTS:
+		tracemsg = "enter to ResumeAllInterrupts.";
+		break;
+
+	case TFN_RESUMEOSINTERRUPTS:
+		tracemsg = "enter to ResumeOSInterrupts.";
+		break;
+
+	case TFN_GETISRID:
+		tracemsg = "enter to GetISRID.";
+		break;
+
+	case TFN_DISABLEINTERRUPTSOURCE:
+		info[0] = (uintptr) atk2_isrid_str((ISRType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to DisableInterruptSource ISRID=%s(%d).";
+		break;
+
+	case TFN_ENABLEINTERRUPTSOURCE:
+		info[0] = (uintptr) atk2_isrid_str((ISRType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to EnableInterruptSource ISRID=%s(%d).";
+		break;
+
+	default:
+		tracemsg = "unknown service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½ - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_intleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_DISABLEALLINTERRUPTS:
+		tracemsg = "leave from DisableAllInterrupts.";
+		break;
+
+	case TFN_SUSPENDALLINTERRUPTS:
+		tracemsg = "leave from SuspendAllInterrupts.";
+		break;
+
+	case TFN_SUSPENDOSINTERRUPTS:
+		tracemsg = "leave from SuspendOSInterrupts.";
+		break;
+
+	case TFN_ENABLEALLINTERRUPTS:
+		tracemsg = "leave from EnableAllInterrupts.";
+		break;
+
+	case TFN_RESUMEALLINTERRUPTS:
+		tracemsg = "leave from ResumeAllInterrupts.";
+		break;
+
+	case TFN_RESUMEOSINTERRUPTS:
+		tracemsg = "leave from ResumeOSInterrupts.";
+		break;
+
+	case TFN_GETISRID:
+		info[0] = (uintptr) atk2_isrid_str((ISRType) trace->loginfo[1]);
+		info[1] = (const uintptr) trace->loginfo[1];
+		tracemsg = "leave from GetISRID id=%s(%d).";
+		break;
+
+	case TFN_DISABLEINTERRUPTSOURCE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from DisableInterruptSource %s.";
+		break;
+
+	case TFN_ENABLEINTERRUPTSOURCE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from EnableInterruptSource %s.";
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ã·ã¹ãã ç¶æ
+ç®¡çæ©è½ - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_sysenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_GETTASKID:
+		tracemsg = "enter to GetTaskID.";
+		break;
+
+	case TFN_GETTASKSTATE:
+		info[0] = (uintptr) atk2_tskid_str((TaskType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to GetTaskState TaskID=%s(%d).";
+		break;
+
+	case TFN_GETACTIVEAPPLICATIONMODE:
+		tracemsg = "enter to GetActiveApplicationMode.";
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ã·ã¹ãã ç¶æ
+ç®¡çæ©è½ - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_sysleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_GETTASKID:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = (uintptr) atk2_tskid_str(trace->loginfo[2]);
+			tracemsg = "leave from GetTaskID %s/TaskID=%s.";
+		}
+		else {
+			tracemsg = "leave from GetTaskID %s.";
+		}
+		break;
+
+	case TFN_GETTASKSTATE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = (uintptr) atk2_task_state_str((TaskStateType) trace->loginfo[2]);
+			tracemsg = "leave from GetTaskState %s/State=%s.";
+		}
+		else {
+			tracemsg = "leave from GetTaskState %s.";
+		}
+		break;
+
+	case TFN_GETACTIVEAPPLICATIONMODE:
+		info[0] = (uintptr) atk2_appid_str((AppModeType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "leave from GetActiveApplicationMode mode=%s(%d).";
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ã«ã¼ãã«ã®åæåã¨çµäºå¦ç
+ */
+static const char8 *
+trace_print_kerenter(const TRACE *trace, uintptr info[], void (*outputc)(char8 c))
+{
+	uint32		type;
+	const char8	*tracemsg;
+	uintptr		traceinfo[TMAX_LOGINFO + 1U];
+	uint32		i;
+
+	type = (const uint32) trace->loginfo[0];
+
+	/* ã·ã£ãããã¦ã³æã«ãã¹ã¦ã®ã¿ã¹ã¯ãSUSPENDEDç¶æ
+ã¨ãªãããã«ãã */
+	for (i = 0U; i < TNUM_TASK; i++) {
+		traceinfo[0] = (uintptr) i;
+		syslog_printf("task %d becomes SUSPENDED.\n", traceinfo, outputc);
+		traceinfo[0] = (uintptr) (trace->logtim);
+		syslog_printf("[%d] ", traceinfo, outputc);
+	}
+
+	if (type == TFN_SHUTDOWNOS) {
+		info[0] = trace->loginfo[1];
+		tracemsg = "enter to ShutdownOS Error=%d.";
+	}
+	else {
+		tracemsg = "unknown service call";
+	}
+
+	return(tracemsg);
+}
+
+/*
+ *  OSAPæ©è½ - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_osapenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_GETAPPLICATIONID:
+		tracemsg = "enter to GetApplicationID.";
+		break;
+
+	case TFN_GETAPPLICATIONSTATE:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to GetApplicationState OsapID=%s(%d).";
+		break;
+
+	case TFN_CALLTRUSTEDFUNCTION:
+		info[0] = (uintptr) atk2_tfnid_str((TrustedFunctionIndexType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to CallTrustedFunction FunctionID=%s(%d).";
+		break;
+
+	case TFN_CHECKTASKACCESS:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = (uintptr) atk2_tskid_str((TaskType) trace->loginfo[2]);
+		info[3] = trace->loginfo[2];
+		tracemsg = "enter to CheckTaskAccess ApplID=%s(%d)/TaskID=%s(%d).";
+		break;
+
+	case TFN_CHECKISRACCESS:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = (uintptr) atk2_isrid_str((ISRType) trace->loginfo[2]);
+		info[3] = trace->loginfo[2];
+		tracemsg = "enter to CheckISRAccess ApplID=%s(%d)/ISRID=%s(%d).";
+		break;
+
+	case TFN_CHECKALARMACCESS:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = (uintptr) atk2_almid_str((AlarmType) trace->loginfo[2]);
+		info[3] = trace->loginfo[2];
+		tracemsg = "enter to CheckAlarmAccess ApplID=%s(%d)/AlarmID=%s(%d).";
+		break;
+
+	case TFN_CHECKRESOURCEACCESS:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = (uintptr) atk2_resid_str((ResourceType) trace->loginfo[2]);
+		info[3] = trace->loginfo[2];
+		tracemsg = "enter to CheckResourceAccess ApplID=%s(%d)/ResID=%s(%d).";
+		break;
+
+	case TFN_CHECKCOUNTERACCESS:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = (uintptr) atk2_cntid_str((CounterType) trace->loginfo[2]);
+		info[3] = trace->loginfo[2];
+		tracemsg = "enter to CheckCounterAccess ApplID=%s(%d)/CounterID=%s(%d).";
+		break;
+
+	case TFN_CHECKSCHEDULETABLEACCESS:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = (uintptr) atk2_schtblid_str((ScheduleTableType) trace->loginfo[2]);
+		info[3] = trace->loginfo[2];
+		tracemsg = "enter to CheckScheduleTableAccess ApplID=%s(%d)/ScheduleTableID=%s(%d).";
+		break;
+
+	case TFN_CHECKTASKOWNERSHIP:
+		info[0] = (uintptr) atk2_tskid_str((TaskType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to CheckTaskOwnership TaskID=%s(%d).";
+		break;
+
+	case TFN_CHECKISROWNERSHIP:
+		info[0] = (uintptr) atk2_isrid_str((ISRType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to CheckISROwnership ISRID=%s(%d).";
+		break;
+
+	case TFN_CHECKALARMOWNERSHIP:
+		info[0] = (uintptr) atk2_almid_str((AlarmType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to CheckAlarmOwnership AlarmID=%s(%d).";
+		break;
+
+	case TFN_CHECKCOUNTEROWNERSHIP:
+		info[0] = (uintptr) atk2_cntid_str((CounterType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to CheckCounterOwnership CounterID=%s(%d).";
+		break;
+
+	case TFN_CHECKSCHEDULETABLEOWNERSHIP:
+		info[0] = (uintptr) atk2_schtblid_str((ScheduleTableType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to CheckScheduleTableOwnership ScheduleTableID=%s(%d).";
+		break;
+
+	default:
+		tracemsg = "unknown service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  OSAPæ©è½ - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_osapleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_GETAPPLICATIONID:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "leave from GetApplicationID id=%s.";
+		break;
+
+	case TFN_GETAPPLICATIONSTATE:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		/* è¿ãå¤ãE_OKã®å ´åã®ã¿ï¼æå¹å¤ãå
+¥ã */
+		if (trace->loginfo[1] == E_OK) {
+			info[1] = (uintptr) atk2_osap_state_str((ApplicationStateType) trace->loginfo[2]);
+			tracemsg = "leave from GetApplicationState %s/state=%s.";
+		}
+		else {
+			tracemsg = "leave from GetApplicationState %s.";
+		}
+		break;
+
+	case TFN_CALLTRUSTEDFUNCTION:
+		info[0] = (uintptr) atk2_strerror((StatusType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "leave from CallTrustedFunction %s(%d).";
+		break;
+
+	case TFN_CHECKTASKACCESS:
+		info[0] = (uintptr) atk2_access_str((ObjectAccessType) trace->loginfo[1]);
+		tracemsg = "leave from CheckTaskAccess %s.";
+		break;
+
+	case TFN_CHECKISRACCESS:
+		info[0] = (uintptr) atk2_access_str((ObjectAccessType) trace->loginfo[1]);
+		tracemsg = "leave from CheckISRAccess %s.";
+		break;
+
+	case TFN_CHECKALARMACCESS:
+		info[0] = (uintptr) atk2_access_str((ObjectAccessType) trace->loginfo[1]);
+		tracemsg = "leave from CheckAlarmAccess %s.";
+		break;
+
+	case TFN_CHECKRESOURCEACCESS:
+		info[0] = (uintptr) atk2_access_str((ObjectAccessType) trace->loginfo[1]);
+		tracemsg = "leave from CheckResourceAccess %s.";
+		break;
+
+	case TFN_CHECKCOUNTERACCESS:
+		info[0] = (uintptr) atk2_access_str((ObjectAccessType) trace->loginfo[1]);
+		tracemsg = "leave from CheckCounterAccess %s.";
+		break;
+
+	case TFN_CHECKSCHEDULETABLEACCESS:
+		info[0] = (uintptr) atk2_access_str((ObjectAccessType) trace->loginfo[1]);
+		tracemsg = "leave from CheckScheduleTableAccess %s.";
+		break;
+
+	case TFN_CHECKTASKOWNERSHIP:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		tracemsg = "leave from CheckTaskOwnership %s.";
+		break;
+
+	case TFN_CHECKISROWNERSHIP:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		tracemsg = "leave from CheckISROwnership %s.";
+		break;
+
+	case TFN_CHECKALARMOWNERSHIP:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		tracemsg = "leave from CheckAlarmOwnership %s.";
+		break;
+
+	case TFN_CHECKCOUNTEROWNERSHIP:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		tracemsg = "leave from CheckCounterOwnership %s.";
+		break;
+
+	case TFN_CHECKSCHEDULETABLEOWNERSHIP:
+		info[0] = (uintptr) atk2_osapid_str((ApplicationType) trace->loginfo[1]);
+		tracemsg = "leave from CheckScheduleTableOwnership %s.";
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  IOC - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_iocenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+
+	case TFN_IOC_SEND_GENERIC:
+		info[0] = trace->loginfo[1];
+		tracemsg = "enter to IocSend Sender ID=%d.";
+		break;
+
+	case TFN_IOC_WRITE_GENERIC:
+		info[0] = trace->loginfo[1];
+		tracemsg = "enter to IocWrite Sender ID=%d.";
+		break;
+
+	case TFN_IOC_RECEIVE_GENERIC:
+		info[0] = (uintptr) atk2_iocid_str((IocType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to IocReceive IOC ID=%s(%d).";
+		break;
+
+	case TFN_IOC_READ_GENERIC:
+		info[0] = (uintptr) atk2_iocid_str((IocType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to IocRead IOC ID=%s(%d).";
+		break;
+
+	case TFN_IOC_EMPTY_QUEUE_GENERIC:
+		info[0] = (uintptr) atk2_iocid_str((IocType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		tracemsg = "enter to IocEmptyQueue IOC ID=%s(%d).";
+		break;
+
+	default:
+		tracemsg = "unknown service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  IOC - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_iocleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+
+	case TFN_IOC_SEND_GENERIC:
+		info[0] = (uintptr) atk2_ioc_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from IocSend %s.";
+		break;
+
+	case TFN_IOC_WRITE_GENERIC:
+		info[0] = (uintptr) atk2_ioc_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from IocWrite %s.";
+		break;
+
+	case TFN_IOC_RECEIVE_GENERIC:
+		info[0] = (uintptr) atk2_ioc_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from IocReceive %s.";
+		break;
+
+	case TFN_IOC_READ_GENERIC:
+		info[0] = (uintptr) atk2_ioc_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from IocRead %s.";
+		break;
+
+	case TFN_IOC_EMPTY_QUEUE_GENERIC:
+		info[0] = (uintptr) atk2_ioc_strerror((StatusType) trace->loginfo[1]);
+		tracemsg = "leave from IocEmptyQueue %s.";
+		break;
+
+	default:
+		tracemsg = "unknown tsk service call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹é¢é£æ©è½ - å
+¥å£ã­ã°
+ */
+static const char8 *
+trace_print_memoryenter(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_CHECKISRMEMORYACCESS:
+		info[0] = (uintptr) atk2_isrid_str((ISRType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = trace->loginfo[2];
+		info[3] = trace->loginfo[3];
+		tracemsg = "enter to CheckISRMemoryAccess ISRID=%s(%d)/Address=0x%x/Size=0x%x.";
+		break;
+
+	case TFN_CHECKTASKMEMORYACCESS:
+		info[0] = (uintptr) atk2_isrid_str((ISRType) trace->loginfo[1]);
+		info[1] = trace->loginfo[1];
+		info[2] = trace->loginfo[2];
+		info[3] = trace->loginfo[3];
+		tracemsg = "enter to CheckTaskMemoryAccess TaskID=%s(%d)/Address=0x%x/Size=0x%x.";
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+/*
+ *  AccessTypeãæå­åå¤æ
+ */
+static void
+trace_get_memory_access(AccessType access, uintptr info[])
+{
+	boolean add_slash = FALSE;
+
+	info[0] = (uintptr) "";
+	info[1] = (uintptr) "";
+	info[2] = (uintptr) "";
+	info[3] = (uintptr) "";
+
+	if (OSMEMORY_IS_STACKSPACE(access) != AP_NoAccess) {
+		info[3] = (uintptr) "Stack";
+		add_slash = TRUE;
+	}
+	if (OSMEMORY_IS_EXECUTABLE(access) != AP_NoAccess) {
+		if (add_slash != FALSE) {
+			info[2] = (uintptr) "Exec/";
+		}
+		else {
+			info[2] = (uintptr) "Exec";
+		}
+		add_slash = TRUE;
+	}
+	if (OSMEMORY_IS_WRITEABLE(access) != AP_NoAccess) {
+		if (add_slash != FALSE) {
+			info[1] = (uintptr) "Write/";
+		}
+		else {
+			info[1] = (uintptr) "Write";
+		}
+		add_slash = TRUE;
+	}
+	if (OSMEMORY_IS_READABLE(access) != AP_NoAccess) {
+		if (add_slash != FALSE) {
+			info[0] = (uintptr) "Read/";
+		}
+		else {
+			info[0] = (uintptr) "Read";
+		}
+		add_slash = TRUE;
+	}
+	if (add_slash == FALSE) {
+		info[0] = (uintptr) "NoAccess";
+	}
+}
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹é¢é£æ©è½ - åºå£ã­ã°
+ */
+static const char8 *
+trace_print_memoryleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_CHECKISRMEMORYACCESS:
+		trace_get_memory_access((AccessType) trace->loginfo[1], info);
+		tracemsg = "leave from CheckISRMemoryAccess %s%s%s%s.";
+		break;
+
+	case TFN_CHECKTASKMEMORYACCESS:
+		trace_get_memory_access((AccessType) trace->loginfo[1], info);
+		tracemsg = "leave from CheckTaskMemoryAccess %s%s%s%s.";
+		break;
+
+	default:
+		tracemsg = "unknown servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+
+/*
+ *  ã·ã¹ãã ã³ã¼ã«ã®å
+¥å£ã­ã°(LOG_TYPE_SVC|ENTER)
+ */
+static const char8 *
+trace_print_svcenter(const TRACE *trace, uintptr info[], void (*outputc)(char8 c))
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+
+	/* ã¿ã¹ã¯ç®¡ç */
+	case TFN_ACTIVATETASK:
+	case TFN_TERMINATETASK:
+	case TFN_CHAINTASK:
+	case TFN_SCHEDULE:
+		tracemsg = trace_print_tskenter(trace, info);
+		break;
+
+	/* ã¤ãã³ãæ©è½ */
+	case TFN_SETEVENT:
+	case TFN_CLEAREVENT:
+	case TFN_GETEVENT:
+	case TFN_WAITEVENT:
+		tracemsg = trace_print_evententer(trace, info);
+		break;
+
+	/* ãªã½ã¼ã¹æ©è½ */
+	case TFN_RELEASERESOURCE:
+	case TFN_GETRESOURCE:
+		tracemsg = trace_print_resenter(trace, info);
+		break;
+
+	/* ã¢ã©ã¼ã æ©è½ */
+	case TFN_GETALARMBASE:
+	case TFN_GETALARM:
+	case TFN_SETRELALARM:
+	case TFN_SETABSALARM:
+	case TFN_CANCELALARM:
+	case TFN_INCREMENTCOUNTER:
+	case TFN_GETCOUNTERVALUE:
+	case TFN_GETELAPSEDVALUE:
+		tracemsg = trace_print_almenter(trace, info);
+		break;
+
+	/* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æ©è½ */
+	case TFN_STARTSCHEDULETABLEREL:
+	case TFN_STARTSCHEDULETABLEABS:
+	case TFN_STOPSCHEDULETABLE:
+	case TFN_NEXTSCHEDULETABLE:
+	case TFN_GETSCHEDULETABLESTATUS:
+		tracemsg = trace_print_schtblenter(trace, info);
+		break;
+
+	/* å²è¾¼ã¿ç®¡çæ©è½ */
+	case TFN_DISABLEALLINTERRUPTS:
+	case TFN_SUSPENDALLINTERRUPTS:
+	case TFN_SUSPENDOSINTERRUPTS:
+	case TFN_ENABLEALLINTERRUPTS:
+	case TFN_RESUMEALLINTERRUPTS:
+	case TFN_RESUMEOSINTERRUPTS:
+	case TFN_GETISRID:
+	case TFN_DISABLEINTERRUPTSOURCE:
+	case TFN_ENABLEINTERRUPTSOURCE:
+		tracemsg = trace_print_intenter(trace, info);
+		break;
+
+	/* ã·ã¹ãã ç¶æ
+ç®¡çæ©è½ */
+	case TFN_GETTASKID:
+	case TFN_GETTASKSTATE:
+	case TFN_GETACTIVEAPPLICATIONMODE:
+		tracemsg = trace_print_sysenter(trace, info);
+		break;
+
+	/* ã«ã¼ãã«ã®åæåã¨çµäºå¦ç */
+	case TFN_SHUTDOWNOS:
+		tracemsg = trace_print_kerenter(trace, info, outputc);
+		break;
+
+	/* OSAPæ©è½ */
+	case TFN_GETAPPLICATIONID:
+	case TFN_GETAPPLICATIONSTATE:
+	case TFN_CALLTRUSTEDFUNCTION:
+	case TFN_CHECKTASKACCESS:
+	case TFN_CHECKISRACCESS:
+	case TFN_CHECKALARMACCESS:
+	case TFN_CHECKRESOURCEACCESS:
+	case TFN_CHECKCOUNTERACCESS:
+	case TFN_CHECKSCHEDULETABLEACCESS:
+	case TFN_CHECKTASKOWNERSHIP:
+	case TFN_CHECKISROWNERSHIP:
+	case TFN_CHECKALARMOWNERSHIP:
+	case TFN_CHECKCOUNTEROWNERSHIP:
+	case TFN_CHECKSCHEDULETABLEOWNERSHIP:
+		tracemsg = trace_print_osapenter(trace, info);
+		break;
+
+	/* IOCæ©è½ */
+	case TFN_IOC_SEND_GENERIC:
+	case TFN_IOC_WRITE_GENERIC:
+	case TFN_IOC_RECEIVE_GENERIC:
+	case TFN_IOC_READ_GENERIC:
+	case TFN_IOC_EMPTY_QUEUE_GENERIC:
+		tracemsg = trace_print_iocenter(trace, info);
+		break;
+
+	/* ã¡ã¢ãªã¢ã¯ã»ã¹é¢é£æ©è½ */
+	case TFN_CHECKISRMEMORYACCESS:
+	case TFN_CHECKTASKMEMORYACCESS:
+		tracemsg = trace_print_memoryenter(trace, info);
+		break;
+
+	default:
+		tracemsg = "unknown LOG_TYPE_SVC|ENTER service call";
+		break;
+	}
+	return(tracemsg);
+}
+
+
+/*
+ *  ã·ã¹ãã ã³ã¼ã«ã®åºå£ã­ã°(LOG_TYPE_SVC|LEAVE)
+ */
+static const char8 *
+trace_print_svcleave(const TRACE *trace, uintptr info[])
+{
+	uint32		type;
+	const char8	*tracemsg;
+
+	type = (const uint32) trace->loginfo[0];
+
+	switch (type) {
+	case TFN_ACTIVATETASK:
+	case TFN_TERMINATETASK:
+	case TFN_CHAINTASK:
+	case TFN_SCHEDULE:
+		/* ã¿ã¹ã¯ç®¡ç */
+		tracemsg = trace_print_tskleave(trace, info);
+		break;
+
+	/* ã¤ãã³ãæ©è½ */
+	case TFN_SETEVENT:
+	case TFN_CLEAREVENT:
+	case TFN_GETEVENT:
+	case TFN_WAITEVENT:
+		tracemsg = trace_print_eventleave(trace, info);
+		break;
+
+	/* ãªã½ã¼ã¹æ©è½ */
+	case TFN_RELEASERESOURCE:
+	case TFN_GETRESOURCE:
+		tracemsg = trace_print_resleave(trace, info);
+		break;
+
+	/* ã¢ã©ã¼ã æ©è½ */
+	case TFN_GETALARMBASE:
+	case TFN_GETALARM:
+	case TFN_SETRELALARM:
+	case TFN_SETABSALARM:
+	case TFN_CANCELALARM:
+	case TFN_INCREMENTCOUNTER:
+	case TFN_GETCOUNTERVALUE:
+	case TFN_GETELAPSEDVALUE:
+		tracemsg = trace_print_almleave(trace, info);
+		break;
+
+	/* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æ©è½ */
+	case TFN_STARTSCHEDULETABLEREL:
+	case TFN_STARTSCHEDULETABLEABS:
+	case TFN_STOPSCHEDULETABLE:
+	case TFN_NEXTSCHEDULETABLE:
+	case TFN_GETSCHEDULETABLESTATUS:
+		tracemsg = trace_print_schtblleave(trace, info);
+		break;
+
+	/* å²è¾¼ã¿ç®¡çæ©è½ */
+	case TFN_DISABLEALLINTERRUPTS:
+	case TFN_SUSPENDALLINTERRUPTS:
+	case TFN_SUSPENDOSINTERRUPTS:
+	case TFN_ENABLEALLINTERRUPTS:
+	case TFN_RESUMEALLINTERRUPTS:
+	case TFN_RESUMEOSINTERRUPTS:
+	case TFN_GETISRID:
+	case TFN_DISABLEINTERRUPTSOURCE:
+	case TFN_ENABLEINTERRUPTSOURCE:
+		tracemsg = trace_print_intleave(trace, info);
+		break;
+
+	/* ã·ã¹ãã ç¶æ
+ç®¡çæ©è½ */
+	case TFN_GETTASKID:
+	case TFN_GETTASKSTATE:
+	case TFN_GETACTIVEAPPLICATIONMODE:
+		tracemsg = trace_print_sysleave(trace, info);
+		break;
+
+	/* OSAPæ©è½ */
+	case TFN_GETAPPLICATIONID:
+	case TFN_GETAPPLICATIONSTATE:
+	case TFN_CALLTRUSTEDFUNCTION:
+	case TFN_CHECKTASKACCESS:
+	case TFN_CHECKISRACCESS:
+	case TFN_CHECKALARMACCESS:
+	case TFN_CHECKRESOURCEACCESS:
+	case TFN_CHECKCOUNTERACCESS:
+	case TFN_CHECKSCHEDULETABLEACCESS:
+	case TFN_CHECKTASKOWNERSHIP:
+	case TFN_CHECKISROWNERSHIP:
+	case TFN_CHECKALARMOWNERSHIP:
+	case TFN_CHECKCOUNTEROWNERSHIP:
+	case TFN_CHECKSCHEDULETABLEOWNERSHIP:
+		tracemsg = trace_print_osapleave(trace, info);
+		break;
+
+	/* IOCæ©è½ */
+	case TFN_IOC_SEND_GENERIC:
+	case TFN_IOC_WRITE_GENERIC:
+	case TFN_IOC_RECEIVE_GENERIC:
+	case TFN_IOC_READ_GENERIC:
+	case TFN_IOC_EMPTY_QUEUE_GENERIC:
+		tracemsg = trace_print_iocleave(trace, info);
+		break;
+
+	/* ã¡ã¢ãªã¢ã¯ã»ã¹é¢é£æ©è½ */
+	case TFN_CHECKISRMEMORYACCESS:
+	case TFN_CHECKTASKMEMORYACCESS:
+		tracemsg = trace_print_memoryleave(trace, info);
+		break;
+
+
+	default:
+		tracemsg = "unknown LOG_TYPE_SVC|LEAVE servic call";
+		break;
+	}
+
+	return(tracemsg);
+}
+
+/*
+ *  å¦çåä½ãåãæ¿ãã
+ *  éå¸¸ã¯trace_push_contextããå¼ã°ãããï¼
+ *  trace_push_contextãçµç±ããªãå ´åããã(ã¿ã¹ã¯ï¼ã¹ã¿ã¼ãã¢ããããã¯)
+ */
+static void
+trace_set_context(PR_UNIT_TYPE type, ObjectIDType id)
+{
+	context_stack[context_index].type = type;
+	context_stack[context_index].id = id;
+}
+
+/*
+ *  å¦çåä½ã¹ã¿ãã¯ã«type, idã§æå®ãããå¦çåä½ãããã·ã¥ãã
+ */
+static void
+trace_push_context(PR_UNIT_TYPE type, ObjectIDType id)
+{
+	context_index++;
+	trace_set_context(type, id);
+}
+
+/*
+ *  ç¾å¨ã®å¦çåä½ãè¿ã
+ *  p_obj_type_strã«ã¯å¦çåä½ç¨®å¥ã®æå­åãå
+¥ãã
+ *  p_idã«ã¯å¦çåä½ã®IDãå
+¥ãã
+ *  ã¿ã¹ã¯ï¼C2ISRå®è¡ä¸­ã®å ´åã§ï¼ã¢ã©ã¼ã æºäºå¦çï¼
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦çï¼ä¿¡é ¼é¢æ°ãè¡ãªã£ã¦ããå ´åã¯ï¼ãããã
+ *  ç¾å¨ã®å¦çåä½ã¨ãã¦è¿ã
+ */
+static void
+trace_get_context(uintptr *p_obj_type_str, uintptr *p_id)
+{
+	PR_UNIT_TYPE	type;
+	ObjectIDType	id;
+	sint32			index;
+
+	type = context_stack[context_index].type;
+	id = context_stack[context_index].id;
+	if (type == PR_UNIT_TASK) {
+		index = task_context_index[id];
+		if (index >= 0) {
+			id = task_exec[id][index].id;
+			type = task_exec[id][index].type;
+		}
+	}
+	else if (type == PR_UNIT_ISR) {
+		index = isr_context_index[id];
+		if (index >= 0) {
+			id = isr_exec[id][index].id;
+			type = isr_exec[id][index].type;
+		}
+	}
+	else {
+		/* typeãä¸è¨ä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã */
+	}
+	*p_obj_type_str = (const uintptr) obj_type_to_str[type];
+	*p_id = (uintptr) id;
+}
+
+/*
+ *  trace_push_contextã§ããã·ã¥ããå¦çåä½ããããï¼åãé¤ãï¼ãã
+ *  1ã¤åã®å¦çåä½ãè¿ã
+ */
+static void
+trace_pop_context(uintptr *p_obj_type_str, uintptr *p_id)
+{
+	context_index--;
+	trace_get_context(p_obj_type_str, p_id);
+}
+
+/*
+ *  ã¿ã¹ã¯ï¼C2ISRå®è¡ä¸­ã«ã¢ã©ã¼ã æºäºå¦çï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ã
+ *  ã«æºäºå¦çï¼ä¿¡é ¼é¢æ°ãçºçããå ´åã«ï¼ç¾å¨ã®å¦çåä½ããããã®æºäºå¦çã«ãã
+ */
+static void
+trace_change_context(PR_UNIT_TYPE type, ObjectIDType id)
+{
+	sint32		index;
+	TaskType	tskid;
+	ISRType		isrid;
+	if (context_stack[context_index].type == PR_UNIT_TASK) {
+		tskid = context_stack[context_index].id;
+		task_context_index[tskid]++;
+		index = task_context_index[tskid];
+		task_exec[tskid][index].id = id;
+		task_exec[tskid][index].type = type;
+	}
+	else if (context_stack[context_index].type == PR_UNIT_ISR) {
+		isrid = context_stack[context_index].id;
+		isr_context_index[isrid]++;
+		index = isr_context_index[isrid];
+		isr_exec[isrid][index].id = id;
+		isr_exec[isrid][index].type = type;
+	}
+	else {
+		/* ããã«ã¯æ¥ãªãï¼ä¸ãä¸æ¥ãå ´åï¼ä»¥éã®ã­ã°å
+å®¹ãæªä¿è¨¼ã¨ãªã */
+	}
+}
+
+/*
+ *  ã¿ã¹ã¯ï¼C2ISRå®è¡ä¸­ã®ã¢ã©ã¼ã æºäºå¦çï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ã
+ *  ã«æºäºå¦çï¼ä¿¡é ¼é¢æ°ã®çµäºæã«å¼ã³åºãï¼å¦çåä½ãæ»ã
+ */
+static void
+trace_resume_context(void)
+{
+	TaskType	tskid;
+	ISRType		isrid;
+	if (context_stack[context_index].type == PR_UNIT_TASK) {
+		tskid = context_stack[context_index].id;
+		task_context_index[tskid]--;
+	}
+	else if (context_stack[context_index].type == PR_UNIT_ISR) {
+		isrid = context_stack[context_index].id;
+		isr_context_index[isrid]--;
+	}
+	else {
+		/* ããã«ã¯æ¥ãªãï¼ä¸ãä¸æ¥ãå ´åï¼ä»¥éã®ã­ã°å
+å®¹ãæªä¿è¨¼ã¨ãªã */
+	}
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®è¡¨ç¤º
+ */
+static void
+trace_print(const TRACE *p_trace, void (*outputc)(char8 c))
+{
+	uintptr				traceinfo[TMAX_LOGINFO + 1U];
+	const char8			*tracemsg;
+	uint32				i;
+	TaskType			tskid;
+	AlarmType			almid;
+	ISRType				isrid;
+	ScheduleTableType	schtblid;
+	ApplicationType		osapid;
+
+	traceinfo[0] = (uintptr) (p_trace->logtim);
+	syslog_printf("[%d] ", traceinfo, outputc);
+
+	switch (p_trace->logtype) {
+	/* C2ISRã®éå§ */
+	case LOG_TYPE_ISR | LOG_ENTER:
+		isrid = p_trace->loginfo[0];
+		trace_push_context(PR_UNIT_ISR, isrid);
+
+		traceinfo[0] = (uintptr) isrid;
+		tracemsg = "enter to isr %d.";
+		break;
+
+	/* C2ISRã®çµäº */
+	case LOG_TYPE_ISR | LOG_LEAVE:
+		isrid = p_trace->loginfo[0];
+
+		traceinfo[0] = (uintptr) isrid;
+		trace_pop_context(&(traceinfo[1]), &(traceinfo[2]));
+		tracemsg = "leave from isr %d, context is %s %d.";
+		break;
+
+	/* ã¢ã©ã¼ã æºäºå¦çã®éå§ */
+	case LOG_TYPE_ALM | LOG_ENTER:
+		almid = (uintptr) (((ALMCB *) (p_trace->loginfo[0])) - almcb_table);
+		trace_change_context(PR_UNIT_ALARM, almid);
+
+		traceinfo[0] = (uintptr) almid;
+		tracemsg = "enter to alarm %d.";
+		break;
+
+	/* ã¢ã©ã¼ã æºäºå¦çã®çµäº */
+	case LOG_TYPE_ALM | LOG_LEAVE:
+		almid = (uintptr) (((ALMCB *) (p_trace->loginfo[0])) - almcb_table);
+		trace_resume_context();
+
+		traceinfo[0] = (uintptr) almid;
+		trace_get_context(&(traceinfo[1]), &(traceinfo[2]));
+		tracemsg = "leave from alarm %d, context is %s %d.";
+		break;
+
+	/* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦çã®éå§ */
+	case LOG_TYPE_SCHTBL | LOG_ENTER:
+		schtblid = (uintptr) (((SCHTBLCB *) (p_trace->loginfo[0])) - schtblcb_table);
+		trace_change_context(PR_UNIT_SCHTBL, schtblid);
+
+		traceinfo[0] = (uintptr) schtblid;
+		tracemsg = "enter to scheduletable %d.";
+		break;
+
+	/* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦çã®çµäº */
+	case LOG_TYPE_SCHTBL | LOG_LEAVE:
+		schtblid = (uintptr) (((SCHTBLCB *) (p_trace->loginfo[0])) - schtblcb_table);
+		trace_resume_context();
+
+		traceinfo[0] = (uintptr) schtblid;
+		trace_get_context(&(traceinfo[1]), &(traceinfo[2]));
+		tracemsg = "leave from scheduletable %d, context is %s %d.";
+		break;
+
+	/* ã¹ã¿ã¼ãã¢ããããã¯ã®éå§ */
+	case LOG_TYPE_STAHOOK | LOG_ENTER:
+		trace_set_context(PR_UNIT_STA, 0U);
+		tracemsg = "enter to startup hook.";
+		break;
+
+	/* ã¹ã¿ã¼ãã¢ããããã¯ã®çµäº */
+	case LOG_TYPE_STAHOOK | LOG_LEAVE:
+		tracemsg = "leave from startup hook.";
+		break;
+
+	/* ã¨ã©ã¼ããã¯ã®éå§ */
+	case LOG_TYPE_ERRHOOK | LOG_ENTER:
+		trace_push_context(PR_UNIT_ERR, 0U);
+
+		traceinfo[0] = (uintptr) atk2_strerror((StatusType) p_trace->loginfo[0]);
+		tracemsg = "enter to error hook ercd=%s.";
+		break;
+
+	/* ã¨ã©ã¼ããã¯ã®çµäº */
+	case LOG_TYPE_ERRHOOK | LOG_LEAVE:
+		trace_pop_context(&(traceinfo[0]), &(traceinfo[1]));
+		tracemsg = "leave from error hook, context is %s %d.";
+		break;
+
+	/* ãã­ãã¯ã·ã§ã³ããã¯ã®éå§ */
+	case LOG_TYPE_PROHOOK | LOG_ENTER:
+		trace_push_context(PR_UNIT_PRO, 0U);
+
+		traceinfo[0] = (uintptr) atk2_strerror((StatusType) p_trace->loginfo[0]);
+		tracemsg = "enter to protection hook ercd=%s.";
+		break;
+
+	/* ãã­ãã¯ã·ã§ã³ããã¯ã®çµäº */
+	case LOG_TYPE_PROHOOK | LOG_LEAVE:
+		traceinfo[0] = (uintptr) trace_proret_str((ProtectionReturnType) p_trace->loginfo[0]);
+		trace_pop_context(&(traceinfo[1]), &(traceinfo[2]));
+		tracemsg = "leave from protection hook ercd=%s, context is %s %d.";
+		break;
+
+	/* ã·ã£ãããã¦ã³ããã¯ã®éå§ */
+	case LOG_TYPE_SHUTHOOK | LOG_ENTER:
+		trace_push_context(PR_UNIT_SHUT, 0U);
+
+		traceinfo[0] = (uintptr) atk2_strerror((StatusType) p_trace->loginfo[0]);
+		tracemsg = "enter to shutdown hook ercd=%s.";
+		break;
+
+	/* ã·ã£ãããã¦ã³ããã¯ã®çµäº */
+	case LOG_TYPE_SHUTHOOK | LOG_LEAVE:
+		trace_pop_context(&(traceinfo[0]), &(traceinfo[1]));
+		tracemsg = "leave from shutdown hook.";
+		break;
+
+	/* ä¿¡é ¼é¢æ°ã®éå§ */
+	case LOG_TYPE_TFN | LOG_ENTER:
+		trace_change_context(PR_UNIT_TFN, p_trace->loginfo[0]);
+
+		traceinfo[0] = (const uintptr) p_trace->loginfo[0];
+		tracemsg = "enter to trusted function %d.";
+		break;
+
+	/* ä¿¡é ¼é¢æ°ã®çµäº */
+	case LOG_TYPE_TFN | LOG_LEAVE:
+		trace_resume_context();
+
+		traceinfo[0] = (const uintptr) p_trace->loginfo[0];
+		traceinfo[1] = (uintptr) atk2_strerror((StatusType) p_trace->loginfo[1]);
+		traceinfo[2] = p_trace->loginfo[1];
+		trace_get_context(&(traceinfo[3]), &(traceinfo[4]));
+		tracemsg = "leave from trusted function %d ercd=%s(%d), context is %s %d.";
+		break;
+
+	/* ã¿ã¹ã¯ç¶æ
+ã®å¤å */
+	case LOG_TYPE_TSKSTAT:
+		traceinfo[0] = trace_get_tskid(p_trace->loginfo[0]);
+		traceinfo[1] = (uintptr) atk2_task_state_str((TaskStateType) p_trace->loginfo[1]);
+		tracemsg = "task %d becomes %s.";
+		break;
+
+	/* ãã£ã¹ãããã£ã®å
+¥å£ */
+	case LOG_TYPE_DSP | LOG_ENTER:
+		traceinfo[0] = trace_get_tskid(p_trace->loginfo[0]);
+		tracemsg = "dispatch from task %d.";
+		break;
+
+	/* ãã£ã¹ãããã£ã®åºå£ */
+	case LOG_TYPE_DSP | LOG_LEAVE:
+		tskid = (TaskType) trace_get_tskid(p_trace->loginfo[0]);
+		traceinfo[0] = (uintptr) tskid;
+		trace_set_context(PR_UNIT_TASK, tskid);
+		/* æºäºå¦çããã¦ãããããããªãã®ã§ï¼ç¾å¨ã®å¦çåä½ãåå¾ãã */
+		trace_get_context(&(traceinfo[1]), &(traceinfo[2]));
+
+		if (traceinfo[1] != (const uintptr) obj_type_to_str[PR_UNIT_TASK]) {
+			tracemsg = "dispatch to task %d, executing %s %d.";
+		}
+		else {
+			tracemsg = "dispatch to task %d.";
+		}
+		break;
+
+	/* ã·ã¹ãã ãµã¼ãã¹ã®å
+¥å£ */
+	case LOG_TYPE_SVC | LOG_ENTER:
+		tracemsg = trace_print_svcenter(p_trace, traceinfo, outputc);
+		break;
+
+	/* ã·ã¹ãã ãµã¼ãã¹ã®åºå£ */
+	case LOG_TYPE_SVC | LOG_LEAVE:
+		tracemsg = trace_print_svcleave(p_trace, traceinfo);
+		break;
+
+	case LOG_TYPE_COMMENT:
+		for (i = 1U; i < TMAX_LOGINFO; i++) {
+			traceinfo[i - 1U] = p_trace->loginfo[i];
+		}
+		tracemsg = (const char8 *) (p_trace->loginfo[0]);
+		break;
+
+	case LOG_TYPE_ASSERT:
+		traceinfo[0] = p_trace->loginfo[0];
+		traceinfo[1] = p_trace->loginfo[1];
+		traceinfo[2] = p_trace->loginfo[2];
+		tracemsg = "%s:%u: Assertion '%s' failed.";
+		break;
+
+	case LOG_TYPE_USER_MARK:
+		traceinfo[0] = p_trace->loginfo[0];
+		tracemsg = "user mark=%s.";
+		break;
+
+	default:
+		traceinfo[0] = p_trace->logtype;
+		tracemsg = "unknown trace log type: %d.";
+		break;
+	}
+	syslog_printf(tracemsg, traceinfo, outputc);
+	(*outputc)('\n');
+}
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã®ãã³ã
+ */
+void
+trace_dump(void (*exinf)(char8 c))
+{
+	TRACE	trace;
+	void	(*outputc)(char8 c);
+	uint32	i;
+
+	for (i = 0U; i < TNUM_TASK; i++) {
+		task_context_index[i] = -1;
+	}
+	for (i = 0U; i < TNUM_ISR2; i++) {
+		isr_context_index[i] = -1;
+	}
+
+	outputc = exinf;
+	while (trace_rea_log(&trace) == E_OK) {
+		trace_print(&trace, outputc);
+	}
+	syslog(LOG_NOTICE, "sizeof TRACE=%d", sizeof(TRACE));
+
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/MANIFEST	(revision 172)
@@ -0,0 +1,26 @@
+PACKAGE atk2-sc3
+
+MANIFEST
+Platform_Types.h
+prc.py
+prc.tf
+prc_asm.tf
+prc_cfg1_out.h
+prc_def.csv
+prc_inline_symbols.h
+prc_insn.h
+prc_kernel.h
+prc_mem.arxml
+prc_mem.tf
+prc_mem.yaml
+prc_meminib.tf
+prc_offset.tf
+prc_support.asm
+prc_svc.h
+prc_tool.c
+prc_tool.h
+prc_tool_asm.asm
+prc_user.txt
+prc_design.txt
+start.asm
+v850asm.inc
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/Platform_Types.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/Platform_Types.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/Platform_Types.h	(revision 172)
@@ -0,0 +1,156 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Platform_Types.h 182 2015-06-24 07:14:37Z t_ishikawa $
+ */
+
+/*
+ *		AUTOSAR platform types header file
+ */
+
+#ifndef TOPPERS_PLATFORM_TYPES_H
+#define TOPPERS_PLATFORM_TYPES_H
+
+/*
+ *  Symbol definitions - general
+ */
+#define CPU_TYPE_8		UINT_C(8)
+#define CPU_TYPE_16		UINT_C(16)
+#define CPU_TYPE_32		UINT_C(32)
+
+#define MSB_FIRST		UINT_C(0)
+#define LSB_FIRST		UINT_C(1)
+
+#define HIGH_BYTE_FIRST	UINT_C(0)
+#define LOW_BYTE_FIRST	UINT_C(1)
+
+#ifndef TRUE
+#define TRUE			UINT_C(1)
+#endif /* TRUE */
+
+#ifndef FALSE
+#define FALSE			UINT_C(0)
+#endif /* FALSE */
+
+/*
+ *  Symbol definitions - platform
+ */
+#define CPU_TYPE		(CPU_TYPE_32)
+#define CPU_BIT_ORDER	(MSB_FIRST)
+#define CPU_BYTE_ORDER	(LOW_BYTE_FIRST)
+
+/*
+ *  Stack definitions - platform
+ *  ã»ã¯ã·ã§ã³é
+ç½®ã¯pragmaã§å®æ½ããããï¼
+ *  prc_tool.c ã§éä¾å­é¨ã§å¿
+è¦ãªå¤æ°ã®
+ *  ã»ã¯ã·ã§ã³é
+ç½®æå®ãå®æ½ãã
+ */
+#define DEFINE_VAR_SEC_NOBITS(type, var, sec)   extern type var
+
+/*
+ *  Type definitions
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+#include <stdint.h>
+
+typedef unsigned char boolean;
+
+typedef char				char8;
+typedef unsigned char		uint8;
+typedef signed char			sint8;
+typedef unsigned short		uint16;
+typedef signed short		sint16;
+typedef unsigned int		uint32;
+typedef signed int			sint32;
+typedef unsigned long long	uint64;
+typedef signed long long	sint64;
+
+typedef unsigned long	uint8_least;
+typedef unsigned long	uint16_least;
+typedef unsigned long	uint32_least;
+typedef signed long		sint8_least;
+typedef signed long		sint16_least;
+typedef signed long		sint32_least;
+
+typedef float	float32;
+typedef double	float64;
+
+typedef uint32	uintptr;                /* ãã¤ã³ã¿ãæ ¼ç´ã§ããç¬¦å·ç¡ãæ´æ° */
+typedef sint32	sintptr;                /* ãã¤ã³ã¿ãæ ¼ç´ã§ããç¬¦å·ä»ãæ´æ° */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#if !defined(TOPPERS_CFG1_OUT) && defined(TOPPERS_KERNEL_IMPL_H)
+#pragma section kernel
+#endif
+
+#endif /* TOPPERS_PLATFORM_TYPES_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc.py	(revision 172)
@@ -0,0 +1,66 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: prc.py 182 2015-06-24 07:14:37Z t_ishikawa $
+#
+
+CFG1_DEF_TABLES = CFG1_DEF_TABLES + ["arch/v850_ccrh/prc_def.csv", "arch/v850_gcc/prc_def.csv"]
+INCLUDES = INCLUDES + ["arch/v850_ccrh", "arch/v850_gcc", "arch/ccrh"]
+kernel_arch_files = ['arch/v850_gcc/prc_config.c', 'arch/v850_ccrh/prc_support.asm', 'arch/v850_ccrh/prc_tool.c','arch/v850_gcc/prc_mpu.c', 'arch/v850_ccrh/prc_tool_asm.asm']
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc.tf	(revision 172)
@@ -0,0 +1,281 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: prc.tf 189 2015-06-26 01:54:57Z t_ishikawa $
+$
+
+$
+$     ãã¹2ã®ã¢ã¼ã­ãã¯ãã£ä¾å­ãã³ãã¬ã¼ãï¼V850ç¨ï¼
+$
+
+$FILE "kernel_mem2.c"$
+#pragma section kernel
+
+$FILE "Os_Lcfg.c"$
+#pragma section kernel
+
+$ 
+$  kernel/kernel.tf ã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åãç¢ºä¿ããã³ã¼ããåºåãã
+$  ARGV[1]ï¼ã¿ã¹ã¯ID
+$  ARGV[2]ï¼ã¹ã¿ãã¯ãµã¤ãº
+$ 
+$FUNCTION ALLOC_USTACK$
+    #pragma section $FORMAT(".user_stack.%s", ARGV[1])$$NL$
+    StackType _kernel_ustack_$ARGV[1]$[COUNT_STK_T($ARGV[2]$)];$NL$
+    #pragma section kernel$NL$
+
+    $TSK.TINIB_USTKSZ[ARGV[1]] = VALUE(FORMAT("ROUND_STK_T(%s)", ARGV[2]), +ARGV[2])$
+    $TSK.TINIB_USTK[ARGV[1]] = FORMAT("_kernel_ustack_%s", ARGV[1])$
+$END$
+
+$ 
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã»ã¯ã·ã§ã³åãè¿ã
+$  ARGV[1]ï¼ã¿ã¹ã¯ID
+$ 
+$FUNCTION SECTION_USTACK$
+    $RESULT = FORMAT(".user_stack.%s.bss", ARGV[1])$
+$END$
+
+$
+$  ã¦ã¼ã¶ã¹ã¿ãã¯ã®ã¢ã©ã¤ã¡ã³ãå¶ç´ã«åããããµã¤ãºãè¿ã
+$  ARGV[1]ï¼ã¹ã¿ãã¯ãµã¤ãºï¼ã¢ã©ã¤ã³åï¼
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION USTACK_ALIGN_SIZE$
+	$RESULT = (ARGV[1] + CHECK_USTKSZ_ALIGN - 1) & ~(CHECK_USTKSZ_ALIGN - 1)$
+$END$
+
+$
+$  åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ç¢ºä¿
+$  ARGV[1]ï¼å
+±æã¹ã¿ãã¯å
+$  ARGV[2]ï¼å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+$  ARGV[3]ï¼ã¹ã¿ãã¯ãµã¤ãº(ã¢ã©ã¤ã¡ã³ãèª¿æ´æ¸ã¿)
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION ALLOC_SHARED_USTACK$
+    #pragma section $FORMAT(".shared_user_stack.%s", ARGV[2])$$NL$
+	StackType $ARGV[1]$[COUNT_STK_T(ROUND_STK_T($ARGV[3]$))];$NL$
+    #pragma section kernel$NL$
+$END$
+
+$
+$  åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ã»ã¯ã·ã§ã³å
+$  ARGV[1]ï¼å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION SECTION_SHARED_USTACK$
+	$RESULT = FORMAT(".shared_user_stack.%s.bss", ARGV[1])$
+$END$
+
+$ 
+$  OsMemoryModule ã¯ãµãã¼ãããªã
+$ 
+$TOPPERS_SUPPORT_ATT_MOD = 0$
+$FUNCTION HOOK_ERRORCHECK_MOD$
+    $ERROR$
+        OsMemoryModule is not supported.$NL$
+    $END$
+$END$
+
+$ 
+$  OSAPåæåã³ã³ãã­ã¹ããã­ãã¯ã®ããã®å®£è¨
+$ 
+$FUNCTION PREPARE_OSAPINICTXB$
+    $NOOP()$
+$END$
+
+$FUNCTION ASM_MACRO$
+	$ARGV[1]$ .macro $ARGV[2]$
+$END$
+
+$INCLUDE "arch/v850_gcc/prc_common.tf"$
+
+$IF __v850e3v5__$
+
+$
+$ ãã¼ãã«åç
+§æ¹å¼ç¨ãã¯ã¿ãã¼ãã«(v850e3v5)
+$
+
+$FILE "Os_Lcfg_asm.asm"$
+
+.extern _interrupt$NL$
+
+$NL$$FOREACH intno INTNO_VALID$
+	$isrid = INT.ISRID[intno]$
+	$IF LENGTH(isrid)$
+		$IF EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+			.extern _$ISR.INT_ENTRY[isrid]$$NL$
+		$END$
+	$END$
+$END$
+$NL$
+	.section "EIINTTBL", const$NL$
+	.extern _intbp_tbl$NL$
+	.align 512$NL$
+	_intbp_tbl:$NL$
+$JOINEACH intno INTNO_VALID "\n"$
+	$isrid = INT.ISRID[intno]$
+	$IF LENGTH(isrid) && EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+		$TAB$.dw #_$ISR.INT_ENTRY[isrid]$
+	$ELSE$
+		$TAB$.dw #_interrupt
+	$END$
+	$TAB$$FORMAT(";/* %d */", intno)$
+$END$
+
+$NL$
+;/* in order to restrain warning */$NL$
+$NL$
+$FOREACH mo MO_ORDER$
+	$IF MO.LINKER[mo]$
+        $seg = ""$
+        $e = REGEX_REPLACE(MO.SECTION[mo], ".*\\.text$", "")$
+        $IF !EQ(e, MO.SECTION[mo])$
+            $seg = "text"$
+        $END$
+        $e = REGEX_REPLACE(MO.SECTION[mo], ".*\\.const$", "")$
+        $IF !EQ(e, MO.SECTION[mo])$
+            $seg = "const"$
+        $END$
+        $e = REGEX_REPLACE(MO.SECTION[mo], ".*\\.data$", "")$
+        $IF !EQ(e, MO.SECTION[mo])$
+            $seg = "data"$
+        $END$
+        $e = REGEX_REPLACE(MO.SECTION[mo], ".*\\.bss$", "")$
+        $IF !EQ(e, MO.SECTION[mo])$
+            $seg = "bss"$
+        $END$
+        $IF !EQ(seg, "")$
+            $TAB$.section "$MO.SECTION[mo]$", $seg$$NL$
+            _dummy$MO.SECTION[mo]$:$NL$
+            $NL$
+        $END$
+    $END$
+$END$
+
+$END$
+$   //$IF __v850e3v5__$
+
+$ 
+$  arch/ccrh/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  CCRHä¾å­é¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+$ 
+$INCLUDE "ccrh/ldscript.tf"$ 
+
+$FILE "kernel_mem2.c"$
+
+$IF TNUM_MPU_SHARED > 0$
+uint8 * const shared_meminib_table[$TNUM_MPU_SHARED * 3$] = {$NL$
+$FOREACH memid RANGE(0, TNUM_MPU_SHARED - 1)$
+    $TAB$((uint8 *)NULL),$TAB$/* MPUL $TNUM_MPU_REG - memid$ */$NL$
+    $TAB$((uint8 *)NULL),$TAB$/* MPUA $TNUM_MPU_REG - memid$ */$NL$
+    $TAB$((uint8 *)NULL),$TAB$/* MPAT $TNUM_MPU_REG - memid$ */$NL$
+$END$
+};$NL$
+$NL$
+$END$
+
+$FILE "cfg2_out.tf"$
+$ LNKSEC.*ã®åºå
+$$numls = $numls$$$$NL$
+$NL$
+$FOREACH lsid RANGE(1, numls)$
+	$$LNKSEC.MEMREG[$lsid$] = $LNKSEC.MEMREG[lsid]$$$$NL$
+	$$LNKSEC.SECTION[$lsid$] = $ESCSTR(LNKSEC.SECTION[lsid])$$$$NL$
+	$NL$
+$END$
+
+$JOINEACH tskid TSK.ID_LIST "\n"$
+	$$TSK.ID[$+tskid$] = $TSK.ID[tskid]$$$
+$END$
+$NL$
+
+$lma = 0$
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid] && ((MO.SEFLAG[moid] & 0x01) != 0)$
+		$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+            $$LMA.START_IDATA[$lma$] = "__s$MO.SECTION[moid]$"$$$NL$
+			$$LMA.START_DATA[$lma$] = "__s$MO.SECTION[moid]$.R"$$$NL$
+			$$LMA.END_DATA[$lma$] = "__e$MO.SECTION[moid]$.R"$$$NL$
+            $lma = lma + 1$
+		$END$
+    $END$
+$END$
+$$LMA.ORDER_LIST = RANGE(0, $lma - 1$)$$$NL$
+$NL$
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_asm.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_asm.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_asm.tf	(revision 172)
@@ -0,0 +1,115 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: prc_asm.tf 182 2015-06-24 07:14:37Z t_ishikawa $
+$
+
+$
+$  set ãã£ã¬ã¯ãã£ãã®åå®ç¾©
+$
+$FUNCTION DEFINE$
+	$TAB$$ARGV[1]$$TAB$.set$TAB$$FORMAT("%d", +ARGV[2])$$NL$
+$END$
+
+$DEFINE("TCL_TASK", TCL_TASK)$
+$DEFINE("TCL_ISR2", TCL_ISR2)$
+$DEFINE("TSYS_ISR1", TSYS_ISR1)$
+$DEFINE("E_OS_PROTECTION_EXCEPTION", E_OS_PROTECTION_EXCEPTION)$
+$DEFINE("TSYS_DISALLINT", TSYS_DISALLINT)$
+
+$IF HOOK.PROTECTIONHOOK[1]$
+	$DEFINE("CFG_USE_PROTECTIONHOOK", 1)$
+$END$
+
+$IF OS.STACKMONITORING[1]$
+	$DEFINE("CFG_USE_STACKMONITORING", 1)$
+	$DEFINE("STACK_MAGIC_NUMBER", STACK_MAGIC_NUMBER)$
+	$DEFINE("E_OS_STACKFAULT", E_OS_STACKFAULT)$
+$END$
+
+$IF HOOK.PRETASKHOOK[1]$
+	$DEFINE("CFG_USE_PRETASKHOOK", 1)$
+$END$
+
+$IF HOOK.POSTTASKHOOK[1]$
+	$DEFINE("CFG_USE_POSTTASKHOOK", 1)$
+$END$
+
+$IF ENABLE_RETURN_MAIN$
+	$DEFINE("ENABLE_RETURN_MAIN", 1)$
+$END$
+
+$IF LOG_DSP_ENTER$
+	$DEFINE("LOG_DSP_ENTER", 1)$
+$END$
+
+$IF LOG_DSP_LEAVE$
+	$DEFINE("LOG_DSP_LEAVE", 1)$
+$END$
+
+$FOREACH isrid ISR.ID_LIST$
+	$IF EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+		$DEFINE(ISR.INT_ENTRY[isrid], 1)$
+	$END$
+$END$
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_cfg1_out.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_cfg1_out.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_cfg1_out.h	(revision 172)
@@ -0,0 +1,99 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_cfg1_out.h 182 2015-06-24 07:14:37Z t_ishikawa $
+ */
+
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ */
+int
+main(void)
+{
+	return(0);
+}
+
+StackType * const	_ostkpt = UINT_C(0x00);
+const uint32			tnum_datasec;
+const DATASECINIB	datasecinib_table[1];
+const uint32		tnum_bsssec;
+const BSSSECINIB	bsssecinib_table[1];
+void * const	    syscall_table[1];
+
+/*
+ *  ãªãã»ãããã¡ã¤ã«ãçæããããã®å®ç¾©
+ */
+const uint8			MAGIC_1 = UINT_C(0x12);
+const uint16		MAGIC_2 = UINT_C(0x1234);
+const uint32		MAGIC_4 = UINT_C(0x12345678);
+
+/*
+ *	CXã³ã³ãã¤ã©ã§ã¯ï¼æ¡ä»¶ã«ãã£ã¦ã¯ãæå³ããã¤ã³ã©ã¤ã³åãç¡å¹åãããã
+ *	ã±ã¼ã¹ãå­å¨ããï¼ãã®ããï¼ããããã¡ã¤ã«ããå¼ã³åºãããå¯è½æ§ã®ãã
+ *	ã¹ã¿ããå®ç¾©ããï¼
+ */
+
+/*
+ *  prc_config.h
+ */
+const uint16		pmr_isr1_mask;
+const uint16		pmr_isr2_mask;
+volatile uint8		nested_lock_os_int_cnt;
+uint8				current_iintpri;
+const uint16		pmr_setting_tbl[];
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_def.csv
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_def.csv	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_def.csv	(revision 172)
@@ -0,0 +1,9 @@
+TCL_TASK,TCL_TASK
+TCL_ISR2,TCL_ISR2
+TSYS_ISR1,TSYS_ISR1
+TSYS_DISALLINT,TSYS_DISALLINT
+STACK_MAGIC_NUMBER,STACK_MAGIC_NUMBER
+E_OS_STACKFAULT,E_OS_STACKFAULT
+ENABLE_RETURN_MAIN,#defined(ENABLE_RETURN_MAIN)
+LOG_DSP_ENTER,#defined(LOG_DSP_ENTER)
+LOG_DSP_LEAVE,#defined(LOG_DSP_LEAVE)
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_design.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_design.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_design.txt	(revision 172)
@@ -0,0 +1,208 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼RH850ãã­ã»ããµä¾å­é¨è¨­è¨æ¹é(CCRHç)ï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: prc_design.txt 164 2015-06-03 01:22:29Z t_ishikawa $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+æ¬ãã­ã¥ã¡ã³ãã§ã¯ï¼GCCããCCRHã«åãã¦å¤æ´ããè¨­è¨äºé 
+ããã£ããã¨
+è¨é²ããï¼
+
+â¯ ã¿ã¼ã²ããå®ç¾©ã®ã»ã¯ã·ã§ã³
+
+ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ãå®ç¾©ããã»ã¯ã·ã§ã³åã®å¯¾å¿ã¯ä¸è¨ã®ã¨ãã
+ã§ããï¼prc_mem.yaml|arxmlã«ãã£ã¦å®ç¾©ãã
+
+å¡ä¾ï¼gccä¾å­é¨ã§ã®ã»ã¯ã·ã§ã³å â ccrhä¾å­é¨ã§ã®ã»ã¯ã·ã§ã³å
+ .text_kernel â kernel.text
+ .rodata_kernel â kernel.const
+ .data_kernel â kernel.data
+ .bss_kernel â kernel.bss
+ .srpw_kernel â kernel.srpw.bss
+ .text_shared â shared.text
+ .rodata_shared â shared.const
+ .data_shared â shared.data
+ .bss_shared â shared.bss
+
+ã¾ãï¼ä¸è¨ã»ã¯ã·ã§ã³ãé
+ç½®ãããOSAPã¯ä¸è¨ã®ã¨ãã
+å¡ä¾ï¼OSAPå - æå±ããã»ã¯ã·ã§ã³å
+ prc_osap_kernel (ä¿¡é ¼OSAP)
+  - kernel.text
+  - kernel.const
+  - kernel.data
+  - kernel.bss
+  - kernel.srpw.bss
+ (ç¡æå±)
+  - shared.text
+  - shared.const
+  - shared.data
+  - shared.bss
+
+ã¾ãï¼ã¸ã§ãã¬ã¼ã¿ãèªåçã«å®ç¾©ããã»ã¯ã·ã§ã³åï¼å
+·ä½çã«ã¯ã¦ã¼ã¶
+ã¹ã¿ãã¯ã®ã»ã¯ã·ã§ã³åã¯ä¸è¨ã®ã¨ããï¼
+å¡ä¾ï¼gccä¾å­é¨ã§ã®ã»ã¯ã·ã§ã³å â ccrhä¾å­é¨ã§ã®ã»ã¯ã·ã§ã³å
+ .user_stack.<task ID> â .user_stack.<task ID>.bss
+ .shared_user_stack.<priority> â .shared_user_stack.<priority>.bss
+ 
+â¯ prc_support.asm
+
+ã¾ãï¼v850_gcc/prc_support.S ãã ccrh/gcc2ccrh.rb ã«ããã¢ã»ã³ããªã
+çæããï¼
+
+ããã¦ï¼ä¸è¨ã»ã¯ã·ã§ã³åã®å¤æè¦åã«å¾ãï¼ã»ã¯ã·ã§ã³é
+ç½®æå®ãå¤æ´ããï¼
+
+ã¾ãï¼ccrhã§ã¯ï¼Cè¨èªã®ãã¯ã­ãã¢ã»ã³ããªã«åãè¾¼ããªãããï¼v850asm.inc
+ã«ãã¯ã­å®ç¾©ãè¨è¿°ããï¼
+
+â»prc_asm.tf ã§åºåããæ¡ãèãããã
+
+â¯ DEFINE_VAR_SEC_NOBITS(type, var, sec)
+
+éä¾å­é¨ã§å®ç¾©ããå¤æ°ãï¼ç¹å®ã®ã»ã¯ã·ã§ã³ã«é
+ç½®ããããã®ãã¯ã­ã§ããï¼
+ç¾ç¶ã§ã¯ï¼å
+±æãªã¼ãå°æã©ã¤ãã®ã«ã¼ãã«å¤æ°ãã»ã¯ã·ã§ã³é
+ç½®ããç®çã§
+ã®ã¿ä½¿ç¨ãã¦ããï¼
+ccrhã§ã¯pragmaã«ããã»ã¯ã·ã§ã³é
+ç½®ãè¡ãããï¼ä¸è¨ãã¯ã­ã§ã¯externå®£è¨
+ãããããã«å¤æ´ãï¼prc_tool.c ã§å¤æ°ã®å®ä½ã®å®£è¨ããã³ã»ã¯ã·ã§ã³é
+ç½®ã
+æå®ããï¼
+
+â»defineãã¯ã­ã«ããã¦pragmaãå±éãããã¨ã¯ã§ããªãã£ãï¼
+â»defineãã¯ã­ã«ããã¦ã»ã¯ã·ã§ã³åãå±éãããã¨ã¯ã§ããªãã£ãï¼
+  #define SECTION section1
+  #pragma section SECTION
+  ã¨ããã¨ï¼SECTIONã¨ããã»ã¯ã·ã§ã³ã«é
+ç½®ããã
+
+â¯ ã«ã¼ãã«å¤æ°ï¼ã³ã¼ãã®ã»ã¯ã·ã§ã³é
+ç½®æå®
+
+éä¾å­é¨ã§å®ç¾©ããã¦ããå¤æ°ããã³é¢æ°ãªã©ãï¼kernel.xxxxã»ã¯ã·ã§ã³ã«
+é
+ç½®ããããã«ï¼Platfrom_Types.hã«ããã¦ï¼kernel_impl.hããincludeããã
+å ´åã«ï¼#pragma section kernel ãçæããããã«ããï¼
+
+ããã§ï¼cfgã®ãã¹1ã«ããã¦kernelã»ã¯ã·ã§ã³ã«é
+ç½®ããããã¨ãé²ãããã«ï¼
+ã¬ã¼ããããã¦ããï¼
+cfgã®ãã¹1ã§ã¯ï¼ccrhããã©ã«ãã®ã»ã¯ã·ã§ã³é
+ç½®æå®ãä½¿ç¨ããããï¼kernel
+ã¨ããã»ã¯ã·ã§ã³ã¯å­å¨ããªãï¼
+
+ã¾ãï¼Os_Lcfg.c / kernel_mem.c ã«çæããããã¼ã¿ãé¢æ°ãkernelã»ã¯ã·ã§ã³
+ã«é
+ç½®ããããï¼prc.tfã«ããã¦ï¼#pragma section kernel ãçæããããã«ããï¼
+
+â¯ tf
+
+ã»OsMemoryModuleããµãã¼ãããªãããï¼TOPPERS_SUPPORT_ATT_MOD ã0ã«ããï¼
+
+ã»MPUã«ã»ããããçªå°ã«ã¤ãã¦ï¼ccrhã§ã¯ã»ã¯ã·ã§ã³ã®å¢çãç¤ºãã©ãã«åãï¼
+ã'.'ãå«ãããï¼Cè¨èªã§ä½¿ç¨ãããã¨ãã§ããªã(æ§é ä½ã®ã¡ã³ãã¨ãã¦æ±ã
+ããã¦ãã¾ã)ï¼ãã®ããï¼ãã¹2ã§ã¯0ãMPUåæåãã­ãã¯ã«åºåãã¦ããï¼
+ããã¹4ã§ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã¨ãã¦ç»é²ãããã»ã¯ã·ã§ã³ã®ã©ãã«åãã
+ãé
+ç½®ã¢ãã¬ã¹ãSYMBOLã§åå¾ãã¦ï¼MPUåæåãã­ãã¯ã«åºåããï¼
+
+ã»ccrhã§ã¯ï¼ãµã¤ãºãç©ºã®ã»ã¯ã·ã§ã³ãé
+ç½®ããã¨ï¼è­¦åãçºããï¼
+ããã®è­¦åãåé¿ããããã«ï¼arxmlã§ç»é²ããããã¹ã¦ã®ã»ã¯ã·ã§ã³ã«å¯¾ãã¦ï¼
+ãããã¼ã®ã·ã³ãã«ãçæãï¼Os_Lcfg_asm.asm ã«åºåããï¼
+
+ã»ccrh/ldscript.tf ã«ããã¦ï¼CS+ã§ãªã³ã¯ãªãã·ã§ã³ãæå®ããããã®
+ãpythonã¹ã¯ãªããï¼ldscript.pyãåºåããï¼
+
+ããã®pythonã¹ã¯ãªãããå®è¡ããæ¹æ³ã¨ãã¦ï¼ä»¥ä¸ã®æ¹æ³ãæ¤è¨ããï¼
+
+ã(1) ãã¹4ã¨atk2-sc3æ¬ä½ã®ãã«ãåã«ã¦ã¼ã¶ã«å®è¡ãã¦ãããï¼
+ã - ã¦ã¼ã¶ã®æéã«ãªãï¼å®è¡ãå¿ãã«ããã¨ã©ã¼ãèµ·ããå¯è½æ§ãããï¼
+ã(2) ãã¹4ã¨atk2-sc3æ¬ä½ã®ãã«ãåã«CS+ã«ãã¬ãã«ãèªåå®è¡ãã¦ãããï¼
+ã - ãã¬ãã«ãæã«ãã«ããªãã·ã§ã³ãæ¸ãæãããã¨ã¯ã§ããªãã£ãããå´ä¸ï¼
+ã(3) CS+ã«ãã¹2ã®ãã«ãå¾ã«ãã¹ããã«ãèªåå®è¡ãã¦ãããï¼ãã¹4ã¨
+ãããatk2-sc3æ¬ä½ã®ãã­ã¸ã§ã¯ããã¡ã¤ã«(xml)ãæ¸ãæããï¼
+ã - ãã¹2ã®ãã¨ã«æ¸ãæãããã­ã¸ã§ã¯ããã¡ã¤ã«ãèªåã§éãç´ãã¨ããã§
+ã   ã¨ã©ã¼ã¨ãªãï¼ã¦ã¼ã¶ã«ååº¦ãã­ã¸ã§ã¯ããéãç´ãã¦ãããå¿
+è¦ãããï¼
+  ç¾ç¶ã¯(3)ã§å®è£
+ãã¦ããï¼
+
+ãæ¬ã¹ã¯ãªããã§ã¯ï¼ã»ã¯ã·ã§ã³ã®é
+ç½®é ï¼ROMåãããã¼ã¿ã»ã¯ã·ã§ã³ï¼
+ãã¢ã©ã¤ã¡ã³ãããã»ã¯ã·ã§ã³ã®ããã®ãªã³ã¯ãªãã·ã§ã³ãæå®ããï¼
+
+ã»ccrhã§ã¯ï¼åºåã»ã¯ã·ã§ã³ã¨ããæ¦å¿µããªãï¼å
+¥åã»ã¯ã·ã§ã³ãã¡ã¢ãª
+ããªãã¸ã§ã¯ããã¨ã«ã¾ã¨ããåºåã»ã¯ã·ã§ã³ãçæãï¼ãã®å¢çå¤ãåå¾ãã
+ããã¨ã§ï¼MPUã®è¨­å®æ
+å ±ãçæããã¨ããå¾æ¥ææ³(GCCä¾å­é¨)ãä½¿ç¨ã§ããªãï¼
+ããã®ããï¼MPUã«è¨­å®ããã¢ãã¬ã¹ãåå¾ããããã«ï¼ãã¹ã¦ã®ã»ã¯ã·ã§ã³ã
+ãã¡ã¢ãªãªãã¸ã§ã¯ããã¨ã«ï¼ãªã³ã¯é ã«ãµã¼ããï¼å§ãã¦è¦ã¤ãã£ãç©ºã§ãªã
+ãã»ã¯ã·ã§ã³ã®éå§çªå°ããã®ã¡ã¢ãªãªãã¸ã§ã¯ãã®éå§çªå°ã¨ãã¦ï¼æå¾ã«
+ãè¦ã¤ãã£ãç©ºã§ãªãã»ã¯ã·ã§ã³ã®çµäºçªå°ããã®ã¡ã¢ãªãªãã¸ã§ã¯ãã®çµäº
+ãçªå°ã¨ãã¦ããï¼
+
+ã»ã»ã¯ã·ã§ã³ã®ã©ãã«åã®å¶ç´ã«ããï¼kernel_mem.tf ã«ãããæ¨æºã®ã¡ã¢ãª
+ããªãã¸ã§ã¯ãåæåãã­ãã¯ãçæã§ããªãï¼
+ããã®é¨åã«ã¤ãã¦ã¯ï¼prc_meminib.tf ã§çæããï¼
+
+â TIPS
+
+ã»sdata/sbss ã¯ï¼pragmaã§å¤æ°ãgp_dispxxã»ã¯ã·ã§ã³ã«é
+ç½®ããã¨çæããã
+ã»sdata/sbss ã¯ï¼ããã©ã«ãã§ã¯gpç¸å¯¾ã§ã¢ã¯ã»ã¹ãããªãï¼-MApãªãã·ã§ã³ã
+ãã¤ãã¦ãªã³ã¯ããçµæåºåãããblsãã¡ã¤ã«ãï¼ã³ã³ãã¤ã«ãªãã·ã§ã³-Omap=
+ãã§æå®ãããã¨ã§ï¼gpç¸å¯¾ã§ã¢ã¯ã»ã¹ãããã³ã¼ããçæãããï¼
+ãgpç¸å¯¾ãä½¿ãã®ã§ããã°ï¼ãã¹4ã®ãã«ãæã«ãgpç¸å¯¾ãä½¿ãããã«ãã«ããã¹ã
+ãã¨èããããï¼
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_inline_symbols.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_inline_symbols.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_inline_symbols.h	(revision 172)
@@ -0,0 +1,120 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_inline_symbols.h 182 2015-06-24 07:14:37Z t_ishikawa $
+ */
+
+/*
+ *		ã³ã³ãã¤ã©ä¾å­å®ç¾©
+ */
+
+#ifndef PRC_INLINE_SYMBOL_H
+#define PRC_INLINE_SYMBOL_H
+
+#include "kernel_inline_symbols.h"
+
+/* v850.h */
+#pragma inline set_pmr
+#pragma inline get_ispr
+#pragma inline clear_ispr
+
+/* prc_config.h */
+#pragma inline x_lock_all_int
+#pragma inline x_unlock_all_int
+#pragma inline x_nested_lock_os_int
+#pragma inline x_nested_unlock_os_int
+#pragma inline x_suspend_lock_os_int
+#pragma inline x_resume_unlock_os_int
+#pragma inline x_set_ipm
+#pragma inline x_get_ipm
+#pragma inline x_disable_int
+#pragma inline x_enable_int
+#pragma inline x_clear_int
+#pragma inline x_probe_int
+#pragma inline i_begin_int
+#pragma inline i_end_int
+
+/* prc_insn.h */
+#pragma inline disable_int
+#pragma inline enable_int
+#pragma inline current_psw
+#pragma inline set_psw
+
+/* prc_sil.h */
+#pragma inline sil_reb_mem
+#pragma inline sil_wrb_mem
+#pragma inline sil_reh_mem
+#pragma inline sil_wrh_mem
+#pragma inline sil_rew_mem
+#pragma inline sil_wrw_mem
+#pragma inline TOPPERS_disint
+#pragma inline TOPPERS_enaint
+
+/* taua_timer.h */
+#pragma inline target_timer_get_current
+#pragma inline target_timer_probe_int
+
+/* uart.h */
+#pragma inline uart_putc
+
+/* uart.c */
+#pragma inline uart_getready
+#pragma inline uart_getchar
+
+
+#endif /* PRC_INLINE_SYMBOL_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_insn.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_insn.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_insn.h	(revision 172)
@@ -0,0 +1,175 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_insn.h 182 2015-06-24 07:14:37Z t_ishikawa $
+ */
+
+/*
+ *		ãã­ã»ããµã®ç¹æ®å½ä»¤ã®ã¤ã³ã©ã¤ã³é¢æ°å®ç¾©ï¼V850ç¨ï¼
+ */
+#ifndef TOPPERS_PRC_INSN_H
+#define TOPPERS_PRC_INSN_H
+
+#include <prc_tool.h>
+
+/*
+ *  V850E3V5ã®ã¿ãµãã¼ã
+ */
+#ifndef __v850e3v5__
+#error Only support v850e3v5 architecture!!
+#endif /* __v850e3v5__ */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+#define SYNCM	__syncm();
+
+LOCAL_INLINE void
+disable_int(void)
+{
+	__DI();
+}
+
+LOCAL_INLINE void
+enable_int(void)
+{
+	__EI();
+}
+
+LOCAL_INLINE uint32
+current_psw(void)
+{
+	return(__stsr_rh(5, 0));
+}
+
+LOCAL_INLINE void
+set_psw(uint32 psw)
+{
+	__ldsr_rh(5, 0, psw);
+}
+
+/*
+ *  V850E3V5ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ */
+LOCAL_INLINE void
+set_pmr(uint16 pmr)
+{
+	uint32 psw;
+
+	/* PMR must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	__ldsr_rh(11, 2, pmr);
+
+	set_psw(psw);
+}
+
+LOCAL_INLINE uint16
+get_ispr(void)
+{
+	return(__stsr_rh(10, 2));
+}
+
+LOCAL_INLINE void
+clear_ispr(void)
+{
+	uint32 psw;
+
+	/* ISPR must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	__ldsr_rh(13, 2, 1);    /* INTCFG = 1; ISPR ãæ¸ãæãå¯è½ã« */
+	__ldsr_rh(10, 2, 0);    /* ISPR = 0 */
+	__ldsr_rh(13, 2, 0);    /* INTCFG = 0; ISPR ãæ¸ãæãç¦æ­¢ã«(èªåæ´æ°ã«) */
+	__syncp();
+
+	set_psw(psw);
+}
+
+LOCAL_INLINE void
+set_intbp(uint32 intbp)
+{
+	uint32 psw;
+
+	/* INTBP must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	__ldsr_rh(4, 1, intbp);
+
+	set_psw(psw);
+}
+
+#define LDSR_REG(reg, sel, val) {\
+    __ldsr_rh(reg, sel, val);\
+}
+
+#define STSR_REG(reg, sel, val) {\
+    val = __stsr_rh(reg, sel); \
+}
+
+#define MPA_WRITE(mpuid, mpla, mpua, mpat) { \
+    __ldsr_rh(mpuid*4, 6, mpla); \
+    __ldsr_rh(mpuid*4+1, 6, mpua); \
+    __ldsr_rh(mpuid*4+2, 6, mpat); \
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_INSN_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_kernel.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_kernel.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_kernel.h	(revision 172)
@@ -0,0 +1,110 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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: prc_kernel.h 182 2015-06-24 07:14:37Z t_ishikawa $
+ */
+
+/*
+ *		Os.hã®ãã­ã»ããµä¾å­é¨ï¼V850E2/FL4ç¨ï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼Os.hã§ã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡
+ *  ã¤ã«ããç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªã
+ */
+
+#ifndef TOPPERS_PRC_KERNEL_H
+#define TOPPERS_PRC_KERNEL_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef uint32	SystemTimeMsType;
+typedef uint32	SystemTimeUsType;
+typedef uint32	SystemTime100NsType;
+
+#ifdef CFG_USE_PROTECTIONHOOK
+/*
+ *  CPUä¾å¤è¦å æ
+å ±ä¿æå¤æ°å¤é¨åç
+§å®£è¨ï¼prc_config.cï¼
+ *  ã¦ã¼ã¶ä½æãããã­ãã¯ã·ã§ã³ããã¯ããåç
+§ããããï¼
+ *  Os.hããã¤ã³ã¯ã«ã¼ããããprc_kernel.hã§åç
+§å®£è¨
+ */
+/* CPUä¾å¤çºçæï¼CPUä¾å¤è¦å çªå·ãä¿æããå¤æ° */
+extern uint32	v850_cpu_exp_no;
+
+/* CPUä¾å¤çºçæï¼ãã­ã°ã©ã ã«ã¦ã³ã¿ï¼PC - 4ï¼ãä¿æããå¤æ° */
+extern uint32	v850_cpu_exp_pc;
+
+/* CPUä¾å¤çºçæï¼ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿æããå¤æ° */
+extern uint32	v850_cpu_exp_sp;
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãµãã¼ãããæ©è½ã®å®ç¾©
+ */
+#define TOPPERS_SUPPORT_GET_UTM         /* get_utmããµãã¼ããã */
+
+
+#endif /* TOPPERS_PRC_KERNEL_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.arxml	(revision 172)
@@ -0,0 +1,487 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>kernel_text</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>kernel.text</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>kernel_const</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>kernel.const</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>kernel_data</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>kernel.data</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>DATA</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>kernel_bss</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>kernel.bss</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>BSS</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>kernel_srpw</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>kernel.srpw.bss</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>NO_INITIALIZE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>prc_osap_kernel</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/kernel_text</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/kernel_const</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/kernel_data</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/kernel_bss</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/kernel_srpw</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsApplicationHooks</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppErrorHook</DEFINITION-REF>
+											<VALUE>false</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppShutdownHook</DEFINITION-REF>
+											<VALUE>false</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppStartupHook</DEFINITION-REF>
+											<VALUE>false</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>shared_text</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>shared.text</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>shared_const</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>shared.const</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>shared_data</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>shared.data</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>DATA</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>shared_bss</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>shared.bss</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize</DEFINITION-REF>
+									<VALUE>BSS</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.tf	(revision 172)
@@ -0,0 +1,123 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+
+$ 
+$  ãã¹4ã®ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãï¼V850 CCRHç¨ï¼
+$  
+$FILE "kernel_mem.c"$
+#pragma section kernel
+
+$ 
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã»ã¯ã·ã§ã³åãè¿ã
+$  ARGV[1]ï¼ã¿ã¹ã¯ID
+$ 
+$FUNCTION SECTION_USTACK$
+    $RESULT = FORMAT(".user_stack.%s.bss", ARGV[1])$
+$END$
+
+$
+$  åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ã»ã¯ã·ã§ã³å
+$  ARGV[1]ï¼å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION SECTION_SHARED_USTACK$
+	$RESULT = FORMAT(".shared_user_stack.%s.bss", ARGV[1])$
+$END$
+
+$FUNCTION START_MO_SYMBOL$
+    $symbol = CONCAT("__s", MO.SECTION[ARGV[1]])$
+    $IF !EQ(MO.ILABEL[ARGV[1]], "")$
+        $symbol = CONCAT(symbol, ".R")$
+    $END$
+	$RESULT = SYMBOL(symbol)$
+$END$
+
+$FUNCTION LIMIT_MO_SYMBOL$
+    $symbol = CONCAT("__e", MO.SECTION[ARGV[1]])$
+    $IF !EQ(MO.ILABEL[ARGV[1]], "")$
+        $symbol = CONCAT(symbol, ".R")$
+    $END$
+	$RESULT = SYMBOL(symbol)$
+$END$
+
+$FUNCTION START_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("__s", ARGV[1]))$
+$END$
+
+$FUNCTION LIMIT_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("__e", ARGV[1]))$
+$END$
+
+$ 
+$  OSAPåæåã³ã³ãã­ã¹ããã­ãã¯ã®ããã®å®£è¨
+$ 
+$FUNCTION PREPARE_OSAPINICTXB$
+    $NOOP()$
+$END$
+
+$ 
+$  meminibã®ä¾å­é¨ã®èª­è¾¼ã¿
+$ 
+$INCLUDE "arch/v850_ccrh/prc_meminib.tf"$
+
+$INCLUDE "arch/v850_gcc/prc_mem_common.tf"$
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_mem.yaml	(revision 172)
@@ -0,0 +1,180 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  AUTOSARï¼AUTomotive Open System ARchitectureï¼ã¯ï¼AUTOSARä»æ§ã«åºã¥
+#  ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«
+#  ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: prc_mem.yaml 182 2015-06-24 07:14:37Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    kernel_text:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "kernel.text"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/FLASH
+      OsMemorySectionWriteable: false
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: true
+      OsMemorySectionShort: false
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    kernel_const:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "kernel.const"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/FLASH
+      OsMemorySectionWriteable: false
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: true
+      OsMemorySectionShort: false
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    kernel_data:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "kernel.data"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: false
+      OsMemorySectionInitialize: DATA
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    kernel_bss:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "kernel.bss"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: false
+      OsMemorySectionInitialize: BSS
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    kernel_srpw:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "kernel.srpw.bss"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: false
+      OsMemorySectionInitialize: NO_INITIALIZE
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    prc_osap_kernel:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppMemorySectionRef: 
+        - /Ecuc/Os/kernel_text
+        - /Ecuc/Os/kernel_const
+        - /Ecuc/Os/kernel_data
+        - /Ecuc/Os/kernel_bss
+        - /Ecuc/Os/kernel_srpw
+      OsApplicationHooks:
+        OsAppErrorHook: false
+        OsAppShutdownHook: false
+        OsAppStartupHook: false
+    shared_text:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "shared.text"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/FLASH
+      OsMemorySectionWriteable: false
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: true
+      OsMemorySectionShort: false
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    shared_const:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "shared.const"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/FLASH
+      OsMemorySectionWriteable: false
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: true
+      OsMemorySectionShort: false
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    shared_data:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "shared.data"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: false
+      OsMemorySectionInitialize: DATA
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: true
+    shared_bss:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: "shared.bss"
+      OsMemorySectionMemoryRegionRef: /Ecuc/Os/RAM
+      OsMemorySectionWriteable: true
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: false
+      OsMemorySectionShort: false
+      OsMemorySectionInitialize: BSS
+      OsMemorySectionCacheable: true
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: true
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_meminib.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_meminib.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_meminib.tf	(revision 172)
@@ -0,0 +1,363 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: prc_meminib.tf 189 2015-06-26 01:54:57Z t_ishikawa $
+$
+
+$ 
+$  MOã®èª­ã¿è¾¼ã¿
+$ 
+$INCLUDE "cfg2_out.tf"$
+
+$ =====================================================================
+$ kernel_mem.cã®å
+±éé¨åã®çæ
+$ =====================================================================
+
+$FILE "kernel_mem.c"$
+
+$ =====================================================================
+$ ã·ã³ãã«ã¨ä»®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®èª­è¾¼ã¿ã¨åå¦ç
+$ =====================================================================
+
+$
+$ ã·ã³ãã«ã¨ä»®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®èª­è¾¼ã¿
+$
+$ MO.BASEADDR[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­çªå°
+$ MO.LIMITADDR[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ä¸éçªå°
+$ MO.POFFSET[moid]ï¼ç©çã¢ãã¬ã¹ã¨ã®ãªãã»ãã
+$ MO_MEMTOP_LISTï¼ãµã¤ãºã0ã§ãªãã¡ã¢ãªãªãã¸ã§ã¯ãã®ãªã¹ã
+
+$OMIT_STANDARD_MEMINIB = 1$
+$IF OMIT_STANDARD_MEMINIB$
+	$MO_MEMTOP_LIST = {}$
+	$memtop_table = SYMBOL("memtop_table")$
+	$offset = 0$
+	$FOREACH moid MO_START_LIST$
+		$IF MO.LINKER[moid]$
+            $next = AT(MO_START_LIST, (FIND(MO_START_LIST, moid) + 1))$
+            $IF LENGTH(next) && !EQ(next, "")$
+                $last = FIND(MO_ORDER, next) - 1$
+            $ELSE$
+                $last = LENGTH(MO_ORDER) - 1$
+            $END$
+            $TRACE(MO.SECTION[moid])$
+            $FOREACH moid2 RANGE(FIND(MO_ORDER, moid), last)$
+                $moid2 = AT(MO_ORDER, moid2)$
+                $TRACE(MO.SECTION[moid2])$
+                $IF !LENGTH(MO.BASEADDR[moid])$
+                    $MO.BASEADDR[moid] = START_MO_SYMBOL(moid2)$
+                    $IF !EQ(MO.ILABEL[moid2], "")$
+                        $MO.IBASEADDR[moid] = START_SYMBOL(MO.SECTION[moid2])$
+                    $END$
+                $END$
+                $IF LENGTH(LIMIT_MO_SYMBOL(moid2))$
+                    $MO.LIMITADDR[moid] = LIMIT_MO_SYMBOL(moid2)$
+                $END$
+            $END$
+            $IF !LENGTH(MO.BASEADDR[moid])$
+                $IF LENGTH(MO.LIMITADDR[moid])$
+                    $ERROR$conflict MO BASE and LIMIT$END$
+                $END$
+                $MO.BASEADDR[moid] = 0xffffffff$
+                $MO.LIMITADDR[moid] = 0xffffffff$
+            $END$
+            $IF LENGTH(MO.BASEADDR[moid])$
+                $IF !LENGTH(MO.LIMITADDR[moid])$
+                    $ERROR$conflict MO BASE and LIMIT$END$
+                $END$
+            $END$
+			$MO.POFFSET[moid] = 0$
+		$ELSE$
+			$MO.BASEADDR[moid] = PEEK(memtop_table + offset, sizeof_void_ptr)$
+			$offset = offset + sizeof_void_ptr$
+			$MO.LIMITADDR[moid] = (MO.BASEADDR[moid] + MO.SIZE[moid]) & ((1 << sizeof_void_ptr * 8) - 1)$
+			$IF LENGTH(MO.PADDR[moid])$
+				$MO.POFFSET[moid] = MO.PADDR[moid] - MO.BASEADDR[moid]$
+			$ELSE$
+				$MO.POFFSET[moid] = 0$
+			$END$
+		$END$
+
+		$IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+			$IF MO.BASEADDR[moid] < MO.LIMITADDR[moid]
+											|| MO.LIMITADDR[moid] == 0$
+				$MO_MEMTOP_LIST = APPEND(MO_MEMTOP_LIST, moid)$
+			$ELIF MO.TYPE[moid] == TOPPERS_ATTMEM$
+				$ERROR MO.TEXT_LINE[moid]$ 
+					$FORMAT(_("%1% `%2%\' is too large"),
+								"size", MO.SIZE[moid])$
+				$END$
+			$ELSE$
+				$ERROR MO.TEXT_LINE[moid]$
+					$FORMAT(_("illegal memory object size"))$$NL$
+                    $FORMAT("0x%x", MO.BASEADDR[moid])$$NL$
+                    $FORMAT("0x%x", MO.LIMITADDR[moid])$
+				$END$
+			$END$
+		$END$
+	$END$
+$END$
+
+$ =====================================================================
+$ ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+$ =====================================================================
+
+$FUNCTION GENERATE_MEMINIB_TABLE$
+$	// ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã«åºåããã¨ã³ããªã®æ±ºå®
+$
+$	// tnum_meminibï¼ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã«åºåããã¨ã³ããªæ°
+$	// genzeroï¼ã¢ãã¬ã¹0ã«å¯¾å¿ããã¨ã³ããªãåºåãã
+	$tnum_meminib = 0$
+	$prev = 0$
+	$TRACE(MO_MEMTOP_ORDER)$
+	$FOREACH moid MO_MEMTOP_ORDER$
+		$IF !prev && MO.BASEADDR[moid] != 0$
+			$genzero = 1$
+			$tnum_meminib = tnum_meminib + 1$
+		$END$
+		$IF LENGTH(MO.SUPPRESSLIMIT[moid])$
+			$tnum_meminib = tnum_meminib + 1$
+		$ELSE$
+			$tnum_meminib = tnum_meminib + 2$
+		$END$
+		$prev = moid$
+	$END$
+
+$	// tsize_meminibã®å¦¥å½æ§ãã§ãã¯
+	$IF tsize_meminib < tnum_meminib$
+		$ERROR$$FORMAT(_("illegal memory object initialization block size"))$$END$
+	$END$
+
+$	// tnum_meminibã®çæ
+	const uint32 tnum_meminib = $tnum_meminib$U;$NL$
+	$NL$
+
+$	// memtop_tableã®çæ
+	void *const memtop_table[$tsize_meminib$] = {$NL$
+	$IF LENGTH(genzero)$
+		$TAB$0,$NL$
+	$END$
+	$JOINEACH moid MO_MEMTOP_ORDER ",\n"$
+		$IF MO.LINKER[moid]$
+			$TAB$$FORMAT("(void *)0x%x", MO.BASEADDR[moid])$
+			$SPC$/* #__s$MO.SECTION[moid]$ */
+			$IF !LENGTH(MO.SUPPRESSLIMIT[moid])$
+				 ,$NL$$TAB$$FORMAT("(void *)0x%x", MO.LIMITADDR[moid])$
+				$SPC$/* #__e$MO.SECTION[ALT(MO.MERGELAST[moid],moid)]$ */
+			$END$
+		$ELSE$
+			$TAB$(void *)($MO.BASE[moid]$)
+			$SPC$/* $FORMAT("%x", MO.BASEADDR[moid])$ */
+			$IF !LENGTH(MO.SUPPRESSLIMIT[moid])$
+				,$NL$$TAB$(void *)(((uint8 *)($MO.BASE[moid]$)) + ($MO.SIZE[moid]$))
+				$SPC$/* $FORMAT("%x", MO.LIMITADDR[moid])$ */
+			$END$
+		$END$
+	$END$
+	$IF tnum_meminib < tsize_meminib$
+		$FOREACH i RANGE(tnum_meminib + 1, tsize_meminib)$
+			,$NL$$TAB$NULL
+		$END$
+	$END$$NL$
+	};$NL$
+	$NL$
+
+$	// meminib_tableã®çæ
+	const MEMINIB meminib_table[$tsize_meminib$] = {$NL$
+	$IF LENGTH(genzero)$
+		$TAB${ TA_NULL, TACP_KERNEL, TACP_KERNEL, TACP_KERNEL },$NL$
+	$END$
+	$JOINEACH moid MO_MEMTOP_ORDER ",\n"$
+		$TAB${
+		$IF MO.TYPE[moid] == TOPPERS_USTACK$
+			$SPC$TOPPERS_USTACK|($MO.MEMATR[moid]$),
+		$ELSE$
+			$IF MO.TYPE[moid] == TOPPERS_ATTMEM$
+				$SPC$TOPPERS_ATTMEM|($FORMAT("0x%xU", +MO.MEMATR[moid])$),
+			$ELSE$
+				$SPC$TOPPERS_ATTSEC|($FORMAT("0x%xU", +MO.MEMATR[moid])$),
+			$END$
+		$END$
+		$SPC$$MO.ACPTN_R[moid]$,
+		$SPC$$MO.ACPTN_W[moid]$,
+		$SPC$$MO.ACPTN_X[moid]$
+		$SPC$}
+		$IF !LENGTH(MO.SUPPRESSLIMIT[moid])$
+			,$NL$$TAB${ TA_NULL, TACP_KERNEL, TACP_KERNEL, TACP_KERNEL }
+		$END$
+	$END$
+	$IF tnum_meminib < tsize_meminib$
+		$FOREACH i RANGE(tnum_meminib + 1, tsize_meminib)$
+			,$NL$$TAB${ 0U, 0U, 0U, 0U }
+		$END$
+	$END$$NL$
+	};$NL$
+	$NL$
+
+$ 
+$  dataã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+$ 
+    $IF !OMIT_IDATA && LENGTH(DATASEC_LIST) && !LENGTH(DATASEC_LIST_OPTIMIZED)$
+$	// ãµã¤ãºã0ã§ãªãdataã»ã¯ã·ã§ã³ã®ãªã¹ãï¼MO_DATASEC_LISTï¼ãä½æ
+$	// ãã¹3ã§ä½æãã¦ããªãå ´åã«ã¯ï¼ããã§ä½æããï¼
+        $MO_DATASEC_LIST = {}$
+        $FOREACH moid DATASEC_LIST$
+            $IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+                $MO_DATASEC_LIST = APPEND(MO_DATASEC_LIST, moid)$
+            $END$
+        $END$
+    $END$
+
+    $IF OMIT_STANDARD_DATASECINIB$
+        /*$NL$
+        $SPC$*	Data Section Management Functions$NL$
+        $SPC$*/$NL$
+        $NL$
+
+$	// dataã»ã¯ã·ã§ã³ã®æ°
+        #define TNUM_DATASEC		$IF !OMIT_IDATA$$LENGTH(MO_DATASEC_LIST)$U$ELSE$0$END$$NL$
+        #define TNUM_DATASEC_TBL	$IF !OMIT_IDATA$$LENGTH(DATASEC_LIST)$U$ELSE$0$END$$NL$
+        $NL$
+
+        $IF ISFUNCTION("DEFINE_CONST_VAR")$
+            $DEFINE_CONST_VAR("const uint32", "tnum_datasec")$ = TNUM_DATASEC;$NL$
+        $ELSE$
+            const uint32 tnum_datasec = TNUM_DATASEC;$NL$
+        $END$
+        $NL$
+
+        $IF !OMIT_IDATA && LENGTH(DATASEC_LIST)$
+            $IF ISFUNCTION("DEFINE_CONST_VAR")$
+                $DEFINE_CONST_VAR("const DATASECINIB", "datasecinib_table[TNUM_DATASEC_TBL]")$ = {
+            $ELSE$
+                const DATASECINIB datasecinib_table[TNUM_DATASEC_TBL] = {
+            $END$
+            $IF LENGTH(MO_DATASEC_LIST)$
+                $NL$
+                $JOINEACH moid MO_DATASEC_LIST ",\n"$
+                    $IF LENGTH(START_MO_SYMBOL(moid))$ 
+                        $TAB${ $FORMAT("(void *)0x%xU, (void *)0x%xU, (void *)0x%xU", MO.BASEADDR[moid], MO.LIMITADDR[moid], 
+                        MO.IBASEADDR[moid])$ }
+                    $ELSE$
+                        $TAB${ 0U, 0U, 0U }
+                    $END$
+                    $SPC$ /* #__s$MO.SECTION[moid]$.R, &__e$MO.SECTION[moid]$.R, 
+                    &__s$MO.SECTION[moid]$ */
+                $END$$NL$
+            $ELSE$
+                { 0U, 0U, 0U }
+            $END$
+            };$NL$
+        $ELSE$
+            TOPPERS_EMPTY_LABEL(const DATASECINIB, datasecinib_table);$NL$
+        $END$$NL$
+    $END$
+
+$ 
+$  bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+$ 
+    $IF LENGTH(BSSSEC_LIST) && !LENGTH(BSSSEC_LIST_OPTIMIZED)$
+$	// ãµã¤ãºã0ã§ãªãbssã»ã¯ã·ã§ã³ã®ãªã¹ãï¼MO_BSSSEC_LISTï¼ãä½æ
+        $MO_BSSSEC_LIST = {}$
+        $FOREACH moid BSSSEC_LIST$
+            $IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+                $MO_BSSSEC_LIST = APPEND(MO_BSSSEC_LIST, moid)$
+            $END$
+        $END$
+    $END$
+
+    $IF OMIT_STANDARD_BSSSECINIB$
+        /*$NL$
+        $SPC$*	BSS Section Management Functions$NL$
+        $SPC$*/$NL$
+        $NL$
+
+        $IF LENGTH(BSSSEC_LIST)$
+$		// bssã»ã¯ã·ã§ã³ã®æ°
+            const uint32 tnum_bsssec = $LENGTH(MO_BSSSEC_LIST)$U;$NL$
+            $NL$
+
+$		// bssã»ã¯ã·ã§ã³åæåãã­ãã¯
+            const BSSSECINIB bsssecinib_table[$LENGTH(BSSSEC_LIST)$] = {
+            $IF LENGTH(MO_BSSSEC_LIST)$
+                $NL$
+                $JOINEACH moid MO_BSSSEC_LIST ",\n"$
+                    $IF LENGTH(START_MO_SYMBOL(moid))$ 
+                        $TAB${ $FORMAT("(void *)0x%xU, (void *)0x%xU", MO.BASEADDR[moid], MO.LIMITADDR[moid])$ } 
+                    $ELSE$
+                        $TAB${ 0, 0 }
+                    $END$
+                    $SPC$ /* #__s$MO.SECTION[moid]$, #__e$MO.SECTION[moid]$ */
+                $END$$NL$
+            $ELSE$
+                { 0, 0 }
+            $END$
+            };$NL$
+        $ELSE$
+            const uint32 tnum_bsssec = 0U;$NL$
+            TOPPERS_EMPTY_LABEL(const BSSSECINIB, bsssecinib_table);$NL$
+        $END$$NL$
+    $END$
+
+$END$
+
+$OMIT_STANDARD_DATASECINIB = 1$
+$OMIT_STANDARD_BSSSECINIB = 1$
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_offset.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_offset.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_offset.tf	(revision 172)
@@ -0,0 +1,82 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: prc_offset.tf 164 2015-06-03 01:22:29Z t_ishikawa $
+$
+
+$
+$       ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤ã«ï¼V850ç¨ï¼
+$
+
+$
+$  set ãã£ã¬ã¯ãã£ãã®åå®ç¾©
+$
+$FUNCTION DEFINE$
+	$TAB$$ARGV[1]$$TAB$.set$TAB$$FORMAT("%d", +ARGV[2])$$NL$
+$END$
+
+$
+$  ã³ã¢ä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ãï¼V850E2Mç¨ï¼
+$
+$INCLUDE "v850_gcc/prc_offset.tf"$
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_support.asm
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_support.asm	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_support.asm	(revision 172)
@@ -0,0 +1,2793 @@
+;/* 
+ ;*  TOPPERS ATK2
+ ;*      Toyohashi Open Platform for Embedded Real-Time Systems
+ ;*      Automotive Kernel Version 2
+ ;*
+ ;*  Copyright (C) 2012-2016 by Center for Embedded Computing Systems
+ ;*              Graduate School of Information Science, Nagoya Univ., JAPAN
+ ;*  Copyright (C) 2012-2013 by FUJI SOFT INCORPORATED, JAPAN
+ ;*  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ ;*  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ ;*  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ ;*  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ ;*  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ ;*  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ ;*  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ ;*  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ ;*      å
+è²¬ãããã¨ï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ ;*  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ ;*  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ ;*  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ;*  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ;*  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ;*  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ;*  ã®è²¬ä»»ãè² ããªãï¼
+ ;*
+ ;*  $Id: prc_support.asm 189 2015-06-26 01:54:57Z t_ishikawa $
+ ;*/
+
+;/*
+ ;*		ã¿ã¼ã²ããä¾å­æ
+å ±ã®å®ç¾©
+ ;*/
+$include (v850asm.inc)
+$include (offset.h)
+$include (Os_Cfg_asm.inc)
+
+$ifdef USE_ASMCONFIG_INC
+$include (asm_config.inc)
+$endif ;/* USE_ASMCONFIG_INC */
+
+$ifdef __v850e2v3__
+
+;/*
+ ;*  V850E2ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ ;*/
+GET_ISPR .macro reg
+	mov		ISPR_H, reg
+	ld.h	0[reg],reg
+.endm
+
+CLEAR_ISPR .macro reg1, reg2
+	mov		ISPC_H,reg1
+	mov		0xffff,reg2
+	st.h	reg2,0[reg1]
+	mov		ISPR_H, reg1
+	st.h	r0,0[reg1]
+.endm
+
+SET_PMR .macro reg_val, reg_tmp
+	mov     PMR, reg_tmp
+	st.h    reg_val, 0[reg_tmp]  ;/* set interrupt level */
+	syncm
+.endm
+
+$endif ;/* __v850e2v3__ */
+
+$ifdef __v850e3v5__
+
+;/*
+ ;*  V850E3V5ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ ;*/
+GET_ISPR .macro reg
+	stsr 10, reg, 2
+.endm
+
+SET_ISPR .macro val, reg 
+	movea val,r0,reg
+	ldsr reg, 10, 2
+	syncp
+.endm
+
+SET_INTCFG .macro val, reg 
+	movea val,r0,reg
+	ldsr reg, 13, 2
+	syncp
+.endm
+
+CLEAR_ISPR .macro reg1, reg2
+	SET_INTCFG 1, reg1 ;/* ISPR ãæ¸ãæãå¯è½ã« */
+	SET_ISPR   0, reg1 ;/* ISPR ã®ã¯ãªã¢ */
+	SET_INTCFG 0, reg1 ;/* ISPR ãæ¸ãæãç¦æ­¢ã«(èªåæ´æ°ã«) */
+.endm
+
+GET_PMR .macro reg
+	stsr 11, reg, 2
+.endm
+
+SET_PMR .macro reg_val, reg_tmp
+	stsr psw, reg_tmp
+	di
+	ldsr reg_val, 11, 2
+	ldsr reg_tmp, psw
+	syncp
+.endm
+
+GET_ICSR .macro reg
+	stsr sr12, reg, 2
+.endm
+
+SET_ICSR .macro val, reg 
+	movea val,r0,reg
+	ldsr \reg, sr12, 2
+.endm
+
+$endif ;/* !__v850e3v5__ */
+
+
+;/*
+ ;*  OSå²è¾¼ã¿ç¦æ­¢ãã¯ã­
+ ;*  ãã¹ãã®ä¸çªå¤å´ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+ ;*/
+OUTER_LOCK_OS_INT .macro   reg12, reg13
+
+    ;/* pmr_isr2_mask -> PMR */
+    Lea     _pmr_isr2_mask, reg13
+    ld.h    0[reg13], reg13
+    SET_PMR reg13, reg12
+
+    ;/* nested_lock_os_int_cnt = 1 */
+    Lea     _nested_lock_os_int_cnt, reg12
+    mov     1, reg13
+    st.b    reg13, 0[reg12]
+
+.endm
+
+;/*
+ ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+ ;*  ãã¹ãã®ä¸çªå¤å´ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+ ;*/
+OUTER_UNLOCK_OS_INT .macro  reg12, reg13
+
+    ;/* nested_lock_os_int_cnt = 0 */
+    Lea     _nested_lock_os_int_cnt, reg12
+    mov     r0, reg13
+    st.b    reg13, 0[reg12]
+
+    ;/* pmr_setting_tbl[current_iintpri] -> PMR */
+    Lea     _current_iintpri, reg12
+    ld.bu   0[reg12], reg12
+    shl     1, reg12
+
+    Lea     _pmr_setting_tbl, reg13
+    add     reg12, reg13
+    ld.h    0[reg13], reg13
+    SET_PMR reg13, reg12  ;/* set interrupt level */
+
+.endm
+
+;/* =begin modified for SC3 */
+;/*
+ ;*  OSå²è¾¼ã¿ç¦æ­¢ãã¯ã­
+ ;*  ãã¹ããã
+ ;*/
+NESTED_LOCK_OS_INT .macro   reg12, reg13
+    .local increment_nest_lock
+
+    ;/* nested_lock_os_int_cnt == 0 ? */
+    Lea     _nested_lock_os_int_cnt, reg13
+    ld.b    0[reg13], reg12
+    cmp     r0, reg12
+    bne     increment_nest_lock
+
+    ;/* pmr_isr2_mask -> PMR */
+    Lea     _pmr_isr2_mask, reg13
+    ld.h    0[reg13], reg13
+    SET_PMR reg13, reg12  ;/* set interrupt level */
+    Lea     _nested_lock_os_int_cnt, reg13
+    mov     r0, reg12                ;/* nested_lock_os_int_cnt = 0 */
+
+increment_nest_lock:
+    ;/* nested_lock_os_int_cnt += 1 */
+    add     1, reg12
+    st.b    reg12, 0[reg13]
+
+.endm
+
+;/*
+ ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+ ;*  ãã¹ããã
+ ;*/
+NESTED_UNLOCK_OS_INT .macro  reg12, reg13
+    .local nested_unlock_exit
+
+    ;/* nested_lock_os_int_cnt -= 1 */
+    Lea     _nested_lock_os_int_cnt, reg12
+    ld.b    0[reg12], reg13
+    add     -1, reg13
+    st.b    reg13, 0[reg12]
+    cmp     r0, reg13
+    bne     nested_unlock_exit
+
+    ;/* pmr_setting_tbl[current_iintpri] -> PMR */
+    Lea     _current_iintpri, reg12
+    ld.bu   0[reg12], reg12
+    shl     1, reg12
+
+    Lea     _pmr_setting_tbl, reg13
+    add     reg12, reg13
+    ld.h    0[reg13], reg13
+    SET_PMR reg13, reg12  ;/* set interrupt level */
+
+nested_unlock_exit:
+.endm
+
+;/* =end modified for SC3 */
+
+	;/* 
+	 ;* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç 
+	;*/
+PRE_INT_EXC .macro
+$ifdef _RH850G3M_
+	;/* ä¸é¨ä¸­æ­åä¾å¤ãã³ãã©ã§ã®ã¿å¿
+è¦ã ãä¸å¾å®è¡ãã */
+	syncp
+$endif ;/* _RH850G3M_ */
+.endm
+
+	;/*
+	 ;* å²è¾¼ã¿ä¾å¤å
+¥ãå£ã§ã®ã¬ã¸ã¹ã¿ã®ä¿å­ãã¯ã­
+	 ;*/
+INT_EXC_SAVEREG .macro workreg
+$ifndef TOPPERS_USE_PUSHSP
+$ifdef TOPPERS_USE_HFLOAT
+	addi    -88 , sp , sp
+$else ;/* !TOPPERS_USE_HFLOAT */
+	addi    -84 , sp , sp
+$endif ;/* TOPPERS_USE_HFLOAT */
+	st.w    r30, 12[sp]  ;/* r30(ep) */
+    ;/*
+     ;* å²è¾¼ã¿çºçåã®r2ã¯eiwrã«ä¿å­ããã¦ãã
+     ;* ããã§ï¼r2ã¯ãã§ã«ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦
+     ;* ä½¿ç¨ä¸­ã§ããããï¼ä¸æ¸ãããªã
+     ;* r2ã«å
+¥ã£ã¦ããå²è¾¼ã¿çªå·ãç ´å£ããªãããã«
+     ;*/
+    stsr    workreg, r30    ;/* r2->r30ã«å¾©å¸° */
+	st.w    r30, 76[sp]
+	mov     sp, ep 
+	sst.w   r1, 80[ep]
+	sst.w   r5, 72[ep]
+	sst.w   r6, 68[ep]
+	sst.w   r7, 64[ep]
+	sst.w   r8, 60[ep]
+	sst.w   r9, 56[ep]
+	sst.w   r10, 52[ep]
+	sst.w   r11, 48[ep]
+	sst.w   r12, 44[ep]
+	sst.w   r13, 40[ep]
+	sst.w   r14, 36[ep]
+	sst.w   r15, 32[ep]
+	sst.w   r16, 28[ep]
+	sst.w   r17, 24[ep]
+	sst.w   r18, 20[ep]
+	sst.w   r19, 16[ep]
+	sst.w   r31, 8[ep]
+$ifdef TOPPERS_USE_HFLOAT
+	stsr    fpsr, r19     ;/* load FPSR */
+	sst.w   r19, 84[ep]
+$endif ;/* TOPPERS_USE_HFLOAT */
+
+$else ;/* TOPPERS_USE_PUSHSP */
+	pushsp  r1-r1
+    ;/*
+     ;* å²è¾¼ã¿çºçåã®r2ã¯eiwrã«ä¿å­ããã¦ãã
+     ;* ããã§ï¼r2ã¯ãã§ã«ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦
+     ;* ä½¿ç¨ä¸­ã§ããããï¼ä¸æ¸ãããªã
+     ;* r2ã«å
+¥ã£ã¦ããå²è¾¼ã¿çªå·ãç ´å£ããªãããã«
+     ;*/
+    stsr    workreg, r1    ;/* r2->r1ã«å¾©å¸° */
+	pushsp  r1-r1
+$ifdef TOPPERS_USE_HFLOAT
+	stsr    fpsr, r1     ;/* load FPSR */
+	pushsp  r1-r1
+$endif ;/* TOPPERS_USE_HFLOAT */
+	pushsp  r5-r19
+	pushsp  r30-r31
+	addi    -8, sp , sp
+	mov     sp, ep 
+$endif ;/* TOPPERS_USE_PUSHSP */
+.endm
+
+	;/*
+	 ;* å²è¾¼ã¿ä¾å¤å
+¥ãå£ã§ã®ã¬ã¸ã¹ã¿ã®å¾©å¸°ãã¯ã­
+	 ;*/
+INT_EXC_RESTOREREG .macro workreg
+$ifndef TOPPERS_USE_PUSHSP
+$ifdef TOPPERS_USE_HFLOAT
+	sld.w   84[ep], r19
+	ldsr    r19, fpsr     ;/* store FPSR */
+$endif ;/* TOPPERS_USE_HFLOAT */
+	sld.w   80[ep], r1
+	sld.w   76[ep], r2
+	sld.w   72[ep], r5
+	sld.w   68[ep], r6
+	sld.w   64[ep], r7
+	sld.w   60[ep], r8
+	sld.w   56[ep], r9
+	sld.w   52[ep], r10
+	sld.w   48[ep], r11
+	sld.w   44[ep], r12
+	sld.w   40[ep], r13
+	sld.w   36[ep], r14
+	sld.w   32[ep], r15
+	sld.w   28[ep], r16
+	sld.w   24[ep], r17
+	sld.w   20[ep], r18
+	sld.w   16[ep], r19
+	sld.w    8[ep], r31
+$ifdef TOPPERS_USE_HFLOAT
+	addi    88, ep, sp
+$else ;/* !TOPPERS_USE_HFLOAT */
+	addi    84, ep, sp
+$endif ;/* TOPPERS_USE_HFLOAT */
+	sld.w   12[ep], r30 ;/* r30(ep) */
+    ldsr    r2, workreg    ;/* r2ãéé¿ */
+
+$else ;/* TOPPERS_USE_PUSHSP */
+	addi    8, sp , sp
+	popsp   r30-r31
+	popsp   r5-r19
+$ifdef TOPPERS_USE_HFLOAT
+	popsp   r1-r1
+	ldsr    r1, fpsr      ;/* store FPSR */
+$endif ;/* TOPPERS_USE_HFLOAT */
+    ;/*
+     ;* å²è¾¼ã¿çºçåã®r2ã¯eiwrã«å¾©å¸°
+     ;*/
+	popsp   r1-r1
+    ldsr    r1, workreg     ;/* r2->eiwrã«å¾©å¸° */
+	popsp   r1-r1
+$endif ;/* TOPPERS_USE_PUSHSP */
+.endm
+
+
+$ifdef __v850e3v5__
+	;/* 
+	 ;* V850E3V5ç¨ãã¯ã¿
+	 ;* ããã«RBASEãè¨­å®ããããã¨ãæ³å®ï¼ãããé»æºæå
+¥æã®éå§ã¢ãã¬ã¹ï¼
+	 ;* (EIã¬ãã«å²è¾¼ã¿ã¯ãã¼ãã«åç
+§æ¹å¼ãä½¿ç¨ããããæ¬ãã¯ã¿ã¯ä½¿ç¨ããªã)
+	 ;*/
+	RESET .cseg text
+	.extern __reset
+__reset:
+	jr __start
+	.rept 6
+	nop
+	.endm
+__syserr: ;/* 0x0010 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endm
+__hvtrap: ;/* 0x0020 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endm
+__fetrap: ;/* 0x0030 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endm
+__trap0:  ;/* 0x0040 */
+	jr _ei_exception_entry
+	.rept 6
+	nop
+	.endm
+__trap1:  ;/* 0x0050 */
+	jr _ei_exception_entry
+	.rept 6
+	nop
+	.endm
+__rie:    ;/* 0x0060 */
+	jr _ei_exception_entry
+	.rept 6
+	nop
+	.endm
+__fppfpi: ;/* 0x0070 */
+	jr _ei_exception_entry
+	.rept 6
+	nop
+	.endm
+__ucpop:  ;/* 0x080 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endm
+__mip:    ;/* 0x0090 */
+	jr _fe_exception_entry_memory
+	.rept 6
+	nop
+	.endm
+__pie:   ;/* 0x00a0 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endm
+__debug:  ;/* 0x00b0 */
+	jr __debug
+	.rept 6
+	nop
+	.endm
+__mae:    ;/* 0x00c0 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endm
+__rfu:    ;/* 0x00d0 */
+	jr __rfu
+	.rept 6
+	nop
+	.endm
+__fenmi:  ;/* 0x00e0 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endm
+__feint:  ;/* 0x00f0 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endm
+__eiintn0:  ;/*ï¼åªå
+åº¦0ï¼ 0x0100 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn1:  ;/*ï¼åªå
+åº¦1ï¼ 0x0110 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn2:  ;/*ï¼åªå
+åº¦2ï¼ 0x0120 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn3:  ;/*ï¼åªå
+åº¦3ï¼ 0x0130 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn4:  ;/*ï¼åªå
+åº¦4ï¼ 0x0140 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn5:  ;/*ï¼åªå
+åº¦5ï¼ 0x0150 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn6:  ;/*ï¼åªå
+åº¦6ï¼ 0x0160 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn7:  ;/*ï¼åªå
+åº¦7ï¼ 0x0170 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn8:  ;/*ï¼åªå
+åº¦8ï¼ 0x0180 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn9:  ;/*ï¼åªå
+åº¦9ï¼ 0x0190 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn10: ;/*ï¼åªå
+åº¦10ï¼ 0x01a0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn11: ;/*ï¼åªå
+åº¦11ï¼ 0x01b0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn12: ;/*ï¼åªå
+åº¦12ï¼ 0x01c0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn13: ;/*ï¼åªå
+åº¦13ï¼ 0x01d0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn14: ;/*ï¼åªå
+åº¦14ï¼ 0x01e0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn15: ;/*ï¼åªå
+åº¦15ï¼ 0x01f0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+
+$endif ;/* __v850e3v5__ */
+
+FE_EXCEPTION_ENTRY .macro
+    .local _fe_exception_macro
+	;/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+    ldsr    r2, fewr                ;/* ã¨ã©ã¼ã³ã¼ããä¿å­ */
+    stsr    fepsw, r2
+    shl     PSW_SV, r2              ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    mov     r0, r2
+    bnc     _fe_exception_macro          ;/* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+    ;/*
+     ;*  ã¦ã¼ã¶ã¿ã¹ã¯ããã®ä¾å¤
+     ;*/
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    st.w    sp, TCB_usp[r2]         ;/* uspãTCBã«ä¿å­ */
+    ld.w    TCB_p_tinib[r2], r2
+    ld.w    TINIB_sstk_bottom[r2], sp         ;/* sspãå¾©å¸° */
+    ori     0x1000, r0, r2             ;/* r2 = 0x1000 */
+_fe_exception_macro:
+.endm
+
+
+    kernel.text .cseg text
+	;/*
+	 ;*  ä¾å¤ã¨ã³ããªï¼feretã§ãªã¿ã¼ã³ããä¾å¤ç¨ï¼
+     ;*  ããã§ï¼CY = FEPSW.IMPï¼r2 = error code
+     ;*  r2ã¯ä¾å¤ã¨ã³ããªã§ã¹ã¿ãã¯ã«ä¿å­æ¸ã¿
+     ;*  r2ã®æä¸ä½ãããã«ï¼ä¾å¤å
+ã®ã³ã³ãã­ã¹ããç¹æ¨©ãã©ãããä¿å­ãã
+	 ;*/
+	.extern _fe_exception_entry_cpu
+_fe_exception_entry_cpu:
+    FE_EXCEPTION_ENTRY
+    ori     E_OS_PROTECTION_EXCEPTION, r2, r2
+    br      fe_exception_0
+
+	.extern _fe_exception_entry
+_fe_exception_entry_memory:
+    FE_EXCEPTION_ENTRY
+    ori     E_OS_PROTECTION_MEMORY, r2, r2
+
+fe_exception_0:
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ */
+    INT_EXC_SAVEREG fewr
+
+	;/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®FEPCã¨FEPSWãä¿å­ */
+	stsr    fepc, r6
+	sst.w   r6, 4[ep]
+	stsr    fepsw, r6
+	sst.w   r6, 0[ep]
+
+	;/*
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå¦çã¬ãã«ã§å®è¡ããããOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ä¾å¤ãçºçããå¯è½æ§ãããããï¼ãã¹ãç®¡çãè¡ãï¼
+	 ;* ä¾å¤ã¯æ¬¡ã®æ¡ä»¶ã§çºçãã
+	 ;*  ã»ISR1å®è¡ç¶æ
+ã§çºçããå ´å
+	 ;*  ã»ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 ;*  ã»OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 ;*  ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§çºçããå ´å
+	 ;*/
+
+	;/*
+	 ;* ã«ãã´ãª1ã®å²è¾¼ã¿ä»¥å¤ã§ä¾å¤ãçºçãããã®å¤æ­ãã
+	 ;* ã«ãã´ãª1ã§ä¾å¤ãçºçï¼fe_exception_1ã¸ã¸ã£ã³ã
+	 ;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     fe_exception_1
+
+	;/*
+	 ;*  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 ;*/
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     1, r13
+	bne     fe_exception_1
+
+	;/*
+	 ;* OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+	 ;*/
+	Lea     _pmr_isr2_mask, r7
+	ld.h    0[r7], r7
+	SET_PMR r7, r6  ;/* pmr_isr2_mask -> PMR */
+
+fe_exception_1:
+	;/*
+	 ;*  å²è¾¼ã¿çºçæã«å¤æ´ãããã®ã§å²è¾¼ã¿è§£é¤åã«åå¾
+	 ;*/
+	stsr    feic, r19                   ;/* ä¾å¤è¦å  */
+	stsr    fepc, r18                   ;/* ä¾å¤çºçPC */
+
+	;/* 
+	 ;* C1ISRãåãä»ããããï¼NPbit ã¯ãªã¢ 
+	 ;*/
+	stsr    psw, r12
+	mov     !0x0080, r13
+	and     r12, r13
+	ldsr    r13, psw
+
+fe_exception_2:
+	;/*
+	 ;*  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã¯ï¼ç¡éã«ã¼ãã¸
+	 ;*/
+	Lea   _kerflg, r12          ;/* kerflgãFALSEãªãç¡éã«ã¼ã */
+	ld.b  0[r12], r12
+	cmp   r0, r12
+infinity_loop_fe:
+	be    infinity_loop_fe
+
+	;/*
+	 ;* å¤éå²è¾¼ã¿ãå¤å®
+	 ;*/
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     1, r14                      ;/*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã */
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	mov     sp, r9                      ;/* sp ãr9ã«éé¿ */
+
+	cmp     1, r13
+	bne     fe_exception_3              ;/* _nested_lock_os_int_cnt > 1 -> fe_exception_3 */
+
+	;/*
+	 ;* C1ISRå®è¡ç¶æ
+ã§çºçããå ´åã¯ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 ;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     fe_exception_3
+
+	;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+	Lea     __ostkpt, r12
+	ld.w    0[r12], r12
+	add     -4, r12
+	st.w    sp, 0[r12]                      ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ */
+	mov     r12, sp                         ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åãæ¿ã */
+
+fe_exception_3:
+    ;/* FEPSW.ID == 1ã®å ´åã¯å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ãªã®ã§è§£é¤ããªã */
+	stsr    fepsw, r12
+    mov     0x20, r13
+    tst     r12, r13
+    bne     fe_exception_4
+	UNLOCK_ALL_INT
+
+fe_exception_4:
+$ifdef CFG_USE_PROTECTIONHOOK
+	;/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãç¢ºä¿ */
+	addi    -12, sp, sp
+
+	;/* v850_cpu_exp_spã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_sp, r12
+	st.w    r9, 0[r12]
+	st.w    ep, 0[sp]
+	mov     sp, ep
+
+	;/* v850_cpu_exp_noã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_no, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 8[ep]
+	st.w    r19, 0[r12]                     ;/* r19 ä¾å¤è¦å  */
+
+	;/* v850_cpu_exp_pcã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_pc, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 4[ep]
+	mov     r18, r17                        ;/* r18:fepc */
+	add     -4, r17
+	st.w    r17, 0[r12]
+
+$endif ;/* CFG_USE_PROTECTIONHOOK */
+
+	;/*
+	 ;* CPUä¾å¤ãçºçããå ´åï¼OSã¯E_OS_PROTECTION_EXCEPTIONããã©ã¡ã¼ã¿ã¨ãã¦
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 ;*/
+    ;/* =begin modified for SC3 */
+    andi    0xefff, r2, r6 ;/* ã¨ã©ã¼ã³ã¼ããç¬¬1å¼æ°ã«(r6=r2 & !0x1000) */
+    shr     12, r2         ;/* ä¾å¤ã®çºçå
+ãã¦ã¼ã¶ã¢ã¼ããªãr2=1 */
+    xori    0x0001, r2, r2     ;/* r2 = r2==1? 0: 1 */
+    Lea     _pre_protection_supervised, r12
+    st.b    r2, 0[r12]
+    ;/* =end modified for SC3 */
+	jarl    _call_protectionhk_main, r31
+
+$ifdef CFG_USE_PROTECTIONHOOK
+	mov     sp, ep
+
+	;/* v850_cpu_exp_noãå¾©å¸° */
+	Lea     _v850_cpu_exp_no, r12
+	sld.w   8[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_pcãå¾©å¸° */
+	Lea     _v850_cpu_exp_pc, r12
+	sld.w   4[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_spéé¿ */
+	Lea     _v850_cpu_exp_sp, r12
+	sld.w   0[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãæ»ã */
+	addi    12, sp, sp
+$endif ;/* CFG_USE_PROTECTIONHOOK */
+
+fe_ret_exc:
+	LOCK_ALL_INT
+
+	;/*
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å®è¡ãã
+	 ;*/
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 ;*/
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 ;*/
+	;/*
+	 ;* ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯
+	 ;* (1)ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ããããªã
+	 ;* (2)OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ãããªã
+	;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ret_exc_2
+
+	;/*
+	 ;*  ãã¹ãåæ°ã1ä»¥ä¸ãªãå²è¾¼ã¿å
+ãISRãªããä¾å¤çºçå
+ã¸å¾©å¸°
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 ;*/
+	cmp     r0, r13
+	bne     ret_exc_1
+
+	;/*
+	 ;*  æ»ãå
+ãã¿ã¹ã¯ãªããã¹ã¿ãã¯ãæ»ã
+	 ;*/
+	ld.w    0[sp], sp
+
+ret_exc_1:
+	;/*
+	 ;*  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´åï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 ;*/
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     r0, r13
+	bne     ret_exc_2
+
+	;/* OSå²è¾¼ã¿ãè§£é¤ */
+	;/* pmr_setting_tbl[current_iintpri] -> PMR */
+	Lea     _current_iintpri, r12
+	ld.bu   0[r12], r12
+	shl     1, r12
+
+	Lea     _pmr_setting_tbl, r13
+	add     r12, r13
+	ld.h    0[r13], r13
+	SET_PMR r13, r12     ;/* set interrupt level */
+
+	;/*
+	 ;*  ä¾å¤çºçå
+ã¸å¾©å¸°
+	 ;*/
+ret_exc_2:
+	;/*
+	 ;* ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 ;*/
+	mov     sp, ep
+	sld.w    4[ep], r10
+	ldsr    r10, fepc
+	sld.w   0[ep], r10
+	ldsr    r10, fepsw
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+    INT_EXC_RESTOREREG fewr
+
+	stsr    fepsw, r2   ;/* r2 = fepsw */
+    shl     PSW_SV, r2         ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_fe_exception    ;/* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+fe_exception_to_utask:
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp         ;/* uspãå¾©å¸° */
+return_from_fe_exception:
+    stsr    fewr, r2
+	feret
+
+	;/*
+	 ;*  ä¾å¤ã¨ã³ããªï¼eiretã§ãªã¿ã¼ã³ããä¾å¤ç¨ï¼
+     ;*  ããã§ï¼CY = EIPSW.IMPï¼r2 = error code
+     ;*  r2ã¯OSå´ã§äºç´ããï¼å²è¾¼ã¿ã»ä¾å¤ã®åºå
+¥å£ã®
+     ;*  ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ç¨ããï¼ããï¼
+     ;*  ã¹ã¿ãã¯ã«ä¿å­ããªã
+	 ;*/
+	.extern _ei_exception_entry
+_ei_exception_entry:
+	;/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+    stsr    eipsw, r2
+    shl     PSW_SV, r2              ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    mov     r0, r2                  ;/* movå½ä»¤ã§ã¯ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ã¯å¤åããªã */
+    bnc     ei_exception_0          ;/* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+    ;/*
+     ;*  ã¦ã¼ã¶ã¿ã¹ã¯ããã®ä¾å¤
+     ;*/
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    st.w    sp, TCB_usp[r2]         ;/* uspãä¿å­ */
+    ld.w    TCB_p_tinib[r2], r2
+    ld.w    TINIB_sstk_bottom[r2], sp         ;/* sspãå¾©å¸° */
+    ori     0x1000, r0, r2          ;/* r2 = 0x1000 */
+ei_exception_0:
+    ;/*
+     ;*  EIä¾å¤ã«ããè¦å ã¯E_OS_PROTECTION_EXCEPTIONã®ã¿ã§ãã
+     ;*/
+    ori E_OS_PROTECTION_EXCEPTION, r2, r2 ;/* r2 |= E_OS_PROTECTION_EXCEPTION */
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+    INT_EXC_SAVEREG eiwr
+
+	;/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®EIPCã¨EIPSWãä¿å­ */
+	stsr    eipc, r6
+	sst.w   r6, 4[ep]
+	stsr    eipsw, r6
+	sst.w   r6, 0[ep]
+
+	;/*
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå¦çã¬ãã«ã§å®è¡ããããOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ä¾å¤ãçºçããå¯è½æ§ãããããï¼ãã¹ãç®¡çãè¡ãï¼
+	 ;* ä¾å¤ã¯æ¬¡ã®æ¡ä»¶ã§çºçãã
+	 ;*  ã»ISR1å®è¡ç¶æ
+ã§çºçããå ´å
+	 ;*  ã»ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 ;*  ã»OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 ;*  ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§çºçããå ´å
+	 ;*/
+
+	;/*
+	 ;* ã«ãã´ãª1ã®å²ãè¾¼ã¿ä»¥å¤ã§ä¾å¤ãçºçãããã®å¤æ­ãã
+	 ;* ã«ãã´ãª1ã§ä¾å¤ãçºçï¼ei_exception_1ã¸ã¸ã£ã³ã
+	 ;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_exception_1
+
+	;/*
+	 ;*  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 ;*/
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     1, r13
+	bne     ei_exception_1
+
+	;/*
+	 ;* OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+	 ;*/
+	Lea     _pmr_isr2_mask, r7
+	ld.h    0[r7], r7
+	SET_PMR r7, r6                   ;/* pmr_isr2_mask -> PMR */
+
+ei_exception_1:
+	;/*
+	 ;*  å²è¾¼ã¿çºçæã«å¤æ´ãããã®ã§å²è¾¼ã¿è§£é¤åã«åå¾
+	 ;*/
+	stsr    eiic, r19                   ;/* ä¾å¤è¦å  */
+	stsr    eipc, r18                   ;/* ä¾å¤çºçPC */
+
+
+ei_exception_2:
+	;/*
+	 ;*  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã¯ï¼ç¡éã«ã¼ãã¸
+	 ;*/
+	Lea   _kerflg, r12          ;/* kerflgãFALSEãªãç¡éã«ã¼ã */
+	ld.b  0[r12], r12
+	cmp   r0, r12
+infinity_loop_ei:
+	be    infinity_loop_ei
+
+	;/*
+	 ;* å¤éå²è¾¼ã¿ãå¤å®
+	 ;*/
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     1, r14                      ;/*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã */
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	mov     sp, r9                      ;/* sp ãr9ã«éé¿ */
+
+	cmp     1, r13
+	bne     ei_exception_3             ;/* _nested_lock_os_int_cnt > 1 -> ei_exception_3 */
+
+	;/*
+	 ;* ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 ;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_exception_3
+
+	;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+	Lea     __ostkpt, r12
+	ld.w    0[r12], r12
+	add     -4, r12
+	st.w    sp, 0[r12]                      ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ */
+	mov     r12, sp                         ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åãæ¿ã */
+
+ei_exception_3:
+    ;/* EIPSW.ID == 1ã®å ´åã¯ããã«ããªãããï¼æ¡ä»¶å¤å®ã¯ä¸è¦ */
+	UNLOCK_ALL_INT
+
+$ifdef CFG_USE_PROTECTIONHOOK
+	;/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãç¢ºä¿ */
+	addi    -12, sp, sp
+
+	;/* v850_cpu_exp_spã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_sp, r12
+	st.w    r9, 0[r12]
+	st.w    ep, 0[sp]
+	mov     sp, ep
+
+	;/* v850_cpu_exp_noã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_no, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 8[ep]
+	st.w    r19, 0[r12]                     ;/* r19 ä¾å¤è¦å  */
+
+	;/* v850_cpu_exp_pcã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_pc, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 4[ep]
+	mov     r18, r17                        ;/* r18:fepc */
+	add     -4, r17
+	st.w    r17, 0[r12]
+
+$endif ;/* CFG_USE_PROTECTIONHOOK */
+
+	;/*
+	 ;* CPUä¾å¤ãçºçããå ´åï¼OSã¯E_OS_PROTECTION_EXCEPTIONããã©ã¡ã¼ã¿ã¨ãã¦
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 ;*/
+    ;/* =begin modified for SC3 */
+    andi    0xefff, r2, r6 ;/* ã¨ã©ã¼ã³ã¼ããç¬¬1å¼æ°ã«(r6=r2 & !0x1000) */
+    shr     12, r2         ;/* ä¾å¤ã®çºçå
+ãç¹æ¨©ã¢ã¼ããªãr2=1 */
+    xori    0x0001, r2, r2     ;/* r2 = r2==1? 0: 1 */
+    Lea     _pre_protection_supervised, r12
+    st.b    r2, 0[r12]
+    ;/* =end modified for SC3 */
+	jarl    _call_protectionhk_main, r31
+
+$ifdef CFG_USE_PROTECTIONHOOK
+	mov     sp, ep
+
+	;/* v850_cpu_exp_noãå¾©å¸° */
+	Lea     _v850_cpu_exp_no, r12
+	sld.w   8[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_pcãå¾©å¸° */
+	Lea     _v850_cpu_exp_pc, r12
+	sld.w   4[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_spéé¿ */
+	Lea     _v850_cpu_exp_sp, r12
+	sld.w   0[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãæ»ã */
+	addi    12, sp, sp
+$endif ;/* CFG_USE_PROTECTIONHOOK */
+
+ei_ret_exc:
+	LOCK_ALL_INT
+
+	;/*
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å®è¡ãã
+	 ;*/
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 ;*/
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 ;*/
+	;/*
+	 ;* ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯
+	 ;* (1)ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ããããªã
+	 ;* (2)OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ãããªã
+	;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_ret_exc_2
+
+	;/*
+	 ;*  ãã¹ãåæ°ã1ä»¥ä¸ãªãå²è¾¼ã¿å
+ãISRãªããä¾å¤çºçå
+ã¸å¾©å¸°
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 ;*/
+	cmp     r0, r13
+	bne     ei_ret_exc_1
+
+	;/*
+	 ;*  æ»ãå
+ãã¿ã¹ã¯ãªããã¹ã¿ãã¯ãæ»ã
+	 ;*/
+	ld.w    0[sp], sp
+
+ei_ret_exc_1:
+	;/*
+	 ;*  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´åï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 ;*/
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     r0, r13
+	bne     ei_ret_exc_2
+
+	;/* OSå²è¾¼ã¿ãè§£é¤ */
+	;/* pmr_setting_tbl[current_iintpri] -> PMR */
+	Lea     _current_iintpri, r12
+	ld.bu   0[r12], r12
+	shl     1, r12
+
+	Lea     _pmr_setting_tbl, r13
+	add     r12, r13
+	ld.h    0[r13], r13
+	SET_PMR r13, r12             ;/* set interrupt level */
+
+	;/*
+	 ;*  ä¾å¤çºçå
+ã¸å¾©å¸°
+	 ;*/
+ei_ret_exc_2:
+	;/*
+	 ;* ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 ;*/
+	mov     sp, ep
+	sld.w    4[ep], r10
+	ldsr    r10, eipc
+	sld.w   0[ep], r10
+	ldsr    r10, eipsw
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+    INT_EXC_RESTOREREG eiwr
+
+	stsr    eipsw, r2   ;/* r2 = eipsw */
+    shl     PSW_SV, r2  ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_ei_exception    ;/* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+ei_exception_to_utask:
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp         ;/* uspãå¾©å¸° */
+return_from_ei_exception:
+    stsr    eiwr, r2
+	eiret
+
+	;/*
+	 ;*  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã®ç¡éã«ã¼ã
+	 ;*/
+infinity_loop:
+	br infinity_loop
+
+	;/*
+	 ;*  å²ãè¾¼ã¿ã¨ã³ããª
+	 ;*  V850E2
+	 ;*   ãã¯ã¿ã¼ãã¼ãã«ãã Os_Lcfg.c ã«çæãããåå²è¾¼ã¿ã®å²è¾¼ã¿ã¨ã³ããª
+	 ;*   ããã¸ã£ã³ããï¼r2ã«å²è¾¼ã¿çªå·ãä¿å­ãããç¶æ
+ã§å®è¡ããã
+	 ;*  V850E3V5
+	 ;*   ãã¯ã¿ã¼ãã¼ãã«ããç´æ¥å®è¡ãããããï¼ã¹ã¿ãã¯ã®ç¢ºä¿ãã¬ã¸ã¹ã¿ã®ä¿å­ã¯
+	 ;*   ç¹ã«è¡ããã¦ããªãç¶æ
+ã§å®è¡ããã
+	 ;*/
+	.extern _interrupt
+_interrupt:
+	;/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+$ifdef __v850e3v5__
+    ldsr    r2, eiwr
+$endif ;/* __v850e3v5__ */
+	;/*
+	 ;*  æ®ãã®ã¬ã¸ã¹ã¿éé¿ï¼ EPã§ã®ã¢ã¯ã»ã¹ã«åãæ¿ãã¦è¡ã
+     ;* ããã§ï¼CY = EIPSW.IMPï¼r2[31:16] = intno
+     ;*  r2ã¯OSå´ã§äºç´ããï¼å²è¾¼ã¿ã»ä¾å¤ã®åºå
+¥å£ã®
+     ;*  ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ç¨ããï¼ããï¼
+     ;*  ã¹ã¿ãã¯ã«ä¿å­ããªã
+	 ;*/
+    stsr    eipsw, r2
+    shl     PSW_SV, r2              ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     interrupt_0             ;/* ç¹æ¨©ããã®å²è¾¼ã¿ãªãã°ã¹ã­ãã */
+    ;/*
+     ;*  ã¦ã¼ã¶ã¿ã¹ã¯ã¸ã®å²è¾¼ã¿
+     ;*/
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    st.w    sp, TCB_usp[r2]         ;/* uspãä¿å­ */
+    ld.w    TCB_p_tinib[r2], r2
+    ld.w    TINIB_sstk_bottom[r2], sp         ;/* sspãå¾©å¸° */
+interrupt_0:
+$ifdef __v850e3v5__
+	;/* å²è¾¼ã¿è¦å ã®ç¹å® */
+	stsr	eiic,   r2
+	;/* EICå²è¾¼ã¿ã¯0x1000 ãã */
+	addi   -0x1000, r2, r2
+$endif ;/* __v850e3v5__ */
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+    INT_EXC_SAVEREG eiwr
+
+	;/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®EIPCã¨EIPSWãä¿å­ */
+	stsr    eipc, r6
+	sst.w   r6, 4[ep]
+	stsr    eipsw, r6
+	sst.w   r6, 0[ep]
+
+	mov     r2, r12
+
+	;/* å²è¾¼ã¿åªå
+åº¦ãåå¾(r11) */
+	GET_ISPR r13
+	sch1r	r13, r11   
+	add		-1,r11
+
+	;/* 
+	 ;*  _current_iintpri ã®æ´æ° 
+	 ;*  å²ãè¾¼ã¿å¦çä¸­ã¯ISPRãèªåçã«è¨­å®ããã¦ããããï¼PMRã¯è¨­å®ããå¿
+è¦ããªãï¼
+	 ;*/
+	Lea     _current_iintpri, r6
+	ld.bu   0[r6], r19
+	st.b    r11,0[r6]
+
+	;/*
+	 ;*  å¤éå²è¾¼ã¿ãå¤å®
+	 ;*/
+	Lea     _except_nest_cnt, r13
+	ld.w    0[r13], r6
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã
+	 ;*/
+	add     1,  r6
+	st.w    r6, 0[r13]
+	cmp     1,  r6
+	bne     interrupt_1     ;/* ãã¹ããã¦ããå ´åã¯ã¹ã¿ãã¯åæ¿ç¡ã */
+
+	;/*
+	 ;*  ã¿ã¹ã¯ã«å²è¾¼ãã å ´å
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã
+	 ;*/
+	mov     sp , r13
+	Lea     __ostkpt, sp
+	ld.w    0[r3], r3
+	add     -4, sp
+	st.w    r13, 0[sp]
+
+interrupt_1:
+    ;/*
+     ;*  å²è¾¼ã¿çºçæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã¹ã¿ãã¯ã«ä¿å­
+     ;*/
+    add     -4, sp
+    st.w    r19, 0[sp]
+
+	UNLOCK_ALL_INT
+
+$ifdef CFG_USE_STACKMONITORING
+    ;/* 
+     ;*  å²è¾¼ã¿çªå·ã®ä¿å­
+     ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼ã®ãã­ãã¯ã·ã§ã³ããã¯ã§ç ´å£ãããå¯è½æ§ããã
+     ;*/
+    push    r12 
+	;/*
+	 ;*  ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*/
+
+	;/*
+	 ;* å¤éå²è¾¼ã¿ã®å ´åã¯ã¿ã¹ã¯ã¹ã¿ãã¯ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ãè¡ããªã
+	 ;*/
+	cmp     1,  r6
+	bne     int_nested
+
+	;/*
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     _p_runtsk, r6                   ;/* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             ;/* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    ;/* =begin modified for SC3 */
+    ;/* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     r0, r9
+	cmp     r6, r13                         ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     stack_monitoring_exit, lp     
+    ;/* =end modified for SC3 */
+	bnh      stack_monitoring_error_isr
+
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+    ld.w    0[r6], r6
+    mov     STACK_MAGIC_NUMBER, r7
+	;/*
+	 ;*  ãã¸ãã¯ãã³ãã¼æªç ´å£ãªãï¼å²è¾¼ã¿å¦çã«é£ã¶
+	 ;*  ã¿ã¹ã¯ã«å²è¾¼ãã å ´åï¼å²è¾¼ã¿ã¹ã¿ãã¯ããã§ãã¯ããªã
+	 ;*/
+	cmp     r7, r6
+	be      stack_monitoring_exit
+    ;/* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    ;/* =end modified for SC3 */
+	br      stack_monitoring_error_isr
+
+	;/* 
+	 ;* å¤éå²è¾¼ã¿ã®å ´å 
+	 ;*/
+int_nested:
+	;/*
+	 ;*  å²è¾¼ã¿ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*/
+
+	;/*
+	 ;*  ã¹ã¿ãã¯æ®éãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     _isr_p_isrcb_tbl, r7
+	mov     r12, r11
+	shl     2, r11                          ;/* å²è¾¼ã¿çªå·ã4åãã¦ãªãã»ãããçæ  */
+	add     r11, r7
+    ld.w    0[r7], r7                       ;/* r7 = &isrcb_table[x] */
+    ;/* =begin modified for SC3 */
+	ld.w    ISRCB_p_isrinib[r7], r7         
+	ld.w    ISRINIB_p_intinib[r7], r7
+    mov     1, r9
+    ;/* =end modified for SC3 */
+	ld.w    INTINIB_remain_stksz[r7], r7    ;/* å²è¾¼ã¿çªå·ã«å¯¾å¿ããã¹ã¿ãã¯ãµã¤ãºã®åå¾ */
+	Lea     __ostk, r6                      ;/* å²è¾¼ã¿ã¹ã¿ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	add     r6, r7                          ;/* å
+é ­ã¢ãã¬ã¹ï¼ISRã®ä½¿ç¨ããã¹ã¿ãã¯ãµã¤ãº */
+	cmp     r7, sp                          ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ <= å
+é ­ã¢ãã¬ã¹ï¼ISRã®ä½¿ç¨ããã¹ã¿ãã¯ãµã¤ãºã®å ´åOK  */
+    ;/* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    ;/* =end modified for SC3 */
+	bnh     stack_monitoring_error_isr
+
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+	ld.w    0[r6], r6                       ;/* ãã®ã¢ãã¬ã¹ã®ç¤ºãå
+ã«ãã¸ãã¯ãã³ãã¼ãå
+¥ã£ã¦ãã */
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    ;/* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    ;/* =end modified for SC3 */
+	bne     stack_monitoring_error_isr
+
+stack_monitoring_exit:
+    pop     r12 
+$endif ;/* CFG_USE_STACKMONITORING */
+
+	;/*
+	 ;*  _callevel_stat ä¿å­
+	 ;*/
+	Lea     _callevel_stat, r6
+	ld.h    0[r6], r7
+	Push    r7
+
+	;/*
+	 ;*  _callevel_stat è¨­å®
+	 ;*/
+	mov     TCL_ISR2, r8
+	or      r8, r7
+	st.h    r7, 0[r6]
+
+    ;/* =begin added for SC3 */
+	;/*
+	 ;*  run_trusted ä¿å­
+	 ;*/
+    Lea     _run_trusted, r6
+    ld.b    0[r6], r7
+    Push    r7
+
+	;/*
+	 ;*  run_trusted è¨­å®
+	 ;*/
+	mov     TRUE, r8
+    st.b    r8, 0[r6]
+
+	;/*
+	 ;*  p_runosap ä¿å­
+	 ;*/
+    Lea     _p_runosap, r6
+    ld.w    0[r6], r7
+	Push    r7
+    ;/* =end added for SC3 */
+
+	;/*
+	 ;* p_runisr ä¿å­
+	 ;*/
+	Lea     _p_runisr, r6
+	ld.w    0[r6], r7
+	Push    r7
+
+	;/*
+	 ;* p_runisr è¨­å®
+	 ;*/
+	Lea     _isr_p_isrcb_tbl, r7
+	shl     2, r12                      ;/* å²è¾¼ã¿çªå·ã4åãã¦ãªãã»ãããçæ  */
+	add     r12, r7
+	Lea     _p_runisr, r8
+	ld.w    0[r7], r7
+	st.w    r7, 0[r8]
+
+	;/*
+	 ;*  å²è¾¼ã¿ãã³ãã©ã®ã¢ãã¬ã¹ãèª­ã¿è¾¼ã
+	 ;*/
+	Lea     _isr_tbl, r6
+	add     r12, r6
+
+    ;/* =begin modified for SC3 */
+    ;/*
+     ;*  p_runosap è¨­å®
+     ;*/
+    cmp     r7, r0                      ;/* r7 = p_runisr == NULL ? */
+    be      int_handler_call            ;/* p_runisr ã NULL ã§ãªããã°ã¹ã­ãã */
+    ld.w    ISRCB_p_isrinib[r7], ep     ;/* ep = p_runisr->p_isrinib */
+    sld.w   ISRINIB_p_osapcb[ep], r8    ;/* r8 = p_runisr->p_isrinib->p_osapcb */
+    Lea     _p_runosap, ep
+    sst.w   r8, 0[ep]                   ;/* p_runosap = p_runisr->p_isrinib->p_osapcb */
+
+int_handler_call:
+    ;/* =end modified for SC3 */
+	;/*
+	 ;*  å²è¾¼ã¿ãã³ãã©å¼ã³åºã
+	 ;*/
+	Lea     end_int_handler, r31
+	ld.w    0[r6], r6
+	jmp     [r6]
+
+	;/*
+	 ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼æã®å¦ç
+	 ;*/
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼æãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 ;*  ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã
+     ;*  ISRã®åºå
+¥å£ããç¸å¯¾ã¸ã£ã³ãã§ããããã«ããã«ç½®ã
+     ;*  stack_monitoring_errorã¸ã®è¸ã¿å°
+	 ;*/
+stack_monitoring_error_isr:
+    br  stack_monitoring_error
+$endif ;/* CFG_USE_STACKMONITORING */
+
+end_int_handler:
+
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  å²è¾¼ã¿ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*  å²è¾¼ã¿ããæ»ã£ãæï¼ã¹ã¿ãã¯ãã¤ã³ã¿ãæ»ã£ãã¯ããªã®ã§ï¼
+	 ;*  ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼ã®ã¿å®æ½
+	 ;*/
+
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     __ostk, r6                       ;/* å²è¾¼ã¿ã¹ã¿ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    0[r6], r6                       ;/* ãã®ã¢ãã¬ã¹ã®ç¤ºãå
+ã«ãã¸ãã¯ãã³ãã¼ãå
+¥ã£ã¦ãã */
+    ;/* =begin modified for SC3 */
+    mov     1, r9
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    Lea     stack_monitoring_exit2, lp     
+	bne     stack_monitoring_error_isr
+
+stack_monitoring_exit2:
+    ;/* =end modified for SC3 */
+$endif ;/* CFG_USE_STACKMONITORING */
+
+	;/*
+	 ;* ISR2ã®ä¸æ­£çµäºãã§ãã¯
+	 ;*/
+	jarl    _exit_isr2, r31
+
+	;/*
+	 ;* p_runisr ã®å¾©å¸°
+	 ;*/
+	Lea     _p_runisr, r7
+	Pop     r6
+	st.w    r6, 0[r7]
+
+    ;/* =begin modified for SC3 */
+	;/*
+	 ;*  p_runosap å¾©å¸°
+	 ;*/
+    Lea     _p_runosap, r7
+	Pop     r6
+    st.w    r6, 0[r7]
+
+	;/*
+	 ;*  run_trusted å¾©å¸°
+	 ;*/
+    Lea     _run_trusted, r7
+	Pop     r6
+    st.b    r6, 0[r7]
+    ;/* =end modified for SC3 */
+
+
+	;/*
+	 ;* _callevel_stat ã®å¾©å¸°
+	 ;*/
+	Lea     _callevel_stat, r7
+	Pop     r6
+	st.h    r6, 0[r7]
+
+;/*
+ ;*  å²è¾¼ã¿ãã³ãã©åºå£å¦ç
+ ;*/
+ret_int:
+	;/*
+	 ;* _except_nest_cntã®æä½ã¨ã¹ã¿ãã¯åãæ¿ãã®éã¯OSå²è¾¼ã¿ç¦æ­¢ã«ãã
+	 ;* å¿
+è¦ããã
+	 ;* ãã®å
+ï¼å²è¾¼ã¿å
+ã¸ã®ãªã¿ã¼ã³ãï¼é
+å»¶ãã£ã¹ãããã«åå²ããï¼
+	 ;* å²è¾¼ã¿å
+ã¸ã®ãªã¿ã¼ã³ã«ã¯å
+¨å²è¾¼ã¿ãå¿
+è¦ã§ããï¼é
+å»¶ãã£ã¹ãããæã«ã¯
+	 ;* ãã¹ãç®¡çã®OSå²è¾¼ã¿ç¦æ­¢ã«ããå¿
+è¦ãããããï¼ããã§ã¯ä¸æ¦å
+¨å²è¾¼ã¿ç¦
+	 ;* æ­¢ã¨ãã
+	 ;*/
+
+	LOCK_ALL_INT
+
+    ;/*
+     ;*  å²è¾¼ã¿çºçæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã¹ã¿ãã¯ããå¾©å¸°
+     ;*/
+    ld.w    0[sp], r19
+    add     4, sp
+	Lea     _current_iintpri, r6
+	st.b    r19, 0[r6]              ;/* current_iintpriãå¾©å¸° */
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 ;*/
+	Lea     _except_nest_cnt, r6
+	ld.w    0[r6], r7
+	add     -1, r7
+	st.w    r7, 0[r6]
+
+	;/*
+	 ;*  ãã¹ãåæ°ã0ãªãï¼å²è¾¼ã¿å
+ãã¿ã¹ã¯
+	 ;*/
+	cmp     r0, r7
+	be      ret_int_task
+
+	;/*
+	 ;*  ISR2å²è¾¼ã¿ããã®ãªã¿ã¼ã³æã¯å²è¾¼ã¿å
+ã
+	 ;*  ISR2ã§ãããããã®ã¾ã¾ãªã¿ã¼ã³
+	 ;*/
+	br      ret_int_1
+
+
+	;/*
+	 ;*  å²è¾¼ã¿å
+ãã¿ã¹ã¯ã®å ´å
+	 ;*/
+ret_int_task:
+	ld.w    0[sp], sp                       ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ãæ»ã     */
+
+	;/*  
+     ;*  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå¤ããAPIããªãããï¼
+     ;*  ATK2ã§ã¯å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¾©å¸°å¦çã¯ä¸è¦
+     ;*/
+	;/*
+	 ;*  å²è¾¼ã¿ãã³ãã©å®è¡æã«ã¯ï¼ISPRã§åªå
+åº¦ãèªåçã«ä¸ããããï¼
+	 ;*  PMRã¯å¤æ´ãã¦ããªããï¼å²ãè¾¼ã¿ãã³ãã©å
+ã§ x_nested_unlock_os_int() ã
+	 ;*  å¼ã³åºãã¨PMRãæ¸ãæããï¼ãã£ã¹ããããå¿
+è¦ã§ãªãå ´åã¯ï¼ret_int_1ã§
+	 ;*  PMRãå
+ã®å¤ã«æ»ãï¼ãã£ã¹ããããå¿
+è¦ãªå ´åã¯ï¼OSå²ãè¾¼ã¿ç¦æ­¢ã¨ããããï¼
+	 ;*  ããã§ï¼PMRãæ´æ°ããå¿
+è¦ã¯ãªãï¼
+	 ;*/
+
+	;/*
+	 ;*  æ»ãå
+ãã¿ã¹ã¯ã®å ´åï¼ãã£ã¹ãããã®å¿
+è¦ãããããã§ãã¯
+	 ;*/
+	Lea     _p_runtsk, r6
+	ld.w    0[r6], r6
+	Lea     _p_schedtsk, r7
+	ld.w    0[r7], r7
+	cmp     r6, r7
+	be      ret_int_1      ;/* ãã£ã¹ãããã®å¿
+è¦ããªããã°å²è¾¼ã¿å
+ã¸æ»ã */
+
+	;/*
+	 ;*  ããã§ã¯ï¼æ»ãå
+ãã¿ã¹ã¯ã§ããï¼ã¹ã¿ãã¯ã¯ï¼ã¿ã¹ã¯ã¹ã¿ãã¯ã«
+	 ;*  ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ã¿ãä¿å­ãããç¶æ
+ã«ãªã£ã¦ããï¼ã¾ãï¼
+	 ;*  å
+¨å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+ã¨ãªã£ã¦ãã
+	 ;*/
+
+	;/* 
+	 ;*  åªå
+åº¦ãã¹ã¯ã®ã¯ãªã¢ 
+	 ;*  eiretãå®è¡ããªãããï¼eiretã«ããå²è¾¼ã¿ã³ã³ãã­ã¼ã©ã®åªå
+åº¦ãã¹ã¯
+	 ;*  (ã¤ã³ãµã¼ãã¹ãã©ã¤ãªãªãã£)ã®ã¯ãªã¢ãè¡ãããªãããï¼ä»£ããã«ISPC
+	 ;*  ãç¨ãã¦ã¯ãªã¢ããï¼
+	 ;*/
+	CLEAR_ISPR r10, r12
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ç§»è¡ãã
+	 ;*
+	 ;*  ãã®æç¹ã§OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ããã®ã¯ï¼dispatcherãå®è¡ããéã«
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãªã£ã¦ããå¿
+è¦ãããããã§ãã
+	 ;*
+	 ;*  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼ISR1ä»¥å¤ã®å²è¾¼ã¿ã¯å
+¨ã¦ç¦æ­¢ãã
+	 ;*/
+
+	OUTER_LOCK_OS_INT r12, r13
+	;/* ret_int ã§å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ããããè§£é¤ */
+	UNLOCK_ALL_INT
+
+	;/*
+	 ;* ã³ã³ãã­ã¹ãã®éé¿ 
+	 ;*/
+$ifndef TOPPERS_USE_PUSHSP
+	addi    -40, sp, sp
+	mov     sp, ep
+	sst.w   r20, 36[ep]
+	sst.w   r21, 32[ep]
+	sst.w   r22, 28[ep]
+	sst.w   r23, 24[ep]
+	sst.w   r24, 20[ep]
+	sst.w   r25, 16[ep]
+	sst.w   r26, 12[ep]
+	sst.w   r27, 8[ep]
+	sst.w   r28, 4[ep]
+	sst.w   r29, 0[ep]
+$else ;/* TOPPERS_USE_PUSHSP */
+	pushsp  r20-r29
+$endif ;/* TOPPERS_USE_PUSHSP */
+
+	;/* ã¹ã¿ãã¯ã¨æ¬¡ã®èµ·åçªå°ãä¿å­ */
+	Lea     _p_runtsk, ep
+	sld.w   0[ep], ep
+    ;/* =begin modified for SC3 */
+	sst.w   sp, TCB_ssp[ep]
+    ;/* =end modified for SC3 */
+	Lea     ret_int_r, r6
+	sst.w   r6, TCB_pc[ep]
+	br      dispatcher
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã§ã³ã³ãã­ã¹ãä¿å­ããå ´åã®å¾©å¸°ã«ã¼ãã³
+	 ;*/
+ret_int_r:
+	;/*
+	 ;* ã³ã³ãã­ã¹ãã®å¾©å¸°
+	 ;*/
+$ifndef TOPPERS_USE_PUSHSP
+	mov     sp, ep
+	sld.w   36[ep], r20
+	sld.w   32[ep], r21
+	sld.w   28[ep], r22
+	sld.w   24[ep], r23
+	sld.w   20[ep], r24
+	sld.w   16[ep], r25
+	sld.w   12[ep], r26
+	sld.w   8[ep], r27
+	sld.w   4[ep], r28
+	sld.w   0[ep], r29
+	addi    40, ep, sp
+$else ;/* TOPPERS_USE_PUSHSP */
+	popsp   r20-r29
+$endif ;/* TOPPERS_USE_PUSHSP */
+
+	LOCK_ALL_INT
+
+	OUTER_UNLOCK_OS_INT r12, r13
+	;/*
+	 ;*  å²è¾¼ã¿ããã®å¾©å¸°ã«ã¼ãã³
+	 ;*/
+ret_int_1:
+	;/*
+	 ;* ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 ;*/
+	mov     sp, ep
+
+	;/*  
+     ;*  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå¤ããAPIããªãããï¼
+     ;*  ATK2ã§ã¯å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¾©å¸°å¦çã¯ä¸è¦
+     ;*/
+	;/*
+	 ;*  PMRãå
+ã«æ»ãï¼
+	 ;*  å²è¾¼ã¿ãã³ãã©å®è¡æã«ã¯ï¼ISPRã§åªå
+åº¦ãèªåçã«ä¸ããããï¼
+	 ;*  PMRã¯å¤æ´ãã¦ããªããï¼å²ãè¾¼ã¿ãã³ãã©å
+ã§ x_nested_unlock_os_int() ã
+	 ;*  å¼ã³åºãã¨PMRãæ¸ãæããããããã§å
+ã®å¤ã«æ»ãï¼
+	 ;*  OUTER_UNLOCK_OS_INT ã¯ nested_lock_os_int_cnt ã0ã«ãããï¼
+	 ;*  ããã§ã¯æ¢ã«0ã§ããããåé¡ãªãï¼
+	 ;*/
+	OUTER_UNLOCK_OS_INT  r1, r6
+	sld.w    4[ep], r10
+	ldsr    r10, eipc
+	sld.w   0[ep], r10
+	ldsr    r10, eipsw
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãå¾©å¸° */
+    INT_EXC_RESTOREREG eiwr
+
+	stsr    eipsw, r2           ;/* r2 = eipsw */
+    shl     PSW_SV, r2          ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_int     ;/* ç¹æ¨©ããã®å²è¾¼ã¿ãªãã°ã¹ã­ãã */
+int_to_utask:
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp     ;/* uspãå¾©å¸° */
+return_from_int:
+    stsr    eiwr, r2
+	eiret
+
+;/*
+ ;* ã¿ã¹ã¯ãã£ã¹ããã
+ ;*/
+	.extern _dispatch
+_dispatch:
+	;/*
+	 ;*  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã»ãã£ã¹ããã
+	 ;*  è¨±å¯ç¶æ
+ã»ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºã
+	 ;*  ãã
+	 ;*/
+$ifndef TOPPERS_USE_PUSHSP
+	addi    -48, sp, sp
+	st.w    ep,  0[sp]
+	mov     sp,  ep
+	sst.w   r20, 44[ep]
+	sst.w   r21, 40[ep]
+	sst.w   r22, 36[ep]
+	sst.w   r23, 32[ep]
+	sst.w   r24, 28[ep]
+	sst.w   r25, 24[ep]
+	sst.w   r26, 20[ep]
+	sst.w   r27, 16[ep]
+	sst.w   r28, 12[ep]
+	sst.w   r29, 8[ep]
+	sst.w   r31, 4[ep]
+$else ;/* TOPPERS_USE_PUSHSP */
+	pushsp  r20-r31
+$endif ;/* TOPPERS_USE_PUSHSP */
+	;/* ã¹ã¿ãã¯ã¨æ¬¡ã®èµ·åçªå°ãä¿å­ */
+	Lea     _p_runtsk, ep
+	sld.w   0[ep], ep
+    ;/* =begin modified for SC3 */
+	sst.w   sp, TCB_ssp[ep]
+    ;/* =end modified for SC3 */
+	Lea     dispatch_r, r10
+	sst.w   r10, TCB_pc[ep]
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  å®è¡ä¸­ã¿ã¹ã¯ã®ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*/
+	;/*
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     _p_runtsk, r6                   ;/* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             ;/* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    ;/* =begin modified for SC3 */
+    ;/* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     1, r9
+	cmp     r6, sp                          ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     dispatcher, lp
+    ;/* =end modified for SC3 */
+	bnh      stack_monitoring_error
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+	ld.w    0[r6], r6
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    ;/* =begin modified for SC3 */
+    Lea     dispatcher, lp
+    ;/* =end modified for SC3 */
+	bne     stack_monitoring_error
+$endif ;/* CFG_USE_STACKMONITORING */
+	br      dispatcher
+
+	;/* 
+	 ;* ãã£ã¹ãããã£ã®å¾©å¸°ã«ã¼ãã³ 
+	 ;*/
+dispatch_r:
+$ifndef TOPPERS_USE_PUSHSP
+	mov     sp, ep
+	sld.w   44[ep], r20
+	sld.w   40[ep], r21
+	sld.w   36[ep], r22
+	sld.w   32[ep], r23
+	sld.w   28[ep], r24
+	sld.w   24[ep], r25
+	sld.w   20[ep], r26
+	sld.w   16[ep], r27
+	sld.w   12[ep], r28
+	sld.w    8[ep], r29
+	sld.w    4[ep], r31
+	addi    48, ep, sp
+	ld.w    0[sp], ep
+$else ;/* TOPPERS_USE_PUSHSP */
+	popsp   r20-r31
+$endif ;/* TOPPERS_USE_PUSHSP */
+	jmp     [lp]
+
+	;/*
+	 ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼æã®å¦ç
+	 ;*/
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼æãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 ;*  ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã
+     ;*  r9 = ostkptã®åæå¤ã«åãæ¿ããã?
+	 ;*/
+stack_monitoring_error:
+	;/*
+	 ;*  r9==0ã®å ´åã§ãï¼æ¢ã«_ostkptãä½¿ã£ã¦ããã®ã§ï¼
+	 ;*  except_nest_cntãã¤ã³ã¯ãªã¡ã³ããã¦ãåé¡ã¯ãªã
+	 ;*/
+	Lea     _except_nest_cnt, r12               ;/* _ostkptãä½¿ãå ´åã¯except_nest_cntãã¤ã³ã¯ãªã¡ã³ããã */
+	ld.w    0[r12], r13
+	add     1, r13
+	st.w    r13, 0[r12]
+
+    ;/* =begin modified for SC3 */
+    cmp     r0, r9
+    be      stack_monitoring_error_1
+    ;/* =end modified for SC3 */
+
+	Lea    __ostkpt, r12                        ;/* ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã */
+	ld.w    0[r12], r12
+	mov     r12, sp
+
+    ;/* =begin modified for SC3 */
+stack_monitoring_error_1:
+	;/*
+	 ;*  ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºã
+	 ;*/
+	NESTED_LOCK_OS_INT r12, r13
+    ;/* =end modified for SC3 */
+
+	mov     E_OS_STACKFAULT, r6                 ;/* ãã­ãã¯ã·ã§ã³ããã¯ã®å¼æ°ãè¨­å® */
+    ;/* =begin modified for SC3 */
+ 	Lea     _pre_protection_supervised, r12
+    mov     0x01, r13
+ 	st.b    r13, 0[r12]     ;/* pre_protection_supervised = 0x01 */
+	jr      _call_protectionhk_main        ;/* ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã */
+    ;/* ããã«ã¯æ¥ãªã */
+stack_monitoring_error_loop:
+    jr   stack_monitoring_error_loop
+    ;/* =end modified for SC3 */
+$endif ;/* CFG_USE_STACKMONITORING */
+
+
+;/*
+ ;*  ãã£ã¹ãããã£ã®åä½éå§
+ ;*/
+	.extern _start_dispatch
+_start_dispatch:
+	;/*
+	 ;*  ãã®ã«ã¼ãã³ã¯ï¼ã«ã¼ãã«èµ·åæã«ï¼ãã¹ã¦ã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+
+	 ;* ï¼å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨åç­ï¼ã§å¼ã³åºãããï¼ã¾ãï¼å²è¾¼ã¿ã¢ã¼ãï¼é
+	 ;*  ã¿ã¹ã¯ã³ã³ãã­ã¹ãã¨åç­ï¼ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+	 ;*
+	 ;*  dispatcherã¯ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºãï¼
+	 ;*/
+	;/* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ */
+	OUTER_LOCK_OS_INT r12, r13
+	;/* å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸ */
+	UNLOCK_ALL_INT
+	br    dispatcher_0
+
+    ;/* =begin modified for SC3 */
+	.extern _exit_and_dispatch_nohook
+	;/*
+	 ;*  ã¿ã¹ã¯å¼·å¶çµäºã®å ´åã¯PostTaskHookãå¼åºããªã
+	 ;*  ãã®å ´åã®ã¨ã³ããªã§ãã
+	 ;*/
+_exit_and_dispatch_nohook:
+
+	br    dispatcher_0
+    ;/* =end modified for SC3 */
+
+	;/*
+	 ;*  ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ããã
+	 ;*/
+	.extern _exit_and_dispatch
+_exit_and_dispatch:
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  å®è¡ä¸­ã®ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*/
+	;/*
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     _p_runtsk, r6                   ;/* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             ;/* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    ;/* =begin modified for SC3 */
+    ;/* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     1, r9
+	cmp     r6, sp                          ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     dispatcher, lp
+    ;/* =end modified for SC3 */
+	bnh      stack_monitoring_error
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+	ld.w    0[r6], r6
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    ;/* =begin modified for SC3 */
+    Lea     dispatcher, lp
+    ;/* =end modified for SC3 */
+	bne     stack_monitoring_error
+$endif ;/* CFG_USE_STACKMONITORING */
+	;/* ãã£ã¹ãããã£æ¬ä½ï¼dispatcherï¼ã¸ */
+
+dispatcher:
+	;/*
+	 ;*  PostTaskHookã®å¼ã³åºã
+	 ;*/
+$ifdef CFG_USE_POSTTASKHOOK
+posttaskhook_call:
+	Lea     _call_posttaskhook, r6
+	jarl    _stack_change_and_call_func_1, r31
+$endif ;/* CFG_USE_POSTTASKHOOK */
+
+dispatcher_0:
+	;/*
+	 ;*  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã»ãã£ã¹ããã
+	 ;*  è¨±å¯ç¶æ
+ã»ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºã
+	 ;*  ããï¼å®è¡åéçªå°ã¸ããã®ç¶æ
+ã®ã¾ã¾åå²ãã
+	 ;*/
+$ifdef LOG_DSP_ENTER
+	Lea     _p_runtsk, r21
+	ld.w    0[r21], r21
+	cmp     r0, r21
+	be      dispatcher_0_1
+	mov     r21, r6                            ;/* å¼æ°ã«_p_runtskãæå® */
+	jarl    _log_dsp_enter, r31
+dispatcher_0_1:
+$endif	;/* LOG_DSP_ENTER */
+
+	Lea     _callevel_stat, r21
+	ld.h    0[r21], r22
+	mov     TSYS_DISALLINT, r20
+	and     r22, r20
+	be      dispatcher_1
+
+	mov     !TSYS_DISALLINT, r20
+	and     r22, r20
+	st.h    r20, 0[r21]
+	UNLOCK_ALL_INT                             ;/* å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸ */
+
+	;/*
+	 ;*  ä¾å¤ï¼å²è¾¼ã¿/CPUä¾å¤ï¼ã®ãã¹ãåæ°ã¯start_dispatchãï¼dispatcher_3:
+	 ;*  ããæ¥ãå ´åã¯'1'ã¨ãªã£ã¦ããããï¼ã¿ã¹ã¯ã¹ã¿ãã¯ã«åãæãå¾ï¼
+	 ;*  '0'ã«åæåããï¼
+	 ;*/
+dispatcher_1:
+	Lea     _p_runtsk, r21
+	Lea     _p_schedtsk, r20
+	ld.w    0[r20], r22
+	st.w    r22, 0[r21]
+	cmp     r22, r0
+	be      dispatcher_3
+
+	mov     r22, ep 
+    ;/* =begin modified for SC3 */
+	sld.w   TCB_ssp[ep], sp
+    ;/* =end modified for SC3 */
+	Lea     _except_nest_cnt, r20
+	st.w    r0, 0[r20]
+
+    ;/* =begin modified for SC3 */
+    sld.w   TCB_p_tinib[ep], ep
+    mov     ep, r25                     ;/* r25 = p_tinib */
+    sld.w   TINIB_p_osapcb[ep], r26     ;/* r26 = p_osapcb */
+    Lea     _p_runosap, ep              ;/* ep = &p_runosap */
+    sst.w   r26, 0[ep]                  ;/* p_runosap = p_osapcb */
+    ld.w    OSAPCB_p_osapinib[r26], r29 ;/* r29 = p_osapinib */
+    ld.bu   OSAPINIB_osap_trusted[r29], r24 ;/* r24 = trusted? */
+    Lea     _run_trusted, ep
+    sst.b   r24, 0[ep]                      ;/* run_trusted = trusted? */
+    cmp     r0, r24                         ;/* ä¿¡é ¼ãªãã°ã¹ã­ãã */
+    bne     dispatcher_5
+
+$ifdef __v850e2v3__
+    ori     0x1001, r0, r27
+    ldsr    r27, bsel
+    ;/*
+     ;*  ã¦ã¼ã¶ã¹ã¿ãã¯é å
+     ;*/
+    mov     r25, ep
+    sld.w   TINIB_start_ustk[ep], r27   ;/* å
+é ­çªå° */
+    ori     0x01, r27, r27
+    sld.w   TINIB_limit_ustk[ep], r28   ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ori     0x06, r28, r28
+    ldsr    r27, dpa0l
+    ldsr    r28, dpa0u
+$else ;/* defined(__v850e3v5__) */
+    ;/*
+     ;*  ã¦ã¼ã¶ã¹ã¿ãã¯é å
+     ;*/
+    mov     r25, ep
+    sld.w   TINIB_start_ustk[ep], r27   ;/* å
+é ­çªå° */
+    sld.w   TINIB_limit_ustk[ep], r28   ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, 0, 6                   ;/* MPLA0 */
+    ldsr    r28, 1, 6                   ;/* MPUA0 */
+
+$endif ;/* __v850e2v3__ */
+
+   	;/*
+	 ;*  å®è¡ãã¡ã¤ã³ã¨ä¿è­·ãã¡ã¤ã³(MPUã®è¨­å®)ãåããªãã°ï¼
+     ;*  ãã¡ã¤ã³æ¯ã®ã³ã¼ãé åã»ãã¼ã¿é åãMPUã«è¨­å®ãç´ãå¿
+è¦ã¯ãªã
+     ;*/
+    Lea     _p_ctxosap, ep      ;/* ep = &p_ctxosap */	
+    sld.w   0[ep], r27          ;/* r27 = p_ctxosap */
+	cmp     r27, r26            ;/* p_ctxosap == p_runosap ? */
+	be      dispatcher_5        ;/* åããªãdispatcher_5ã¸ */
+    nop
+	sst.w   r26, 0[ep]          ;/* p_ctxosap = p_runosap : ä¿è­·ãã¡ã¤ã³ãåæ¿ã */
+$ifdef __v850e2v3__
+    ldsr    r26, vmtid          ;/* ã¡ã¢ãªä¿è­·éåã¿ã¹ã¯è­å¥å­ãp_runosapã¨ãã */
+    mov     r29, ep             ;/* ep = p_osapinib */
+
+    ;/*
+     ;*  èªä¿è­·ãã¡ã¤ã³å°ç¨ã®romé å
+     ;*/
+    sld.w   OSAPINIB_start_text[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_text[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, ipa0l
+    ldsr    r28, ipa0u
+    ;/*
+     ;*  èªä¿è­·ãã¡ã¤ã³å°ç¨ã®rosdataé å
+     ;*/
+    sld.w   OSAPINIB_start_rosdata[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_rosdata[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, ipa1l
+    ldsr    r28, ipa1u
+    ;/* 
+     ;* èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å
+     ;*/
+    sld.w   OSAPINIB_start_ram[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_ram[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa1l
+    ldsr    r28, dpa1u
+    ;/* 
+     ;* èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å(sdata)
+     ;*/
+    sld.w   OSAPINIB_start_sram[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_sram[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa2l
+    ldsr    r28, dpa2u
+    ;/*
+     ;* å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å
+     ;*/
+    sld.w   OSAPINIB_start_srpw[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_srpw[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa3l
+    ldsr    r28, dpa3u
+     ;/*
+     ;* å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å(sdata)
+     ;*/
+    sld.w   OSAPINIB_start_ssrpw[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_ssrpw[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa4l
+    ldsr    r28, dpa4u
+
+$else ;/* defined(__v850e3v5__) */
+    ;/*
+     ;* reg1: p_osapinib
+     ;* reg2: tmp1
+     ;* reg3: tmp2
+     ;* reg4: tmp3
+     ;* reg5: tmp4
+     ;* reg6: tmp5
+     ;*/
+    DISPATCHER_MPU_SETTING r29, r24, r25, r26, r27, r28
+$endif ;/* __v850e2v3__ */
+
+dispatcher_5:
+$ifdef __v850e2v3__
+    ldsr    r0, bsel    ;/* bselãæ»ã */
+$endif ;/* __v850e2v3__ */
+    ;/* =end modified for SC3 */
+
+$ifdef LOG_DSP_LEAVE
+	ld.w    0[r21], r6                          ;/* å¼æ°ã«_p_runtskãæå® */
+	jarl    _log_dsp_leave, r31
+$endif	;/* LOG_DSP_LEAVE */
+
+$ifdef CFG_USE_PRETASKHOOK
+pretaskhook_call:
+	Lea     _call_pretaskhook, r6
+	jarl    _stack_change_and_call_func_1, r31
+$endif ;/* CFG_USE_PRETASKHOOK */
+
+dispatcher_2:
+	Lea     _p_runtsk, r20
+	ld.w    0[r20], r22
+	mov     r22, ep
+	sld.w   TCB_pc[ep], r31
+	jmp     [r31]
+
+dispatcher_3:
+	;/*
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ã¨ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãå®è¡ç¶æ
+ã¸ã®
+	 ;* æºåããã
+	 ;*
+	 ;*  ããã§éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæ¿ããï¼spï¼éã¿ã¹ã¯ã³ã³ãã­ã¹
+	 ;*  ãç¨ã¹ã¿ãã¯ãã¤ã³ã¿ï¼except_nest_cntï¼1)ã®ã¯ï¼OSå²è¾¼ã¿ç¦æ­¢è§£
+	 ;*  é¤å¾ã«çºçããå²è¾¼ã¿å¦çã«ã©ã®ã¹ã¿ãã¯ãä½¿ããã¨ããåé¡ã®è§£æ±º
+	 ;*  ã¨ï¼å²è¾¼ã¿ãã³ãã©å
+ã§ã®ã¿ã¹ã¯ãã£ã¹ãããã®é²æ­¢ã¨ãã2ã¤ã®æ
+	 ;*  å³ããã
+	 ;*/
+	Lea     __ostkpt, r20		;/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã®èª­ã¿è¾¼ã¿ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ã */
+	ld.w    0[r20], r3
+
+	Lea     _except_nest_cnt, r20
+	mov     1, r21
+	st.w    r21, 0[r20]
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸
+	 ;*  å²è¾¼ã¿ãè¨±å¯ãï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãå®è¡ç¶æ
+ã¨ãå²è¾¼ã¿ãå¾
+ã¤
+	 ;*
+	 ;*  ãã­ã»ããµãå²è¾¼ã¿å¾
+ã¡ã«ç§»è¡ãããå¦çã¨ï¼å²è¾¼ã¿è¨±å¯ã¨ã¯ï¼ä¸å¯
+	 ;*  åã«è¡ãªãå¿
+è¦ããã
+	 ;*  ãããä¸å¯åã«è¡ãªããªãå ´åï¼å²è¾¼ã¿ãè¨±å¯ããç´å¾ã«å²è¾¼
+	 ;*  ã¿ãå
+¥ãï¼ãã®ä¸­ã§ã¿ã¹ã¯ãå®è¡å¯è½ç¶æ
+ã«ãªãã¨ï¼å®è¡ãã¹ãã¿ã¹
+	 ;*  ã¯ãããã«ãããããããã­ã»ããµãå²è¾¼ã¿å¾
+ã¡ã«ãªã£ã¦ãã¾ãï¼
+	 ;*  ä¸å¯åã«è¡ãããï¼diã«ããã³ã¢ã§ã®å²ãè¾¼ã¿ãç¦æ­¢ããç¶æ
+ã§ï¼
+	 ;*  INTCã®å²ãè¾¼ã¿åªå
+åº¦ãã¹ã¯ãä¸ãã¦ããhaltãå¼ã³åºãï¼
+	 ;*  å²ãè¾¼ã¿ãçºçããå ´åã¯ï¼haltããå¾©å¸°ãã¦æ¬¡ã®eiã§ãã¯ã¿ã«
+	 ;*  ã¸ã£ã³ãããï¼
+	 ;*
+	 ;*  å²è¾¼ã¿å¾
+ã¡ã®éã¯ï¼p_runtskãNULLï¼ï¼0ï¼ã«è¨­å®ããªããã°ãªããªã
+	 ;*  ãã®ããã«è¨­å®ããªãã¨ï¼å²è¾¼ã¿ãã³ãã©ããGetTaskIDãå¼ã³åº
+	 ;*  ããéã®åä½ãä»æ§ã«åè´ããªããªã
+	 ;*/
+
+	di
+	OUTER_UNLOCK_OS_INT r12, r13
+
+$if 0
+	nop
+	nop
+	nop
+	nop
+$else
+	halt
+$endif
+	ei
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸
+	 ;*  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼ISR1ä»¥å¤ã®å²è¾¼ã¿ã¯å
+¨ã¦ç¦æ­¢ãã
+	 ;*  ã¹ã¿ãã¯ã¯éã¿ã¹ã¯ã³ã³ãã­ã¹ãã®ã¹ã¿ãã¯ãä½¿ç¨ãã¦ããããï¼_except_nest_cntã¯ï¼
+	 ;*  '1'ã®ã¾ã¾ã¨ãã
+	 ;*/
+	OUTER_LOCK_OS_INT r12, r13
+	br      dispatcher_1
+
+
+;/*
+ ;*  ã¿ã¹ã¯éå§æå¦ç
+ ;*
+ ;*  dispatcherããå¼ã³åºããã
+ ;*/
+    ;/* =begin modified for SC3 */
+	.extern _start_stask_r
+_start_stask_r:
+    Lea		_p_runtsk, ep                   ;/* ep = p_runtsk */
+	sld.w	0[ep], ep
+	;/*
+	 ;*  ã¿ã¹ã¯ãä¸æ­£çµäºããå ´åã¯ä¿è­·å¦çãè¡ããã
+	 ;*  æ»ãã¢ãã¬ã¹ã«exit_taskãè¨­å®
+	 ;*/
+	Lea     __kernel_exit_task, r31
+    mov     r0, r6
+    br      _start_r
+
+	.extern _start_utask_r
+_start_utask_r:
+$ifndef __v850e3v5__
+    ldsr    r0, bsel
+$endif
+    Lea		_p_runtsk, ep                   ;/* ep = p_runtsk */
+	sld.w	0[ep], ep
+    clr1    0, TCB_priv_mode[ep]            ;/* ç¹æ¨©ã¢ã¼ãå®è¡ãæãã */
+    sld.w   TCB_p_tinib[ep], r20            ;/* ep = p_runtsk->p_tinib */
+    ld.w    TINIB_ustk_bottom[r20], r20     ;/* r20 = ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ */
+    mov     r20, sp
+	;/*
+	 ;*  ã¿ã¹ã¯ãä¸æ­£çµäºããå ´åã¯ä¿è­·å¦çãè¡ããã
+	 ;*  æ»ãã¢ãã¬ã¹ã«exit_utaskãè¨­å®
+	 ;*/
+    Lea     _exit_utask, lp                 ;/* lp = _exit_utask */
+    stsr    psw, r10
+
+    ;/* 
+     ;*  å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸
+     ;*  ã¿ã¹ã¯ã³ã³ãã­ã¹ãã¸ã®ã¸ã£ã³ãã§è§£é¤ããã
+     ;*/
+    di
+
+    ;/* 
+	 ;* éç¹æ¨©ã¢ã¼ãã§åä½ããããæºå
+     ;* ä¿è­·æ©è½æå¹ï¼éä¿¡é ¼ã¸ï¼ï¼å²è¾¼ã¿è¨±å¯
+     ;* PP,NPV,DMP,IMP = 1, ID = 0
+     ;*/
+$ifdef __v850e2v3__
+    movhi   0x000f, r0, r7                  
+$else ;/* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r7  
+$endif ;/* __v850e2v3__ */
+    or      r7, r10         ;/* psw |= (PP|NPV|DMP|IMP) */
+	ldsr    r10, eipsw      ;/* eipsw = psw */
+    mov     1, r6
+
+	.extern _start_r
+_start_r:
+	ld.w    TCB_p_tinib[ep], r22
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  SC3ã§ã¯ã¿ã¹ã¯å¼·å¶çµäºãããã®ã§ï¼ã¿ã¹ã¯èµ·åæ¯ã«ãã¸ãã¯ãã³ãã¼
+	 ;*  ãåæåãã
+	 ;*/
+	ld.w    TINIB_sstk_bottom[r22], r21
+    ld.w    TINIB_sstksz[r22], r10
+    sub     r10, r21
+	mov     STACK_MAGIC_NUMBER, r10
+	st.w	r10, 0[r21]
+$endif ;/* CFG_USE_STACKMONITORING */
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤åã«ç¾å¨åªå
+åº¦(TCB.curpri)ãå®è¡åªå
+åº¦(TINIB.exepri)ã«
+	 ;*  å¤æ´(å
+é¨ãªã½ã¼ã¹ãç²å¾)
+	 ;*/
+	ld.b    TINIB_exepri[r22], r21			;/* TINIB.exepri -> TCB.curpri */
+	st.b    r21, TCB_curpri[ep]
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸
+	 ;*  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼æå¹ãªå²è¾¼ã¿ã¯å
+¨ã¦è¨±å¯ãã
+	 ;*/
+
+	OUTER_UNLOCK_OS_INT r12, r13
+
+	ld.w    TCB_p_tinib[ep], r22
+	ld.w    TINIB_task[r22], r10
+    cmp     r0, r6
+    bne     _start_r_1              ;/* r6 != 0 ãªãã° _start_r_1 ã¸*/
+	jmp     [r10]
+
+_start_r_1:
+	ldsr    r10, eipc               ;/* EIPC = pc */
+    eiret
+    ;/* =end modified for SC3 */
+
+    ;/*
+     ;*  ext_tskãsvcå½ä»¤ã§å¼ã³åºã
+     ;*/
+    shared.text .cseg text
+    .align 4
+    .public _exit_utask
+_exit_utask:
+    mov     TFN_EXIT_TASK, r11
+    syscall NO_SVC
+    nop
+
+    kernel.text .cseg text
+	.extern _stack_change_and_call_func_1 
+	.extern _stack_change_and_call_func_2
+_stack_change_and_call_func_1:
+_stack_change_and_call_func_2:
+
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	add     1, r13
+	st.w    r13, 0[r12]
+	cmp     1, r13
+	bne     _stack_change_and_call_func_1_1
+
+	;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+	Lea     __ostkpt, r12
+	ld.w    0[r12], r12
+	add     -4, r12
+	st.w    sp, 0[r12]                      ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ */
+	mov     r12, sp                         ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åãæ¿ã */
+    
+
+_stack_change_and_call_func_1_1:
+	push    lp
+	Lea     stack_change_and_call_func_r, lp  ;/* æ»ãã¢ãã¬ã¹ */
+	mov     r6, r12
+	mov     r7, r6
+	mov     r8, r7
+	jmp     [r12]
+
+stack_change_and_call_func_r:
+	pop     lp
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	add     -1, r13
+	st.w    r13, 0[r12]
+	cmp     r0, r13
+	bne     stack_change_and_call_func_r_1
+
+	ld.w    0[sp], sp                    ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®å¾©å¸°     */
+stack_change_and_call_func_r_1:
+	jmp     [lp]
+
+
+$ifdef ENABLE_RETURN_MAIN
+;/*
+ ;*  AKTSPç¨ã®main()ã¸ã®ãªã¿ã¼ã³ã³ã¼ã
+ ;*/
+	.extern _return_main
+_return_main:
+	Lea   __ostkpt, sp
+	ld.w  0[sp],sp
+	jarl  _main, r31
+$endif ;/* ENABLE_RETURN_MAIN */
+
+    ;/* =begin modified for SC3 */
+;/*
+ ;*  SYSCALLãã¼ãã«
+ ;*  syscallå½ä»¤ã¯ãscbp + scbp[x] ã®çªå°ã«ã¸ã£ã³ããã
+ ;*/
+    .public _syscall_table
+    kernel.text .cseg text
+    .align 4
+_syscall_table:
+    .dw (_syscall_error_handler - _syscall_table)
+    .dw (_svc_entry - _syscall_table)
+
+    .public _syscall_error_handler
+    .public _svc_entry
+;/*
+ ;*  SYSCALLã¨ã©ã¼ãã³ãã©
+ ;*/
+_syscall_error_handler:
+    br  _syscall_error_handler
+    nop
+
+;/*
+ ;*  ãµã¼ãã¹ã³ã¼ã«ã®åºå
+¥å£
+ ;*  PP,NPV,DMP,IMP = 0, ID,EP = 1
+ ;*  eipc = pc, eipsw = psw : eiããåã«ä¿å­
+ ;*    r10 : è¿ãå¤
+ ;*    r11ï¼é¢æ°ã³ã¼ã
+ ;*    r6 - r9 : å¼æ°ï¼4ã¤ã¾ã§ï¼
+ ;*    r20 : ç¬¬5å¼æ°
+ ;*    ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä¿å­æ¸ã¿
+ ;*    lpä¿å­æ¸ã¿
+ ;*/
+_svc_entry:
+    ;/*
+     ;*  å¼åºãå
+ãç¹æ¨©ã¢ã¼ããï¼
+     ;*  eipswããã§ãã¯ãã
+     ;*/
+$ifndef __v850e3v5__
+    ldsr    r0, bsel
+$endif
+    stsr    eipsw, r13
+    shl     PSW_SV, r13         ;/* r13 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     svc_entry_2         ;/* ç¹æ¨©ã¢ã¼ãããã®å¼åºããªãã°ã¹ã­ãã */
+
+    ;/*
+     ;*  ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®å¼åºãã®å ´å
+     ;*/
+    ;/*
+     ;*  ã¦ã¼ã¶ã¹ã¿ãã¯ã¨ã·ã¹ãã ã¹ã¿ãã¯ãå
+¥ãæ¿ãã
+     ;*  ã¿ã¹ã¯ã®ç¶æ
+ãç¹æ¨©ã¢ã¼ãå®è¡ä¸­ã«ç§»è¡ãã
+     ;*  æ»ãå
+ãéç¹æ¨©ã¢ã¼ãã§éä¿¡é ¼ããã¯å®è¡ä¸­ã§ãªããã°ï¼
+     ;*  ã¿ã¹ã¯å®è¡ä¸­ã§ããã¯ããªã®ã§ï¼p_runtskãNULLãã©ããã®
+     ;*  ãã§ãã¯ã¯å¿
+è¦ãªãã¯ã
+     ;*/
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    set1    0, TCB_priv_mode[ep]    ;/* p_runtsk->priv_mode |= 0x01 */
+    sst.w   sp, TCB_usp[ep]         ;/* uspãä¿å­ */
+    sld.w   TCB_p_tinib[ep], ep
+    sld.w   TINIB_sstk_bottom[ep], sp         ;/* sspãå¾©å¸° */
+
+svc_entry_2:
+    ;/*
+     ;*  eipcã¨eipswï¼syscallå¼åºãå
+ã®pcã¨pswï¼ãä¿å­ãã¦
+     ;*  å²è¾¼ã¿ãããªã¿ã¼ã³
+     ;*  +--------------+ <- new sp
+     ;*  | eipsw        |
+     ;*  +--------------+
+     ;*  | eipc         |
+     ;*  +--------------+ <- old sp
+     ;*/
+    addi    -8, sp, sp
+    mov     sp, ep
+    stsr    eipc, r12
+    sst.w   r12, 4[ep]
+    stsr    eipsw, r12
+    sst.w   r12, 0[ep]
+    ;/*
+     ;*  eipswã®ä¿è­·é¢é£ãããã0ã«ãã
+     ;*/
+$ifdef __v850e2v3__
+    movhi   0x000f, r0, r13
+$else ;/* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r13
+$endif ;/* __v850e2v3__ */
+    not     r13, r13
+    and     r13, r12
+    ldsr    r12, eipsw          ;/* PP,NPV,DMP,IMP = 0 */
+    Lea     svc_entry_3, r12
+    ldsr    r12, eipc
+    eiret
+
+svc_entry_3:
+    ;/*
+     ;*  æ©è½ã³ã¼ãã®ãã§ãã¯
+     ;*/
+    mov     TMAX_SVCID, r12
+    cmp     r12, r11            ;/* æ©è½ã³ã¼ãã®ä¸éãã§ãã¯(TMAX_SVCID < r11) */
+    bgt     svc_entry_error     ;/* ä¸éããªã¼ããã¦ãããªãã°ã¨ã©ã¼ */
+
+    ;/*
+     ;*  ãµã¼ãã¹ã³ã¼ã«ã®ãã¼ãã«ãå¼ãï¼
+     ;*  ãµã¼ãã¹ã³ã¼ã«ã®æ¬ä½ãå¼ã¶
+     ;*/
+    Lea     _svc_table, r12
+    shl     2, r11                  ;/* r11 *= 4 */
+    add     r11, r12                ;/* r12 = &svc_table[r11] */
+	ld.w    0[r12], r12             ;/* ãã¼ãã«ãå¼ã */
+    Lea     svc_entry_r, lp         ;/* æ»ãçªå°ãè¨­å® */
+	jmp     [r12]                   ;/* ãµã¼ãã¹ã³ã¼ã«å¦çã«ã¼ãã³ãå¼ã¶ */
+    nop
+
+svc_entry_error:
+    jarl    _no_support_service, lp ;/* no_support_service ãå¼ã¶ */
+
+svc_entry_r:
+    ;/*
+     ;*  ãã®æç¹ã§ã®pswãr11ã«ä¿å­ãã
+     ;*  å
+¨å²è¾¼ã¿ç¦æ­¢ã§æ´æ°ããæã¸ã®å¯¾å¿
+     ;*/
+    stsr    psw, r11
+
+    ;/*
+     ;*  å
+¨å²è¾¼ã¿ç¦æ­¢ãã¤EPç¶æ
+ã¸
+     ;*  ããã§EPç¶æ
+ã¨ããã®ã¯ï¼ISRããã·ã¹ãã ãµã¼ãã¹ãå¼ã°ãã
+     ;*  å ´åã«ï¼eiretã«ãã£ã¦ISPRãæ´æ°ãããã®ãé²ãããã§ãã
+     ;*/
+    ori     0x60, r11, r12   ;/* psw |= EP|ID */
+    ldsr    r12, psw
+
+    ;/*
+     ;*  eipcã¨eipswï¼syscallå¼åºãå
+ã®pcã¨pswï¼ãå¾©å¸°
+     ;*  ããã§ã¯ï¼å²è¾¼ã¿å¦çä¸­ã§ãªãï¼ãµã¼ãã¹ã³ã¼ã«å¼åºãåã«
+     ;*  eiretãçºè¡ãã¦ããï¼ãï¼eiretãå©ç¨ãã¦ãªã¿ã¼ã³ãã
+     ;*  +--------------+ <- old sp
+     ;*  | eipc         |
+     ;*  +--------------+
+     ;*  | eipsw        |
+     ;*  +--------------+ <- new sp
+     ;*/
+    mov     sp, ep
+    sld.w   4[ep], r15
+    sld.w   0[ep], r16
+    addi    8, sp, sp
+
+    ;/*
+	 ;*  ã¹ã¿ãã¯ãæ»ãããã§ãã¯
+	 ;*/
+    ;/*
+     ;*  å¼åºãå
+ãç¹æ¨©ã¢ã¼ããï¼
+     ;*  eipswããã§ãã¯ãã
+     ;*/
+$ifdef __v850e2v3__
+    ldsr    r0, bsel
+    movhi   0x000f, r0, r12
+$else ;/* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r12
+$endif ;/* __v850e2v3__ */
+    tst     r16, r12
+    be      svc_prv_r           ;/* ç¹æ¨©ã¢ã¼ãããã®å¼åºããªãã°ã¹ã­ãã */
+
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    tst1    0, TCB_priv_mode[ep]    ;/* uspãä¿å­ãããï¼ */
+    be      svc_prv_r               ;/* uspãä¿å­ãã¦ããªããªãã°ã¹ã­ãã */
+
+svc_usr_r:
+    ;/* 
+     ;*  ç¹æ¨©ã¢ã¼ãå®è¡ãæãã
+     ;*  sstkã¨ustkãå
+¥ãæ¿ãã
+     ;*  æ»ãå
+ãã¿ã¹ã¯ã³ã³ãã­ã¹ããªãã°ï¼ã¿ã¹ã¯å®è¡ä¸­ã§ããã¯ã
+     ;*  ãªã®ã§ï¼p_runtskãNULLãã©ããã®ãã§ãã¯ã¯å¿
+è¦ãªãã¯ã
+     ;*/
+    clr1    0, TCB_priv_mode[ep]    ;/* p_runtsk->priv_mode &= !0x01 */
+    sld.w   TCB_usp[ep], sp         ;/* uspãå¾©å¸° */
+    
+svc_prv_r:
+    ;/*
+     ;*  ã·ã¹ãã ãµã¼ãã¹ã§ã»ãããããå²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãåæ ãã
+     ;*/
+    mov     0x20, r12
+    and     r12, r11    ;/* PSW.IDä»¥å¤ã0ã« */
+    not     r12, r12    ;/* r12 = !0x20 */
+    and     r12, r16    ;/* eipsw &= !0x20 */
+    or      r11, r16    ;/* eipsw |= r11 */
+    ldsr    r16, eipsw
+    ldsr    r15, eipc
+    eiret               ;/* å¼åºãå
+ã¸ãªã¿ã¼ã³ */
+    nop
+
+	;/*
+	 ;*  ã¹ã¿ãã¯ãã§ãã¯é¢æ°
+	 ;*   å
+¥å r6  ä½¿ç¨ããã¹ã¿ãã¯é
+	 ;*   ä½¿ç¨ããã¹ã¿ãã¯éãæ®ã£ã¦ããªãå ´åã¯ã¨ã©ã¼
+	 ;*/
+    .extern _trustedfunc_stack_check
+_trustedfunc_stack_check:
+    Lea     _callevel_stat, ep
+    sld.h   0[ep], r10
+    addi    TCL_ISR2, r0, r11     
+    tst     r11, r10
+    be      trustedfunc_stack_check_1       ;/* TCL_TASKã®å ´åã¯ã¹ã­ãã */
+
+    ;/*
+     ;*  _ostkãä½¿ç¨ä¸­
+     ;*/
+    Lea     __ostk, ep
+    sld.w   0[ep], r11
+    br      trustedfunc_stack_check_2
+
+trustedfunc_stack_check_1:
+    ;/*
+     ;*  ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ãä½¿ç¨ä¸­
+     ;*/
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    sld.w   TCB_p_tinib[ep], ep
+    sld.w   TINIB_sstk_bottom[ep], r11
+    sld.w   TINIB_sstksz[ep], r12
+    sub     r12, r11
+trustedfunc_stack_check_2:
+    ;/*
+     ;*  ã¹ã¿ãã¯ã®æ®éããã§ãã¯
+     ;*  r11 = ã¹ã¿ãã¯ã®å
+é ­
+     ;*/
+    subr    sp, r6                      ;/* r6 = ssp - tf_stksz */
+    bl      trustedfunc_stack_check_3   ;/* ssp < tfstksz ãªãã°ã¨ã©ã¼å¦çã¸ */
+    cmp     r11, r6                     ;/* r11 < r6 ï¼ */
+    bnh     trustedfunc_stack_check_3   ;/* ããã§ãªããã°ã¨ã©ã¼å¦çã¸ */
+    addi    E_OK, r0, r10
+    jmp     [lp]
+
+trustedfunc_stack_check_3:
+    addi    E_OS_STACKINSUFFICIENT, r0, r10
+    jmp     [lp]
+
+    ;/* =end modified for SC3 */
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_svc.h	(revision 172)
@@ -0,0 +1,106 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+
+#ifndef TOPPERS_PRC_SVC_H
+#define TOPPERS_PRC_SVC_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef sint32 FunctionCodeType;                  /* æ©è½ã³ã¼ãã®å */
+
+extern int cal_svc_0m(int fncd);
+extern int cal_svc_1m(int par1, int fncd);
+extern int cal_svc_2m(int par1, int par2, int fncd);
+extern int cal_svc_3m(int par1, int par2, int par3, int fncd);
+
+extern void cal_svc_0n(int fncd);
+extern void cal_svc_1n(int par1, int fncd);
+extern void cal_svc_2n(int par1, int par2, int fncd);
+extern void cal_svc_3n(int par1, int par2, int par3, int fncd);
+
+#define CAL_SVC_0M(TYPE, FNCD) cal_svc_0m((int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_1M(TYPE, FNCD, TYPE1, PAR1) \
+cal_svc_1m((int)((TYPE1)PAR1), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_2M(TYPE, FNCD, TYPE1, PAR1, TYPE2, PAR2) \
+cal_svc_2m((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_3M(TYPE, FNCD, TYPE1, PAR1, \
+							TYPE2, PAR2, TYPE3, PAR3) \
+cal_svc_3m((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((TYPE3)PAR3), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_0N(TYPE, FNCD) cal_svc_0n((int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_1N(TYPE, FNCD, TYPE1, PAR1) \
+cal_svc_1n((int)((TYPE1)PAR1), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_2N(TYPE, FNCD, TYPE1, PAR1, TYPE2, PAR2) \
+cal_svc_2n((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_3N(TYPE, FNCD, TYPE1, PAR1, \
+							TYPE2, PAR2, TYPE3, PAR3) \
+cal_svc_3n((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((TYPE3)PAR3), (int)((FunctionCodeType)FNCD))
+
+#ifndef TOPPERS_SVC_CALL
+#include "ccrh/tool_svc.h"
+#endif /* TOPPERS_SVC_CALL */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_TARGET_SVC_H */
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool.c	(revision 172)
@@ -0,0 +1,79 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_tool.c 182 2015-06-24 07:14:37Z t_ishikawa $
+ */
+
+/*
+ *		ãã¼ã«ä¾å­ã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ */
+#include "kernel_impl.h"
+#include <prc_tool.h>
+
+/* 
+ * kernel/osctl.c:
+ * å
+±æãªã¼ãå°æã©ã¤ã
+ */
+#pragma section kernel.srpw
+OSServiceIdType _errorhook_svcid;
+_ErrorHook_Par errorhook_par1;
+_ErrorHook_Par errorhook_par2;
+_ErrorHook_Par errorhook_par3;
+#pragma section default
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool.h	(revision 172)
@@ -0,0 +1,99 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_tool.h 182 2015-06-24 07:14:37Z t_ishikawa $
+ */
+
+/*
+ *		ãã¼ã«ä¾å­ã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ */
+#ifndef TOPPERS_PRC_TOOL_H
+#define TOPPERS_PRC_TOOL_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ * CFGã® pass 1 ã§ STACK_MAGIC_NUMBER ãåå¾ããããã«å®ç¾©
+ */
+#ifdef TOPPERS_CFG1_OUT
+#define CFG_USE_STACKMONITORING
+#endif /* TOPPERS_CFG1_OUT */
+
+/*
+ *  é¢æ°ã®ã¢ã©ã¤ã³åä½
+ *  CXã§ã¯2ãã¤ãå¢çã«ãé
+ç½®ããï¼
+ */
+#define CHECK_FUNC_ALIGN	2
+
+/*
+ *  ã¡ã¢ãªåèª­è¾¼ãå¿
+è¦ãªãã¨ãã³ã³ãã¤ã©ã«ä¼ããããã®ããã¼é¢æ°ï¼prs_support.asmï¼
+ *  CX ã«ã¯GNUã®Asm("":::memory);ç¸å½ããªãããç©ºã®é¢æ°ãå¼ã³åºãï¼
+ */
+extern void v850_memory_changed(void);
+
+/*
+ *  ã¡ã¢ãªã®åèª­ã¿è¾¼ã¿ãå¿
+è¦ãªãã¨ãã³ã³ãã¤ã©ã«ä¼ãã
+ */
+#define V850_MEMORY_CHANGED	v850_memory_changed();
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_TOOL_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool_asm.asm
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool_asm.asm	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_tool_asm.asm	(revision 172)
@@ -0,0 +1,216 @@
+;/*
+ ;*  TOPPERS ATK2
+ ;*      Toyohashi Open Platform for Embedded Real-Time Systems
+ ;*      Automotive Kernel Version 2
+ ;*
+ ;*  Copyright (C) 2015 by Center for Embedded Computing Systems
+ ;*              Graduate School of Information Science, Nagoya Univ., JAPAN
+ ;* 
+ ;*  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ ;*  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ ;*  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ ;*  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ ;*      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ ;*      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ ;*  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ ;*      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ ;*      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ ;*      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ ;*  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ ;*      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ ;*      ã¨ï¼
+ ;*    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ ;*        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ ;*    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ ;*        å ±åãããã¨ï¼
+ ;*  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ ;*      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ ;*      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ ;*      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ ;*      å
+è²¬ãããã¨ï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ;*  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ;*  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ;*  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ;*  ã®è²¬ä»»ãè² ããªãï¼  
+ ;*
+ ;*  $Id: prc_tool_asm.asm 180 2015-06-12 04:46:49Z t_ishikawa $  
+ ;*/
+
+;/*
+ ;*  V850ç¨cal_svcå®è£
+
+ ;*  GHSã«ãããã¤ã³ã©ã¤ã³ã¢ã»ã³ãã©ã§ã¯ï¼ç ´å£ã¬ã¸ã¹ã¿ã®æå®ã
+ ;*  ä¿è¨¼ãããªãããï¼ç´æ¥ã¢ã»ã³ããªã§è¨è¿°ãã
+ ;*/
+$include (v850asm.inc)
+$include (offset.h)
+
+$ifdef USE_ASMCONFIG_INC
+$include (asm_config.inc)
+$endif ;/* USE_ASMCONFIG_INC */
+
+    .section "kernel.text", text
+    .align 4
+;/*
+ ;*  ã¡ã¢ãªåèª­è¾¼ãå¿
+è¦ãªãã¨ãã³ã³ãã¤ã©ã«ä¼ããããã®ããã¼é¢æ°
+ ;*/
+    .public _v850_memory_changed
+    ;/* 
+     ;*  void v850_memory_changed(void)
+     ;*/
+_v850_memory_changed:
+    jmp [lp]
+    nop
+
+    .public _v850_sync_memory
+    ;/* 
+     ;*  void v850_sync_memory(void)
+     ;*/
+_v850_sync_memory:
+    syncm
+    jmp [lp]
+    nop
+
+;/*
+ ;*  ãµã¼ãã¹ã³ã¼ã«ã®åºå
+¥å£
+ ;*    r10 : è¿ãå¤
+ ;*    r11ï¼é¢æ°ã³ã¼ã
+ ;*    r6 - r9 : å¼æ°ï¼4ã¤ã¾ã§ï¼
+ ;*    ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä¿å­ï¼é¢æ°å¼åºãã«ããããã§ã¯ä¿å­æ¸ã¿ï¼
+ ;*    lpä¿å­
+ ;*    epä¿å­(RH850ã§ã¯callee saved)
+ ;*/
+    .section "shared.text", text
+    .align 4
+    .public _cal_svc_0m
+    ;/* 
+     ;* extern int cal_svc_0m(int fncd)
+     ;*   __attribute__((section("text_shared")));
+     ;*/
+_cal_svc_0m:
+    mov r6, r11
+    pushsp ep,lp
+    syscall 1
+    nop
+    popsp ep,lp
+    jmp [lp]
+    nop
+
+    .public _cal_svc_1m
+    ;/* 
+     ;* extern int cal_svc_1m(int par1, int fncd)
+     ;*   __attribute__((section("text_shared")));
+     ;*/
+_cal_svc_1m:
+    mov r7, r11
+    pushsp ep, lp
+    syscall 1
+    nop
+    popsp ep, lp
+    jmp [lp]
+    nop
+
+    .public _cal_svc_2m
+    ;/* 
+     ;* extern int cal_svc_2m(int par1, int par2, int fncd)
+     ;*   __attribute__((section("text_shared")));
+     ;*/
+_cal_svc_2m:
+    mov r8, r11
+    pushsp ep, lp
+    syscall 1
+    nop
+    popsp ep, lp
+    jmp [lp]
+    nop
+
+    .public _cal_svc_3m
+    ;/* 
+     ;* extern int cal_svc_3m(int par1, int par2, int par3, int fncd)
+     ;*   __attribute__((section("text_shared")));
+     ;*/
+_cal_svc_3m:
+    mov r9, r11
+    pushsp ep, lp
+    syscall 1
+    nop
+    popsp ep, lp
+    jmp [lp]
+    nop
+
+    .public _cal_svc_0n
+    ;/* 
+     ;* extern void cal_svc_0n(int fncd)
+     ;*   __attribute__((section("text_shared")));
+     ;*/
+_cal_svc_0n:
+    mov r6, r11
+    pushsp ep, lp
+    syscall 1
+    nop
+    popsp ep, lp
+    jmp [lp]
+    nop
+
+    .public _cal_svc_1n
+    ;/* 
+     ;* extern void cal_svc_1n(int par1, int fncd)
+     ;*   __attribute__((section("text_shared")));
+     ;*/
+_cal_svc_1n:
+    mov r7, r11
+    pushsp ep, lp
+    syscall 1
+    nop
+    popsp ep, lp
+    jmp [lp]
+    nop
+
+    .public _cal_svc_2n
+    ;/* 
+     ;* extern void cal_svc_2n(int par1, int par2, int fncd)
+     ;*   __attribute__((section("text_shared")));
+     ;*/
+_cal_svc_2n:
+    mov r8, r11
+    pushsp ep, lp
+    syscall 1
+    nop
+    popsp ep, lp
+    jmp [lp]
+    nop
+
+    .public _cal_svc_3n
+    ;/* 
+     ;* extern void cal_svc_3n(int par1, int par2, int par3, int fncd)
+     ;*   __attribute__((section("text_shared")));
+     ;*/
+_cal_svc_3n:
+    mov r9, r11
+    pushsp ep, lp
+    syscall 1
+    nop
+    popsp ep, lp
+    jmp [lp]
+    nop
+
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/prc_user.txt	(revision 172)
@@ -0,0 +1,169 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼RH850ãã­ã»ããµä¾å­é¨ããã¥ã¢ã«(CCRHç)ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯RH850ãã­ã»ããµä¾å­é¨ã®CCRHçã®æ
+å ±ãè¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: prc_user.txt 182 2015-06-24 07:14:37Z t_ishikawa $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+RH850ãã­ã»ããµä¾å­é¨ï¼ä»¥ä¸ï¼RH850ä¾å­é¨ï¼ã¯ï¼ã«ããµã¹ã¨ã¬ã¯ãã­ãã¯ã¹
+ã®RH850(V850E3v5)ãç¨ããLSIããµãã¼ããã¦ããï¼
+
+ç¾ç¶ãµãã¼ããã¦ããLSIã¯ï¼æ¬¡ã®éãã§ããï¼RH850ãã­ã»ããµä¾å­é¨ã§ã¯ï¼
+ãã­ã»ããµã¨å²ãè¾¼ã¿ã³ã³ãã­ã¼ã©ã®ã¿ãä½¿ç¨ããããï¼ä»ã®G3M/G3Kã³ã¢ã
+ç¨ããLSIã¸ã®ãã¼ãã£ã³ã°ã¯å®¹æã§ããï¼
+
+ ã»RH850/F1L
+ ã»RH850/F1H 
+
+
+âéçºç°å¢
+
+ã«ã¼ãã«ã®ã³ã³ãã¤ã«ã¯ï¼CS+ ä»å±ã® CCRH ãç¨ãã¦ããï¼åä½ç¢ºèªãè¡ãªã£
+ããã¼ã¸ã§ã³ã¯ï¼ä»¥ä¸ã®ãã®ã§ããï¼
+
+ ã»CCRH V1.01.00
+
+ãããã¬ã¯ï¼CS+ãä½¿ç¨ãã¦åä½ç¢ºèªããã¦ããï¼åä½ç¢ºèªããããã¼ã¸ã§ã³
+ã¯æ¬¡ã®éãã§ããï¼
+
+ ã»V3.00.00
+ 
+ãã«ãã®ããã®ãã­ã¸ã§ã¯ãã¯ï¼CubeSuite+ã«å«ã¾ãã¦ããPytonã¹ã¯ãªãã
+ã«ãã£ã¦ä½æããï¼è©³ç´°ã«é¢ãã¦ã¯ï¼ä»¥ä¸ã®ãã¡ã¤ã«ãåç
+§ã®ãã¨ï¼
+
+ ./ccrh/configure/README.txt
+
+
+âå¨è¾ºåè·¯
+
+ATK2ã®SC1ã«ã¼ãã«ã®ãµã³ãã«ãåä½ãããããã«ã¯ï¼å¨è¾ºåè·¯ã¨ãã¦ï¼UART
+ã¨ã¿ã¤ããå¿
+è¦ã¨ãªãï¼RH850ä¾å­é¨ã§ã¯ï¼UARTã¨ãã¦ã¯ï¼RLIN3xãï¼ã¿ã¤ã
+ã¨ãã¦ã¯ï¼ã¿ã¤ãã¢ã¬ã¤ã¦ãããï¼TAUJnï¼ããµãã¼ããã¦ããï¼ä½¿ç¨ããã
+ã£ãã«ã¯ã¿ã¼ã²ããæ¯ã«ç°ãªãï¼
+
+
+âå²è¾¼ã¿åªå
+åº¦
+
+CFG_INTã«æå®å¯è½ãªå²è¾¼ã¿åªå
+åº¦ã¨ãã¦ã¯ï¼ä»¥ä¸ã®å¤ãè¨­å®å¯è½ã§ããï¼
+
+G3M : -1 ã -15 
+G3K : -1 ã -7
+
+
+âå²è¾¼ã¿å±æ§
+
+CFG_INTã§ãµãã¼ããã¦ããå²è¾¼ã¿å±æ§ã¯ãªãï¼
+
+âæªç»é²ã®å²è¾¼ã¿
+
+æªç»é²ã®å²è¾¼ã¿ãçºçããå ´åã¯ï¼prc_config.c ã§å®ç¾©ããã¦ããï¼
+default_int_handler() ãå¼ã³åºãï¼default_int_handler() ã¯ï¼çºçããå²
+ãè¾¼ã¿ã®å²è¾¼ã¿çªå·ãã³ã³ã½ã¼ã«ã«åºåããå¾ï¼target_exit() ãå¼ã³åºãï¼
+
+âC1ISRã®æ±ã
+
+ã»C1ISRã«ã¯ã¦ã¼ã¶ã«ãã£ã¦ä»¥ä¸ã®å¦çãè¨è¿°ãããã¹ãã§ããï¼
+    ã»C1ISRã§ä½¿ç¨ããã¬ã¸ã¹ã¿ã®å
+å®¹ãéé¿
+    ã»C1ISRãå®è¡ä¸­ã§ãããã¨ãå¤å¥ããããã®æ
+å ±ãä¿å­ãã
+        ã»ç¾å¨ã®å®è£
+ã§ã¯iipm
+    ã»éé¿ããã¬ã¸ã¹ã¿ã®å¾©å¸°
+    ã»eretå½ä»¤ã§C1ISRãçµäºãã
+
+                
+âCPUä¾å¤è¦å æ
+å ±åå¾
+
+ã»CPUä¾å¤çºçããå ´åï¼ã¦ã¼ã¶ã¯ï¼ãã­ãã¯ã·ã§ã³ããCPUä¾å¤æ
+å ±ãåå¾ã§
+  ãï¼åå¾ã§ããã®ã¯ï¼CPUä¾å¤çºçæã®ä»¥ä¸ã®æ
+å ±ãããï¼
+    ã»CPUä¾å¤è¦å çªå·(å¤æ°ï¼v850_cpu_exp_no)
+    ã»ãã­ã°ã©ã ã«ã¦ã³ã¿(å¤æ°ï¼v850_cpu_exp_pc)
+    ã»ã¹ã¿ãã¯ãã¤ã³ã¿(å¤æ°ï¼v850_cpu_exp_sp)
+        ã»æ´ã«ï¼CPUä¾å¤çºçæã«åã¬ã¸ã¹ã¿ã¯ã¹ã¿ãã¯ã«ä¿å­ãã¦ããã®ã§ï¼
+          v850_cpu_exp_spãä½¿ã£ã¦ä¿å­ãã¦ããã¬ã¸ã¹ã¿ã®å¤ãåå¾ããã
+          ã¨ãã§ããï¼ä¿å­ãã¦ããã¬ã¸ã¹ã¿ã¨ã¢ãã¬ã¹ã®æ
+å ±ã¯ã¢ã»ã³ããª
+          ã³ã¼ããåç
+§ããï¼
+                    
+ã»ãããï¼ãã­ãã¯ã·ã§ã³ããã¯ç¡å¹ã®å ´åï¼ä¸è¨ã®CPUä¾å¤è¦å ä¿æç¨å¤æ°ã
+  å®ç¾©ãããªãããï¼ä½¿ç¨ããªãã§ãã ãã(ä½¿ç¨ããå ´åï¼ã³ã³ãã¤ã«ã¨ã©ã¼
+  ã¨ãªã)ï¼
+
+
+âå¶éäºé 
+
+
+epç¸å¯¾ã§ã¢ã¯ã»ã¹ããtinyãã¼ã¿ã»ã¯ã·ã§ã³ã¯ãµãã¼ãããªãï¼
+    
+
+âGCCçã¨ã®é¢ä¿
+
+RHçã¯ï¼Cè¨èªã®ãã¡ã¤ã«ã¯ï¼åºæ¬çã«ã¯GCCçã®ãã®ãç¨ãã¦ããï¼
+prc_support.asmã«ã«é¢ãã¦ã¯ï¼è«ççã«ã¯åãã ãè¨æ³ãç°ãªãããï¼ãã¼
+ã«ã«ããGCCçã®prc_support.Sãå¤æããï¼å¤æã®ããã®ã¹ã¯ãªãããï¼
+../ccrh/gcc2ccrh.rb ã«ããï¼ä½¿ç¨æ¹æ³ã¯æ¬¡ã®éãã§ããï¼
+
+../ccrh/gcc2ccrh.rb xxx.S
+
+    
+âå¤æ´å±¥æ­´
+2015/06/26
+ã»SC3å¯¾å¿
+  
+ä»¥ä¸ï¼
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/start.asm
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/start.asm	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/start.asm	(revision 172)
@@ -0,0 +1,322 @@
+;/*
+ ;*  TOPPERS ATK2
+ ;*      Toyohashi Open Platform for Embedded Real-Time Systems
+ ;*      Automotive Kernel Version 2
+ ;*
+ ;*  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ ;*              Graduate School of Information Science, Nagoya Univ., JAPAN
+ ;*  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ ;*  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ ;*  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ ;*  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ ;*  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ ;*  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ ;*  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ ;*  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ ;*  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ ;*      å
+è²¬ãããã¨ï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ ;*  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ ;*  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ ;*  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ;*  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ;*  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ;*  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ;*  ã®è²¬ä»»ãè² ããªãï¼
+ ;*
+ ;*  $Id: start.asm 187 2015-06-25 03:39:04Z t_ishikawa $
+ ;*/
+
+;/*
+ ;*		ã«ã¼ãã«å¯¾å¿ã®ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ ;*/
+
+#define OMIT_INCLUDE_OS_CFG		;/* Os_Cfg.hã¤ã³ã¯ã«ã¼ãææ­¢ */
+
+$include (v850asm.inc)
+
+	# *****************************************************************************
+# CCRHäºç´ã·ã³ãã«ã®å¤é¨ã©ãã«å®£è¨(gpãepç¨)
+# *****************************************************************************
+	.extern __gp_data, 4
+	.extern __ep_data, 4
+
+# *****************************************************************************
+# ã»ã¯ã·ã§ã³åæåãã¼ãã«
+# *****************************************************************************
+	.section	".INIT_DSEC.const", const
+	.align	4
+	.dw	#__s.data,	#__e.data,	#__s.data.R
+
+	.section	".INIT_BSEC.const", const
+	.align	4
+	.dw	#__s.bss,	#__e.bss
+
+# *****************************************************************************
+# é¢æ°ã®å¤é¨ã©ãã«å®£è¨
+# *****************************************************************************
+    .cseg text
+	.align  2
+	.extern __start
+	.extern __gp_data, 4
+	.extern __ep_data, 4
+    .extern _bsssecinib_table
+    .extern _tnum_bsssec
+    .extern _datasecinib_table
+    .extern _tnum_datasec
+    .extern _syscall_table
+__start:
+	di                                  ;/* å²ãè¾¼ã¿ç¦æ­¢ */
+
+	;/*
+	 ;* åç¨®ãã¤ã³ã¿ã®åæå(SP/TP/EP/GP/CTBP)
+	 ;*/
+	Lea     __ostkpt, r3
+	ld.w	0[r3],r3
+    ;/* =begin modified for SC3 */
+    ;/*
+     ;* ep, ctbpã¯ã¨ããããä½¿ç¨ããªã
+     ;* tp, gpã¯sdataã¢ã¯ã»ã¹ã§ã³ã³ãã¤ã©ãä½¿ç¨ãã
+     ;*/
+	mov 	#__gp_data , gp
+	mov 	#__ep_data , ep
+    ;/*
+     ;*  syscallã®åä½è¨­å®
+     ;*/
+$ifdef __v850e2v3__
+    mov     SYSCALL_SIZE, r6
+    ldsr    r6, sccfg
+    Lea     _syscall_table, r6
+    ldsr    r6, scbp
+$elseif defined(__v850e3v5__)
+    mov     SYSCALL_SIZE, r6
+    ldsr    r6, 11, 1
+    Lea     _syscall_table, r6
+    ldsr    r6, 12, 1
+    syncp
+$endif ;/* __v850e2v3__ */
+
+    ;/* =end modified for SC3 */
+
+$ifdef TOPPERS_USE_HFLOAT
+	;/* 
+	 ;*  FPUãæå¹ã«
+	 ;*/
+	stsr psw, r12       ;/* load psw */
+	mov  0x00010000,r13 ;/* PSW.CU0(PSW[16]) = 1 */
+	or   r13, r12
+	ldsr r12, psw       ;/* store psw */
+$endif ;/* TOPPERS_USE_HFLOAT */
+ 	
+	;/*
+	 ;*  hardware_init_hook ã®å¼åºãï¼0 ã§ãªãå ´åï¼
+	 ;*
+	 ;*  ã¿ã¼ã²ãããã¼ãã¦ã§ã¢ã«ä¾å­ãã¦å¿
+è¦ãªåæåå¦çãããå ´å
+	 ;*  ã¯ï¼hardware_init_hook ã¨ããé¢æ°ãç¨æããï¼
+	 ;*/
+	Lea		_hardware_init_hook, r6
+	cmp		r0, r6
+	be		hardware_init_hook_end
+	jarl	_hardware_init_hook, lp
+hardware_init_hook_end:
+	
+	;/*
+	 ;*  BSSã»ã¯ã·ã§ã³åæå
+     ;*  r0: ã¼ã­ã¬ã¸ã¹ã¿
+	 ;*/
+    mov     r0, r6                  ;/* r6: ãã¼ãã«ã®ã¤ã³ããã¯ã¹ i */
+    Lea     _tnum_bsssec, r7
+    ld.w    0[r7], r7               ;/* r7: ãã¼ãã«ã®è¦ç´ æ° num */
+    Lea     _bsssecinib_table, r8   ;/* r8: ãã¼ãã«ã®ã¢ãã¬ã¹ */
+bss_clear_start:
+    cmp     r7, r6                  ;/* ã«ã¼ãçµäºæ¡ä»¶: i >= num */
+    bnl     bss_clear_end
+    ld.w    0[r8], ep               ;/* ep: bssã®å
+é ­çªå° */
+    ld.w    4[r8], r9               ;/* r9: bssã®çµäºçªå° */
+	cmp     r9, ep                  ;/* bssãç©ºãï¼ */
+	bnl 	bss_clear_start_hook    ;/* ç©ºãªãã°æ¬¡ã®bssã¸ */
+    nop
+bss_clear_body:
+    ;/*
+     ;*  bssã®é åã¯ï¼4byteå¢çã«ã¢ã©ã¤ã³ããã¦ãã
+     ;*  ãã£ã¦ï¼4byteãã¤ãã¼ã¿ãã³ãã¼ãã¦ãã
+     ;*/
+	sst.w   r0, 0[ep]           ;/* bssã®é åã0ã§åæå */
+	add     4, ep              ;/* æ¬¡ã®çªå°ã¸ */
+	cmp     r9, ep              ;/* bssã®çµäºçªå°ã¾ã§æ¥ããï¼ */
+	bl      bss_clear_body      ;/* çµäºçªå°ã§ãªããã°ã«ã¼ã */
+$ifdef BSSSEC_ALIGN_MASK
+    ;/*
+     ;*  å¢çã«ãªãã¾ã§åæåãç¶ãã
+     ;*/
+    mov     BSSSEC_ALIGN_MASK, r10
+bss_clear_body2:
+    tst     r10, ep         ;/* ep & 0xf == 0 ? */
+    bz      bss_clear_start_hook
+	sst.w	r0, 0[ep]       ;/* 0åæå */
+    add     4, ep
+    jr      bss_clear_body2
+$endif ;/* BSSSEC_ALIGN_MASK */
+    nop
+bss_clear_start_hook:
+    add     8, r8 ;/* ãã¼ãã«ã®ã¢ãã¬ã¹ãã¤ã³ã¯ãªã¡ã³ã 4byte * 2 -> 8 */
+    add     1, r6 ;/* ãã¼ãã«ã®ã¤ã³ããã¯ã¹ãã¤ã³ã¯ãªã¡ã³ã: i++ */
+    br      bss_clear_start
+    nop
+bss_clear_end:
+
+$ifndef OMIT_DATA_INIT
+	;/*
+	 ;*  dataã»ã¯ã·ã§ã³ã®åæåï¼ROMåå¯¾å¿ï¼
+	 ;*
+	 ;*/
+    mov     r0, r6                  ;/* r6: ãã¼ãã«ã®ã¤ã³ããã¯ã¹ i */
+    Lea     _tnum_datasec, r7
+    ld.w    0[r7], r7               ;/* r7: ãã¼ãã«ã®è¦ç´ æ° num */
+    Lea     _datasecinib_table, r8  ;/* r8: ãã¼ãã«ã®ã¢ãã¬ã¹ */
+data_init_start:
+    cmp     r7, r6                  ;/* ã«ã¼ãçµäºæ¡ä»¶: i >= num */
+    bnl     data_init_end
+    ld.w    0[r8], ep               ;/* ep : dataã®å
+é ­çªå° */
+    ld.w    4[r8], r9               ;/* r9 : dataã®çµäºçªå° */
+    ld.w    8[r8], r2               ;/* r2: idataã®å
+é ­çªå° */
+	cmp     r9, ep                  ;/* dataãç©ºãï¼ */
+	bnl 	data_init_start_hook    ;/* ç©ºãªãã°æ¬¡ã®dataã¸ */
+    nop
+data_init_body:
+	ld.b	0[r2], r10      ;/* idataã®å¤ãã­ã¼ã */
+	sst.b	r10, 0[ep]      ;/* idataã®å¤ãdataã®ã¢ãã¬ã¹ã¸ã¹ãã¢ */
+	add		1, ep           ;/* dataã®æ¬¡ã®çªå°ã¸ */
+	add		1, r2           ;/* idataã®æ¬¡ã®çªå°ã¸ */
+    cmp     r9, ep          ;/* dataã®çµäºçªå°ã¾ã§æ¥ããï¼ */
+    bl      data_init_body  ;/* çµäºçªå°ã§ãªããã°ã«ã¼ã */
+$ifdef DATASEC_ALIGN_MASK
+    ;/*
+     ;*  å¢çã«ãªãã¾ã§åæåãç¶ãã
+     ;*/
+    mov     DATASEC_ALIGN_MASK, r10
+data_init_body2:
+    tst     r10, ep         ;/* ep & 0xf == 0 ? */
+    bz      data_init_start_hook
+	sst.b	r0, 0[ep]       ;/* 0åæå */
+    add     1, ep
+    jr      data_init_body2
+$endif ;/* DATASEC_ALIGN_MASK */
+    nop
+data_init_start_hook:        
+    add     12, r8  ;/* ãã¼ãã«ã®ã¢ãã¬ã¹ãã¤ã³ã¯ãªã¡ã³ã 4byte * 3 -> 12 */
+    add     1, r6   ;/* ãã¼ãã«ã®ã¤ã³ããã¯ã¹ãã¤ã³ã¯ãªã¡ã³ã: i++ */
+	br		data_init_start         
+    nop
+data_init_end:
+$endif ;/* OMIT_DATA_INIT */
+
+	;/*
+	 ;*  software_init_hook ãå¼åºãï¼0 ã§ãªãå ´åï¼
+	 ;*
+	 ;*  ã½ããã¦ã§ã¢ç°å¢ï¼ç¹ã«ã©ã¤ãã©ãªï¼ã«ä¾å­ãã¦å¿
+è¦ãªåæåå¦
+	 ;*  çãããå ´åã¯ï¼software_init_hook ã¨ããé¢æ°ãç¨æããã°
+	 ;*  ããï¼
+	 ;*/
+
+	Lea		_software_init_hook, r6
+	cmp		r0, r6
+	be		software_init_hook_end
+	jarl	_software_init_hook, r31
+software_init_hook_end:
+
+	;/*
+	 ;*  ã«ã¼ãã«ãèµ·åããï¼
+	 ;*/
+	jarl    _target_hardware_initialize, r31
+	jarl    _main, r31
+;-----------------------------------------------------------------------------
+; mainããæ»ã£ã¦ããå¾ã®å¦ç
+;-----------------------------------------------------------------------------
+__exit:
+	halt
+__startend:
+
+;-----------------------------------------------------------------------------
+; Insted of PROVIDE
+;-----------------------------------------------------------------------------
+$ifndef OMIT_PRC_HARDWARE_INIT_HOOK
+	.public _hardware_init_hook
+_hardware_init_hook:
+	jmp	[lp]
+$endif ;/* OMIT_PRC_HARDWARE_INIT_HOOK */
+
+$ifndef OMIT_PRC_SOFTWARE_INIT_HOOK
+	.public _software_init_hook
+_software_init_hook:
+	jmp	[lp]
+$endif ;/* OMIT_PRC_SOFTWARE_INIT_HOOK */
+
+;-----------------------------------------------------------------------------
+;	dummy section to avoid linker warning
+;-----------------------------------------------------------------------------
+	.section	".data", data
+.L.dummy.data:
+	.section	".bss", bss
+.L.dummy.bss:
+	.section	".sdata", sdata
+.L.dummy.sdata:
+	.section	".sbss", sbss
+.L.dummy.sbss:
+	.section	".const", const
+.L.dummy.const:
+	.section	".stack.bss", bss
+.L.dummy.stack.bss:
+	.section	"RESET", text
+.L.dummy.RESET:
+	.section	"EIINTTBL", const
+	.align 512
+.L.dummy.EIINTTBL:
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/v850asm.inc
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/v850asm.inc	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ccrh/v850asm.inc	(revision 172)
@@ -0,0 +1,124 @@
+; 
+;  TOPPERS ATK2
+;      Toyohashi Open Platform for Embedded Real-Time Systems
+;      Automotive Kernel Version 2
+;
+;  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+;              Graduate School of Information Science, Nagoya Univ., JAPAN
+;
+;  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+;  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+;  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+;  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+;      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+;      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+;  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+;      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+;      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+;      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+;  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+;      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+;      ã¨ï¼
+;    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+;        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+;    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+;        å ±åãããã¨ï¼
+;  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+;      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+;      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+;      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+;      å
+è²¬ãããã¨ï¼
+;
+;  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+;  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+;  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+;  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+;
+;  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+;  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+;  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+;  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+;  ã®è²¬ä»»ãè² ããªãï¼
+;
+;  $Id: v850asm.inc 182 2015-06-24 07:14:37Z t_ishikawa $
+;
+
+;
+;  V850ã¢ã»ã³ãã©ç¨å®ç¾©ãã¡ã¤ã«
+;
+
+__ccrh__      .set    1
+__v850e3v5__  .set    1
+USE_ASMCONFIG_INC .set 1
+PSW_SV        .set    2
+NO_SVC        .set    1
+NO_HOOK_RET   .set    2
+SHUTDOWN_HOOK .set    1
+TMAX_SVCID    .set    63
+FE_MP_MASK    .set    0x9e
+FE_MP_BIT     .set    0x90
+TFN_EXIT_TASK .set    61	;/*(TMAX_SVCID - TARGET_SVC_NUM) */
+PEOB_STACKMONITORING_INTERRUPT  .set 0x80
+PEOB_STACKMONITORING_DISPATCH   .set 0x40
+PEOB_STACKMONITORING_TERMTASK   .set 0x20
+E_OS_PROTECTION_MEMORY .set 14
+E_OS_STACKINSUFFICIENT .set 28
+E_OK          .set    0
+TRUE          .set    1
+SYSCALL_SIZE  .set    2
+
+;/*****************************************************************************/
+;/* ã·ã¹ãã ã¬ã¸ã¹ã¿çªå·ã®å®ç¾©												  */
+;/*****************************************************************************/
+	eipc	.set	0
+	eipsw	.set	1
+	fepc	.set	2
+	fepsw	.set	3
+	ecr		.set	4
+	psw		.set	5
+	sccfg	.set	11
+	scbp	.set	12
+	eiic	.set	13
+	feic	.set	14
+	eiwr	.set	28
+	fewr	.set	29
+
+;/*
+; * ã©ãã«ã­ã¼ã Lea (Load Effective Address)
+; */
+Lea .macro name, destination
+;	ld.w $name, destination
+	mov32	#name, destination
+.endm
+
+;/*
+; *  å
+¨å²è¾¼ã¿ç¦æ­¢ãã¯ã­
+; */
+LOCK_ALL_INT .macro 
+    di
+.endm
+
+;/*
+; *  å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+; */
+UNLOCK_ALL_INT .macro 
+    ei
+.endm
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/MANIFEST	(revision 172)
@@ -0,0 +1,59 @@
+PACKAGE atk2-sc3
+
+conv2cs+.rb
+MANIFEST
+Makefile.prc
+Platform_Types.h
+SmpC1ISR.S
+ldscript.tf
+ostm.arxml
+ostm.c
+ostm.h
+ostm.yaml
+prc.tf
+prc_cfg1_out.h
+prc_common.tf
+prc_config.c
+prc_config.h
+prc_def.csv
+prc_design.txt
+prc_insn.h
+prc_kernel.h
+prc_mem.tf
+prc_mem_common.tf
+prc_mpu.c
+prc_mpu.h
+prc_offset.tf
+prc_opt.tf
+prc_sil.h
+prc_support.S
+prc_svc.h
+prc_syslog.h
+prc_user.txt
+rh850_f1h.c
+rh850_f1h.h
+rh850_f1l.c
+rh850_f1l.h
+rh850_f1l_2m.ld
+start.S
+taua_timer.arxml
+taua_timer.c
+taua_timer.h
+taua_timer.yaml
+tauj_hw_counter.c
+uart.arxml
+uart.c
+uart.h
+uart.yaml
+uart_rlin.c
+uart_rlin.h
+v850.h
+v850asm.inc
+v850e2_fg4_1m.ld
+v850e2_fg4_l_384k.ld
+v850e2_fl4_2m.ld
+v850e2_fx4.c
+v850e2_fx4.h
+v850e2_fx4l.h
+v850e2_px4.h
+v850e2_px4_3507.ld
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/Makefile.prc
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/Makefile.prc	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/Makefile.prc	(revision 172)
@@ -0,0 +1,201 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+#  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+#  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+#  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.prc 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+#
+#		Makefile ã®ãã­ã»ããµä¾å­é¨ï¼V850ç¨ï¼
+#
+
+#
+#  ãã­ã»ããµåï¼éçºç°å¢åã®å®ç¾©
+#
+PRC  = v850
+TOOL = gcc
+
+#
+#  ãã­ã»ããµä¾å­é¨ãã£ã¬ã¯ããªåã®å®ç¾©
+#
+PRCDIR = $(SRCDIR)/arch/$(PRC)_$(TOOL)
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES := $(INCLUDES) -I$(PRCDIR) -I$(SRCDIR)/arch/$(TOOL)
+COPTS := $(COPTS) -mdisable-callt -mno-app-regs -mtda=0
+LIBS := $(LIBS) -lgcc -lc
+LDFLAGS :=  $(LDFLAGS) -Wl,-S # for CuteSuite+ debugger
+
+#
+#  ã¢ã¼ã­ãã¯ãã£ã®åãæ¿ã
+#
+ifeq ($(ARCH),V850E2V3)
+	COPTS := $(COPTS) -mv850e2v3 -D__v850e2v3__ -Wa,-mno-bcond17
+	KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) Os_Lcfg_asm.o
+endif
+ifeq ($(ARCH),V850E3V5)
+	COPTS := $(COPTS) -mv850e3v5
+endif
+ 
+#
+#  ã³ã¢ã¿ã¤ã(å®è£
+)ã«ããåãæ¿ã
+#
+ifeq ($(CORETYPE),RH850G3K)
+	COPTS := $(COPTS) -msoft-float
+endif
+ifeq ($(CORETYPE),RH850G3M)
+	ifeq ($(USE_HARD_FLOAT),true)
+		COPTS := $(COPTS) -mhard-float -DTOPPERS_USE_HFLOAT
+	else
+		COPTS := $(COPTS) -msoft-float
+	endif
+endif
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIR := $(KERNEL_DIR) $(PRCDIR)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) prc_support.o
+# =begin modified for SC3
+KERNEL_COBJS := $(KERNEL_COBJS) prc_config.o prc_mpu.o
+# =end modified for SC3
+
+#
+#  ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã«é¢ããå®ç¾©
+#
+#  ãªã³ã«ã¹ã¯ãªããã«ãSTARTUP(start.o)ããè¨è¿°ããããï¼ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼
+#  ã«ã®ååãHIDDEN_OBJSã«å®ç¾©ããï¼ã¾ãï¼LDFLAGSã«-nostdlibãè¿½å ãã¦ããï¼
+#
+HIDDEN_OBJS = start.o
+
+$(HIDDEN_OBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(HIDDEN_OBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+ 
+# =begin modified for SC3
+#
+#  ãªã³ã¯ã«é¢ããè¨­å®
+#
+
+LDFLAGS := -nostdlib $(LDFLAGS)
+LDFLAGS := -nostartfiles -lgcc -lc $(LDFLAGS)
+CFG1_OUT_LDFLAGS := -nostdlib
+CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS) $(LDFLAGS)
+CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) $(LDFLAGS)
+CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) $(LDFLAGS)
+
+# ã¡ã¢ãªé
+ç½®æ±ºå®åã®æ«å®çãªãªã³ã«ã¹ã¯ãªãã
+CFG2_OUT_LDSCRIPT = cfg2_out.ld
+# ã¡ã¢ãªé
+ç½®æ±ºå®æã®ãªã³ã«ã¹ã¯ãªãã
+CFG3_OUT_LDSCRIPT = cfg3_out.ld
+# æçµçãªãªã³ã«ã¹ã¯ãªãã
+LDSCRIPT = ldscript.ld
+ifeq ($(ARCH),V850E2V3)
+	USE_CFG_PASS3 = true
+endif
+
+$(LDSCRIPT): kernel_cfg.timestamp
+$(CFG2_OUT_LDSCRIPT): kernel_cfg.timestamp
+# =end modified for SC3
+
+#
+#  ä¾å­é¢ä¿ã®å®ç¾©
+#
+cfg1_out.c: $(PRCDIR)/prc_def.csv
+Os_Lcfg.timestamp: $(PRCDIR)/prc.tf
+# =begin modified for SC3
+$(OBJFILE): $(PRCDIR)/prc_mem.tf
+# =end modified for SC3
+offset.h: $(PRCDIR)/prc_offset.tf
+
+#
+#  ã¸ã§ãã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+CFG_TABS := $(CFG_TABS) --cfg1-def-table $(PRCDIR)/prc_def.csv
+
+# =begin added for aktsp
+# vpath %.c $(SRCDIR)/aktsp/library/arch/v850e2/gcc/memory_protection/
+# 
+# KERNEL_COBJS := $(KERNEL_COBJS) t_osap1_share.o t_osap1.o nt_osap1_share.o nt_osap1.o nt_osap2_share.o nt_osap2.o common.o aktsp_target_lib_mem.o
+# =end added for aktsp
+
+
+
+#
+#  CS+ç¨ã«å¤æ
+#
+cs: $(OBJFILE)
+	v850-elf-objdump.exe -h $(OBJFILE) | $(SRCDIR)/arch/v850_gcc/conv2cs+.rb  $(OBJFILE)
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/Platform_Types.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/Platform_Types.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/Platform_Types.h	(revision 172)
@@ -0,0 +1,150 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Platform_Types.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		AUTOSAR platform types header file
+ */
+
+#ifndef TOPPERS_PLATFORM_TYPES_H
+#define TOPPERS_PLATFORM_TYPES_H
+
+/*
+ *  Symbol definitions - general
+ */
+#define CPU_TYPE_8		UINT_C(8)
+#define CPU_TYPE_16		UINT_C(16)
+#define CPU_TYPE_32		UINT_C(32)
+
+#define MSB_FIRST		UINT_C(0)
+#define LSB_FIRST		UINT_C(1)
+
+#define HIGH_BYTE_FIRST	UINT_C(0)
+#define LOW_BYTE_FIRST	UINT_C(1)
+
+#ifndef TRUE
+#define TRUE			UINT_C(1)
+#endif /* TRUE */
+
+#ifndef FALSE
+#define FALSE			UINT_C(0)
+#endif /* FALSE */
+
+/*
+ *  Symbol definitions - platform
+ */
+#define CPU_TYPE		(CPU_TYPE_32)
+#define CPU_BIT_ORDER	(MSB_FIRST)
+#define CPU_BYTE_ORDER	(LOW_BYTE_FIRST)
+
+/*
+ *  Stack definitions - platform
+ */
+/* =begin modified for SC3 */
+#define DEFINE_VAR_SEC_NOBITS(type, var, sec)	type __attribute__((section(sec))) var
+#define DEFINE_VAR_SSTACK(type, var)			type __attribute__((section(".prsv_kernel"), aligned(4))) var
+#define DEFINE_VAR_USTACK(type, var, sec)		type __attribute__((section(sec), aligned(64))) var
+/* =end modified for SC3 */
+
+/*
+ *  Type definitions
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+#include <stdint.h>
+
+typedef unsigned char boolean;
+
+typedef char				char8;
+typedef unsigned char		uint8;
+typedef signed char			sint8;
+typedef unsigned short		uint16;
+typedef signed short		sint16;
+typedef unsigned int		uint32;
+typedef signed int			sint32;
+typedef unsigned long long	uint64;
+typedef signed long long	sint64;
+
+typedef unsigned long	uint8_least;
+typedef unsigned long	uint16_least;
+typedef unsigned long	uint32_least;
+typedef signed long		sint8_least;
+typedef signed long		sint16_least;
+typedef signed long		sint32_least;
+
+typedef float	float32;
+typedef double	float64;
+
+typedef uint32	uintptr;                /* ãã¤ã³ã¿ãæ ¼ç´ã§ããç¬¦å·ç¡ãæ´æ° */
+typedef sint32	sintptr;                /* ãã¤ã³ã¿ãæ ¼ç´ã§ããç¬¦å·ä»ãæ´æ° */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PLATFORM_TYPES_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/SmpC1ISR.S
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/SmpC1ISR.S	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/SmpC1ISR.S	(revision 172)
@@ -0,0 +1,179 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: SmpC1ISR.S 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+#define TOPPERS_MACRO_ONLY
+
+#define UINT_C(val)	(val)
+#define CAST(type, val)	(val)	/* åã­ã£ã¹ããè¡ããã¯ã­ */
+
+#include "v850asm.inc"
+#include "target_test.h"
+#include "kernel/kernel_impl.h"
+#include "target_timer.h"
+#include "v850.h"
+
+.global C1ISRMainSmpC1ISR
+.global _C1ISRMainSmpC1ISR
+
+C1ISRMainSmpC1ISR:
+_C1ISRMainSmpC1ISR:
+
+	/* ã¬ã¸ã¹ã¿ã®ä¿å­ */
+	addi    -80, sp, sp
+	st.w    ep, 12[sp]
+	mov     sp, ep 
+	sst.w   r1, 72[ep]
+	sst.w   r6, 68[ep]
+	sst.w   r7, 64[ep]
+	sst.w   r8, 60[ep]
+	sst.w   r9, 56[ep]
+	sst.w	r10, 52[ep]
+	sst.w	r11, 48[ep]
+	sst.w	r12, 44[ep]
+	sst.w   r13, 40[ep]
+	sst.w   r14, 36[ep]
+	sst.w   r15, 32[ep]
+	sst.w   r16, 28[ep]
+	sst.w   r17, 24[ep]
+	sst.w   r18, 20[ep]
+	sst.w   r19, 16[ep]
+	sst.w   r31, 8[ep]
+
+	/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®EIPCã¨EIPSWãä¿å­ */
+	stsr    eipc, r6
+	sst.w   r6, 4[ep]
+	stsr    eipsw, r6
+	sst.w   r6, 0[ep]
+
+    /* debug led4 on */
+    Lea     P24, r6
+    ld.h    0[r6], r7             /* P24 -> r7 */
+    mov     ~0x0800, r8
+    and     r7, r8
+    st.h    r8, 0[r6]
+
+	UNLOCK_ALL_INT      /* å
+¨å²è¾¼ã¿è§£é¤ */
+
+	/* å²è¾¼ã¿çºçåã®callevel_statãã¹ã¿ãã¯ã«ä¿å­ */
+	Lea     _callevel_stat, r6
+	ld.h    0[r6], r7
+	sst.w   r7, 76[ep]
+
+	/* callevel_statã«C1ISRãã»ãã */
+
+	Lea     TSYS_ISR1, r8
+	or      r8, r7
+	st.h    r7, 0[r6]
+
+	/*
+	 *  ã¿ã¤ãå²è¾¼ã¿ãã¯ãªã¢
+	 */
+    Lea     ICTAUA0I(TAUA_CH7), r6
+    ld.h    0[r6], r7
+    mov     ~EIRFn, r8
+    and      r8, r7
+    st.h    r7, 0[r6]
+
+/*	jarl	_c1isr_syslog, r31  FIXME */
+
+	Lea     _callevel_stat, r6
+	sld.w    76[ep], r7
+	st.h    r7, 0[r6]
+
+	LOCK_ALL_INT      /* å
+¨å²è¾¼ã¿è¨­å® */
+
+   /* debug led4 off */
+    Lea     P24, r6
+    ld.h    0[r6], r7           /* P24 -> r7 */
+    mov     0x0800, r8
+    or     r7, r8
+    st.h    r8, 0[r6]
+
+	/* ã¬ã¸ã¹ã¿ã®å¾©å¸° */
+	mov     sp, ep
+	sld.w    4[ep], r10
+	ldsr    r10, eipc
+	sld.w   0[ep], r10
+	ldsr    r10, eipsw
+	sld.w   72[ep], r1
+	sld.w   68[ep], r6
+	sld.w   64[ep], r7
+	sld.w   60[ep], r8
+	sld.w   56[ep], r9
+	sld.w   52[ep], r10
+	sld.w   48[ep], r11
+	sld.w   44[ep], r12
+	sld.w   40[ep], r13
+	sld.w   36[ep], r14
+	sld.w   32[ep], r15
+	sld.w   28[ep], r16
+	sld.w   24[ep], r17
+	sld.w   20[ep], r18
+	sld.w   16[ep], r19
+	sld.w    8[ep], r31
+	addi    80, ep, sp
+	sld.w   12[ep], r30
+	eiret
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/conv2cs+.rb
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/conv2cs+.rb	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/conv2cs+.rb	(revision 172)
@@ -0,0 +1,17 @@
+#!ruby -Ku
+if ARGV.size != 1 then
+    puts "Argment Error!"
+    exit
+end
+
+while str = STDIN.gets
+    if /^.*\.data\s+[\dabcdef]+\s+[\dabcdef]+\s+([\dabcdef]+)\s+.*/ =~ str
+        command = 'v850-elf-objcopy  -R .bss ' + ARGV[0]
+        puts command
+        system(command)        
+        command = 'v850-elf-objcopy  --change-section-vma .data=0x' + $1 + ' ' + ARGV[0]
+        puts command
+        system(command)
+        exit(0)
+    end
+end
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ldscript.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ldscript.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ldscript.tf	(revision 172)
@@ -0,0 +1,359 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2007-2013 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2013 by FUJISOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by FUJITSU VLSI LIMITED, JAPAN
+$  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2013 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2013 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2013 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2013 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  AUTOSARï¼AUTomotive Open System ARchitectureï¼ã¯ï¼AUTOSARä»æ§ã«åºã¥
+$  ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«
+$  ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: ldscript.tf 117 2014-12-10 03:58:03Z t_ishikawa $
+$
+
+$ =====================================================================
+$ ãªã³ã«ã¹ã¯ãªããã®çæ
+$ =====================================================================
+$FILE "cfg3_out.ld"$
+
+/* This file is generated by v850_gcc/ldscript.tf */$NL$
+
+$
+$  ã¿ã¼ã²ããä¾å­ã®OUTPUTè¨è¿°ã®çæ
+$
+$IF ISFUNCTION("GENERATE_OUTPUT")$
+	$GENERATE_OUTPUT()$
+$END$
+
+$
+$  MEMORYè¨è¿°ã®çæ
+$
+MEMORY {$NL$
+$FOREACH reg REG.ORDER_LIST$
+	$TAB$$FORMAT("%s : ORIGIN = 0x%x, LENGTH = 0x%x",
+				REG.REGNAME[reg], +REG.BASE[reg], +REG.SIZE[reg])$$NL$
+$END$
+$IF ISFUNCTION("GENERATE_MEMORY")$
+	$GENERATE_MEMORY()$
+$END$
+}$NL$
+$NL$
+
+$
+$  ã¿ã¼ã²ããä¾å­ã®PROVIDEè¨è¿°ã®çæ
+$
+$IF ISFUNCTION("GENERATE_PROVIDE")$
+	$GENERATE_PROVIDE()$
+$END$
+
+$
+$  å¤æ°ã®åæå
+$
+$reset_lma = 0$
+$provide_gp = 0$
+
+$
+$  ãªã³ã¯æå®ã®çæ
+$
+SECTIONS {$NL$
+$ ã¿ã¼ã²ããä¾å­ã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$IF ISFUNCTION("GENERATE_SECTION_FIRST")$
+	$GENERATE_SECTION_FIRST()$
+$END$
+
+$IF TOPPERS_LABEL_ASM$
+	$PREFIX_START = "___start_"$
+	$PREFIX_END   = "___end_"$
+	$PREFIX_LIMIT = "___limit_"$
+$ELSE$
+	$PREFIX_START = "__start_"$
+	$PREFIX_END   = "__end_"$
+	$PREFIX_LIMIT = "__limit_"$
+$END$
+
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid]$
+$		// ã»ã¯ã·ã§ã³ã®éå§è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+			$TAB$.$MO.SLABEL[moid]$$SPC$
+			$IF (MO.SEFLAG[moid] & 0x40) == 0$
+                $IF LENGTH(MO.REALBASE[moid])$
+				    ($FORMAT("0x%x", MO.REALBASE[moid])$)$SPC$
+                $ELSE$
+				    ALIGN($TARGET_SEC_ALIGN_STR$)$SPC$
+                $END$
+			$ELIF LENGTH(MO.REALBASE[moid])$
+                ($FORMAT("0x%x", MO.REALBASE[moid])$)$SPC$
+			$END$
+			$IF (MO.MEMATR[moid] & TA_NOWRITE) == 0
+							&& (MO.MEMATR[moid] & TA_MEMINI) == 0$
+				(NOLOAD)$SPC$
+			$END$
+            :$SPC$
+			$IF !EQ(MO.ILABEL[moid], "")$
+				ALIGN($TARGET_SEC_ALIGN_STR$)$SPC$
+			$END$
+			{
+            $IF LENGTH(MO.COMMENT[moid])$
+                $SPC$/* $MO.COMMENT[moid]$ */$SPC$
+            $END$
+            $NL$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®éå§ã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x400) != 0$
+			$IF ISFUNCTION("GENERATE_GP_LABEL")$
+				$GENERATE_GP_LABEL()$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x100) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$TAB$$PREFIX_START$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$TAB$$PREFIX_START$ssrpw_all = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x10) != 0$
+			$IF !EQ(MO.PLABEL[moid], "")$
+				$TAB$$TAB$$PREFIX_START$$MO.PLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+			$IF !EQ(MO.SLABEL[moid], ALT(omit_start_slabel,""))$
+				$TAB$$TAB$$PREFIX_START$$MO.SLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x04) != 0$
+			$IF (MO.SEFLAG[moid] & 0x01) == 0$
+				$NL$
+			$END$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])
+					&& !EQ(MO.MLABEL[moid], ALT(omit_start_mlabel,""))$
+				$TAB$$TAB$$PREFIX_START$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+			$TAB$$TAB$
+		$END$
+
+$		// ãªã³ã¯ãããã¡ã¤ã«è¨è¿°ã®çæ
+		$section_dscr = SECTION_DESCRIPTION(MO.SECTION[moid])$
+		$IF MO.TYPE[moid] == TOPPERS_ATTMOD$
+			$IF EQ(MO.MODULE[moid], "kernel_mem.o")$
+				kernel_mem3.o
+			$ELSE$
+				$MO.MODULE[moid]$
+			$END$
+			($section_dscr$)$SPC$
+		$ELIF MO.TYPE[moid] == TOPPERS_ATTSEC$
+			*($section_dscr$)$SPC$
+		$ELSE$
+$			// ã¦ã¼ã¶ã¹ã¿ãã¯é å
+			Os_Lcfg.o($section_dscr$)$SPC$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®çµäºã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x08) != 0$
+			$NL$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])$
+				$TAB$$TAB$$PREFIX_END$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$$TAB$$PREFIX_END$$MO.SLABEL[moid]$ = .;$NL$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$TAB$$PREFIX_END$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$TAB$$PREFIX_END$ssrpw_all = .;$NL$
+			$END$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã®çµäºè¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$} > $REG.REGNAME[MO.MEMREG[moid]]$
+			$IF !OMIT_IDATA$
+				$IF !EQ(MO.ILABEL[moid], "")$
+					$SPC$AT > $REG.REGNAME[STANDARD_ROM]$
+					$reset_lma = 1$
+				$ELIF reset_lma$
+					$SPC$AT > $REG.REGNAME[MO.MEMREG[moid]]$
+					$reset_lma = 0$
+				$END$
+			$END$$NL$
+			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+				$TAB$$PREFIX_START$$MO.ILABEL[moid]$ = LOADADDR(.$MO.SLABEL[moid]$);$NL$
+			$END$
+		$END$
+
+$		// ã¢ã©ã¤ã³è¨è¿°ã®çæ
+        $IF LENGTH(MO.REALALIGN[moid])$
+			$TAB$. = ALIGN($FORMAT("0x%x", +MO.REALALIGN[moid])$); /* sdata_shared_align */$NL$
+		$ELIF (MO.SEFLAG[moid] & 0x20) != 0$
+			$TAB$. = ALIGN($TARGET_PAGE_SIZE_STR$);$NL$
+		$ELIF (MO.SEFLAG[moid] & 0x08) != 0$
+$			// ã»ã¯ã·ã§ã³ãç¶ç¶ãã¦ããå ´åã«ã¯ï¼TABã1ã¤åºå
+			$IF (MO.SEFLAG[moid] & 0x02) == 0$$TAB$$END$
+			$TAB$. = ALIGN($TARGET_SEC_ALIGN_STR$);$NL$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®ä¸éã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x08) != 0$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])$
+$				// ã»ã¯ã·ã§ã³ãç¶ç¶ãã¦ããå ´åã«ã¯ï¼TABã1ã¤åºå
+				$IF (MO.SEFLAG[moid] & 0x02) == 0$$TAB$$END$
+				$TAB$$PREFIX_LIMIT$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$$PREFIX_LIMIT$$MO.SLABEL[moid]$ = .;$NL$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x20) != 0$
+			$IF !EQ(MO.PLABEL[moid], "")$
+				$TAB$$PREFIX_LIMIT$$MO.PLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$PREFIX_LIMIT$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$PREFIX_LIMIT$ssrpw_all = .;$NL$
+			$END$
+		$END$
+
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$NL$
+		$END$
+
+$		// ã¡ã¢ãªãªã¼ã¸ã§ã³æ«ã§ã¢ã©ã¤ã³ãããããã®ããã¼ã»ã¯ã·ã§ã³ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x80) != 0$
+			$TAB$.$REG.REGNAME[MO.MEMREG[moid]]$_align$SPC$
+            $IF LENGTH(REG.LIMIT_ALIGN[MO.MEMREG[moid]])$
+                ($FORMAT("0x%x", REG.LIMIT_ALIGN[MO.MEMREG[moid]])$)$SPC$
+            $ELSE$
+                ALIGN($TARGET_SEC_ALIGN_STR$)$SPC$
+            $END$
+            : ALIGN($TARGET_SEC_ALIGN_STR$) {$NL$
+			$TAB$$TAB$__$REG.REGNAME[MO.MEMREG[moid]]$_align = .;$NL$
+$           // ä¸­èº«ãç©ºã®åºåã»ã¯ã·ã§ã³ã¯ãªã³ã«ã«ãã£ã¦ç¡è¦ãããããï¼
+$           // ããã¼ã®ãã¼ã¿ãå
+¥ãã¦ãã
+            $TAB$$TAB$LONG(1); /*dummy*/$NL$
+			$TAB$} > $REG.REGNAME[MO.MEMREG[moid]]$ AT > $REG.REGNAME[MO.MEMREG[moid]]$$NL$
+			$TAB$. = ALIGN($TARGET_SEC_ALIGN_STR$);$NL$
+			$TAB$___$REG.REGNAME[MO.MEMREG[moid]]$_align = .;$NL$
+			$NL$
+		$END$
+	$END$
+$END$
+
+$FOREACH lsid RANGE(1, numls)$
+	$TAB$$LNKSEC.SECTION[lsid]$ : {$NL$
+	$TAB$$TAB$*($LNKSEC.SECTION[lsid]$)$NL$
+	$TAB$} > $REG.REGNAME[LNKSEC.MEMREG[lsid]]$ AT > $REG.REGNAME[LNKSEC.MEMREG[lsid]]$$NL$
+	$NL$
+$END$
+
+$	// C++testã§å¿
+è¦ãªæ¨æºã©ã¤ãã©ãªã§ä½¿ç¨ããã»ã¯ã·ã§ã³
+$TAB$.dummy_rom_for_cpptest : {$NL$
+$TAB$$TAB$*(.ctors.65535) *(.eh_frame)$NL$
+$TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+$TAB$. = ALIGN(64);$NL$$NL$
+$TAB$.dummy_ram_for_cpptest : {$NL$
+$TAB$$TAB$_end = .;$NL$
+$TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+$TAB$. = ALIGN(64);$NL$$NL$
+
+$TAB$/DISCARD/ : {$NL$
+$TAB$$TAB$*(.rel.dyn)$NL$
+$TAB$}$NL$
+$NL$
+
+$TAB$/* DWARF debug sections.$NL$
+$TAB$Symbols in the DWARF debugging sections are relative to $NL$
+$TAB$the beginning of the section so we begin them at 0.  */$NL$
+$NL$
+$TAB$/* DWARF 1 */$NL$
+$TAB$.debug          0 : { *(.debug) }$NL$
+$TAB$.line           0 : { *(.line) }$NL$
+$NL$
+$TAB$/* GNU DWARF 1 extensions */$NL$
+$TAB$.debug_srcinfo  0 : { *(.debug_srcinfo) }$NL$
+$TAB$.debug_sfnames  0 : { *(.debug_sfnames) }$NL$
+$NL$
+$TAB$/* DWARF 1.1 and DWARF 2 */$NL$
+$TAB$.debug_aranges  0 : { *(.debug_aranges) }$NL$
+$TAB$.debug_pubnames 0 : { *(.debug_pubnames) }$NL$
+$NL$
+$TAB$/* DWARF 2 */$NL$
+$TAB$.debug_info     0 : { *(.debug_info) }$NL$
+$TAB$.debug_abbrev   0 : { *(.debug_abbrev) }$NL$
+$TAB$.debug_line     0 : { *(.debug_line) }$NL$
+$TAB$.debug_frame    0 : { *(.debug_frame) }$NL$
+$TAB$.debug_str      0 : { *(.debug_str) }$NL$
+$TAB$.debug_loc      0 : { *(.debug_loc) }$NL$
+$TAB$.debug_macinfo  0 : { *(.debug_macinfo) }$NL$
+$TAB$.debug_ranges   0 : { *(.debug_ranges) }$NL$
+$NL$
+$TAB$/* SGI/MIPS DWARF 2 extensions */$NL$
+$TAB$.debug_weaknames 0 : { *(.debug_weaknames) }$NL$
+$TAB$.debug_funcnames 0 : { *(.debug_funcnames) }$NL$
+$TAB$.debug_typenames 0 : { *(.debug_typenames) }$NL$
+$TAB$.debug_varnames  0 : { *(.debug_varnames) }$NL$
+$NL$
+}$NL$
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.arxml	(revision 172)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.0.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>target_timer_hdr</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIsr</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptNumber</DEFINITION-REF>
+									<VALUE>OSTM_IRQ</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptPriority</DEFINITION-REF>
+									<VALUE>INTPRI_TIMER</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrStackSize</DEFINITION-REF>
+									<VALUE>592</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrCategory</DEFINITION-REF>
+									<VALUE>CATEGORY_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SysTimerCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>999</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.c	(revision 172)
@@ -0,0 +1,174 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: ostm.c 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+#include "kernel_impl.h"
+#include "target_timer.h"
+#include "ostm.h"
+#include "Os_Lcfg.h"
+
+/*
+ *  ç¾å¨ã®ã·ã¹ãã æå»ï¼åä½: ããªç§ï¼
+ *
+ *  å³å¯ã«ã¯ï¼åã®ã¿ã¤ã ãã£ãã¯ã®ã·ã¹ãã æå»
+ */
+SystemTimeMsType current_time;
+
+/*
+ *	å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+ISR(target_timer_hdr);
+
+/*
+ *  ãã¤ã¯ã­ç§åä½ã§ã®æå»ãåå¾
+ */
+SystemTimeUsType
+get_tim_utime(void)
+{
+	SystemTimeUsType	utime;
+	SystemTimeMsType	mtime;
+	TickType			clock1, clock2;
+	boolean				ireq;
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+	mtime = current_time;
+	clock1 = target_timer_get_current();
+	ireq = target_timer_probe_int();
+	clock2 = target_timer_get_current();
+	SIL_UNL_INT();
+	utime = ((SystemTimeUsType) mtime) * 1000U;
+
+	if ((ireq != FALSE) && (clock2 >= clock1)) {
+		/*
+		 *  å²è¾¼ã¿ãå
+¥ã£ã¦ããï¼clock2ã®æ¹ãclock1ã®æ¹ãå¤§ããã¾ãã¯ç­ããå ´åã¯ï¼
+		 *  current_time ãå²è¾¼ã¿ã«ããæ´æ°ããã¦ããªããã¤ï¼clock1ã¯ãªã¼ããã­ã¼å¾
+		 *  ã®å¤ã§ããããï¼utimeã«1mè¿½å ããï¼clock1ã®èª­ã¿è¾¼ã¿ï¼å²è¾¼ã¿ã®ãã§ãã¯ï¼
+		 *  clock2ã®èª­ã¿è¾¼ã¿ã1Î¼sä»¥ä¸ã§å®è¡å¯è½ãªãã­ã»ããµãå­å¨ããããï¼ç­å·ä»ã
+		 *  ã§æ¯è¼ãã¦ããï¼
+		 */
+		utime += 1000U;
+	}
+	utime += TO_USEC(clock1);
+
+	return(utime);
+}
+
+/*
+ *  OSTMã®åæå
+ */
+void
+target_timer_initialize(void)
+{
+	/* åæ­¢ */
+	sil_wrb_mem((void *) (OSTM_TT_B), 0x01);
+
+	/* ã¤ã³ã¿ã¼ãã«ã»ã¿ã¤ãã»ã¢ã¼ã */
+	sil_wrb_mem((void *) (OSTM_CTL_B), 0x00);
+
+	/* ã³ã³ãã¢ã¬ã¸ã¹ã¿ã®è¨­å® */
+	sil_wrw_mem((void *) (OSTM_CMP_W), TIMER_CLOCK);
+
+	/* ã¹ã¿ã¼ã */
+	sil_wrb_mem((void *) (OSTM_TS_B), 0x01);
+}
+
+/*
+ *  OSTMã®åæ­¢
+ */
+void
+target_timer_terminate(void)
+{
+	/* åæ­¢ */
+	sil_wrb_mem((void *) (OSTM_TT_B), 0x01);
+
+	/* å²è¾¼ã¿ã®ç¦æ­¢ã¨ã¯ãªã¢ */
+	x_disable_int(OSTM_IRQ);
+	x_clear_int(OSTM_IRQ);
+}
+
+/*
+ *  target_timer.arxmlãä½¿ç¨ããªãå ´åã®å¯¾å¦
+ */
+#ifndef SysTimerCnt
+#define SysTimerCnt		UINT_C(0)
+#endif /* SysTimerCnt */
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿ãã³ãã©
+ */
+ISR(target_timer_hdr)
+{
+	StatusType ercd;
+
+	/* current_timeãæ´æ°ãã */
+	current_time++;
+
+	/*
+	 *  ã«ã¦ã³ã¿å ç®éç¥å¦çå®è¡
+	 */
+	ercd = IncrementCounter(SysTimerCnt);
+	/* ã¨ã©ã¼ãªã¿ã¼ã³ã®å ´åã¯ã·ã£ãããã¦ã³ */
+	if (ercd != E_OK) {
+		ShutdownOS(ercd);
+	}
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.h	(revision 172)
@@ -0,0 +1,131 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  @(#) $Id: ostm.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+#ifndef TOPPERS_OSTM_H
+#define TOPPERS_OSTM_H
+
+#include "prc_sil.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¿ã¤ãå¤ã®å
+é¨è¡¨ç¾ã¨ãã¤ã¯ã­ç§åä½ã¨ã®å¤æ
+ *
+ */
+#define TO_USEC(clock)	((((SystemTimeUsType) (clock)) * 1000U) / TIMER_CLOCK)
+
+/*
+ *  ã¿ã¤ãå¤ã®å
+é¨è¡¨ç¾ã¨100ããç§åä½ã¨ã®å¤æ
+ *
+ */
+#define TO_100NSEC(clock)	((((SystemTimeUsType) (clock)) * 10000U) / TIMER_CLOCK)
+
+/*
+ *  ãã¤ã¯ã­ç§åä½ã§ã®æå»ãåå¾
+ */
+extern SystemTimeUsType get_tim_utime(void);
+
+/*
+ *  100ããç§åä½ã§ã®æå»ãåå¾
+ */
+extern SystemTime100NsType get_tim_100ntime(void);
+
+/*
+ *  ã¿ã¤ãã®èµ·åå¦ç
+ *
+ *  ã¿ã¤ããåæåãï¼å¨æçãªã¿ã¤ãå²è¾¼ã¿è¦æ±ãçºçããã
+ */
+extern void target_timer_initialize(void);
+
+/*
+ *  ã¿ã¤ãã®åæ­¢å¦ç
+ *
+ *  ã¿ã¤ãã®åä½ãåæ­¢ããã
+ */
+extern void target_timer_terminate(void);
+
+/*
+ *  ã¿ã¤ãã®ç¾å¨å¤ã®èª­åºã
+ */
+LOCAL_INLINE TickType
+target_timer_get_current(void)
+{
+	TickType count;
+
+	count = sil_rew_mem((void *) (OSTM_CNT_W));
+
+	return(TIMER_CLOCK - count);
+}
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿è¦æ±ã®ãã§ãã¯
+ */
+LOCAL_INLINE boolean
+target_timer_probe_int(void)
+{
+	return(x_probe_int(OSTM_IRQ));
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_OSTM_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/ostm.yaml	(revision 172)
@@ -0,0 +1,81 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: ostm.yaml 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    target_timer_hdr:
+      DefinitionRef: OsIsr
+      OsIsrInterruptNumber: OSTM_IRQ
+      OsIsrInterruptPriority: INTPRI_TIMER
+      OsIsrStackSize: 0x250
+      OsIsrCategory: CATEGORY_2
+    SysTimerCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 999
+      OsCounterMinCycle: 1
+      OsCounterTicksPerBase: 1
+      OsCounterType: SOFTWARE
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc.tf	(revision 172)
@@ -0,0 +1,347 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+$  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: prc.tf 189 2015-06-26 01:54:57Z t_ishikawa $
+$
+
+$
+$     ãã¹2ã®ã¢ã¼ã­ãã¯ãã£ä¾å­ãã³ãã¬ã¼ãï¼V850ç¨ï¼
+$
+
+$ 
+$  kernel/kernel.tf ã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åãç¢ºä¿ããã³ã¼ããåºåãã
+$  ARGV[1]ï¼ã¿ã¹ã¯ID
+$  ARGV[2]ï¼ã¹ã¿ãã¯ãµã¤ãº
+$ 
+$FUNCTION ALLOC_USTACK$
+    StackType _kernel_ustack_$ARGV[1]$[COUNT_STK_T($ARGV[2]$)]
+    $SPC$__attribute__((section($FORMAT("\".user_stack.%s\"", ARGV[1])$)));$NL$
+
+    $TSK.TINIB_USTKSZ[ARGV[1]] = VALUE(FORMAT("ROUND_STK_T(%s)", ARGV[2]), +ARGV[2])$
+    $TSK.TINIB_USTK[ARGV[1]] = FORMAT("_kernel_ustack_%s", ARGV[1])$
+$END$
+
+$ 
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã»ã¯ã·ã§ã³åãè¿ã
+$  ARGV[1]ï¼ã¿ã¹ã¯ID
+$ 
+$FUNCTION SECTION_USTACK$
+    $RESULT = FORMAT(".user_stack.%s", ARGV[1])$
+$END$
+
+$
+$  ã¦ã¼ã¶ã¹ã¿ãã¯ã®ã¢ã©ã¤ã¡ã³ãå¶ç´ã«åããããµã¤ãºãè¿ã
+$  ARGV[1]ï¼ã¹ã¿ãã¯ãµã¤ãºï¼ã¢ã©ã¤ã³åï¼
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION USTACK_ALIGN_SIZE$
+	$RESULT = (ARGV[1] + CHECK_USTKSZ_ALIGN - 1) & ~(CHECK_USTKSZ_ALIGN - 1)$
+$END$
+
+$
+$  åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ç¢ºä¿
+$  ARGV[1]ï¼å
+±æã¹ã¿ãã¯å
+$  ARGV[2]ï¼å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+$  ARGV[3]ï¼ã¹ã¿ãã¯ãµã¤ãº(ã¢ã©ã¤ã¡ã³ãèª¿æ´æ¸ã¿)
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION ALLOC_SHARED_USTACK$
+	StackType $ARGV[1]$[COUNT_STK_T(ROUND_STK_T($ARGV[3]$))]
+	$SPC$__attribute__((section($FORMAT("\".shared_user_stack.%s\"", ARGV[2])$)));$NL$
+$END$
+
+$
+$  åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ã»ã¯ã·ã§ã³å
+$  ARGV[1]ï¼å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION SECTION_SHARED_USTACK$
+	$RESULT = FORMAT(".shared_user_stack.%s", ARGV[1])$
+$END$
+
+$ 
+$  OSAPåæåã³ã³ãã­ã¹ããã­ãã¯ã®ããã®å®£è¨
+$ 
+$FUNCTION PREPARE_OSAPINICTXB$
+$   ãã¼ã¿ã»ã¯ã·ã§ã³åæåãã¼ãã«ãROMã«é
+ç½®ãã
+$   rosdataé åã¯RAMã«é
+ç½®ãããããï¼ãã¼ã¿ã»ã¯ã·ã§ã³åæåãã¼ãã«ãsdataåããã¨
+$   ãã¼ã¿ã»ã¯ã·ã§ã³ã®åæåã«å¤±æãã
+    extern const uint32 __attribute__((section(".rodata_kernel"), aligned(4))) tnum_datasec;$NL$
+    extern const DATASECINIB __attribute__((section(".rodata_kernel"), aligned(4))) datasecinib_table[];$NL$
+    extern const uint32 __attribute__((section(".rodata_kernel"), aligned(4))) tnum_bsssec;$NL$
+    extern const BSSSECINIB __attribute__((section(".rodata_kernel"), aligned(4))) bsssecinib_table[];$NL$
+$END$
+
+$FUNCTION ASM_MACRO$
+	.macro $ARGV[1]$ $ARGV[2]$
+$END$
+
+$INCLUDE "arch/v850_gcc/prc_common.tf"$
+
+$IF __v850e2v3__$
+
+$ å²è¾¼ã¿ãã¯ã¿ã¨åå²è¾¼ã¿å
+¥å£å¦ç(V850E2V3ã®ã¿)
+
+$FILE "Os_Lcfg_asm.S"$
+
+
+$
+$ ã¢ã»ã³ãã©åºåç¨ã®é¢æ°ç¾¤
+$
+
+$FUNCTION EXCEPTION_VECTOR_SECTION$
+$TAB$.section .vector,"ax"$NL$
+$END$
+
+$FUNCTION ASM_GLOBAL$
+	$TAB$.global $ARGV[1]$
+$END$
+
+$FUNCTION ASM_LABEL$
+	FLABEL($ARGV[1]$)
+$END$
+
+$FUNCTION ASM_COMMENT$
+	//
+$END$
+
+
+#include <v850asm.inc>$NL$$NL$
+
+$VECTOR_ASMOUT()$
+
+$END$
+$ =end IF __v850e2v3__
+
+
+$IF __v850e3v5__$
+
+$
+$ ãã¼ãã«åç
+§æ¹å¼ç¨ãã¯ã¿ãã¼ãã«(v850e3v5)
+$
+
+extern void interrupt(void);$NL$
+const uint32 __attribute__((aligned(512))) intbp_tbl[TNUM_INT] = {$NL$
+$JOINEACH intno INTNO_VALID "\n"$
+	$isrid = INT.ISRID[intno]$
+	$IF LENGTH(isrid) && EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+		$TAB$(uint32)&$ISR.INT_ENTRY[isrid]$
+	$ELSE$
+		$TAB$(uint32)&interrupt
+	$END$
+$	//ã«ã³ãã®åºåï¼æå¾ã®è¦ç´ ã®å¾ãã«åºåããªãï¼
+	$IF intno != AT(INTNO_VALID,LENGTH(INTNO_VALID) - 1)$
+		,
+	$END$
+	$TAB$$FORMAT("/* %d */", intno)$
+$END$
+$NL$};$NL$
+
+$END$
+
+$ 
+$  arch/gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$FUNCTION GENERATE_MEMORY$
+    $NOOP()$
+$END$
+
+$FUNCTION GENERATE_OUTPUT$
+    OUTPUT_FORMAT("elf32-v850-rh850","elf32-v850-rh850","elf32-v850-rh850")$NL$
+    OUTPUT_ARCH(v850-rh850)$NL$
+    $NL$
+$END$
+
+$FUNCTION GENERATE_PROVIDE$
+    PROVIDE(_hardware_init_hook = 0);$NL$
+    PROVIDE(_software_init_hook = 0);$NL$
+    PROVIDE(_software_term_hook = 0);$NL$
+    PROVIDE(_bsssecinib_table = 0);$NL$
+    PROVIDE(_tnum_bsssec = 0);$NL$
+    PROVIDE(_datasecinib_table = 0);$NL$
+    PROVIDE(_tnum_datasec = 0);$NL$
+    $NL$
+
+    $IF LENGTH(OSAP.ID_LIST)$
+        $FOREACH domid OSAP.ID_LIST$
+            $IF !OSAP.TRUSTED[domid]$
+$   RXé åï¼å°ç¨ï¼
+                PROVIDE(___start_text_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                PROVIDE(___limit_text_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+$   Ré åï¼å°ç¨ï¼
+                PROVIDE(___start_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+                PROVIDE(___limit_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+$   RWXé åï¼å°ç¨ï¼
+                PROVIDE(___start_ram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                PROVIDE(___limit_ram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                PROVIDE(___start_sram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                PROVIDE(___limit_sram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ã
+                PROVIDE($FORMAT("___start_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                PROVIDE($FORMAT("___limit_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                PROVIDE($FORMAT("___start_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                PROVIDE($FORMAT("___limit_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+            $END$
+        $END$
+        $NL$
+    $END$$NL$
+
+$  å
+±æé å
+    PROVIDE(___start_text_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___limit_text_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___start_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+    PROVIDE(___limit_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+    PROVIDE(___start_ram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___limit_ram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___start_sram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___limit_sram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ãé åå
+¨ä½
+    PROVIDE(___start_srpw_all = 0xfffffff0);$NL$
+    PROVIDE(___limit_srpw_all = 0xfffffff0);$NL$
+    PROVIDE(___start_ssrpw_all = 0xfffffff0);$NL$
+    PROVIDE(___limit_ssrpw_all = 0xfffffff0);$NL$
+    STARTUP(start.o);$NL$
+    ENTRY(__reset);$NL$
+    $NL$
+$END$
+
+$FUNCTION GENERATE_GP_LABEL$
+    $TAB$$TAB$__gp = . + 32K;$NL$
+    $TAB$$TAB$__tp = . + 32K;$NL$
+$END$
+
+$FILE "kernel_mem2.c"$
+
+$IF __v850e2v3__$
+$   // v850
+$TNUM_SHARED_REGION = 3$
+const uint32 tnum_shared_mem = $TNUM_SHARED_REGION * 2$;$NL$
+uint8 * const shared_meminib_table[$TNUM_SHARED_REGION * 2$] = {$NL$
+$TAB$((uint8 *)&__start_text_$OSAP.LABEL[TDOM_NONE]$),$TAB$/* iregion 2 */$NL$
+$TAB$((uint8 *)&__limit_text_$OSAP.LABEL[TDOM_NONE]$),$TAB$/* iregion 2 */$NL$
+
+$TAB$((uint8 *)NULL),$TAB$/* iregion 3 */$NL$
+$TAB$((uint8 *)NULL),$TAB$/* iregion 3 */$NL$
+
+$TAB$((uint8 *)NULL),$TAB$/* dregion 5 */$NL$
+$TAB$((uint8 *)NULL),$TAB$/* dregion 5 */$NL$
+};$NL$
+$NL$
+$ELIF __v850e3v5__$
+$   // rh850
+$IF TNUM_MPU_SHARED > 0$
+uint8 * const shared_meminib_table[$TNUM_MPU_SHARED * 3$] = {$NL$
+$FOREACH memid RANGE(0, TNUM_MPU_SHARED - 1)$
+    $TAB$((uint8 *)NULL),$TAB$/* MPUL $TNUM_MPU_REG - memid$ */$NL$
+    $TAB$((uint8 *)NULL),$TAB$/* MPUA $TNUM_MPU_REG - memid$ */$NL$
+    $TAB$((uint8 *)NULL),$TAB$/* MPAT $TNUM_MPU_REG - memid$ */$NL$
+$END$
+};$NL$
+$NL$
+$END$
+
+$ 
+$  GCCä¾å­é¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+$ 
+$INCLUDE "gcc/ldscript.tf"$ 
+
+$FILE "cfg2_out.tf"$
+$ LNKSEC.*ã®åºå
+$$numls = $numls$$$$NL$
+$NL$
+$FOREACH lsid RANGE(1, numls)$
+	$$LNKSEC.MEMREG[$lsid$] = $LNKSEC.MEMREG[lsid]$$$$NL$
+	$$LNKSEC.SECTION[$lsid$] = $ESCSTR(LNKSEC.SECTION[lsid])$$$$NL$
+	$NL$
+$END$
+
+$JOINEACH tskid TSK.ID_LIST "\n"$
+	$$TSK.ID[$+tskid$] = $TSK.ID[tskid]$$$
+$END$
+$NL$
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_cfg1_out.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_cfg1_out.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_cfg1_out.h	(revision 172)
@@ -0,0 +1,99 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_cfg1_out.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ */
+
+int
+main(void)
+{
+	return(0);
+}
+
+int
+_reset(void)
+{
+	return(0);
+}
+
+StackType * const	_ostkpt = UINT_C(0x00);
+/* =begin modified for SC3 */
+void *syscall_table;
+/* =end modified for SC3 */
+
+/*
+ *  ãªãã»ãããã¡ã¤ã«ãçæããããã®å®ç¾©
+ */
+const uint8			MAGIC_1 = UINT_C(0x12);
+const uint16		MAGIC_2 = UINT_C(0x1234);
+const uint32		MAGIC_4 = UINT_C(0x12345678);
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_common.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_common.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_common.tf	(revision 172)
@@ -0,0 +1,845 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2013-2016 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: prc_common.tf 187 2015-06-25 03:39:04Z t_ishikawa $
+$
+
+$
+$  æå¹ãªå²è¾¼ã¿çªå·
+$
+$ 
+$ V850ã§ã¯ãªã»ããï¼NMIï¼WDTã¯å²è¾¼ã¿ã«åé¡ããããï¼ãªã»ããã¯
+$ ã«ã¼ãã«ãç¨ããããé¤å¤ãã
+
+$INTNO_VALID = {}$
+$FOREACH intno RANGE(0, TNUM_INT - 1)$
+	$INTNO_VALID = APPEND(INTNO_VALID, intno)$
+$END$
+
+$EXCNO_VALID = {1,2,3,4,5,7}$
+
+$TNUM_EXC = {1,2,3,4,5,6,7}$
+
+$
+$  CRE_ISR2ã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·
+$
+$INTNO_CREISR2_VALID = INTNO_VALID$
+
+$ 
+$  æ¨æºã®ã»ã¯ã·ã§ã³ã®ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ã®å®ç¾©
+$ 
+$MEMATR_TEXT = (TA_NOWRITE|TA_EXEC)$
+$MEMATR_RODATA = (TA_NOWRITE|TA_EXEC)$
+$MEMATR_DATA = TA_MEMINI$
+$MEMATR_BSS = TA_NULL$
+$MEMATR_PRSV = TA_MEMPRSV$
+$MEMATR_ROSDATA = (TA_SDATA|TA_MEMINI|TA_NOWRITE)$
+$MEMATR_SDATA = (TA_SDATA|TA_MEMINI)$
+$MEMATR_SBSS = TA_SDATA$
+
+$TARGET_MEMATR_USTACK = TA_NULL$
+
+$ 
+$  æ¨æºã®ã»ã¯ã·ã§ã³ã«é¢ããå®ç¾©
+$  DESC.SECTIONï¼ã»ã¯ã·ã§ã³å
+$  DESC.MEMREGï¼ã»ã¯ã·ã§ã³ãé
+ç½®ããã¡ã¢ãªãªã¼ã¸ã§ã³
+$  DESC.MEMATRï¼ã»ã¯ã·ã§ã³ã®ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§
+$  â»DSEC.ORDER_LISTï¼IDã®ãªã¹ããå®ç¾©ããã¦ããªãã¿ã¼ã²ããã§ã¯ï¼
+$  ãä¸è¨ã®å®ç¾©ã¯ç¡å¹ã§ããï¼kernel.tfã§ç¡è¦ãããï¼
+$ 
+
+$DSEC.SECTION[0] = ".text"$
+$DSEC.MEMREG[0] = 1$
+$DSEC.MEMATR[0] = MEMATR_TEXT$
+
+$DSEC.SECTION[1] = ".rodata"$
+$DSEC.MEMREG[1] = 1$
+$DSEC.MEMATR[1] = MEMATR_RODATA$
+
+$DSEC.SECTION[2] = ".data"$
+$DSEC.MEMREG[2] = 0$
+$DSEC.MEMATR[2] = MEMATR_DATA$
+
+$DSEC.SECTION[3] = ".bss"$
+$DSEC.MEMREG[3] = 0$
+$DSEC.MEMATR[3] = MEMATR_BSS$
+
+$DSEC.SECTION[4] = ".prsv"$
+$DSEC.MEMREG[4] = 0$
+$DSEC.MEMATR[4] = MEMATR_PRSV$
+
+$DSEC.SECTION[5] = ".rosdata"$
+$DSEC.MEMREG[5] = 0$
+$DSEC.MEMATR[5] = MEMATR_ROSDATA$
+
+$DSEC.SECTION[6] = ".sdata"$
+$DSEC.MEMREG[6] = 0$
+$DSEC.MEMATR[6] = MEMATR_SDATA$
+
+$DSEC.SECTION[7] = ".sbss"$
+$DSEC.MEMREG[7] = 0$
+$DSEC.MEMATR[7] = MEMATR_SBSS$
+
+
+$TNUM_MPU_OSAP_DEFAULT = 0$
+$IF USE_MPU_SRPW_DATA$
+$   // å
+±æãªã¼ãå°æã©ã¤ããã¼ã¿
+    $TNUM_MPU_OSAP_DEFAULT = TNUM_MPU_OSAP_DEFAULT + 1$
+$END$
+$IF USE_MPU_SRPW_SDATA$
+$   // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+    $TNUM_MPU_OSAP_DEFAULT = TNUM_MPU_OSAP_DEFAULT + 1$
+$END$
+$IF USE_MPU_PR_TEXT$
+$   // å°æãªã¼ãROM
+    $TNUM_MPU_OSAP_DEFAULT = TNUM_MPU_OSAP_DEFAULT + 1$
+$END$
+$IF USE_MPU_PR_SDATA$
+$   // å°æãªã¼ãRAM
+    $TNUM_MPU_OSAP_DEFAULT = TNUM_MPU_OSAP_DEFAULT + 1$
+$END$
+$IF USE_MPU_PRW_DATA$
+$   // å°æãªã¼ãã©ã¤ããã¼ã¿
+    $TNUM_MPU_OSAP_DEFAULT = TNUM_MPU_OSAP_DEFAULT + 1$
+$END$
+$IF USE_MPU_PRW_SDATA$
+$   // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+    $TNUM_MPU_OSAP_DEFAULT = TNUM_MPU_OSAP_DEFAULT + 1$
+$END$
+
+$TNUM_MPU_SHARED_DEFAULT = 0$
+$IF USE_MPU_SRW_DATA_SDATA$
+$   // å
+±æãªã¼ãã©ã¤ã    
+    $TNUM_MPU_SHARED_DEFAULT = TNUM_MPU_SHARED_DEFAULT + 1$
+$END$
+$IF USE_MPU_SR_TEXT$
+$   // å
+±æãªã¼ãROM
+    $TNUM_MPU_SHARED_DEFAULT = TNUM_MPU_SHARED_DEFAULT + 1$
+$END$
+$IF USE_MPU_SR_DATA_SDATA$
+$   // å
+±æãªã¼ãRAM
+    $TNUM_MPU_SHARED_DEFAULT = TNUM_MPU_SHARED_DEFAULT + 1$
+$END$
+
+$ 
+$  MPUã«è¨­å®ããé åã®ã¢ã©ã¤ã³ã¡ã³ãããã§ãã¯ããããã®å®æ°
+$  TARGET_PAGE_SIZE_STR: targetä¾å­é¨ã§å®ç¾©ããMPUé åãã¼ã¸åä½(byte)
+$ 
+$MPU_PAGE_MASK = 0xffffffff - (TARGET_PAGE_SIZE_STR - 1)$
+
+$ 
+$  OSãããã©ã«ãã§ä½¿ç¨ããMPUæ°ãæå¤§å¤ãè¶
+ãã¦ãããã¨ã©ã¼
+$  ã¿ã¼ã²ããä¾å­é¨ã®target_config.hã® USE_MPU_XXX ã®å®ç¾©èª¤ã
+$ 
+$IF TNUM_MPU_REG < (TNUM_MPU_OSAP_DEFAULT + TNUM_MPU_SHARED_DEFAULT)$
+    $ERROR$
+        the number of MPU region used by ATK2 exceeds $TNUM_MPU_REG$
+    $END$
+$END$
+
+$ 
+$  OsMemoryArea ç®¡çç¨ãã¼ã¿ã®åæå
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åã§MPU1ã¤ã¯å¿
+ãå°æããã
+$ 
+$TNUM_MPU_ATTMEM_REMAIN = TNUM_MPU_REG - (TNUM_MPU_OSAP_DEFAULT + TNUM_MPU_SHARED_DEFAULT) - 1$
+$TNUM_MPU_SHARED_ATTMEM = 0$
+$TNUM_MPU_OSAP_ATTMEM = 0$
+
+$TNUM_MPU_OSAP = TNUM_MPU_OSAP_DEFAULT + TNUM_MPU_OSAP_ATTMEM$
+$TNUM_MPU_SHARED = TNUM_MPU_SHARED_DEFAULT + TNUM_MPU_SHARED_ATTMEM$
+
+$ 
+$  OsMemoryArea ã®ã¨ã©ã¼ãã§ãã¯
+$ 
+$FUNCTION HOOK_ERRORCHECK_MEM$
+    $IF TNUM_MPU_ATTMEM_REMAIN <= 0$
+        $ERROR$
+            the number of OsMemoryArea exceeds $TNUM_MPU_REG - (TNUM_MPU_OSAP_DEFAULT + TNUM_MPU_SHARED_DEFAULT)$
+        $END$
+    $ELIF EQ(MEM.OSAPID[ARGV[1]], "")$
+$       // å
+±æ ATTMEM
+        $TNUM_MPU_SHARED_ATTMEM = TNUM_MPU_SHARED_ATTMEM + 1$
+        $TNUM_MPU_ATTMEM_REMAIN = TNUM_MPU_ATTMEM_REMAIN - 1$
+    $ELIF DEFAULT_ACPTN[MEM.OSAPID[ARGV[1]]] != TACP_KERNEL$
+$       // éä¿¡é ¼OSAP ATTMEM
+        $IF LENGTH(ENUM_MPU_OSAP_ATTMEM[MEM.OSAPID[ARGV[1]]])$
+            $ENUM_MPU_OSAP_ATTMEM[MEM.OSAPID[ARGV[1]]] = ENUM_MPU_OSAP_ATTMEM[MEM.OSAPID[ARGV[1]]] + 1$
+        $ELSE$
+            $ENUM_MPU_OSAP_ATTMEM[MEM.OSAPID[ARGV[1]]] = 1$
+        $END$
+        $IF TNUM_MPU_OSAP_ATTMEM < ENUM_MPU_OSAP_ATTMEM[MEM.OSAPID[ARGV[1]]]$
+            $TNUM_MPU_OSAP_ATTMEM = TNUM_MPU_OSAP_ATTMEM + 1$
+            $TNUM_MPU_ATTMEM_REMAIN = TNUM_MPU_ATTMEM_REMAIN - 1$
+        $END$
+    $END$
+
+    $TNUM_MPU_OSAP = TNUM_MPU_OSAP_DEFAULT + TNUM_MPU_OSAP_ATTMEM$
+    $TNUM_MPU_SHARED = TNUM_MPU_SHARED_DEFAULT + TNUM_MPU_SHARED_ATTMEM$
+$END$
+
+$FUNCTION GENERATE_TARGET_MPUINFOB$
+$ 
+$  ä¿è­·ãã¡ã¤ã³åæåãã­ãã¯ã®å¤æ´é¨ãçæ
+$ 
+    $FILE "kernel_mem2.c"$
+    extern const uint32 tnum_shared_mem;$NL$
+    extern uint8 * const shared_meminib_table[];$NL$
+    $NL$
+
+    $PREPARE_OSAPINICTXB()$
+
+    $FOREACH osap OSAP.ID_LIST$
+        $IF LENGTH(ENUM_MPU_OSAP_ATTMEM[osap]) && 
+            (ENUM_MPU_OSAP_ATTMEM[osap] > 0)$
+            static MPUINFOB mpu_area_info_$osap$[$ENUM_MPU_OSAP_ATTMEM[osap]$] = {$NL$
+            $FOREACH mpuinfo RANGE(1, ENUM_MPU_OSAP_ATTMEM[osap])$
+                $TAB$$TAB${$NL$
+                $TAB$$TAB$$TAB$0, 0, 0, /* MPU$cur_osap_mpu_id$ */$NL$
+                $TAB$$TAB$},$NL$
+            $END$
+            };$NL$
+            $NL$
+        $END$
+    $END$
+$END$
+
+$FUNCTION GENERATE_OSAPINIB_MPUINFOB$
+    $cur_osap_mpu_id = 1$
+
+    $TAB$$TAB${$NL$
+    $IF USE_MPU_SRPW_DATA$
+$       // å
+±æãªã¼ãå°æã©ã¤ããã¼ã¿
+        $TAB$$TAB$$TAB$0, 0, /* MPU$cur_osap_mpu_id$ */$NL$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_SRPW_SDATA$
+$       // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+        $TAB$$TAB$$TAB$0, 0, /* MPU$cur_osap_mpu_id$ */$NL$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PR_TEXT$
+$       // å°æãªã¼ãROM
+        $TAB$$TAB$$TAB$0, 0, /* MPU$cur_osap_mpu_id$ */$NL$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PR_SDATA$
+$       // å°æãªã¼ãRAM
+        $TAB$$TAB$$TAB$0, 0, /* MPU$cur_osap_mpu_id$ */$NL$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PRW_DATA$
+$       // å°æãªã¼ãã©ã¤ããã¼ã¿
+        $TAB$$TAB$$TAB$0, 0, /* MPU$cur_osap_mpu_id$ */$NL$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PRW_SDATA$
+$       // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+        $TAB$$TAB$$TAB$0, 0, /* MPU$cur_osap_mpu_id$ */$NL$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF LENGTH(ENUM_MPU_OSAP_ATTMEM[ARGV[1]]) &&
+        (ENUM_MPU_OSAP_ATTMEM[ARGV[1]] > 0)$
+        $TAB$$TAB$$TAB$mpu_area_info_$ARGV[1]$,$NL$
+        $TAB$$TAB$$TAB$$ENUM_MPU_OSAP_ATTMEM[ARGV[1]]$U,$NL$
+    $ELSE$
+        $TAB$$TAB$$TAB$NULL,$NL$
+        $TAB$$TAB$$TAB$0U,$NL$
+    $END$
+    $TAB$$TAB$$TAB$( (uint32)0 ),/* MPRC */$NL$
+    $TAB$$TAB$}$NL$
+    $NL$
+$END$
+
+$FUNCTION GENERATE_TSKINICTXB$
+	$TAB$$TAB${$NL$
+    $TAB$$TAB$$TAB$$TSK.TINIB_SSTKSZ[ARGV[1]]$,$NL$
+	$TAB$$TAB$$TAB$((void *)((uint8 *)($TSK.TINIB_SSTK[ARGV[1]]$)
+    $SPC$+ ($TSK.TINIB_SSTKSZ[ARGV[1]]$))),$NL$
+	$IF OSAP.TRUSTED[TSK.OSAPID[ARGV[1]]]$
+        $TAB$$TAB$$TAB$0,$NL$
+        $TAB$$TAB$$TAB$0,$NL$
+    $ELSE$
+        $TAB$$TAB$$TAB$$TSK.TINIB_USTKSZ[ARGV[1]]$,$NL$ 
+        $TAB$$TAB$$TAB$((void *)((uint8 *)($TSK.TINIB_USTK[ARGV[1]]$)
+        $SPC$+ ($TSK.TINIB_USTKSZ[ARGV[1]]$))),$NL$
+    $END$
+	$TAB$$TAB$},$NL$
+$END$
+
+$FUNCTION GENERATE_STKMPUINFOB$
+	$TAB$$TAB${$NL$
+	$IF OSAP.TRUSTED[TSK.OSAPID[ARGV[1]]] || (tmin_os_restarttask <= ARGV[1])$
+        $TAB$$TAB$$TAB$0,$NL$
+        $TAB$$TAB$$TAB$0,$NL$
+    $ELSE$
+		$IF EQ(TSK.STK[ARGV[1]],"NULL")$
+$			// stkãNULLã®å ´åã®å¦ç
+            $IF LENGTH(TSK.SHARED_USTK_ID[ARGV[1]])$
+$               // å
+±æã¹ã¿ãã¯
+                $TAB$$TAB$$TAB$/*dummy at pass2*/$NL$
+                $TAB$$TAB$$TAB$0,$NL$
+                $TAB$$TAB$$TAB$0,$NL$
+            $ELSE$
+$               // åºæã¹ã¿ãã¯
+                $TAB$$TAB$$TAB$/*dummy at pass2*/$NL$
+                $TAB$$TAB$$TAB$0,$NL$
+                $TAB$$TAB$$TAB$0,$NL$
+            $END$
+        $ELSE$
+$			// stkãNULLã§ãªãå ´åã®å¦ç
+            $TAB$$TAB$$TAB$$FORMAT("(uint8 *)%s", TSK.TINIB_USTK[ARGV[1]])$,$NL$
+            $TAB$$TAB$$TAB$$FORMAT("(uint8 *)((uint32)%s + %d)", TSK.TINIB_USTK[ARGV[1]], TSK.TINIB_USTKSZ[ARGV[1]])$,$NL$
+        $END$
+    $END$
+	$TAB$$TAB$},$NL$
+$END$
+
+
+$
+$  æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "kernel/kernel.tf"$
+
+$FOREACH intno INTNO_VALID$
+	$FOREACH isrid ISR.ID_LIST$
+		$IF intno == ISR.INTNO[isrid]$
+			$INT.ISRID[intno] = isrid$
+		$END$
+	$END$
+$END$
+
+
+$FILE "Os_Lcfg.c"$
+
+$
+$ C2ISRã®åªå
+åº¦ä¸é
+$
+$n = 0$
+$pmr_isr2_mask = 0xffff$
+$WHILE (n < (MIN_PRI_ISR2 + TNUM_INTPRI))$
+$pmr_isr2_mask = pmr_isr2_mask & ~(0x01 << n)$
+$n = n + 1$
+$END$
+$pmr_isr1_mask = ~pmr_isr2_mask & 0xffff $
+
+const uint16 pmr_isr2_mask = $FORMAT("0x%x",pmr_isr2_mask)$;$NL$
+const uint16 pmr_isr1_mask = $FORMAT("0x%x",pmr_isr1_mask)$;$NL$
+
+$
+$  å²è¾¼ã¿ãã³ãã©ãã¼ãã«(EIã¬ãã«ããã¹ã«ãã«å²è¾¼ã¿ç¨)
+$
+const FunctionRefType isr_tbl[TNUM_INT] = {$NL$
+$JOINEACH intno INTNO_VALID "\n"$
+	$isrid = INT.ISRID[intno]$
+	$IF LENGTH(isrid)$
+		$TAB$$ISR.INT_ENTRY[isrid]$
+	$ELSE$
+		$TAB$default_int_handler
+	$END$
+$	//ã«ã³ãã®åºåï¼æå¾ã®è¦ç´ ã®å¾ãã«åºåããªãï¼
+	$IF intno != AT(INTNO_VALID,LENGTH(INTNO_VALID) - 1)$
+		,
+	$END$
+	$TAB$$FORMAT("/* %d */", intno)$
+$END$
+$NL$};$NL$
+$NL$
+
+$
+$  ISRCBã®åå¾ãã¼ãã«(EIã¬ãã«ããã¹ã«ãã«å²è¾¼ã¿ç¨)
+$
+ISRCB *const isr_p_isrcb_tbl[TNUM_INT] = {$NL$
+$JOINEACH intno INTNO_VALID "\n"$
+	$isrid = INT.ISRID[intno]$
+	$IF LENGTH(isrid) && EQ(ISR.CATEGORY[isrid], "CATEGORY_2")$
+		$TAB$&(isrcb_table[$ISR.ID[isrid]$])
+	$ELSE$
+		$TAB$NULL
+	$END$
+$	//ã«ã³ãã®åºåï¼æå¾ã®è¦ç´ ã®å¾ãã«åºåããªãï¼
+	$IF intno != AT(INTNO_VALID,LENGTH(INTNO_VALID) - 1)$
+		,
+	$END$
+	$TAB$$FORMAT("/* %d */", intno)$
+$END$
+$NL$};$NL$
+$NL$
+
+
+$
+$ å²è¾¼ã¿ãã¯ã¿ã¨åå²è¾¼ã¿å
+¥å£å¦çã®åºåé¢æ°
+$
+
+$FUNCTION VECTOR_ASMOUT$
+
+$EXCEPTION_VECTOR_SECTION()$
+
+$ASM_GLOBAL("__reset")$
+$NL$
+$ASM_LABEL("__reset")$
+$NL$
+$TAB$$ASM_COMMENT()$
+$FORMAT(" Exception 0x%x ", 0)$$NL$
+$TAB$jr __start$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+
+$
+$ ãã¯ã¿ãã¼ãã«(ä¾å¤ No1-7)
+$
+$ ä¾å¤ No1
+$TAB$$ASM_COMMENT()$$FORMAT(" Exception 0x%x ", 1)$$NL$
+$TAB$ldsr  r2, eiwr$NL$
+$TAB$movea $E_OS_PROTECTION_EXCEPTION$, r0, r2$NL$
+$TAB$jr _fe_exception_entry$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$ ä¾å¤ No2
+$TAB$$ASM_COMMENT()$$FORMAT(" Exception 0x%x ", 2)$$NL$
+$TAB$ldsr  r2, eiwr$NL$
+$TAB$movea $E_OS_PROTECTION_EXCEPTION$, r0, r2$NL$
+$TAB$jr _fe_exception_entry$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$ ä¾å¤ No3
+$TAB$$ASM_COMMENT()$$FORMAT(" Exception 0x%x ", 3)$$NL$
+$TAB$ldsr  r2, eiwr$NL$
+$TAB$movea $E_OS_PROTECTION_MEMORY$, r0, r2$NL$
+$TAB$jr _fe_exception_entry$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$ ä¾å¤ No4
+$TAB$$ASM_COMMENT()$$FORMAT(" Exception 0x%x ", 4)$$NL$
+$TAB$ldsr  r2, eiwr$NL$
+$TAB$movea $E_OS_PROTECTION_EXCEPTION$, r0, r2$NL$
+$TAB$jr _ei_exception_entry$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$ ä¾å¤ No5
+$TAB$$ASM_COMMENT()$$FORMAT(" Exception 0x%x ", 5)$$NL$
+$TAB$ldsr  r2, eiwr$NL$
+$TAB$movea $E_OS_PROTECTION_EXCEPTION$, r0, r2$NL$
+$TAB$jr _fe_exception_entry$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$ ä¾å¤ No6
+$TAB$$ASM_COMMENT()$$FORMAT(" Exception 0x%x ", 6)$$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+$ ä¾å¤ No7
+$TAB$$ASM_COMMENT()$$FORMAT(" Exception 0x%x ", 7)$$NL$
+$TAB$ldsr  r2, eiwr$NL$
+$TAB$movea $E_OS_PROTECTION_EXCEPTION$, r0, r2$NL$
+$TAB$jr _fe_exception_entry$NL$
+$TAB$nop$NL$
+$TAB$nop$NL$
+
+$
+$ ãã¯ã¿ãã¼ãã«(EIã¬ãã« ãã¹ã«ãã«å²è¾¼ã¿ç¨(8-255)
+$
+$NL$$FOREACH intno INTNO_VALID$
+$TAB$$ASM_COMMENT()$$FORMAT("0x%x",intno*16 + 0x80)$ $NL$
+	$isrid = INT.ISRID[intno]$
+	$IF LENGTH(isrid)$
+		$IF EQ(ISR.CATEGORY[isrid], "CATEGORY_2")$
+            $TAB$ldsr  r2, eiwr$NL$
+            $TAB$movea $intno$, r0, r2$NL$ 
+            $TAB$jr    _interrupt$NL$
+            $TAB$nop$NL$
+            $TAB$nop$NL$
+		$ELSE$
+			$TAB$jr _$ISR.INT_ENTRY[isrid]$$NL$
+			$TAB$nop$NL$
+			$TAB$nop$NL$
+			$TAB$nop$NL$
+			$TAB$nop$NL$
+			$TAB$nop$NL$
+			$TAB$nop$NL$
+		$END$
+	$ELSE$
+$		// å²è¾¼ã¿ãã³ãã©ã®ç»é²ããªãå ´å
+		$TAB$jr _default_int_handler$NL$
+		$TAB$nop$NL$
+		$TAB$nop$NL$
+		$TAB$nop$NL$
+		$TAB$nop$NL$
+		$TAB$nop$NL$
+		$TAB$nop$NL$
+	$END$
+$END$
+
+$END$
+
+$ 
+$  MPUä½¿ç¨ææ°ã®å®ç¾©åºå
+$ 
+$FILE "target_Os_Cfg.h"$
+#ifndef TARGET_OS_CFG_H
+#define TARGET_OS_CFG_H
+
+#define TNUM_MPU_OSAP_DEFAULT ($TNUM_MPU_OSAP_DEFAULT$)$NL$
+#define TNUM_MPU_OSAP_ATTMEM ($TNUM_MPU_OSAP_ATTMEM$)$NL$
+#define TNUM_MPU_OSAP ($TNUM_MPU_OSAP_DEFAULT + TNUM_MPU_OSAP_ATTMEM$)$NL$
+#define TNUM_MPU_SHARED_DEFAULT ($TNUM_MPU_SHARED_DEFAULT$)$NL$
+#define TNUM_MPU_SHARED_ATTMEM ($TNUM_MPU_SHARED_ATTMEM$)$NL$
+#define TNUM_MPU_SHARED ($TNUM_MPU_SHARED_DEFAULT + TNUM_MPU_SHARED_ATTMEM$)$NL$
+
+#endif /* TARGET_OS_CFG_H */
+
+$ 
+$  MPUè¨­å®å¦çã®çæ
+$ 
+$IF __v850e3v5__$
+$FILE "Os_Cfg_asm.inc"$
+$ASM_MACRO("DISPATCHER_MPU_SETTING", "reg1, reg2, reg3, reg4, reg5, reg6")$$NL$
+$IF TNUM_MPU_OSAP > 0$
+$ 
+$   // ãã£ã¹ãããã£ã«ãããMPUè¨­å®å¦çã®çæ
+$ 
+    $cur_osap_mpu_id = 1$
+    $sysreg = 6*32 + 4$
+    $IF USE_MPU_SRPW_DATA$
+$       // å
+±æãªã¼ãå°æã©ã¤ããã¼ã¿
+$         $TAB$*$NL$
+$         $TAB$* å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å$NL$
+$         $TAB$*$NL$
+        $TAB$ld.w   OSAPINIB_start_srpw[reg1], reg2$NL$
+        $TAB$ld.w   OSAPINIB_limit_srpw[reg1], reg3$NL$
+        $TAB$ldsr   reg2, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 1$
+        $TAB$ldsr   reg3, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 3$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_SRPW_SDATA$
+$       // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+$         $TAB$;$NL$
+$         $TAB$; å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å(sdata)$NL$
+$         $TAB$;$NL$
+        $TAB$ld.w   OSAPINIB_start_ssrpw[reg1], reg2$NL$
+        $TAB$ld.w   OSAPINIB_limit_ssrpw[reg1], reg3$NL$
+        $TAB$ldsr   reg2, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 1$
+        $TAB$ldsr   reg3, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 3$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PR_TEXT$
+$       // å°æãªã¼ãROM
+$         $TAB$;$NL$
+$         $TAB$; èªä¿è­·ãã¡ã¤ã³å°ç¨ã®romé å$NL$
+$         $TAB$;$NL$
+        $TAB$ld.w   OSAPINIB_start_text[reg1], reg2$NL$
+        $TAB$ld.w   OSAPINIB_limit_text[reg1], reg3$NL$
+        $TAB$ldsr   reg2, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 1$
+        $TAB$ldsr   reg3, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 3$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PR_SDATA$
+$       // å°æãªã¼ãRAM
+$         $TAB$;$NL$
+$         $TAB$; èªä¿è­·ãã¡ã¤ã³å°ç¨ã®rosdataé å$NL$
+$         $TAB$;$NL$
+        $TAB$ld.w   OSAPINIB_start_rosdata[reg1], reg2$NL$
+        $TAB$ld.w   OSAPINIB_limit_rosdata[reg1], reg3$NL$
+        $TAB$ldsr   reg2, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 1$
+        $TAB$ldsr   reg3, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 3$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PRW_DATA$
+$       // å°æãªã¼ãã©ã¤ããã¼ã¿
+$         $TAB$;$NL$
+$         $TAB$; èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å$NL$
+$         $TAB$;$NL$
+        $TAB$ld.w   OSAPINIB_start_ram[reg1], reg2$NL$
+        $TAB$ld.w   OSAPINIB_limit_ram[reg1], reg3$NL$
+        $TAB$ldsr   reg2, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 1$
+        $TAB$ldsr   reg3, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 3$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PRW_SDATA$
+$       // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+$         $TAB$;$NL$
+$         $TAB$; èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å(sdata)$NL$
+$         $TAB$;$NL$
+        $TAB$ld.w   OSAPINIB_start_sram[reg1], reg2$NL$
+        $TAB$ld.w   OSAPINIB_limit_sram[reg1], reg3$NL$
+        $TAB$ldsr   reg2, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 1$
+        $TAB$ldsr   reg3, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 3$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $TAB$ld.w   OSAPINIB_mprc[reg1], reg2$NL$
+    $TAB$ldsr   reg2, 1, 5$NL$
+    $IF TNUM_MPU_OSAP_ATTMEM$
+        $TAB$mov    r0, reg6$NL$
+        $TAB$ld.b   OSAPINIB_tnum_mpu_area[reg1], reg5$NL$
+        $TAB$cmp    reg5, reg6$NL$
+        $TAB$be     exit_mpu_setting$NL$
+        $TAB$ld.w   OSAPINIB_mpu_area_info[reg1], reg1$NL$
+        $FOREACH mpuid RANGE(cur_osap_mpu_id, TNUM_MPU_OSAP - 1)$
+$         $TAB$/*$NL$
+$         $TAB$* èªä¿è­·ãã¡ã¤ã³å°ç¨ã®ATT_MEMé å(sdata)$NL$
+$         $TAB$*/$NL$
+            $TAB$ld.w   0[reg1], reg2$NL$
+            $TAB$ld.w   4[reg1], reg3$NL$
+            $TAB$ld.w   8[reg1], reg4$NL$
+            $TAB$ldsr   reg2, $sysreg % 32$, $sysreg / 32$$NL$
+            $sysreg = sysreg + 1$
+            $TAB$ldsr   reg3, $sysreg % 32$, $sysreg / 32$$NL$
+            $sysreg = sysreg + 1$
+            $TAB$ldsr   reg4, $sysreg % 32$, $sysreg / 32$$NL$
+            $sysreg = sysreg + 2$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+            $TAB$addi   1, reg6, reg6$NL$
+            $TAB$cmp    reg5, reg6$NL$
+            $TAB$be     exit_mpu_setting$NL$
+            $TAB$addi   12, reg1, reg1$NL$
+        $END$
+        $TAB$ld.w   0[reg1], reg2$NL$
+        $TAB$ld.w   4[reg1], reg3$NL$
+        $TAB$ld.w   8[reg1], reg4$NL$
+        $TAB$ldsr   reg2, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 1$
+        $TAB$ldsr   reg3, $sysreg % 32$, $sysreg / 32$$NL$
+        $sysreg = sysreg + 1$
+        $TAB$ldsr   reg4, $sysreg % 32$, $sysreg / 32$$NL$
+
+        $NL$
+        exit_mpu_setting:$NL$
+    $END$
+$ELSE$
+    $NL$
+$END$
+.endm$NL$
+
+$ 
+$ // ã«ã¼ãã«åæåã«ãããMPUè¨­å®å¦çã®çæ
+$ 
+$FILE "Os_Lcfg.c"$
+$IF TNUM_MPU_SHARED > 0$
+extern uint8* shared_meminib_table[];$NL$
+$NL$
+$END$
+
+/*LOCAL_INLINE */void$NL$
+mpu_shared_area_initialize(void)$NL$
+{$NL$
+$IF TNUM_MPU_SHARED > 0$
+$ 
+$   // å
+±æé åã®MPUè¨­å®å¦çã®çæ
+$ 
+    $sysreg = 6*32 + (TNUM_MPU_REG - 1)*4$
+    $TAB$uint32 mpur;$NL$
+    $NL$
+    $FOREACH memid RANGE(0, TNUM_MPU_SHARED - 1)$
+        $TAB$/*$NL$
+        $TAB$ * MPU$TNUM_MPU_REG - 1 - memid$$NL$
+        $TAB$ */$NL$
+        $TAB$mpur = (uint32)shared_meminib_table[$memid*3$];$NL$
+        $TAB$LDSR_REG($sysreg % 32$, $sysreg / 32$, (uint32)mpur);$NL$
+        $TAB$mpur = (uint32)shared_meminib_table[$memid*3 + 1$];$NL$
+        $TAB$LDSR_REG($(sysreg + 1) % 32$, $(sysreg + 1) / 32$, (uint32)mpur);$NL$
+        $TAB$mpur = (uint32)shared_meminib_table[$memid*3 + 2$];$NL$
+        $TAB$LDSR_REG($(sysreg + 2) % 32$, $(sysreg + 2) / 32$, (uint32)mpur);$NL$
+        $sysreg = sysreg - 4$
+    $END$
+$END$
+$IF TNUM_MPU_OSAP > 0$
+$ 
+$   // éä¿¡é ¼OSAPå°æMPUé åã®MPATè¨­å®å¦çã®çæ
+$ 
+    $cur_osap_mpu_id = 1$
+    $sysreg = 6*32 + 4$
+    $IF USE_MPU_SRPW_DATA$
+$       // å
+±æãªã¼ãå°æã©ã¤ããã¼ã¿
+        $TAB$/*$NL$
+        $TAB$ * å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å$NL$
+        $TAB$ * MPU$cur_osap_mpu_id$$NL$
+        $TAB$ */$NL$
+        $sysreg = sysreg + 2$
+        $TAB$LDSR_REG($sysreg % 32$, $sysreg / 32$, (uint32)(MPAT_E | MPAT_G | MPAT_UX | MPAT_UW | MPAT_UR))$NL$
+        $sysreg = sysreg + 2$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_SRPW_SDATA$
+$       // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+        $TAB$/*$NL$
+        $TAB$ * å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å(sdata)$NL$
+        $TAB$ * MPU$cur_osap_mpu_id$$NL$
+        $TAB$ */$NL$
+        $sysreg = sysreg + 2$
+        $TAB$LDSR_REG($sysreg % 32$, $sysreg / 32$, (uint32)(MPAT_E | MPAT_G | MPAT_UX | MPAT_UW | MPAT_UR))$NL$
+        $sysreg = sysreg + 2$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PR_TEXT$
+$       // å°æãªã¼ãROM
+        $TAB$/*$NL$
+        $TAB$ * èªä¿è­·ãã¡ã¤ã³å°ç¨ã®romé å$NL$
+        $TAB$ * MPU$cur_osap_mpu_id$$NL$
+        $TAB$ */$NL$
+        $sysreg = sysreg + 2$
+        $TAB$LDSR_REG($sysreg % 32$, $sysreg / 32$, (uint32)(MPAT_E | MPAT_G | MPAT_UX | MPAT_UR))$NL$
+        $sysreg = sysreg + 2$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PR_SDATA$
+$       // å°æãªã¼ãRAM
+        $TAB$/*$NL$
+        $TAB$ * èªä¿è­·ãã¡ã¤ã³å°ç¨ã®rosdataé å$NL$
+        $TAB$ * MPU$cur_osap_mpu_id$$NL$
+        $TAB$ */$NL$
+        $sysreg = sysreg + 2$
+        $TAB$LDSR_REG($sysreg % 32$, $sysreg / 32$, (uint32)(MPAT_E | MPAT_G | MPAT_UX | MPAT_UR))$NL$
+        $sysreg = sysreg + 2$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PRW_DATA$
+$       // å°æãªã¼ãã©ã¤ããã¼ã¿
+        $TAB$/*$NL$
+        $TAB$ * èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å$NL$
+        $TAB$ * MPU$cur_osap_mpu_id$$NL$
+        $TAB$ */$NL$
+        $sysreg = sysreg + 2$
+        $TAB$LDSR_REG($sysreg % 32$, $sysreg / 32$, (uint32)(MPAT_E | MPAT_G | MPAT_UX | MPAT_UW | MPAT_UR))$NL$
+        $sysreg = sysreg + 2$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+    $IF USE_MPU_PRW_SDATA$
+$       // å°æãªã¼ãã©ã¤ãã·ã§ã¼ããã¼ã¿
+        $TAB$/*$NL$
+        $TAB$ * èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å(sdata)$NL$
+        $TAB$ * MPU$cur_osap_mpu_id$$NL$
+        $TAB$ */$NL$
+        $sysreg = sysreg + 2$
+        $TAB$LDSR_REG($sysreg % 32$, $sysreg / 32$, (uint32)(MPAT_E | MPAT_G | MPAT_UX | MPAT_UW | MPAT_UR))$NL$
+        $sysreg = sysreg + 2$
+        $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+    $END$
+$END$
+}$NL$
+
+$END$
+
+$FILE "cfg2_out.tf"$
+
+$FOREACH osap OSAP.ID_LIST$
+    $IF LENGTH(ENUM_MPU_OSAP_ATTMEM[osap]) && 
+        (ENUM_MPU_OSAP_ATTMEM[osap] > 0)$
+        $$ENUM_MPU_OSAP_ATTMEM[$+osap$] = $ENUM_MPU_OSAP_ATTMEM[osap]$$$$NL$
+    $END$
+$END$
+
+$$TNUM_MPU_OSAP_DEFAULT = $TNUM_MPU_OSAP_DEFAULT$$$$NL$
+$$TNUM_MPU_OSAP = $TNUM_MPU_OSAP$$$$NL$
+$$TNUM_MPU_SHARED = $TNUM_MPU_SHARED$$$$NL$
+$$MPU_PAGE_MASK = $MPU_PAGE_MASK$$$$NL$
+$NL$
+
+$FILE "Os_Lcfg.c"$
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_config.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_config.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_config.c	(revision 172)
@@ -0,0 +1,287 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_config.c 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ */
+#include "kernel_impl.h"
+
+/*
+ *  ä¾å¤ï¼å²è¾¼ã¿/CPUä¾å¤ï¼ã®ãã¹ãåæ°ã®ã«ã¦ã³ã
+ *  ã³ã³ãã­ã¹ãåç
+§ã®ããã«ä½¿ç¨
+ */
+uint32			hook_nest_cnt;
+
+#ifdef CFG_USE_PROTECTIONHOOK
+uint32			v850_cpu_exp_no;
+uint32			v850_cpu_exp_pc;
+uint32			v850_cpu_exp_sp;
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+/*
+ * ç¾å¨ã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¤ï¼å
+é¨è¡¨ç¾ï¼
+ */
+uint8			current_iintpri;
+
+/* å²ãè¾¼ã¿è¦æ±ãã¹ã¯ãã¼ãã« */
+const uint16	pmr_setting_tbl[] =
+{
+#if TNUM_INTPRI == 16
+	0xffff, /* ISR2 LEVEL -16 MASK */
+	0xfffe, /* ISR2 LEVEL -15 MASK */
+	0xfffc, /* ISR2 LEVEL -14 MASK */
+	0xfff8, /* ISR2 LEVEL -13 MASK */
+	0xfff0, /* ISR2 LEVEL -12 MASK */
+	0xffe0, /* ISR2 LEVEL -11 MASK */
+	0xffc0, /* ISR2 LEVEL -10 MASK */
+	0xff80, /* ISR2 LEVEL -9 MASK */
+	0xff00, /* ISR2 LEVEL -8 MASK */
+	0xfe00, /* ISR2 LEVEL -7 MASK */
+	0xfc00, /* ISR2 LEVEL -6 MASK */
+	0xf800, /* ISR2 LEVEL -5 MASK */
+	0xf000, /* ISR2 LEVEL -4 MASK */
+	0xe000, /* ISR2 LEVEL -3 MASK */
+	0xc000, /* ISR2 LEVEL -2 MASK */
+	0x8000, /* ISR2 LEVEL -1 MASK */
+	0x0000  /* Dummy			  */
+#elif TNUM_INTPRI == 8
+	0x00ff, /* ISR2 LEVEL -8 MASK */
+	0x00fe, /* ISR2 LEVEL -7 MASK */
+	0x00fc, /* ISR2 LEVEL -6 MASK */
+	0x00f8, /* ISR2 LEVEL -5 MASK */
+	0x00f0, /* ISR2 LEVEL -4 MASK */
+	0x00e0, /* ISR2 LEVEL -3 MASK */
+	0x00c0, /* ISR2 LEVEL -2 MASK */
+	0x0080, /* ISR2 LEVEL -1 MASK */
+	0x0000  /* Dummy			  */
+#else
+#error TNUM_INTPRI is illegal.
+#endif /* TNUM_INTPRI == 16 */
+};
+
+/*
+ *  x_nested_lock_os_int()ã®ãã¹ãåæ°
+ */
+volatile uint8	nested_lock_os_int_cnt;
+
+/*
+ *  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®æã«å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãä¿å­ããå¤æ°
+ */
+volatile uint16	current_intpri;
+
+/*
+ *  èµ·åæã®ãã¼ãã¦ã§ã¢åæå
+ */
+void
+prc_hardware_initialize(void)
+{
+}
+
+#ifdef __v850e3v5__
+extern const uint32 intbp_tbl[];
+#endif /* __v850e3v5__ */
+
+/*
+ *  ãã­ã»ããµä¾å­ã®åæå
+ */
+void
+prc_initialize(void)
+{
+	/*
+	 *  ã«ã¼ãã«èµ·åæã¯éã¿ã¹ã¯ã³ã³ãã­ã¹ãã¨ãã¦åä½ããããã1ã«
+	 */
+	hook_nest_cnt = 1U;
+
+	/*
+	 * å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®åæå¤ã¯æä½åªå
+åº¦
+	 */
+	current_iintpri = INT_IPM(0);
+
+    /* =begin added for SC3 */
+    target_mpu_initialize();
+    /* =end added for SC3 */
+#ifdef __v850e3v5__
+	/* ãã¼ãã«åç
+§æ¹å¼ã®INTBPã¢ãã¬ã¹è¨­å® */
+	set_intbp((uint32)intbp_tbl);
+#endif /* __v850e3v5__ */
+}
+
+/*
+ *  ãã­ã»ããµä¾å­ã®çµäºå¦ç
+ */
+void
+prc_terminate(void)
+{
+	/* å²ãè¾¼ã¿å¦çä¸­ã§çµäºããå ´åãæ³å®ãã¦ISPRãã¯ãªã¢ãã */
+	clear_ispr();
+
+	/* ä¾å¤å¦çããçµäºããå ´åãæ³å®ãã¦NP/EPããããã¯ãªã¢ãã */
+	set_psw(current_psw() & ~(0x0080 | 0x0040));
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®
+ */
+void
+x_config_int(InterruptNumberType intno, AttributeType intatr, PriorityType intpri)
+{
+	uint32 eic_address;
+
+	ASSERT(VALID_INTNO(intno));
+
+	eic_address = EIC_ADDRESS(intno);
+
+	/*
+	 *  å²è¾¼ã¿ã®ãã¹ã¯
+	 *
+	 *  å²è¾¼ã¿ãåãä»ããã¾ã¾ï¼ã¬ãã«ããªã¬ï¼ã¨ãã¸ããªã¬ã®è¨­å®ãï¼å²
+	 *  è¾¼ã¿åªå
+åº¦ã®è¨­å®ãè¡ãã®ã¯å±éºãªããï¼å²è¾¼ã¿å±æ§ã«ãããããï¼
+	 *  ä¸æ¦ãã¹ã¯ããï¼
+	 */
+	(void) x_disable_int(intno);
+
+	/*
+	 *  å²è¾¼ã¿åªå
+åº¦ã®è¨­å®
+	 */
+	sil_wrh_mem((void *) eic_address,
+				((sil_reh_mem((void *) eic_address) & ~0x0f) | INT_IPM(intpri)));
+
+#ifdef __v850e3v5__
+	/* ãã¼ãã«åç
+§æ¹å¼ */
+	sil_wrh_mem((uint16 *) eic_address,
+				(sil_reh_mem((uint16 *) eic_address) | (1 << 6)));
+#endif /* __v850e3v5__ */
+
+    if ((intatr & ENABLE) != 0U) {
+        /*
+         *  åæç¶æ
+ãå²è¾¼ã¿è¨±å¯ã§ããã°ï¼å²è¾¼ã¿ãè¨±å¯
+         */
+        (void) x_enable_int(intno);
+    }
+}
+
+#ifndef OMIT_DEFAULT_INT_HANDLER
+
+/*
+ *  æªå®ç¾©ã®å²è¾¼ã¿ãå
+¥ã£ãå ´åã®å¦ç
+ */
+void
+default_int_handler(void)
+{
+	target_fput_str("Unregistered Interrupt occurs.");
+	ASSERT_NO_REACHED;
+}
+
+#endif /* OMIT_DEFAULT_INT_HANDLER */
+
+/*
+ *  ç¡éã«ã¼ãå¦ç
+ *  (ãããã°æã®ç¡éã«ã¼ãå°éç¢ºèªç¨ / æé©åé²æ­¢ã®ããããã§å®ç¾©ãã)
+ */
+void
+infinite_loop(void)
+{
+	while (1) {
+	}
+}
+
+/* =begin added for SC3 */
+/*
+ *  ä¸æ­£ãªæ©è½ã³ã¼ããæå®ãã¦ï¼ã·ã¹ãã ãµã¼ãã¹çºè¡æã®å¦ç
+ */
+
+StatusType
+no_support_service(void)
+{
+	StatusType ercd = E_OS_SERVICEID;
+
+#ifdef CFG_USE_ERRORHOOK
+	x_nested_lock_os_int();
+	call_errorhook(ercd, OSServiceId_INVALID);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+	return(ercd);
+}
+
+/* =end added for SC3 */
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_config.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_config.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_config.h	(revision 172)
@@ -0,0 +1,760 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_config.h 189 2015-06-26 01:54:57Z t_ishikawa $
+ */
+
+/*
+ *		ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼target_config.hï¼ã¾ãã¯ï¼ããããã¤ã³ã¯
+ *  ã«ã¼ãããããã¡ã¤ã«ï¼ã®ã¿ããã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡ã¤ã«ãã
+ *  ç´æ¥ã¤ã³ã¯ã«ã¼ããã¦ã¯ãªããªã
+ */
+
+#ifndef TOPPERS_PRC_CONFIG_H
+#define TOPPERS_PRC_CONFIG_H
+
+#include "prc_sil.h"
+
+/*
+ *  ã¨ã©ã¼ãã§ãã¯æ¹æ³ã®æå®
+ */
+/* =begin modified for SC3 */
+#ifndef CHECK_SSTKSZ_ALIGN
+#define CHECK_SSTKSZ_ALIGN	UINT_C(4)   /* ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºã®ã¢ã©ã¤ã³åä½ */
+#endif /* CHECK_STKSZ_ALIGN */
+
+#ifndef CHECK_USTKSZ_ALIGN
+#define CHECK_USTKSZ_ALIGN	UINT_C(16)   /* ã¦ã¼ã¶ã¹ã¿ãã¯ãµã¤ãºã®ã¢ã©ã¤ã³åä½ */
+#endif /* CHECK_USTKSZ_ALIGN */
+/* =end modified for SC3 */
+
+#ifndef CHECK_FUNC_ALIGN
+#define CHECK_FUNC_ALIGN	UINT_C(2)   /* é¢æ°ã®ã¢ã©ã¤ã³åä½ */
+#endif /* CHECK_FUNC_ALIGN */
+
+#define CHECK_FUNC_NONNULL      /* é¢æ°ã®éNULLãã§ãã¯ */
+
+#ifndef CHECK_STACK_ALIGN
+#define CHECK_STACK_ALIGN	UINT_C(4)   /* ã¹ã¿ãã¯é åã®ã¢ã©ã¤ã³åä½ */
+#endif /* CHECK_STACK_ALIGN */
+
+#define CHECK_STACK_NONNULL     /* ã¹ã¿ãã¯é åã®éNULLãã§ãã¯ */
+
+/* =begin modified for SC3 */
+/*
+ *  ã¿ã¼ã²ããã§è¿½å ããã·ã¹ãã ãµã¼ãã¹ãã¼ãã«å®ç¾©
+ */
+#ifndef OTHER_PRC_SVC_TABLE
+#ifdef USE_KERNEL_LIBRARY_SYSLOG
+/* ã·ã¹ã­ã°æ©è½æå¹æ */
+#define PRC_SVC_TABLE	(void *) &_kernel_KernelLibrarySyslog
+#define PRC_SVC_NUM		1
+#else /* USE_KERNEL_LIBRARY_SYSLOG */
+/* ã·ã¹ã­ã°æ©è½ç¡å¹æ */
+#define PRC_SVC_TABLE
+#define PRC_SVC_NUM		0
+#endif /* USE_KERNEL_LIBRARY_SYSLOG */
+#else /* OTHER_PRC_SVC_TABLE */
+#define STR(a)	STR_(a)
+#define STR_(a)	# a
+#include STR(OTHER_PRC_SVC_TABLE)
+#endif /* OTHER_PRC_SVC_TABLE */
+
+/*
+ *  svcã§å¼ã³åºãå¦çã®ç¨®é¡
+ *   ã·ã¹ãã ãµã¼ãã¹ã®å
+¥ãå£
+ *   éä¿¡é ¼ããã¯ã®åºå£
+ */
+#define SYSCALL_SIZE    2
+/* =end modified for SC3 */
+
+#define call_errorhook(ercd, svcid)		stack_change_and_call_func_2(&internal_call_errorhook, (ercd), (svcid))
+#define call_shutdownhook(ercd)			stack_change_and_call_func_1(&internal_call_shtdwnhk, ((uint32) (ercd)))
+
+/*
+ *  å²è¾¼ã¿çªå·ã®ç¯å²ã®å¤å®
+ */
+#if TMIN_INTNO == 0
+#define VALID_INTNO(intno)	((intno) <= (InterruptNumberType) (TMAX_INTNO))
+#else /* TMIN_INTNO != 0 */
+#define VALID_INTNO(intno)	(((InterruptNumberType) (TMIN_INTNO) <= (intno)) && ((intno) <= (InterruptNumberType) (TMAX_INTNO)))
+#endif /* TMIN_INTNO == 0 */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯éå§ã¢ãã¬ã¹è¨­å®ãã¯ã­
+ */
+#define TOPPERS_OSTKPT(stk, stksz)	((StackType *) ((sint8 *) (stk) + (stksz)))
+
+/*
+ *  ãã­ã»ããµã®ç¹æ®å½ä»¤ã®ã¤ã³ã©ã¤ã³é¢æ°å®ç¾©
+ */
+#include <prc_insn.h>
+
+/*
+ *  TOPPERSæ¨æºå²è¾¼ã¿å¦çã¢ãã«ã®å®ç¾
+ */
+
+/*
+ * ä¾å¤ï¼å²è¾¼ã¿/CPUä¾å¤ï¼ã®ãã¹ãåæ°ã®ã«ã¦ã³ã
+ *
+ * ã³ã³ãã­ã¹ãåç
+§ã®ããã«ä½¿ç¨
+ */
+extern uint32		except_nest_cnt;
+
+/*
+ *  ã«ã¼ãã«ç®¡çå
+ï¼ã«ãã´ãª2ï¼ã®å²è¾¼ã¿ãç¦æ­¢ããããã®PMRã®è¨­å®å¤
+ */
+extern const uint16	pmr_isr2_mask;
+
+/*
+ *  ã«ã¼ãã«ç®¡çå¤ï¼ã«ãã´ãª1ï¼ã®å²è¾¼ã¿ã¨ãªãåªå
+åº¦ã®PMRã®ããã
+ */
+extern const uint16	pmr_isr1_mask;
+
+/*
+ *  ç¾å¨ã®å²è¾¼ã¿åªå
+åº¦ã®å¤ï¼å
+é¨è¡¨ç¾ï¼
+ */
+extern uint8		current_iintpri;
+
+/*
+ * å²ãè¾¼ã¿è¦æ±ãã¹ã¯ãã¼ãã«ï¼PMRã¸ã®è¨­å®å¤ï¼
+ */
+extern const uint16	pmr_setting_tbl[];
+
+/*
+ *  ç¡éã«ã¼ãå¦ç
+ */
+extern void infinite_loop(void) NoReturn;
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ã®å
+é¨è¡¨ç¾ã¨å¤é¨è¡¨ç¾ã®å¤æ´
+ */
+#ifndef TOPPERS_MACRO_ONLY
+#define EXT_IPM(iipm)	((PriorityType) (iipm - (TNUM_INTPRI)))     /* å
+é¨è¡¨ç¾ãå¤é¨è¡¨ç¾ã« */
+#define INT_IPM(ipm)	((uint32) (ipm + (TNUM_INTPRI)))            /* å¤é¨è¡¨ç¾ãå
+é¨è¡¨ç¾ã« */
+#else /* TOPPERS_MACRO_ONLY */
+#define EXT_IPM(iipm)	(iipm - (TNUM_INTPRI))              /* å
+é¨è¡¨ç¾ãå¤é¨è¡¨ç¾ã« */
+#define INT_IPM(ipm)	(ipm + (TNUM_INTPRI))               /* å¤é¨è¡¨ç¾ãå
+é¨è¡¨ç¾ã« */
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸ã®ç§»è¡
+ */
+LOCAL_INLINE void
+x_lock_all_int(void)
+{
+	disable_int();
+}
+
+/*
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+ */
+LOCAL_INLINE void
+x_unlock_all_int(void)
+{
+	enable_int();
+}
+
+/*
+ *  x_nested_lock_os_int()ã®ãã¹ãåæ°
+ *  ã¢ã¯ã»ã¹ã®é åºãå¤åããªãããï¼volatile ãæå®
+ */
+extern volatile uint8 nested_lock_os_int_cnt;
+
+/*
+ *  OSå²è¾¼ã¿ç¦æ­¢
+ *  APIå®è¡æã«å¼ã³åºããã
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãISR2ã®åªå
+åº¦ãã¹ã¯ã®ç¯å²ããé«ãç¶æ
+ã§å¼ã³åºããã
+ *  ãã¨ã¯ãªã(ISR1ããå¼ã³åºããããã¨ã¯ãªã)
+ */
+LOCAL_INLINE void
+x_nested_lock_os_int(void)
+{
+	/*
+	 *  ä¸æ®µç®ãªãå²è¾¼ã¿ã®ç¦æ­¢ã¬ãã«ã«è¨­å®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¤ãä¿å­
+	 */
+	if (nested_lock_os_int_cnt == 0U) {
+		set_pmr(pmr_isr2_mask);   /* OSå²ãè¾¼ã¿ç¦æ­¢ã«è¨­å® */
+	}
+	nested_lock_os_int_cnt++;
+
+	V850_MEMORY_CHANGED
+}
+
+/*
+ *  OSå²è¾¼ã¿è§£é¤
+ *  APIå®è¡æã«å¼ã³åºããã
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãISR2ã®åªå
+åº¦ãã¹ã¯ã®ç¯å²ããé«ãç¶æ
+ã§å¼ã³åºããã
+ *  ãã¨ã¯ãªã(ISR1ããå¼ã³åºããããã¨ã¯ãªã)
+ */
+LOCAL_INLINE void
+x_nested_unlock_os_int(void)
+{
+	V850_MEMORY_CHANGED
+	ASSERT(nested_lock_os_int_cnt > 0U);
+	nested_lock_os_int_cnt--;
+
+	/*
+	 *  ä¸çªå¤å´ãªãå²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãæ´æ°
+	 */
+	if (nested_lock_os_int_cnt == 0U) {
+		set_pmr(pmr_setting_tbl[current_iintpri]);
+	}
+}
+
+/*
+ *  SuspendOSInterrupts()ããå¼ã³åºãOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸ã®ç§»è¡
+ *  x_nested_lock_os_int()ã¨ã®éãã¯ï¼ISR1ããå¼ã³åºãããå¯è½æ§ãããããï¼
+ *  ç¾å¨ã®ISPRãOSå²è¾¼ã¿ç¦æ­¢æã®å¤ããå°ããå ´åã¯ISR1ããå¼ã³åºãããã¨ãã¦ï¼
+ *  ä½ããããªã¿ã¼ã³ãã
+ */
+LOCAL_INLINE void
+x_suspend_lock_os_int(void)
+{
+	uint16 ispr;
+
+	ispr = get_ispr();
+
+	if ((ispr & pmr_isr1_mask) == 0U) {
+		/*
+		 *  ã«ãã´ãª1 ISRããå¼ã°ããå ´åã¯ä½ãããªã
+		 */
+		if (nested_lock_os_int_cnt == 0U) {
+			set_pmr(pmr_isr2_mask);   /* OSå²ãè¾¼ã¿ç¦æ­¢ã«è¨­å® */
+		}
+		nested_lock_os_int_cnt++;
+		V850_MEMORY_CHANGED
+	}
+}
+
+/*
+ *  ResumeOSInterrupts()ããå¼ã³åºãOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+ *  x_nested_lock_os_int()ã¨ã®éãã¯ï¼ISR1ããå¼ã³åºãããå¯è½æ§ãããããï¼
+ *  ç¾å¨ã®ISPRãOSå²è¾¼ã¿ç¦æ­¢æã®å¤ããå°ããå ´åã¯ISR1ããå¼ã³åºãããã¨ãã¦ï¼
+ *  ä½ããããªã¿ã¼ã³ãã
+ */
+LOCAL_INLINE void
+x_resume_unlock_os_int(void)
+{
+	uint16	ispr;
+
+	V850_MEMORY_CHANGED
+	ispr = get_ispr();
+
+	if ((ispr & pmr_isr1_mask) == 0U) {
+		/*
+		 *  ã«ãã´ãª1 ISRããå¼ã°ããå ´åã¯ä½ãããªã
+		 */
+		ASSERT(nested_lock_os_int_cnt > 0U);
+		nested_lock_os_int_cnt--;
+
+		/*
+		 *  ä¸çªå¤å´ãªãå²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãæ´æ°
+		 */
+		if (nested_lock_os_int_cnt == 0U) {
+			set_pmr(pmr_setting_tbl[current_iintpri]);
+		}
+	}
+}
+
+
+/*
+ *  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®è¨­å®
+ *
+ *  æ¬OSã§ã¯æ¬¡ã®äºç¹ãæãç«ã¤
+ *    * OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºããã
+ *    * OSå²è¾¼ã¿ç¦æ­¢æã®åªå
+åº¦ããé«ãå¤ã¯æå®ãããªã
+ *  OSå²è¾¼ã¿ç¦æ­¢ã¯PMRã§å®ç¾ããã¦ããï¼ããã§PMRãå¤æ´ããã¨ï¼OSå²è¾¼ã¿ç¦æ­¢
+ *  ãè§£é¤ãããå ´åãããããï¼å
+é¨å¤æ°(current_iintpri) ã®å¤æ´ã®ã¿ãè¡ãï¼
+ *  åªå
+åº¦ãã¹ã¯ã®å¤æ´ã¯ï¼APIã®åºå£ã§å¼ã³åºãããï¼x_nested_unlock_os_int()
+ *  ã§å®æ½ãããï¼
+ */
+LOCAL_INLINE void
+x_set_ipm(PriorityType intpri)
+{
+	ASSERT(nested_lock_os_int_cnt > 0U);
+
+	current_iintpri = INT_IPM(intpri);
+}
+
+/*
+ *  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®åç
+§
+ *
+ *  æ¬OSã§ã¯æ¬¡ã®ç¹ãæãç«ã¤
+ *    * OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºããã
+ */
+LOCAL_INLINE PriorityType
+x_get_ipm(void)
+{
+	ASSERT(nested_lock_os_int_cnt > 0U);
+	return(EXT_IPM(current_iintpri));
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®ã»ãã
+ *
+ *  å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããªãå²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ãã¦å²è¾¼ã¿è¦æ±ç¦æ­¢
+ *  ãã©ã°ãã¯ãªã¢ãããã¨ããå ´åã«ã¯ï¼falseãè¿ãï¼
+ */
+LOCAL_INLINE boolean
+x_disable_int(InterruptNumberType intno)
+{
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	if (!VALID_INTNO(intno)) {
+		return(FALSE);
+	}
+
+	/* å²è¾¼ã¿ã®ç¦æ­¢(7bitç®ãã»ãã) */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) | (0x01U << 7));
+
+	return(TRUE);
+}
+/*
+ *  å²è¾¼ã¿è¦æ±ç¦æ­¢ãã©ã°ã®è§£é¤
+ *
+ *  å²è¾¼ã¿å±æ§ãè¨­å®ããã¦ããªãå²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ãã¦å²è¾¼ã¿è¦æ±ç¦æ­¢
+ *  ãã©ã°ãã¯ãªã¢ãããã¨ããå ´åã«ã¯ï¼falseãè¿ãï¼
+ */
+
+LOCAL_INLINE boolean
+x_enable_int(InterruptNumberType intno)
+{
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	if (!VALID_INTNO(intno)) {
+		return(FALSE);
+	}
+
+	/* 7bitç®ãã¯ãªã¢ */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) & ~(0x01U << 7));
+
+	return(TRUE);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+LOCAL_INLINE boolean
+x_clear_int(InterruptNumberType intno)
+{
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	if (!VALID_INTNO(intno)) {
+		return(FALSE);
+	}
+
+	/* å²è¾¼ã¿ã®ã¯ãªã¢(12bitç®ãã¯ãªã¢) */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) & ~(0x01U << 12));
+
+	return(TRUE);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ãã§ãã¯
+ */
+LOCAL_INLINE boolean
+x_probe_int(InterruptNumberType intno)
+{
+	uint32	eic_address = EIC_ADDRESS(intno);
+	uint16	tmp;
+
+	if (!VALID_INTNO(intno)) {
+		return(FALSE);
+	}
+
+	tmp = sil_reh_mem((void *) (eic_address));
+	return((tmp & 0x1000) != 0);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®
+ */
+extern void x_config_int(InterruptNumberType intno, AttributeType intatr, PriorityType intpri);
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®å
+¥ãå£ã§å¿
+è¦ãªIRCæä½
+ */
+LOCAL_INLINE void
+i_begin_int(InterruptNumberType intno)
+{
+
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©ã®åºå£ã§å¿
+è¦ãªIRCæä½
+ */
+LOCAL_INLINE void
+i_end_int(InterruptNumberType intno)
+{
+
+}
+
+/*
+ *  æªå®ç¾©ã®å²è¾¼ã¿ãå
+¥ã£ãå ´åã®å¦ç
+ */
+extern void default_int_handler(void);
+extern void _start(void);
+extern void prc_hardware_initialize(void);
+
+/*
+ *  ãã­ã»ããµä¾å­ã®åæå
+ */
+extern void prc_initialize(void);
+
+/*
+ *  ãã­ã»ããµä¾å­ã®çµäºæå¦ç
+ */
+extern void prc_terminate(void);
+
+/*
+ *  ã¿ã¹ã¯ãã£ã¹ãããã£
+ */
+
+/*
+ *  æé«åªå
+é ä½ã¿ã¹ã¯ã¸ã®ãã£ã¹ãããï¼prc_support.Sï¼
+ *
+ *  dispatch ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãããå¼ã³åºããããµã¼ãã¹ã³ã¼ã«å¦ç
+ *  å
+ã§ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºããªããã°ãªããªã
+ */
+extern void dispatch(void);
+
+/*
+ *  ãã£ã¹ãããã£ã®åä½éå§ï¼prc_support.Sï¼
+ *
+ *  start_dispatchã¯ï¼ã«ã¼ãã«èµ·åæã«å¼ã³åºãã¹ããã®ã§ï¼ãã¹ã¦ã®å²è¾¼
+ *  ã¿ãç¦æ­¢ããç¶æ
+ï¼å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨åç­ã®ç¶æ
+ï¼ã§å¼ã³åºããªããã°
+ *  ãªããªã
+ */
+extern void start_dispatch(void) NoReturn;
+
+/*
+ *  ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ãããï¼prc_support.Sï¼
+ *
+ *  exit_and_dispatch ã¯ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºããªããã°ãªããªã
+ */
+extern void exit_and_dispatch(void) NoReturn;
+
+/* =begin added for SC3 */
+/*
+ *  ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ãããï¼prc_support.Sï¼
+ *   PosttaskHook ãå¼ã°ãªãã¨ã³ããª
+ *
+ *  exit_and_dispatch_nohook ã¯ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºããªããã°ãªããªã
+ */
+extern void exit_and_dispatch_nohook(void) NoReturn;
+/* =end added for SC3 */
+
+/*
+ *  ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ã®å®ç¾©
+ */
+typedef struct task_context_block {
+    /* =begin modified for SC3 */
+	void	*ssp;               /* ã·ã¹ãã ã¹ã¿ãã¯ãã¤ã³ã¿ */
+	void	*usp;               /* ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ */
+    boolean priv_mode;          /* ç¹æ¨©ã¢ã¼ãå®è¡ä¸­ã */
+    /* =end modified for SC3 */
+	FunctionRefType	pc;         /* ãã­ã°ã©ã ã«ã¦ã³ã¿ */
+} TSKCTXB;
+
+/* =begin modified for SC3 */
+/*
+ *	ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯
+ */
+#define USE_TSKINICTXB	/*  TSKINICTXBãä½¿ç¨ãã  */
+
+typedef struct task_initialization_context_block {
+	MemorySizeType sstksz;  /* ã¹ã¿ãã¯é åã®ãµã¤ãºï¼ä¸¸ããå¤ï¼ */
+	void	*sstk_bottom;	/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ï¼ã¹ã¿ãã¯ã®åºã®åæå¤ï¼ */
+	MemorySizeType stksz;   /* ã¹ã¿ãã¯é åã®ãµã¤ãºï¼ä¸¸ããå¤ï¼ */
+	void	*stk_bottom;	/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ï¼ã¹ã¿ãã¯ã®åºã®åæå¤ï¼ */
+} TSKINICTXB;
+
+/* 
+ *  ã¹ã¿ãã¯ã®MPUæ
+å ±
+ */
+typedef struct task_stack_mpu_info_block {
+    uint8 *start_ustk_label;
+    uint8 *limit_ustk_label;
+} STKMPUINFOB;
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³ã®MPUæ
+å ±
+ */
+typedef struct {
+    uint32 mpul;
+    uint32 mpua;
+    uint32 mpat;
+} MPUINFOB;
+
+typedef struct {
+#ifdef __v850e2v3__
+    uint8 *start_text_label;
+    uint8 *limit_text_label;
+    uint8 *start_rosdata_label;
+    uint8 *limit_rosdata_label;
+    uint8 *start_ram_label;
+    uint8 *limit_ram_label;
+    uint8 *start_sram_label;
+    uint8 *limit_sram_label;
+#else /* __v850e2v3__ */
+#ifdef USE_MPU_SRPW_DATA
+    uint8 *start_srpw_label;
+    uint8 *limit_srpw_label;
+#endif /* USE_MPU_SRPW_DATA */
+#ifdef USE_MPU_SRPW_SDATA
+    uint8 *start_ssrpw_label;
+    uint8 *limit_ssrpw_label;
+#endif /* USE_MPU_SRPW_SDATA */
+#ifdef USE_MPU_PR_TEXT
+    uint8 *start_text_label;
+    uint8 *limit_text_label;
+#endif /* USE_MPU_PR_TEXT */
+#ifdef USE_MPU_PR_SDATA
+    uint8 *start_rosdata_label;
+    uint8 *limit_rosdata_label;
+#endif /* USE_MPU_PR_SDATA */
+#ifdef USE_MPU_PRW_DATA
+    uint8 *start_ram_label;
+    uint8 *limit_ram_label;
+#endif /* USE_MPU_PRW_DATA */
+#ifdef USE_MPU_PRW_SDATA
+    uint8 *start_sram_label;
+    uint8 *limit_sram_label;
+#endif /* USE_MPU_PRW_SDATA */
+    MPUINFOB *mpu_area_info;
+    uint8 tnum_mpu_area;
+    uint32 mprc;
+#endif /* __v850e2v3__ */
+} OSAPMPUINFOB;
+/* =end modified for SC3 */
+
+/*
+ *  ã¿ã¹ã¯ã³ã³ãã­ã¹ãã®åæå
+ *
+ *  ã¿ã¹ã¯ãä¼æ­¢ç¶æ
+ããå®è¡ã§ããç¶æ
+ã«ç§»è¡ããæã«å¼ã°ããï¼ãã®æç¹
+ *  ã§ã¹ã¿ãã¯é åãä½¿ã£ã¦ã¯ãªããªã
+ *
+ *  activate_contextãï¼ã¤ã³ã©ã¤ã³é¢æ°ã§ã¯ãªããã¯ã­å®ç¾©ã¨ãã¦ããã®ã¯ï¼
+ *  ãã®æç¹ã§ã¯TCBãå®ç¾©ããã¦ããªãããã§ãã
+ */
+/* =begin modified for SC3 */
+extern void    start_stask_r(void);
+extern void    start_utask_r(void);
+
+#define activate_context(p_tcb)                                         \
+{\
+	(p_tcb)->tskctxb.ssp = (p_tcb)->p_tinib->tskinictxb.sstk_bottom;	\
+	(p_tcb)->tskctxb.pc = ((p_tcb)->p_tinib->p_osapcb->p_osapinib->osap_trusted != FALSE) ? (FunctionRefType)start_stask_r: (FunctionRefType)start_utask_r;       \
+	(p_tcb)->tskctxb.priv_mode = 0U; \
+}
+
+/* 
+ *  force_term_osap_mainã®èµ·å 
+ *  ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®pcã«force_term_osap_mainã®ã¢ãã¬ã¹ãæ ¼ç´ãã 
+ */ 
+#ifdef CFG_USE_STACKMONITORING
+#define activate_force_term_osap_main(p_tcb)                            \
+{\
+	(p_tcb)->tskctxb.ssp = (p_tcb)->p_tinib->tskinictxb.sstk_bottom;	\
+    *(uint32 *)((uint32)((p_tcb)->tskctxb.ssp) - ((p_tcb)->p_tinib->tskinictxb.sstksz)) = STACK_MAGIC_NUMBER;	\
+    (p_tcb)->tskctxb.pc = &(force_term_osap_main);                      \
+}
+#else /*CFG_USE_STACKMONITORING*/
+#define activate_force_term_osap_main(p_tcb)                            \
+{\
+	(p_tcb)->tskctxb.ssp = (p_tcb)->p_tinib->tskinictxb.sstk_bottom;	\
+    (p_tcb)->tskctxb.pc = &(force_term_osap_main);                      \
+}
+#endif /*CFG_USE_STACKMONITORING*/
+
+#define TOPPERS_SSTK_MAGIC_REGION(p_tinib)	((StackType *) ((uint32)(p_tinib)->tskinictxb.sstk_bottom - (uint32)(p_tinib)->tskinictxb.sstksz))
+/* =end modified for SC3 */
+
+/* å¼æ°ã®åã¯ãã¼ãã¦ã§ã¢ãæ±ãããµã¤ãºï¼uint32ï¼ã¨åãµã¤ãºãä½¿ç¨ */
+extern void stack_change_and_call_func_1(void (*func)(StatusType ercd), uint32 arg1);
+extern void stack_change_and_call_func_2(void (*func)(StatusType ercd, OSServiceIdType svcid), uint8 arg1, uint8 arg2);
+
+/* 
+ *  850ã§ã¯å
+¨ã¦ã®å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«å¯¾ãã¦ 
+ *  æå¹/ç¡å¹ãå¶å¾¡å¯è½ã§ããããï¼å¸¸ã«trueãè¿ã 
+ */ 
+#define target_is_int_controllable(intno) TRUE
+
+#ifdef ENABLE_RETURN_MAIN
+/*
+ *  AKTSPç¨ã®main()ã¸ã®ãªã¿ã¼ã³ã³ã¼ãï¼prc_support.Sï¼
+ */
+extern void return_main(void);
+#endif /* ENABLE_RETURN_MAIN */
+
+/* =begin modified for SC3 */
+#define call_protectionhk_main_stkchg(ercd)	stack_change_and_call_func_1(&call_protectionhk_main, ((uint32) (ercd)))
+
+extern StatusType trustedfunc_stack_check(MemorySizeType size);
+extern StatusType no_support_service(void);
+
+/*
+ * OSå²è¾¼ã¿ç¦æ­¢æã®status.ILã¸ã®è¨­å®å¤
+ */
+extern const uint32	tmin_status_il;
+
+/*
+ *  x_nested_lock_os_int()ã®ãã¹ãåæ°
+ *  ã¢ã¯ã»ã¹ã®é åºãå¤åããªãããï¼volatile ãæå®
+ */
+extern volatile uint8	nested_lock_os_int_cnt;
+
+LOCAL_INLINE void
+x_clear_nested_os_int(void)
+{
+	ASSERT(nested_lock_os_int_cnt > 0U);
+	nested_lock_os_int_cnt = 1U;
+}
+
+#define check_address_sstack(base, size, p_tinib) (check_address_stack(base, size, (const MemoryStartAddressType)((uint32)(p_tinib)->tskinictxb.sstk_bottom - (uint32)(p_tinib)->tskinictxb.sstksz), (p_tinib)->tskinictxb.sstksz))
+#define check_address_ustack(base, size, p_tinib) (check_address_stack(base, size, (const MemoryStartAddressType)((uint32)(p_tinib)->tskinictxb.stk_bottom - (uint32)(p_tinib)->tskinictxb.stksz), (p_tinib)->tskinictxb.stksz))
+
+/* =end modified for SC3 */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/* =begin modified for SC3 */
+/*
+ *  syscallã®ãã©ã¡ã¼ã¿
+ */
+#define NO_SVC          1   /* ãµã¼ãã¹ã³ã¼ã«å¼ã³åºãæã®svcã®å¼æ° */
+
+#ifdef USE_KERNEL_LIBRARY_SYSLOG
+#include "prc_syslog.h"
+#endif /* USE_KERNEL_LIBRARY_SYSLOG */
+/* =end modified for SC3 */
+
+#define NTC2ISR
+
+#endif /* TOPPERS_PRC_CONFIG_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_def.csv
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_def.csv	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_def.csv	(revision 172)
@@ -0,0 +1,63 @@
+offsetof_TCB_p_tinib,"offsetof(TCB,p_tinib)"
+offsetof_TCB_curpri,"offsetof(TCB,curpri)"
+offsetof_TCB_ssp,"offsetof(TCB,tskctxb.ssp)"
+offsetof_TCB_usp,"offsetof(TCB,tskctxb.usp)"
+offsetof_TCB_priv_mode,"offsetof(TCB,tskctxb.priv_mode)"
+offsetof_TCB_pc,"offsetof(TCB,tskctxb.pc)"
+offsetof_TINIB_exepri,"offsetof(TINIB,exepri)"
+offsetof_TINIB_TSKINICTXB_sstksz,"offsetof(TINIB,tskinictxb.sstksz)"
+offsetof_TINIB_TSKINICTXB_sstk_bottom,"offsetof(TINIB,tskinictxb.sstk_bottom)"
+offsetof_TINIB_TSKINICTXB_stksz,"offsetof(TINIB,tskinictxb.stksz)"
+offsetof_TINIB_TSKINICTXB_stk_bottom,"offsetof(TINIB,tskinictxb.stk_bottom)"
+offsetof_TINIB_STKMPUINFOB_start_ustk,"offsetof(TINIB,stkmpu.start_ustk_label)"
+offsetof_TINIB_STKMPUINFOB_limit_ustk,"offsetof(TINIB,stkmpu.limit_ustk_label)"
+offsetof_OSAPCB_p_osapinib,"offsetof(OSAPCB,p_osapinib)"
+offsetof_TINIB_p_osapcb,"offsetof(TINIB,p_osapcb)"
+offsetof_INTINIB_remain_stksz,"offsetof(INTINIB,remain_stksz)"
+offsetof_ISRINIB_p_intinib,"offsetof(ISRINIB,p_intinib)"
+offsetof_ISRINIB_p_osapcb,"offsetof(ISRINIB,p_osapcb)"
+offsetof_OSAPINIB_osap_trusted,"offsetof(OSAPINIB,osap_trusted)"
+offsetof_OSAPINIB_osapmpu,"offsetof(OSAPINIB,osap_mpu)"
+offsetof_OSAPINIB_start_text,#defined(USE_MPU_PR_TEXT),,"offsetof(OSAPINIB,osap_mpu.start_text_label)"
+offsetof_OSAPINIB_limit_text,#defined(USE_MPU_PR_TEXT),,"offsetof(OSAPINIB,osap_mpu.limit_text_label)"
+offsetof_OSAPINIB_start_rosdata,#defined(USE_MPU_PR_SDATA),,"offsetof(OSAPINIB,osap_mpu.start_rosdata_label)"
+offsetof_OSAPINIB_limit_rosdata,#defined(USE_MPU_PR_SDATA),,"offsetof(OSAPINIB,osap_mpu.limit_rosdata_label)"
+offsetof_OSAPINIB_start_ram,#defined(USE_MPU_PRW_DATA),,"offsetof(OSAPINIB,osap_mpu.start_ram_label)"
+offsetof_OSAPINIB_limit_ram,#defined(USE_MPU_PRW_DATA),,"offsetof(OSAPINIB,osap_mpu.limit_ram_label)"
+offsetof_OSAPINIB_start_sram,#defined(USE_MPU_PRW_SDATA),,"offsetof(OSAPINIB,osap_mpu.start_sram_label)"
+offsetof_OSAPINIB_limit_sram,#defined(USE_MPU_PRW_SDATA),,"offsetof(OSAPINIB,osap_mpu.limit_sram_label)"
+offsetof_OSAPINIB_start_srpw,#defined(USE_MPU_SRPW_DATA),,"offsetof(OSAPINIB,osap_mpu.start_srpw_label)"
+offsetof_OSAPINIB_limit_srpw,#defined(USE_MPU_SRPW_DATA),,"offsetof(OSAPINIB,osap_mpu.limit_srpw_label)"
+offsetof_OSAPINIB_start_ssrpw,#defined(USE_MPU_SRPW_SDATA),,"offsetof(OSAPINIB,osap_mpu.start_ssrpw_label)"
+offsetof_OSAPINIB_limit_ssrpw,#defined(USE_MPU_SRPW_SDATA),,"offsetof(OSAPINIB,osap_mpu.limit_ssrpw_label)"
+offsetof_OSAPINIB_mpu_area_info,"offsetof(OSAPINIB,osap_mpu.mpu_area_info)"
+offsetof_OSAPINIB_tnum_mpu_area,"offsetof(OSAPINIB,osap_mpu.tnum_mpu_area)"
+offsetof_OSAPINIB_mprc,"offsetof(OSAPINIB,osap_mpu.mprc)"
+sizeof_OSAPINIB,"sizeof(OSAPINIB)"
+offsetof_ISRCB_p_isrinib,"offsetof(ISRCB,p_isrinib)"
+TNUM_INTPRI,TNUM_INTPRI
+TNUM_INT,TNUM_INT
+__v850e2v3__,#defined(__v850e2v3__)
+__v850e3v5__,#defined(__v850e3v5__) 
+E_OS_PROTECTION_MEMORY,E_OS_PROTECTION_MEMORY
+E_OS_PROTECTION_EXCEPTION,E_OS_PROTECTION_EXCEPTION
+TNUM_MPU_REG,#defined(TNUM_MPU_REG),,TNUM_MPU_REG,0
+USE_MPU_SRPW_DATA,#defined(USE_MPU_SRPW_DATA),,1,0
+USE_MPU_SRPW_SDATA,#defined(USE_MPU_SRPW_SDATA),,1,0
+USE_MPU_PR_TEXT,#defined(USE_MPU_PR_TEXT),,1,0
+USE_MPU_PR_SDATA,#defined(USE_MPU_PR_SDATA),,1,0
+USE_MPU_PRW_DATA,#defined(USE_MPU_PRW_DATA),,1,0
+USE_MPU_PRW_SDATA,#defined(USE_MPU_PRW_SDATA),,1,0
+USE_MPU_SRW_DATA_SDATA,#defined(USE_MPU_SRW_DATA_SDATA),,1,0
+USE_MPU_SR_TEXT,#defined(USE_MPU_SR_TEXT),,1,0
+USE_MPU_SR_DATA_SDATA,#defined(USE_MPU_SR_DATA_SDATA),,1,0
+offsetof_ISRCB_usp,"offsetof(ISRCB,tskctxb.usp)"
+offsetof_ISRCB_ssp,"offsetof(ISRCB,tskctxb.ssp)"
+offsetof_ISRINIB_sstk_bottom,"offsetof(ISRINIB,tskinictxb.sstk_bottom)"
+offsetof_ISRINIB_ustk_bottom,"offsetof(ISRINIB,tskinictxb.stk_bottom)"
+offsetof_QUEUE_prev,"offsetof(QUEUE,p_prev)"
+offsetof_QUEUE_next,"offsetof(QUEUE,p_next)"
+offsetof_ISRCB_next,"offsetof(ISRCB,isr_queue.p_next)"
+offsetof_ISRCB_prev,"offsetof(ISRCB,isr_queue.p_prev)"
+offsetof_ISRINIB_start_ustk,"offsetof(ISRINIB,stkmpu.start_ustk_label)"
+offsetof_ISRINIB_limit_ustk,"offsetof(ISRINIB,stkmpu.limit_ustk_label)"
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_design.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_design.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_design.txt	(revision 172)
@@ -0,0 +1,613 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼V850ä¾å­é¨è¨­è¨ã¡ã¢ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯V850ãã­ã»ããµä¾å­é¨ã®è¨­è¨ã¡ã¢ãè¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: prc_design.txt 187 2015-06-25 03:39:04Z t_ishikawa $
+----------------------------------------------------------------------
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼V850E2ä¾å­é¨ã®è¨­è¨ã¡ã¢ã§ããï¼ä½æä¸­ã®ãã®ã§ããï¼
+ç¶²ç¾
+çã§ã¯ãªãï¼GHSã«é¢é£ããäºé 
+ããã®ã¡ã¢ã«è¨è¼ããï¼
+  
+---------------------------------------------------------------------
+æ¢ç¥ã®åé¡
+---------------------------------------------------------------------
+ã»(GCC) -msoft-float
+  ã»gcc 4.7(v12.02)ã§ã¯-msoft-floatãªãã·ã§ã³ãç¡ããªã£ã¦ããï¼
+
+ã»(GCC)CubeSuite+(V1.03.000)ã®LMAéå¯¾å¿
+  ã»åæå¤ä»ãå¤æ°ã®ããã«VMAã¨LMAãç°ãªãelfãã¡ã¤ã«ãä½æãã¦ãï¼VMA
+    ã®å ´æã«ãã¼ã¿ãã­ã¼ããããï¼
+  ã»å®è¡æã«ã¯æ¯åãã¦ã³ã­ã¼ãå¿
+è¦ï¼
+  
+ã»(GHS) GNUã® Asm("" ::: "memory")ç¸å½ã®å½ä»¤
+ ã»é¢æ°åä½ã§pragmaãä½¿ãã¡ã¢ãªæé©åãæå¶ããæ¹æ³ã¯ãããï¼é¢æ°å
+ã§
+   ä½¿ç¨ãããã¨ã¯ã§ããªãï¼ãã®ããï¼GNUã® Asm("" ::: "memory")ç¸å½ã®
+   å½ä»¤ã¯å­å¨ããªãï¼
+  
+---------------------------------------------------------------------
+Tips
+---------------------------------------------------------------------
+FL4ã«ã¦ä¸å®æéå¾ã«ãªã»ãããçºçï¼
+ ã»WDTã§VACæ©è½ãONã«ãªã£ã¦ããï¼
+ ã»ãªãã·ã§ã³ãã¤ãã§è¨­å®ï¼ãããã¬ããè¨­å®ï¼
+ OPBT0 - ãã©ãã·ã¥ã»ãã¹ã¯ã»ãªãã·ã§ã³ã®ã¬ã¸ã¹ã¿0
+ ã»ã¢ãã¬ã¹ FF47000CH
+ ã»OPBT0ã®å¤ã«ãã£ã¦ã¯èµ·åæããWDTãæå¹ã¨ãªãï¼
+ ã»ãªã¼ã«0ã§åæ­¢ããï¼
+ OPBT0ã®å¤æ´
+ ã»ãããã¬ã§ã¿ã¼ã²ããã«æ¥ç¶
+ ã»ãããã°ã»ãã¼ã«ã®ãã­ããã£ãã©ãã·ã¥ã»ãªãã·ã§ã³ã¿ãã«è¡¨ç¤ºããã
+ ã»ã...ããã¿ã³ãã¯ãªãã¯ãã¦ã¡ãã¥ã¼ãå¼ã³åºãã¦å¤æ´ï¼
+
+---------------------------------------------------------------------
+V850E2ä»æ§(V850E2v3)
+---------------------------------------------------------------------
+âå²è¾¼é¢é£
+
+å²è¾¼ã¿åªå
+åº¦
+ å¤ãå°ããã»ã©åªå
+åº¦ãé«ã
+ 0ãæé«ï¼15ãæä½åªå
+åº¦ï¼
+ 
+å²è¾¼ã¿é¢é£ã¬ã¸ã¹ã¿
+ ã»EICC : å²è¾¼ã¿è¦å ã®åå¾
+ ã»EIWR : å²è¾¼ã¿çºçæã®ä½æ¥­ç¨ã¬ã¸ã¹ã¿
+ ã»ISPR : åä»ä¸­ã®å²è¾¼ã¿
+ ã»PMR  : å²è¾¼ã¿åªå
+åº¦ãã¹ã¯
+ ã»ISPC : åä»ä¸­ã®å²è¾¼ã¿ã®ã¯ãªã¢
+     
+ãã¯ã¿
+ ã»å²è¾¼ã¿è¦å æ¯ã®ãã¯ã¿ï¼
+   ã»å²è¾¼ã¿æ¯ã«16bypte
+         è¦å            : ãªã¿ã¼ã³å½ä»¤
+ 0x00 : ãªã»ãã       
+ 0x10 : FEã¬ãã«ãã¹ã«ãã«å²è¾¼ã¿ : feret
+ 0x20 : FEã¬ãã«ãã³ãã¹ã«ãã«å²è¾¼ã¿ : feret
+ 0x30 : ã·ã¹ãã ã¨ã©ã¼ä¾å¤ã»å¨è¾ºä¿è­·ä¾å¤ã»ã¿ã¤ãã³ã°ç£è¦ä¾å¤ : feret
+ 0x40 : EIã¬ãã«ã½ããã¦ã§ã¢ä¾å¤ : eiret
+ 0x50 : EIã¬ãã«ã½ããã¦ã§ã¢ä¾å¤ : eiret
+ 0x70 : æµ®åå°æ°ç¹æ¼ç®ä¾å¤       : eiret
+ 0x80 : EIã¬ãã«ãã¹ã«ãã«å²è¾¼ã¿ : eiret
+  
+FEINT/FENMI å²è¾¼ã¿
+ ã»CPUã·ã¹ãã ä»¥å¤ã§å®ç¾©ãããä¾å¤ãªã©ã§å©ç¨ããï¼
+ ã»ä¾ãã°ãAUTOSARã®æéç£è¦ãªã©ã®å¤ä»ãã¿ã¤ããªã©ãFEINTã«ã¤ãªãã§ï¼
+   éå¸¸ã®ãã­ã°ã©ã ã®å²è¾¼ã¿ç¦æ­¢è¨±å¯(EIã¬ãã«)ã®å½±é¿ãåããã«å²è¾¼ã¿ã
+   åãä»ããããã«ãããã¨ãã§ããï¼
+ ã»FENMIã®ã»ãã¯WatchDogãªã©ãæ³å®ãã¦ããï¼
+ ã»å
+ã
+ã¯ä¸è¬ã¢ããªã¨ã¯ç°ãªãç·æ¥åº¦ã®é«ãå²ãè¾¼ã¿ã¨ãã¦æ©è½ããããã¨ã
+   æ³å®ãã¦ããï¼
+    
+eiret/feret å½ä»¤
+   EIã¬ãã«ã®ä¾å¤å¦çããã®å¾©å¸°
+    eiretå½ä»¤
+   FEã¬ãã«ã®ä¾å¤å¦çããã®å¾©å¸°
+    feretå½ä»¤
+   ããããPSWã®EPã0ã®å ´åã«ä¾å¤ã«ã¼ãã³ã®å®è¡ãçµäºãããã¨ãå¤é¨
+   ï¼å²è¾¼ã¿ã³ã³ãã­ã¼ã©ï¼ã«ä¼ããï¼
+   PSWã®EP(bit6)
+    å²è¾¼ã¿ä»¥å¤ã®ä¾å¤å¦çä¸­ã§ãããã¨ãç¤ºãï¼ãã®ããããã»ããããã¦ã
+    ä¾å¤è¦æ±ã®åãä»ãã«ã¯å½±é¿ããªãï¼
+     0 : å²è¾¼ã¿å¦çä¸­ã§ããï¼
+     1 : å²è¾¼ã¿ä»¥å¤ã®ä¾å¤å¦çä¸­
+   PSWã®NP(bit7)
+     '0' : FEã¬ãã«ä¾å¤å¦çä¸­ã§ã¯ãªãï¼
+     '1' : å¤éä¾å¤ã®çºçåã³å²ãè¾¼ã¿ã®çºçãç¦æ­¢ããï¼     
+ã»PSWã®EP=0ã®æã«eiretãããã¨ï¼ISPRãå²è¾¼ã¿åã«æ»ããï¼ISPCãä½¿ã£ã¦
+  All 0ã«ã¯ãªã¢ãããã¨ã§è¯ããã°(å²è¾¼ã¿ã®ä¸çªå¤ã®ã¿å®è¡ããã°ãããªã
+  )ï¼eirteã¯å¿
+è¦ãªãï¼
+ã»ä¾å¤ã«é¢ãã¦ã¯ï¼feretã¯EP=1ã¨ãªã£ã¦ããã®ã§ï¼å¼ã³åºãã¦ãå¼ã³åºããª
+  ãã¦ãåé¡ãªãï¼
+ã»FEINT/FENMIã¯feretãè¡ãå¿
+è¦ãããï¼(ISPRã¨ã¯å¥ã«åªå
+åº¦ç®¡çãããã
+  ããï¼ã¯ãªã¢ããå¿
+è¦ããã ICSR.FNEã¨ICSR.FIE)    
+ã»PSWã®EPã'1'ã®ç¶æ
+ã§eiret/feretãå®è¡ããã°ï¼åã«eipc/eipswã¾ãã¯
+  fepc/fepswãpc/pswã«å¾©å¸°ããã®ã¿ã¨ãªãï¼ç¹ã«ä»ã«å¯ä½ç¨ã¯ãªãï¼
+
+    
+   ã»0x10 : FEã¬ãã«ãã¹ã«ãã«å²è¾¼ã¿   feret
+   ã»0x20 : FEã¬ãã«ãã³ãã¹ã«ãã«å²è¾¼ã¿ï¼åéã»åå¾©ä¸å¯è½ï¼ feret
+   ã»0x30 : FEä¾å¤                                           feret
+            ã·ã¹ãã ã¨ã©ã¼ä¾å¤ï¼åéã»åå¾©ä¸å¯è½ï¼  
+            å¨è¾ºä¿è­·ä¾å¤ï¼åå¾©ä¸å¯è½ï¼  
+            ã¿ã¤ãã³ã°ç£è¦éå
+            å®è¡ä¿è­·
+            ã¡ã¢ãªã¨ã©ã¼ï¼åå¾©ä¸å¯è½ï¼  
+            ãã¼ã¿ä¿è­·
+            ã³ãã­ã»ããµä¾å¤
+            äºç´å½ä»¤ä¾å¤
+            ï¼¦ï¼¥ã¬ãã«ã½ããã¦ã§ã¢ä¾å¤
+            ã³ãã­ã»ããµä½¿ç¨ä¸å¯
+            äºç´å½ä»¤
+            FEã¬ãã«ã½ããã¦ã§ã¢ä¾å¤            
+            ->ä¾å¤è¦å ã³ã¼ã
+   ã»0x40 : EIã¬ãã«ã½ããã¦ã§ã¢ä¾å¤ï¼Trapï¼eiret <- å²è¾¼ã¿ã¨ãã¦æ±ã?
+            ä¾å¤è¦å ã³ã¼ã : 0x40 - 0x4F
+   ã»0x50 : EIã¬ãã«ã½ããã¦ã§ã¢ä¾å¤ï¼Trapï¼eiret <- å²è¾¼ã¿ã¨ãã¦æ±ã?
+            ä¾å¤è¦å ã³ã¼ã : 0x50 - 0x5F
+   ã»0x70 : æµ®åå°æ°ç¹ï¼åå¾©ä¸å¯è½ï¼        eiret <- å²è¾¼ã¿ã¨ãã¦æ±ã?
+            æµ®åå°æ°ç¹ä¾å¤
+            ä¾å¤è¦å ã³ã¼ã : 0x71
+   ã»0x80 : EIã¬ãã«ãã¹ã«ãã«å²è¾¼ã¿
+   
+âã¬ã¸ã¹ã¿
+
+ã»ã·ã¹ãã ã¬ã¸ã¹ã¿ãã³ã¯
+  ã»BSELã«ããé¸æ 
+  ã»pswã«ã¢ã¯ã»ã¹ããéã«ã¯å¸¸ã«ãã³ã¯ãåãæ¿ãã¦ã¢ã¯ã»ã¹ï¼
+  
+ã»ã¬ã¸ã¹ã¿å¥å
+  r31 : lp
+  r30 : ep
+  r3  : sp
+  r4  : gp
+  r5  : tp
+ 
+ 
+âå½ä»¤
+
+callt å½ä»¤
+ã»ã³ã³ãã¤ã©ãªãã·ã§ã³ -mdisable-callt ãä»ããªãã¨ä½¿ç¨ãããï¼
+ã»ãªã³ã¯ãå«ãã¦ã³ã¼ãå
+¨ä½ãçºããæã«ï¼æé »åºãã­ãã¯ã«é¢æ°ã®åºå
+¥å£å¦
+  çã§ã®ã¹ã¿ãã¯éé¿ï¼å¾©å¸°å¦çãããï¼ãã®ããï¼ã³ã¼ããµã¤ãºç¸®å°ã®ãã
+  ã®å
+±éãã­ãã¯ã¨ãã¦Calltå½ä»¤ã§å¼ã³åºãããã³ã¼ãã«å¤æããåºå
+¥å£å¦
+  çã®å§ç¸®ãå³ãï¼  
+ã»åå½ä»¤ã«åãè¾¼ããããã³ã¼ãå¹çãè¯ããã¾ããé¢æ°ã«ãã¦Far 
+  jump(mov+jmp=64ããã)ãããããå°ãã(16ããã)ã¨ããç¹ãå©ç¨ä¾¡å¤ã¨
+  ãªãï¼    
+ã»ãã ãï¼Calltå½ä»¤ã¯flashãã¢ã¯ã»ã¹ããããï¼éåº¦ä½ä¸ãæãã¦ãã¾ãã
+  ãï¼éåº¦éè¦ã®æé©åã§ã¯OFFã¨ããï¼
+  
+sld/sstå½ä»¤(epããã¼ã¹ãã¤ã³ã¿ã«ä½¿ç¨ãã)
+ã»sld/sstã¯ã16ãããå½ä»¤ã§ãµã¤ãºæé©åæã«å±æçã«å©ç¨ãããï¼
+
+---------------------------------------------------------------------
+ä¾å­é¨ã®è¨­è¨
+---------------------------------------------------------------------
+âå²è¾¼å¦çã¢ãã«
+
+å²è¾¼ã¿ç¦æ­¢
+ã»IMR(EICn)ã«ããå®ç¾
+
+å²è¾¼ã¿åªå
+åº¦
+ã»PMR(ããããªã®ã§æ³¨æ)ã«ããå®ç¾
+  0ã15ã®16æ®µé
+  0ãæé«åªå
+åº¦15ãæä½åªå
+åº¦ï¼
+  ãã­ã»ããµã®å
+é¨è¡¨ç¾ã¨å¤é¨è¡¨ç¾ã®é¢ä¿
+    0ã15,16
+  -16ã-1,0    
+  
+å²è¾¼ã¿ãã³ãã©
+ã»FEã¬ãã«ãã¹ã«ãã«å²è¾¼ã¿ã»ãã³ãã¹ã«ãã«å²è¾¼ã¿ã¯æ±ããªããï¼ä¾å¤
+  çªå·ã¯å²ãä»ããï¼
+  ã»ä¾å¤çªå·ï¼1,2
+ã»EIã¬ãã«ã½ããã¦ã§ã¢ä¾å¤ï¼Trapï¼ã¯ï¼ä¾å¤ã¨ãã¦æ±ãï¼
+  ã»2ç¨®é¡ã®ä¾å¤ã¨ãã¦ï¼ä¾å¤çªå·:4ã¨5
+ã»æµ®åå°æ°ç¹ï¼åå¾©ä¸å¯è½ï¼ã¯ä¾å¤ã¨ãã¦æ±ãï¼
+  ã»1ç¨®é¡ã®ä¾å¤ã¨ãã¦æ±ã,ä¾å¤çªå·7
+ã»FEä¾å¤ãä¾å¤ã¨ãã¦æ±ãï¼ä¾å¤è¦å ã³ã¼ããã¹ãã¼ã¹ãªã®ã§ï¼ç¾ç¶ã§ã¯
+  ç´°ããåå²ã¯è¡ããï¼å
+¨ã¦ä¾å¤çªå·3ã®ä¾å¤ã¨ãã¦æ±ãï¼
+
+---------------------------------------------------------------------
+GHSå¯¾å¿
+---------------------------------------------------------------------
+âåºæ¬
+
+ã»ã³ã³ãã¤ã©ã®å¤æ­ãã©ã°
+   __ghs__
+   
+ã»ãªã³ã«ã¹ã¯ãªãã
+  ã»ã¼GNUäºæã ãè¥å¹²ç°ãªã
+
+ã»ã¤ã³ã©ã¤ã³ã¢ã»ã³ãã©  
+  Asm("" ::: "memory"); ç¸å½ãç¨æããã¦ããªãï¼  
+  Asm ã¯åã«asmã§ããï¼
+  pswã®è¨­å®,di,eiã¯çµè¾¼ã¿é¢æ°ãä½¿ãï¼
+   psw =  __GETSR()
+   __SETSR(psw)
+   __DI();
+   __EI();
+   
+ã»ã¢ã»ã³ãã©ãã¯ã­
+  ãã¯ã­ã®å¤§æ ã®æ¸ãæ¹ã¯åãã ãï¼å¼æ°ãåç
+§ããã¨ãã«\ãå¿
+è¦ãªãï¼
+  
+ã»ã³ãã³ãã©ã¤ã³
+  ccv850   
+
+ã»ã³ã³ãã¤ã«ãªãã·ã§ã³
+ ç¾ç¶ä»¥ä¸ã®ãªãã·ã§ã³ã§åä½ãç¢ºèªï¼
+  -cpu=v850e2v3               : E2V3å¯¾å¿
+  -gcc                        : GCCäºææ©è½
+  -preprocess_assembly_files  : ã¢ã»ã³ããªãã¡ã¤ã«ãããªãã­ã»ã¹
+  -kanji=euc                  : æ¼¢å­ã³ã¼ãã®æå®
+  -noobj                      : ã¢ã»ã³ããªè¨èªãã¡ã¤ã«ãçæï¼ä¸è¦ãªã»
+                                ã¯ã·ã§ã³ãåé¤ï¼
+  -g                          : ãããã°
+  -O2                         : æé©å
+  
+ MULTIãä½¿ãã¨ä»¥ä¸ã®ãªãã·ã§ã³ãè¿½å ã¨ãªãï¼
+  -Onone
+   -e 
+   -no_japanese_automotive_c
+   --no_exceptions
+   --slash_comment
+   -locatedprogram
+   --no_additional_output
+   -nostrip
+   -Qn
+   -noentry
+   -O2
+   -nostartfiles
+   -srec
+   -kanji=euc
+   --asm_silent
+
+ã»GNUã®asm(:::"memory")ç¸å½ã®è¨è¿°
+  GHSã«ã¯GNUã®asm(:::"memory")ç¸å½ã®è¨è¿°ããããã¨ãã§ããªãï¼ãã®ããï¼
+  V850_MEMORY_CHANGED ã¯ï¼ç©ºã®é¢æ°ãå¼ã³åºããã¨ã§å®ç¾ããï¼
+  
+---------------------------------------------------------------------
+ã¹ã¢ã¼ã«ãã¼ã¿ã¨ãªã¢(SDA)ã®æå¹å
+---------------------------------------------------------------------
+ã»ã¯ã·ã§ã³å
+ ã».sdata
+ ã».sbss
+ ã».rosdata
+ ã»SMALLCOMMON
+
+---------------------------------------------------------------------
+RH850(V850E3v5)ã®ä¾å¤å¦ç
+---------------------------------------------------------------------
+RH850ã§ã¯ï¼ä¾å¤ã»å²è¾¼ã¿çºçæã«ãã¯ã¿ããå®è¡ãããï¼ãã¯ã¿ã®ç¨®é¡ã¯æ¬¡
+ã®éãã§ããï¼
+
+ãªãã»ãã : å¾
+é¿ãªã½ã¼ã¹ : åç§°
+0x0000 : -  : ãªã»ãã
+0x0010 : FE : ã·ã¹ãã ã¨ã©ã¼
+0x0020 : FE : ãã¤ãã¼ãã¤ã¶ã¼ãã©ãã
+0x0030 : FE : FEã¬ãã«ãã©ãã
+0x0040 : EI : EIã¬ãã«ãã©ãã0
+0x0050 : EI : EIã¬ãã«ãã©ãã1
+0x0060 : EI : äºç´å½ä»¤ä¾å¤
+0x0070 : EI : FPUä¾å¤
+0x0080 : FE : ã³ãã­ã»ããµä½¿ç¨ä¸å¯ä¾å¤
+0x0090 : FE : ã¡ã¢ãªä¿è­·ä¾å¤
+0x00a0 : FE : ç¹æ¨©å½ä»¤ä¾å¤
+0x00b0 : DB : ãããã°
+0x00c0 : FE : ãã¹ã¢ã©ã¤ã³ä¾å¤
+0x00d0 : ?  : R.F.U(reserved for future use)
+0x00e0 : FE : FENMI
+0x00f0 : FE : FEINT
+0x0100 : EI : EIå²è¾¼ã¿(åªå
+åº¦0)
+   ...
+0x01f0 : EI : EIå²è¾¼ã¿(åªå
+åº¦15)
+
+
+ã¸ã£ã³ãå
+ã«ã¤ãã¦ã¯ï¼æ¬¡ã®ããã«ããï¼
+
+ãªã»ãã -> __start
+
+EIå²è¾¼ã¿ ->  interrupt
+
+å¾
+é¿ãªã½ã¼ã¹ FE ->  _fe_exception_entry
+å¾
+é¿ãªã½ã¼ã¹ EI ->  _ei_exception_entry
+
+ãã®ä»
+ãããã°ã¨ãã¹ã¢ã©ã¤ã³ä¾å¤ã«é¢ãã¦ã¯ï¼çºçãããã¨ã¯ãªãã®ã§ï¼ãã¯ã¿å
+
+ã§ç¡éã«ã¼ãã¨ããï¼
+
+
+---------------------------------------------------------------------
+V850/RH850ã®ABI
+---------------------------------------------------------------------
+âç¨èª
+ã»caller : å¼ã³åºãå
+ãä¿å­(å¼ã³åºãå
+ã¯ä¿å­ãªãã«ä½¿ãã)
+ã»callee : å¼ã³åºãå
+ãä¿å­(ä½¿ç¨æã¯ä¿å­ãã¦ãã)
+ã»fixed  : èµ·åæã®è¨­å®å
+å®¹ãä¿æ
+
+âåæ
+ã»V850ã¯çµ±ä¸ããABIããªãã³ã³ãã¤ã©æ¯ã«ABIãå®ç¾©ãã¦ãã
+ã»RH850ã§ã¯ãã­ã»ããµã§ABIãå®ç¾©ãã¦ããï¼
+
+âãã¼ã¸ã§ã³
+CX   : V2.01.00
+CCRH : V2.01.00
+
+
+âABIä¸è¦§
+
+âV850:GNU
+ã¬ã¸ã¹ã¿:      å¥åç­                  :  æ±ã
+R0      : ã¼ã­                         : fixed 
+R1      : ã³ã³ãã¤ã©ã»ã¢ã»ã³ãã©ãä½¿ç¨ : caller 
+R2      : OSäºç´                       : caller (-mapp-regs:ãã£ãã©ã«ã), fixed(-mno-app-regs)
+R3      : SP                           : callee 
+R4      : GP                           : fixed
+R5      : TP                           : caller (-mapp-regs:ãã£ãã©ã«ã), fixed(-mno-app-regs)
+R6-R9   : é¢æ°ã®å¼æ°                   : caller 
+R10     : æ»ãå¤                       : caller 
+R11     : 64bitã®æ»ãå¤                : caller 
+R12-R19 :                              : caller 
+R20-R27 :                              : callee 
+R28     : FP                           : callee 
+R29     :                              : callee 
+R30     : EP                           : caller (-mtda=0æ), fixed(æªå®æå®æ) *
+R31     : ãªã³ã¯ãã¤ã³ã¿               : caller
+
+SC3ã§ã¯ï¼-mno-app-regsãæå®ï¼
+
+
+âV850:GHS(V5)
+ã¬ã¸ã¹ã¿:      å¥åç­                  :  æ±ã
+R0      : ã¼ã­                         : fixed
+R1      : ã³ã³ãã¤ã©ã»ã¢ã»ã³ãã©ãä½¿ç¨ : caller 
+R2      : OSäºç´                       : caller or fixed(-reserve_r2)
+R3      : SP                           : callee 
+R4      : GP                           : fixed
+R5      : TP(ROSDAãã¼ã¹)              : caller or fixed
+R6-R9   : é¢æ°ã®å¼æ°                   : caller 
+R10     : æ»ãå¤                       : caller 
+R11     : 64bitã®æ»ãå¤                : caller 
+R12-R19 :                              : caller 
+R20-R27 :                              : callee 
+R28     : FP                           : callee  
+R29     :                              : callee 
+R30     : EP                           : caller(-notda)ï¼or fixed *1
+R31     : ãªã³ã¯ãã¤ã³ã¿               : caller 
+
+-notdaã¯ãã£ãã©ã«ãã§æå¹ï¼
+
+âV850:CX
+ã¬ã¸ã¹ã¿:      å¥åç­                  :  æ±ã
+R0      : ã¼ã­                         : fixed
+R1      : ã³ã³ãã¤ã©ã»ã¢ã»ã³ãã©ãä½¿ç¨ : caller 
+R2      : OSäºç´                       : fixed
+R3      : SP                           : callee 
+R4      : GP                           : fixed
+R5      : TP                           : fixed*1 
+R6-R9   : é¢æ°ã®å¼æ°                   : caller 
+R10     : æ»ãå¤                       : caller 
+R11     : 64bitã®æ»ãå¤                : caller 
+R12-R19 :                              : caller 
+R20-R27 :                              : callee 
+R28     : FP                           : callee  
+R29     :                              : callee 
+R30     : EP                           : fixed*2
+R31     : ãªã³ã¯ãã¤ã³ã¿               : caller 
+
+*1 é¢æ°ã®ã¢ãã¬ã¹ãåçã«(ãã­ã°ã©ã ä¸­ã§)åå¾ããªãå ´åã¯ä½¿ç¨ããªãï¼
+*2 è©²å½ã»ã¯ã·ã§ã³ããªãå ´åã¯ä½¿ç¨ããªãï¼
+
+âRH850(CCRH)
+ã¬ã¸ã¹ã¿:      å¥åç­                  :    æ±ã
+R0      : ã¼ã­                         : fixed
+R1      : ã³ã³ãã¤ã©ã»ã¢ã»ã³ãã©ãä½¿ç¨ : caller 
+R2      : OSäºç´                       : caller or fixed
+R3      : SP                           : callee 
+R4      : GP                           : fixed
+R5      : TP                           : caller or fixed*1
+R6-R9   : é¢æ°ã®å¼æ°                   : caller 
+R10     : æ»ãå¤                       : caller 
+R11     : 64bitã®æ»ãå¤                : caller 
+R12-R19 :                              : caller 
+R20-R27 :                              : callee 
+R28     : FP                           : callee  
+R29     :                              : callee 
+R30     : EP                           : callee or fixed(-Xep=fix)
+R31     : ãªã³ã¯ãã¤ã³ã¿               : caller 
+
+*1 CCRHã§ã¯ç¾ç¶fixedã¯ãµãã¼ããã¦ããªã
+
+--------------------------------------------------------------------------
+åã³ã³ãã¤ã©ã§ã®ã³ã¼ãå
+±æã®ããã®ã¬ã¸ã¹ã¿ã®æ±ã
+--------------------------------------------------------------------------
+åã³ã³ãã¤ã©,V850/RH850ã§æ±ããç°ãªãã¬ã¸ã¹ã¿ã¯æ¬¡ã®éãã§ããï¼
+ 
+  ã»R2
+  ã»R5(TP)
+  ã»R30(EP)
+
+ããããã®ã¬ã¸ã¹ã¿ã®æ±ãã«ã¤ãã¦æ¬¡ã®ããã«ããï¼
+
+âR2
+ã·ã¹ãã äºç´ã¨ãã¦OSå
+ã§ä½¿ç¨ãã(å²è¾¼ã¿ç¦æ­¢æã«ã¢ã»ã³ãã©å
+ã§
+ãã³ãã©ãªã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ç¨ãã)ï¼
+ãã®ããï¼ãã£ã¹ãããã£ãå²è¾¼ã¿ã®ã¨ã³ããªã§ã¯ä¿å­ããªãï¼
+çç±
+SC3ã§å¿
+è¦ãªããï¼
+åã³ã³ãã¤ã©ã§fixedã®æ±ãã«å¯è½ï¼
+ã»ã³ã³ãã¤ã«ãªãã·ã§ã³æå®
+  ã»GCC    : -mno-app-regs
+  ã»GHS(V) : -reserve_r2
+  ã»CX     : æå®å¿
+è¦ãªã
+  ã»CCRH   : -Xreserve_r2
+
+ 
+âR5(TP)
+ã¢ã»ã³ãã©å
+ã§ã¯ä½¿ç¨ããªããå²è¾¼ã¿ã§ä¿å­ããã
+çç±
+CCRHã§callerã§ããããï¼å²è¾¼ã¿åºå
+¥å£ã§ä¿å­å¾©å¸°ã®å¿
+è¦ãããï¼
+ifdefãå
+¥ããã¨å¯èª­æ§ãä¸ããããä¸å¾ä¿å­ããï¼
+ä¸æ¹ï¼ä»ã®ã³ã³ãã¤ã©ã§ã¯fixedã§ããããï¼ã¢ã»ã³ãã©å
+ã§å¤æ´ã§
+ããªãï¼CCRXãfixedããµãã¼ãããéã«ã¯fixedã¨ãã¦æ±ãï¼ 
+ 
+  åã³ã³ãã¤ã©ã®ABI 
+  ã»GCC    : -mno-app-regs ã§R2ã¨å
+±ã«ã³ã³ãã¤ã©ã¯ä½¿ç¨ããªã
+  ã»GHS(V) : fixed (ROSDAãã¼ã¹)
+  ã»CX     : fixed
+  ã»CCRH   : caller
+ 
+âR30(EP)
+  å²è¾¼ã¿ã®åºå
+¥å£ã§ä¿å­å¾©å¸°ããï¼
+  ãã£ã¹ãããã£ã§ãä¿å­å¾©å¸°ããï¼
+  CX/CCRHã§ã®fixedã®ä½¿ç¨ã¯ãµãã¼ãããªãï¼
+çç±
+  GCC/GHSã§ã¯callerã§ããããå²è¾¼ã¿ã®åºå
+¥å£ã§ä¿å­å¾©å¸°ããå¿
+è¦ãããï¼
+  ifdefãå
+¥ããã¨å¯èª­æ§ãä¸ããããä¸å¾ä¿å­ããï¼
+  CCRHã§ã¯caleeã§ãããããã£ã¹ãããã£ã§ä¿å­å¾©å¸°ããå¿
+è¦ãããï¼
+  epã¯ã¢ã»ã³ãã©ã®å½ä»¤é·ãç­ãã§ããããï¼ã¢ã»ã³ãã©å
+ã§ä½¿ç¨ãã¦ããã
+  ãCCRHã§ãå²è¾¼ã¿ã®åºå
+¥å£ã§ä¿å­ããï¼
+  ã»GCC    : -mtda=0ã§ã³ã³ãã¤ã©ãä½¿ç¨ãã?
+  ã»GHS(V) : -notdaã§caller ã¨ãã¦æ±ã
+  ã»CX     : fixed
+  ã»CCRH   : fixed or calee
+ 
+ 
+---------------------------------------------------------------------
+å²è¾¼ã¿/ãã£ã¹ãããã£ã§ã®ã¬ã¸ã¹ã¿ã®ä¿å­ã»å¾©å¸°
+---------------------------------------------------------------------
+âå²è¾¼ã¿
+
+ã»è©²å½ç®æ
+_interrupt ã¨ _fe_exception_entry ã¨ _ei_exception_entry ã«ããã¬ã¸ã¹ã¿ã®ä¿å­ï¼
+  ret_exc_2 ã¨ ei_ret_exc_2 ã¨ ret_int_1 ã§ã®ã¬ã¸ã¹ã¿ã®å¾©å¸°ã«ã¤ãã¦
+
+ã»ä¿å­ã»å¾©å¸°ã¬ã¸ã¹ã¿
+callerã¬ã¸ã¹ã¿ã¯ä¿å­ããï¼
+
+  r1, r6-r19, r31
+ 
+ä¸è¨ã®æ¤è¨ããr30(ep)ãä¿å­ããï¼
+
+CCRHã®å ´åã¯r5(tp)ãä¿å­ããå¿
+è¦ããããï¼ifdefãå
+¥ããã¨å¯èª­æ§ãä¸ã
+ãããä¸å¾ä¿å­ããï¼
+
+ä»¥ä¸ããï¼ä¿å­ããã¬ã¸ã¹ã¿ã¯æ¬¡ã®éãã§ããï¼
+
+r1, r5(tp),r6-r19, r30(ep), r31
+
+
+âãã£ã¹ãããã£
+
+ã»ä¿å­ã»å¾©å¸°ã¬ã¸ã¹ã¿
+calleeã¬ã¸ã¹ã¿ã¯ä¿å­ããï¼
+
+r20-r27,r28,r29
+
+r31(lp)ã¯ãªã¿ã¼ã³ã®ããã«ä¿å­ãã
+
+CCRHã§ã¯r30(ep)ãä¿å­ãããifdefãå
+¥ããã¨å¯èª­æ§ãä¸ã
+ãããä¸å¾ä¿å­ããï¼
+
+ä»¥ä¸ããï¼ä¿å­ããã¬ã¸ã¹ã¿ã¯æ¬¡ã®éãã§ããï¼
+
+r20-r27,r28,r29,r30(ep),r31(lp)
+
+
+---------------------------------------------------------------------
+G3K/G3Mã«ãããä¸é¨ã¬ã¸ã¹ã¿æ´æ°æã®å²è¾¼ã¿ç¦æ­¢
+---------------------------------------------------------------------
+
+ä»¥ä¸ã®ã¬ã¸ã¹ã¿ã¯diç¶æ
+(PSW.ID=1)ã§è¨­å®ããå¿
+è¦ãããï¼
+
+PSW.EBVï¼ EBASEï¼ INTBPï¼ ISPRï¼ PMRï¼ ICSRï¼ INTCFG
+
+ä»¥ä¸ï¼
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_insn.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_insn.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_insn.h	(revision 172)
@@ -0,0 +1,244 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_insn.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ãã­ã»ããµã®ç¹æ®å½ä»¤ã®ã¤ã³ã©ã¤ã³é¢æ°å®ç¾©ï¼V850ç¨ï¼
+ */
+#ifndef TOPPERS_PRC_INSN_H
+#define TOPPERS_PRC_INSN_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+#define V850_MEMORY_CHANGED	Asm("" ::: "memory");
+#define SYNCM	Asm("syncm");
+
+LOCAL_INLINE uint32
+current_psw(void)
+{
+	volatile uint32 psw;
+	Asm("   ldsr	r0,31 \n" /* Select CPU function grp */
+		"\t stsr 5 , %0 \n"
+		: "=r" (psw) :);
+	return(psw);
+}
+
+LOCAL_INLINE void
+set_psw(uint32 psw)
+{
+	Asm("   ldsr	r0,31 \n"  /* Select CPU function grp */
+		"\t ldsr %0 , 5 \n"
+		:  : "r" (psw));
+	return;
+}
+
+LOCAL_INLINE void
+set_psw_wo_fgs(uint32 psw)
+{
+	Asm("\t ldsr %0 , 5 \n"
+		:  : "r" (psw));
+	return;
+}
+
+LOCAL_INLINE void
+disable_int(void)
+{
+	Asm("	di");
+}
+
+LOCAL_INLINE void
+enable_int(void)
+{
+	Asm("	ei");
+}
+
+LOCAL_INLINE void
+set_bit(uint8 bit_offset, uint32 addr)
+{
+	uint32 any;
+
+	Asm("mov %1 , %0;"
+		"set1 %2 , 0[%0]" : "=r" (any) : "i" (addr), "i" (bit_offset));
+}
+
+LOCAL_INLINE void
+clr_bit(uint8 bit_offset, uint32 addr)
+{
+	uint32 any;
+
+	Asm("mov %1 , %0;"
+		"clr1 %2 , 0[%0]" : "=r" (any) : "i" (addr), "i" (bit_offset));
+}
+
+#ifdef __v850e2v3__
+
+#define LDSR_REG(reg, val) {\
+    Asm("\tldsr %0, " #reg \
+        : : "r"(val) : "memory" ); \
+}
+
+#define STSR_REG(reg, val) {\
+    Asm("\tstsr " #reg ", %0" \
+        : "=r"(val) : : "memory" ); \
+}
+
+
+#elif defined(__v850e3v5__)
+
+/*
+ *  V850E3V5ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ */
+LOCAL_INLINE void
+set_pmr(uint16 pmr)
+{
+	uint32 psw;
+
+	/* PMR must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	Asm("ldsr %0, sr11, 2" ::"r" (pmr));
+
+	set_psw_wo_fgs(psw);
+	Asm("syncp");
+}
+
+LOCAL_INLINE uint16
+get_ispr(void)
+{
+	uint16 ispr;
+	Asm("stsr sr10, %0, 2" : "=r" (ispr) :);
+	return(ispr);
+}
+
+LOCAL_INLINE void
+clear_ispr(void)
+{
+	uint32 psw;
+
+	/* ISPR must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	Asm("ldsr %0, sr13, 2" ::"r" (1));  /* INTCFG = 1; ISPR ãæ¸ãæãå¯è½ã« */
+	Asm("ldsr %0, sr10, 2" ::"r" (0));  /* ISPR = 0 */
+	Asm("ldsr %0, sr13, 2" ::"r" (0));  /* INTCFG = 0; ISPR ãæ¸ãæãç¦æ­¢ã«(èªåæ´æ°ã«) */
+
+	set_psw_wo_fgs(psw);
+	Asm("syncp");
+}
+
+LOCAL_INLINE uint32
+current_cpuid(void)
+{
+	uint32 htcfg0_val;
+	Asm("stsr sr0, %0, 2":"=r"(htcfg0_val):);
+	return(((htcfg0_val >> 16) & 0x03));
+}
+
+#define LDSR_REG(reg, sel, val) {\
+    uint32 sval = val; \
+    Asm("ldsr %0, "#reg", "#sel"\n"\
+            ::"r"(sval));\
+}
+
+#define STSR_REG(reg, sel, val) {\
+    Asm("stsr "#reg", %0, "#sel"\n"\
+            :"=r"(val) );\
+}
+
+#define MPA_WRITE(mpuid, mpla, mpua, mpat) { \
+    __LDSR(mpuid*4, 6, mpla); \
+    __LDSR(mpuid*4+1, 6, mpua); \
+    __LDSR(mpuid*4+2, 6, mpat); \
+}
+
+LOCAL_INLINE void
+set_intbp(uint32 intbp)
+{
+	uint32 psw;
+
+	/* INTBP must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	Asm("\t ldsr	%0, 4, 1 \n"
+		: : "r" (intbp) :);
+
+	set_psw_wo_fgs(psw);
+
+	return;
+}
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_INSN_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_kernel.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_kernel.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_kernel.h	(revision 172)
@@ -0,0 +1,117 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_kernel.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		Os.hã®ãã­ã»ããµä¾å­é¨ï¼V850E2/FL4ç¨ï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼Os.hã§ã¤ã³ã¯ã«ã¼ããããï¼ä»ã®ãã¡
+ *  ã¤ã«ããç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªã
+ */
+
+#ifndef TOPPERS_PRC_KERNEL_H
+#define TOPPERS_PRC_KERNEL_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef uint32	SystemTimeMsType;
+typedef uint32	SystemTimeUsType;
+typedef uint32	SystemTime100NsType;
+
+#ifdef CFG_USE_PROTECTIONHOOK
+/*
+ *  CPUä¾å¤è¦å æ
+å ±ä¿æå¤æ°å¤é¨åç
+§å®£è¨ï¼prc_config.cï¼
+ *  ã¦ã¼ã¶ä½æãããã­ãã¯ã·ã§ã³ããã¯ããåç
+§ããããï¼
+ *  Os.hããã¤ã³ã¯ã«ã¼ããããprc_kernel.hã§åç
+§å®£è¨
+ */
+/* CPUä¾å¤çºçæï¼CPUä¾å¤è¦å çªå·ãä¿æããå¤æ° */
+extern uint32	v850_cpu_exp_no;
+
+/* CPUä¾å¤çºçæï¼ãã­ã°ã©ã ã«ã¦ã³ã¿ï¼PC - 4ï¼ãä¿æããå¤æ° */
+extern uint32	v850_cpu_exp_pc;
+
+/* CPUä¾å¤çºçæï¼ã¹ã¿ãã¯ãã¤ã³ã¿ãä¿æããå¤æ° */
+extern uint32	v850_cpu_exp_sp;
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãµãã¼ãããæ©è½ã®å®ç¾©
+ */
+#define TOPPERS_SUPPORT_GET_UTM         /* get_utmããµãã¼ããã */
+#define TOPPERS_TARGET_SUPPORT_ATT_MOD		/* ATT_MOD/ATA_MOD */
+
+
+#endif /* TOPPERS_PRC_KERNEL_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mem.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mem.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mem.tf	(revision 172)
@@ -0,0 +1,183 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+$ 
+$  ãã¹4ã®ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãï¼V850 GCC/GHSç¨ï¼
+$  
+
+$ 
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã»ã¯ã·ã§ã³ã©ãã«åãè¿ã
+$  ARGV[1]ï¼ã¿ã¹ã¯ID
+$ 
+$FUNCTION SECTION_USTACK$
+    $RESULT = FORMAT("user_stack%s", ARGV[1])$
+$END$
+
+$
+$  åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ã»ã¯ã·ã§ã³ã©ãã«å
+$  ARGV[1]ï¼å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+$
+$FUNCTION SECTION_SHARED_USTACK$
+	$RESULT = FORMAT("shared_user_stack%s", ARGV[1])$
+$END$
+
+$FUNCTION START_MO_SYMBOL$
+    $IF !EQ(MO.PLABEL[ARGV[1]], "")$
+        $RESULT = SYMBOL(CONCAT("__start_", MO.PLABEL[ARGV[1]]))$
+    $ELIF !EQ(MO.MLABEL[ARGV[1]], "")$
+        $RESULT = SYMBOL(CONCAT("__start_", MO.MLABEL[ARGV[1]]))$
+    $ELIF MO.LINKER[ARGV[1]]$
+        $ERROR$
+            MO $ARGV[1]$ do not have PLABEL and MLABEL
+        $END$
+    $END$
+$END$
+
+$FUNCTION LIMIT_MO_SYMBOL$
+    $IF !EQ(MO.PLABEL[ARGV[1]], "")$
+        $RESULT = SYMBOL(CONCAT("__limit_", MO.PLABEL[ARGV[1]]))$
+    $ELIF !EQ(MO.MLABEL[ARGV[1]], "")$
+        $RESULT = SYMBOL(CONCAT("__limit_", MO.MLABEL[ARGV[1]]))$
+    $ELIF MO.LINKER[ARGV[1]]$
+        $ERROR$
+            MO $ARGV[1]$ do not have PLABEL and MLABEL
+        $END$
+    $END$
+$END$
+
+$ 
+$  OSAPåæåã³ã³ãã­ã¹ããã­ãã¯ã®ããã®å®£è¨
+$ 
+$FUNCTION PREPARE_OSAPINICTXB$
+    $FILE "kernel_mem.c"$
+
+$   // ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã©ãã« 
+    $IF LENGTH(TSK.ID_LIST)$
+        $FOREACH tskid TSK.ID_LIST$
+            $IF !OSAP.TRUSTED[TSK.OSAPID[tskid]]$
+                extern uint8 $FORMAT("__start_user_stack%s", tskid)$;$NL$
+                extern uint8 $FORMAT("__limit_user_stack%s", tskid)$;$NL$
+            $END$
+        $END$
+    $END$
+$   // å
+±æã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã©ãã« 
+    $FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
+        $IF LENGTH(shared_ustack_size[tskpri])$
+            extern uint8 $FORMAT("__start_shared_user_stack%s", tskpri)$;$NL$
+            extern uint8 $FORMAT("__limit_shared_user_stack%s", tskpri)$;$NL$
+        $END$
+    $END$
+
+    $IF LENGTH(OSAP.ID_LIST)$
+        $FOREACH domid OSAP.ID_LIST$
+            $IF !OSAP.TRUSTED[domid]$
+$               // éä¿¡é ¼OSAPå°æé åã®ã©ãã« 
+                $IF USE_MPU_SRPW_DATA$
+$               // å
+±æãªã¼ãå°æã©ã¤ããã¼ã¿
+                extern uint8 $FORMAT("__start_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                extern uint8 $FORMAT("__limit_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                $END$
+                $IF USE_MPU_SRPW_SDATA$
+$               // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+                extern uint8 $FORMAT("__start_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                extern uint8 $FORMAT("__limit_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                $END$
+                $IF USE_MPU_PR_TEXT$
+$               // RXé åï¼å°æãªã¼ããã­ã¹ãï¼
+                extern uint8 __start_text_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_text_$OSAP.LABEL[domid]$;$NL$
+                $END$
+                $IF USE_MPU_PR_SDATA$
+$               // Ré åï¼å°æãªã¼ãã·ã§ã¼ããã¼ã¿ï¼
+                extern uint8 __start_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+                extern uint8 __limit_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+                $END$
+                $IF USE_MPU_PRW_DATA$
+$               // RWXé åï¼å°æãªã¼ãã©ã¤ããã¼ã¿ï¼
+                extern uint8 __start_ram_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_ram_$OSAP.LABEL[domid]$;$NL$
+                $END$
+                $IF USE_MPU_PRW_SDATA$
+$               // RWXé åï¼å°æãªã¼ãã©ã¤ãã·ã§ã¼ããã¼ã¿ï¼
+                extern uint8 __start_sram_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_sram_$OSAP.LABEL[domid]$;$NL$
+                $END$
+            $END$
+        $END$
+        $NL$
+    $END$$NL$
+    $NL$
+$   ãã¼ã¿ã»ã¯ã·ã§ã³åæåãã¼ãã«ãROMã«é
+ç½®ãã
+$   rosdataé åã¯RAMã«é
+ç½®ãããããï¼ãã¼ã¿ã»ã¯ã·ã§ã³åæåãã¼ãã«ãsdataåããã¨
+$   ãã¼ã¿ã»ã¯ã·ã§ã³ã®åæåã«å¤±æãã
+    extern const uint32 __attribute__((section(".rodata_kernel"), aligned(4))) tnum_datasec;$NL$
+    extern const DATASECINIB __attribute__((section(".rodata_kernel"), aligned(4))) datasecinib_table[];$NL$
+    extern const uint32 __attribute__((section(".rodata_kernel"), aligned(4))) tnum_bsssec;$NL$
+    extern const BSSSECINIB __attribute__((section(".rodata_kernel"), aligned(4))) bsssecinib_table[];$NL$
+$END$
+
+$INCLUDE "arch/v850_gcc/prc_mem_common.tf"$
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mem_common.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mem_common.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mem_common.tf	(revision 172)
@@ -0,0 +1,850 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2015-2016 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  
+$   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$       ã¨ï¼
+$     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$         å ±åãããã¨ï¼
+$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$       å
+è²¬ãããã¨ï¼
+$  
+$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+$DEBUG_OPT_TF = 1$
+
+$ 
+$  ãã¹4ã®ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãï¼V850ç¨ï¼
+$
+
+$  ã·ã¹ãã ã¹ã¿ãã¯ã®å
+é ­çªå°åå¾ (for kernel_mem.tf)
+$FUNCTION GET_SSTK_TSKINICTXB$
+    $bottom = PEEK(ARGV[1] + offsetof_TINIB_TSKINICTXB_sstk_bottom, sizeof_void_ptr)$
+    $size = PEEK(ARGV[1] + offsetof_TINIB_TSKINICTXB_sstksz, sizeof_StackType)$
+    $RESULT = (bottom - size)$
+$END$
+
+$  ã¦ã¼ã¶ã¹ã¿ãã¯ã®å
+é ­çªå°åå¾ (for kernel_mem.tf)
+$FUNCTION GET_USTK_TSKINICTXB$
+    $bottom = PEEK(ARGV[1] + offsetof_TINIB_TSKINICTXB_stk_bottom, sizeof_void_ptr)$
+    $size = PEEK(ARGV[1] + offsetof_TINIB_TSKINICTXB_stksz, sizeof_StackType)$
+    $RESULT = (bottom - size)$
+$END$
+
+$ 
+$  OSAP.ID_LISTãèª­ã¿è¾¼ããã
+$ 
+$INCLUDE "cfg2_out.tf"$
+
+$
+$  ä¿è­·ãã¡ã¤ã³ã®ã©ãã«ã®ä½æ
+$	OSAP.LABEL[domid]ï¼ä¿è­·ãã¡ã¤ã³ã®ã©ãã«
+$
+$OSAP.LABEL[TDOM_KERNEL] = "kernel"$
+$FOREACH domid OSAP.ID_LIST$
+    $OSAP.LABEL[domid] = domid$
+$END$
+$OSAP.LABEL[TDOM_NONE] = "shared"$
+
+$ 
+$  æ¨æºã®ã»ã¯ã·ã§ã³ã®ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ã®å®ç¾©
+$ 
+$MEMATR_TEXT = (TA_NOWRITE|TA_EXEC)$
+$MEMATR_RODATA = (TA_NOWRITE|TA_EXEC)$
+$MEMATR_DATA = TA_MEMINI$
+$MEMATR_BSS = TA_NULL$
+$MEMATR_PRSV = TA_MEMPRSV$
+$MEMATR_ROSDATA = (TA_SDATA|TA_MEMINI|TA_NOWRITE|TA_EXEC)$
+$MEMATR_SDATA = (TA_SDATA|TA_MEMINI)$
+$MEMATR_SBSS = TA_SDATA$
+
+$ 
+$  ä¿è­·ãã¡ã¤ã³æ¯ã®ããã©ã«ãã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ã®ä½æ
+$ 
+$DEFAULT_ACPTN[TDOM_KERNEL] = VALUE("TACP_KERNEL", TACP_KERNEL)$
+$FOREACH domid OSAP.ID_LIST$
+    $DEFAULT_ACPTN[domid] = VALUE(FORMAT("TACP(%1%)", domid), 1 << (domid - 1))$
+$END$
+$DEFAULT_ACPTN[TDOM_NONE] = VALUE("TACP_SHARED", TACP_SHARED)$
+
+$ 
+$  MPUè¨­å®æ
+å ±çæã®æºå
+$  ç¶æ
+å®ç¾©ï¼
+$    check == 0 : åæç¶æ
+
+$    check == 1 : å
+±æãªã¼ãã§ãªãoréä¿¡é ¼ããã©ã¤ãã§ããªãç¯å²
+$    check == 2 : å
+±æãªã¼ãã©ã¤ããã¼ã¿ã®ç¯å²
+$    check == 3 : å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿ã®ç¯å²
+$    check == 4 : å
+±æãªã¼ãå°æã©ã¤ããã¼ã¿ã®ç¯å²
+$    check_r == 0 : åæç¶æ
+
+$    check_r == 1 : å¯¾è±¡å¤
+$    check_r == 2 : å
+±æãªã¼ãROMã®ç¯å²
+$    check_r == 3 : å
+±æãªã¼ãRAMã®ç¯å²
+$ 
+$check = 0$
+$check_r = 0$
+$memtop_table = SYMBOL("memtop_table")$
+$offset = 0$
+$FOREACH osap OSAP.ID_LIST$
+    $IF !OSAP.TRUSTED[osap]$
+        $OSAP.mem_area_mo[osap] = {}$
+    $END$
+$END$
+$shared_mem_area_mo = {}$
+$FOREACH mo MO_MPROTECT_LIST$
+    $start_sym = ""$
+    $IF EQ(MO.TYPE[mo], "TOPPERS_ATTMEM")$
+$       // OsMemoryAreaå¯¾å¿
+        $IF EQ(MO.OSAPID[mo], "TDOM_NONE")$
+$           // å
+±æé å
+            $shared_mem_area_mo = APPEND(shared_mem_area_mo, mo)$
+        $ELIF !EQ(MO.OSAPID[mo], "TDOM_KERNEL")$
+$           // éä¿¡é ¼OSAPå°æé å
+            $TRACE("ATT_MEM?")$
+            $TRACE(mo)$
+            $OSAP.mem_area_mo[MO.OSAPID[mo]] = APPEND(OSAP.mem_area_mo[MO.OSAPID[mo]], mo)$
+        $END$
+    $END$
+    $IF LENGTH(pre_mo) && ((check >= 2) || (check_r >= 2))$
+$       // ç©ºã§ãªãã¡ã¢ãªãªãã¸ã§ã¯ããæ¢ã
+        $FOREACH at RANGE(FIND(MO_ORDER, pre_mo), FIND(MO_ORDER, mo) - 1)$
+            $cur_mo = AT(MO_ORDER, at)$
+            $start = START_MO_SYMBOL(cur_mo)$
+            $limit = LIMIT_MO_SYMBOL(cur_mo)$
+            $TRACE("cur_mo")$
+            $TRACE(cur_mo)$
+            $IF LENGTH(start) && !EQ(start, "")$
+                $IF EQ(start_sym, "")$
+                    $start_sym = start$
+                $END$
+                $IF LENGTH(limit)$
+                    $limit_sym = limit$
+                $END$
+            $END$
+        $END$
+    $END$
+
+    $IF check == 2$
+$       // å
+±æé åã®çµç«¯çªå°
+        $IF !LENGTH(shared_mo_start) || EQ(shared_mo_start, "")$
+            $shared_mo_start = start_sym$
+        $END$
+        $shared_mo_limit = limit_sym$
+        $TRACE("##############")$
+        $TRACE(shared_mo_limit)$
+    $ELIF check == 3$
+$       // å
+±æãªã¼ãå°æã©ã¤ãsdataé åã®çµç«¯çªå°
+        $sosap_mo_start[MO.OSAPID[pre_mo]] = start_sym$
+        $sosap_mo_limit[MO.OSAPID[pre_mo]] = limit_sym$
+    $ELIF check == 4$
+$       // å
+±æãªã¼ãå°æã©ã¤ãé åã®çµç«¯çªå°
+        $osap_mo_start[MO.OSAPID[pre_mo]] = start_sym$
+        $osap_mo_limit[MO.OSAPID[pre_mo]] = limit_sym$
+        $TRACE("########## check srpw ##########")$
+        $TRACE(MO.OSAPID[pre_mo])$
+        $TRACE(osap_mo_start)$
+    $ELIF check == 5$
+$       // éä¿¡é ¼OSAPã®å°æãªã¼ãROMé å
+        $osap_text_start[MO.OSAPID[pre_mo]] = start_sym$
+        $osap_text_limit[MO.OSAPID[pre_mo]] = limit_sym$
+    $ELIF check == 6$
+$       // éä¿¡é ¼OSAPã®å°æãªã¼ãRAMé å
+        $sosap_text_start[MO.OSAPID[pre_mo]] = start_sym$
+        $sosap_text_limit[MO.OSAPID[pre_mo]] = limit_sym$
+    $ELIF check == 7$
+$       // éä¿¡é ¼OSAPã®å°æãªã¼ãã©ã¤ãã·ã§ã¼ãé å
+        $sosap_data_start[MO.OSAPID[pre_mo]] = start_sym$
+        $sosap_data_limit[MO.OSAPID[pre_mo]] = limit_sym$
+    $ELIF check == 8$
+$       // éä¿¡é ¼OSAPã®å°æãªã¼ãã©ã¤ãé å
+        $TRACE("########## check prw ##########")$
+        $TRACE(MO.OSAPID[pre_mo])$
+        $TRACE(start_sym)$
+        $TRACE(osap_data_start[MO.OSAPID[pre_mo]])$
+        $osap_data_start[MO.OSAPID[pre_mo]] = start_sym$
+        $osap_data_limit[MO.OSAPID[pre_mo]] = limit_sym$
+    $END$
+
+    $IF check_r == 2$
+$       // å
+±æãªã¼ãROMé åã®çµç«¯çªå°
+        $IF !LENGTH(shared_rom_mo_start) || EQ(shared_rom_mo_start, "")$
+            $shared_rom_mo_start = start_sym$
+        $END$
+        $shared_rom_mo_limit = limit_sym$
+        $TRACE("########## shared_rom limit ##########")$
+        $TRACE(shared_rom_mo_limit)$
+    $ELIF check_r == 3$
+$       // å
+±æãªã¼ãRAMé åã®çµç«¯çªå°
+        $IF !LENGTH(shared_ram_mo_start) || EQ(shared_ram_mo_start, "")$
+            $shared_ram_mo_start = start_sym$
+        $END$
+        $shared_ram_mo_limit = limit_sym$
+        $TRACE("########## shared_ram limit ##########")$
+        $TRACE(shared_ram_mo_limit)$
+    $END$
+
+    $start_sym = START_MO_SYMBOL(mo)$
+    $limit_sym = LIMIT_MO_SYMBOL(mo)$
+    $IF EQ(MO.TYPE[mo], "TOPPERS_ATTMEM") || EQ(MO.TYPE[mo], "TOPPERS_USTACK")$
+        $check = 1$
+        $check_r = 1$
+    $ELIF !EQ(MO.ACPTN_R[mo], "TACP_SHARED")$
+$       // å
+±æãªã¼ãã§ãªã
+        $IF !EQ(MO.ACPTN_R[mo], "TACP_KERNEL")$
+$           // éä¿¡é ¼OSAPã®å°æãªã¼ãé å
+            $IF EQ(MO.ACPTN_W[mo], "TACP_KERNEL")$
+$               // éä¿¡é ¼OSAPã®å°æãªã¼ãé å
+                $IF (MO.MEMATR[mo] & TA_SDATA) == 0$
+$                   // éä¿¡é ¼OSAPã®å°æãªã¼ãROMé å
+                    $osap_text_start[MO.OSAPID[mo]] = start_sym$
+                    $check = 5$
+                $ELSE$
+$                   // éä¿¡é ¼OSAPã®å°æãªã¼ãRAMé å
+                    $sosap_text_start[MO.OSAPID[mo]] = start_sym$
+                    $check = 6$
+                $END$
+            $ELSE$
+$               // éä¿¡é ¼OSAPã®å°æãªã¼ãã©ã¤ãé å
+                $IF (MO.MEMATR[mo] & TA_SDATA) != 0$
+$                   // sdata        
+                    $sosap_data_start[MO.OSAPID[mo]] = start_sym$
+                    $check = 7$
+                $ELSE$
+$                   // not sdata        
+                    $osap_data_start[MO.OSAPID[mo]] = start_sym$
+                    $check = 8$
+                $END$
+            $END$
+        $ELSE$
+            $check = 1$
+            $check_r = 1$
+        $END$
+    $ELIF EQ(MO.ACPTN_W[mo], "TACP_SHARED")$
+$       // å
+±æãªã¼ãã©ã¤ã        
+        $IF LENGTH(shared_mo_start)$
+            $IF check != 2$
+$               // pre_moãå
+±æãªã¼ãã©ã¤ãã§ãªãå ´åã¯ã¡ã¢ãªé åãé£ç¶ãã¦ããªã
+$               // ããã¨ã©ã¼ã¨ãã
+                $ERROR$
+                    shared mo duplicate
+                $END$
+            $END$
+        $ELSE$
+            $shared_mo_start = start_sym$
+        $END$
+        $TRACE("start_srw")$
+        $TRACE(mo)$
+        $check = 2$
+        $check_r = 1$
+    $ELIF MO.MEMREG[mo] == STANDARD_RAM$
+$       // å
+±æãªã¼ãRAMé å        
+        $IF !EQ(MO.ACPTN_W[mo], "TACP_KERNEL")$
+$           // å
+±æãªã¼ãå°æã©ã¤ã        
+            $IF (MO.MEMATR[mo] & TA_SDATA) != 0$
+$               // sdata        
+                $sosap_mo_start[MO.OSAPID[mo]] = start_sym$
+                $check = 3$
+            $ELSE$
+$               // not sdata        
+                $osap_mo_start[MO.OSAPID[mo]] = start_sym$
+                $check = 4$
+            $END$
+        $ELSE$
+            $check = 1$
+        $END$
+        $IF LENGTH(shared_ram_mo_start)$
+            $IF check_r != 3$
+$               // pre_moãå
+±æãªã¼ãã§ãªãå ´åã¯ã¡ã¢ãªé åãé£ç¶ãã¦ããªã
+$               // ããã¨ã©ã¼ã¨ãã
+                $ERROR$
+                    shared_ram mo duplicate
+                $END$
+            $END$
+        $ELSE$
+            $shared_ram_mo_start = start_sym$
+        $END$
+        $check_r = 3$
+    $ELIF MO.MEMREG[mo] == STANDARD_ROM$
+$       // å
+±æãªã¼ãROMé å        
+        $check = 1$
+        $IF LENGTH(shared_rom_mo_start)$
+            $IF check_r != 2$
+$               // pre_moãå
+±æãªã¼ãã§ãªãå ´åã¯ã¡ã¢ãªé åãé£ç¶ãã¦ããªã
+$               // ããã¨ã©ã¼ã¨ãã
+                $ERROR$
+                    shared_rom mo duplicate
+                $END$
+            $END$
+        $ELSE$
+            $shared_rom_mo_start = start_sym$
+        $END$
+        $check_r = 2$
+    $ELSE$
+        $check = 1$
+        $check_r = 1$
+    $END$
+
+    $pre_mo = mo$
+$END$
+$TRACE(pre_mo)$
+$TRACE(mo)$
+$IF ((check >= 2) || (check_r >= 2))$
+    $start_sym = ""$
+$       // ç©ºã§ãªãã¡ã¢ãªãªãã¸ã§ã¯ããæ¢ã
+    $FOREACH at RANGE(FIND(MO_ORDER, pre_mo), LENGTH(MO_ORDER) - 1)$
+        $cur_mo = AT(MO_ORDER, at)$
+        $start = START_MO_SYMBOL(cur_mo)$
+        $limit = LIMIT_MO_SYMBOL(cur_mo)$
+        $IF LENGTH(start) && !EQ(start, "")$
+            $IF EQ(start_sym, "")$
+                $start_sym = start$
+            $END$
+            $IF LENGTH(limit)$
+                $limit_sym = limit$
+            $END$
+        $END$
+    $END$
+$END$
+
+$IF check == 2$
+$   // å
+±æé åã®çµç«¯çªå°
+    $IF !LENGTH(shared_mo_start) || EQ(shared_mo_start, "")$
+        $shared_mo_start = start_sym$
+    $END$
+    $shared_mo_limit = limit_sym$
+    $TRACE("**************")$
+    $TRACE(shared_mo_limit)$
+$ELIF check == 3$
+$   // å
+±æãªã¼ãå°æã©ã¤ãsdataé åã®çµç«¯çªå°
+    $sosap_mo_start[MO.OSAPID[pre_mo]] = start_sym$
+    $sosap_mo_limit[MO.OSAPID[pre_mo]] = limit_sym$
+$ELIF check == 4$
+$   // å
+±æãªã¼ãå°æã©ã¤ãé åã®çµç«¯çªå°
+    $osap_mo_start[MO.OSAPID[pre_mo]] = start_sym$
+    $osap_mo_limit[MO.OSAPID[pre_mo]] = limit_sym$
+$END$
+
+$IF check_r == 2$
+$   // å
+±æãªã¼ãROMé åã®çµç«¯çªå°
+    $IF !LENGTH(shared_rom_mo_start) || EQ(shared_rom_mo_start, "")$
+        $shared_rom_mo_start = start_sym$
+    $END$
+    $shared_rom_mo_limit = limit_sym$
+    $TRACE("########## shared_rom limit ##########")$
+    $TRACE(shared_rom_mo_limit)$
+$ELIF check_r == 3$
+$   // å
+±æãªã¼ãRAMé åã®çµç«¯çªå°
+    $IF !LENGTH(shared_ram_mo_start) || EQ(shared_ram_mo_start, "")$
+        $shared_ram_mo_start = start_sym$
+    $END$
+    $shared_ram_mo_limit = limit_sym$
+    $TRACE("########## shared_ram limit ##########")$
+    $TRACE(shared_ram_mo_limit)$
+$END$
+
+$ 
+$  MPUã«ã»ããããä¸ä¸éã¢ãã¬ã¹ãåå¾ãï¼
+$  OSAPãã¨ã®MPRCè¨­å®å¤ãã»ãããã
+$  ARGV[1] : å
+é ­ã¢ãã¬ã¹ 
+$  ARGV[2] : æ«å°¾ã¢ãã¬ã¹ 
+$  ARGV[3] : MPRCã®ãããä½ç½®
+$  RETURN : {MPUã«ã»ããããä¸éã¢ãã¬ã¹, ä¸éã¢ãã¬ã¹}
+$ 
+$FUNCTION GET_MPUL_SET_MPRC$
+    $start_address = ALT(ARGV[1], MPU_PAGE_MASK)$
+    $end_address = ALT(ARGV[2],   MPU_PAGE_MASK)$
+    $TRACE(start_address)$
+    $ipal = (start_address & MPU_PAGE_MASK)$ 
+    $ipau = (end_address & MPU_PAGE_MASK)$ 
+    $WARNING$
+        $FORMAT("info%d: start=0x%x, end=0x%x", info, start_address, end_address)$
+    $END$
+    $IF (ipal != start_address) || (ipau != end_address)$
+        $ERROR$
+            $FORMAT("Not aligned: start=0x%x, end=0x%x", start_address, end_address)$
+        $END$
+    $END$
+    $IF ipal != ipau$
+        $ipau = (ipau - 0x1) & 0xfffffffc$
+        $FOREACH osap OSAP.ID_LIST$
+            $IF !OSAP.TRUSTED[osap]$
+                $OSAP.MPRC[osap] = OSAP.MPRC[osap] | (0x1 << ARGV[3])$
+                $TRACE(OSAP.MPRC[osap])$
+            $END$
+        $END$
+    $END$
+    $WARNING$
+        $FORMAT("info%d: ipal=0x%x, ipau=0x%x", info, ipal, ipau)$
+    $END$
+
+    $RESULT = APPEND(ipal, ipau)$
+$END$
+
+$ 
+$  MPUã«ã»ããããä¸ä¸éã¢ãã¬ã¹ãåå¾ãï¼
+$  OSAPãã¨ã®MPRCè¨­å®å¤ãã»ãããã
+$  ARGV[1] : å
+é ­ã¢ãã¬ã¹ 
+$  ARGV[2] : æ«å°¾ã¢ãã¬ã¹ 
+$  ARGV[3] : MPRCã®ãããä½ç½®
+$  ARGV[4] : OSAPID
+$  RETURN : {MPUã«ã»ããããä¸éã¢ãã¬ã¹, ä¸éã¢ãã¬ã¹}
+$ 
+$FUNCTION GET_MPUL_SET_MPRC_OSAP$
+    $TRACE("GET_MPUL_SET_MPRC_OSAP")$
+    $TRACE(ARGV[4])$
+    $start_address = ALT(ARGV[1], MPU_PAGE_MASK)$
+    $end_address = ALT(ARGV[2],   MPU_PAGE_MASK)$
+    $ipal = (start_address & MPU_PAGE_MASK)$ 
+    $ipau = (end_address & MPU_PAGE_MASK)$ 
+    $WARNING$
+        $FORMAT("info%d: start=0x%x, end=0x%x", info, start_address, end_address)$
+    $END$
+    $IF (ipal != start_address) || (ipau != end_address)$
+        $ERROR$
+            $FORMAT("Not aligned: start=0x%x, end=0x%x", start_address, end_address)$
+        $END$
+    $END$
+    $IF ipal != ipau$
+        $ipau = (ipau - 0x1) & 0xfffffffc$
+        $OSAP.MPRC[ARGV[4]] = OSAP.MPRC[ARGV[4]] | (0x1 << ARGV[3])$
+    $END$
+    $WARNING$
+        $FORMAT("info%d: ipal=0x%x, ipau=0x%x", info, ipal, ipau)$
+    $END$
+
+    $RESULT = APPEND(ipal, ipau)$
+$END$
+
+$ 
+$ å
+±æé ååæåãã­ãã¯ã®MPUè¨­å®ã«é¢é£ãããã¼ã¿ãçæ
+$ åæåãã­ãã¯ãkernel_mem.cã«åºåããå¦çã¯ï¼pass2ã¨
+$ åãããããã«ï¼ããã§å®æ½ããªã
+$ 
+$FUNCTION GENERATE_TARGET_MPUINFOB$
+$   // OSAPãã¨ã®MPRCã¬ã¸ã¹ã¿è¨­å®å¤ãåæå    
+$   // ã¦ã¼ã¶ã¹ã¿ãã¯é åMPU0ã¯å¿
+ãæå¹
+    $FOREACH osap OSAP.ID_LIST$
+        $IF !OSAP.TRUSTED[osap]$
+            $OSAP.MPRC[osap] = 0x01$
+        $END$
+    $END$
+    $cur_shared_mpu_id = 0$
+
+    $PREPARE_OSAPINICTXB()$
+
+    $FOREACH osap OSAP.ID_LIST$
+        $IF LENGTH(ENUM_MPU_OSAP_ATTMEM[osap]) && 
+            (ENUM_MPU_OSAP_ATTMEM[osap] > 0)$
+            static MPUINFOB mpu_area_info_$osap$[$ENUM_MPU_OSAP_ATTMEM[osap]$] = {$NL$
+
+            $cur_osap_mpu_id = TNUM_MPU_OSAP_DEFAULT + 1$
+            $FOREACH mo OSAP.mem_area_mo[osap]$
+$               // å°æATT_MEM
+                $osap_mpu_reg = GET_MPUL_SET_MPRC_OSAP(MO.BASEADDR[mo], 
+                MO.LIMITADDR[mo], 
+                cur_osap_mpu_id,
+                osap)$
+$               // MPATã®ããã©ã«ãã¯E|G|SX|SW|SR
+                $osap_mpu_mpat = 0xF8$
+                $IF !EQ(MO.ACPTN_R[mo], "TACP_KERNEL")$
+                    $osap_mpu_mpat = osap_mpu_mpat | 0x01$
+                $END$
+                $IF !EQ(MO.ACPTN_W[mo], "TACP_KERNEL")$
+                    $osap_mpu_mpat = osap_mpu_mpat | 0x02$
+                $END$
+                $IF !EQ(MO.ACPTN_X[mo], "TACP_KERNEL")$
+                    $osap_mpu_mpat = osap_mpu_mpat | 0x04$
+                $END$
+                $ipal = AT(osap_mpu_reg, 0)$
+                $ipau = AT(osap_mpu_reg, 1)$
+                $TAB$$TAB${$NL$
+                $TAB$$TAB$$TAB$( (uint32)($FORMAT("0x%x", +ipal)$) ), /* MPUL$cur_osap_mpu_id$ */$NL$
+                $TAB$$TAB$$TAB$( (uint32)($FORMAT("0x%x", +ipau)$) ), /* MPUA$cur_osap_mpu_id$ */$NL$
+                $TAB$$TAB$$TAB$( (uint32)($FORMAT("0x%x", +osap_mpu_mpat)$) ), /* MPAT$cur_osap_mpu_id$ */$NL$
+                $TAB$$TAB$},$NL$
+                $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+            $END$
+            };$NL$
+            $NL$
+        $END$
+    $END$
+
+    $IF USE_MPU_SRW_DATA_SDATA$
+$       // å
+±æãªã¼ãã©ã¤ã    
+        $shared_mpu_reg[cur_shared_mpu_id] = 
+        GET_MPUL_SET_MPRC(shared_mo_start, shared_mo_limit, 
+        TNUM_MPU_REG - cur_shared_mpu_id - 1)$
+        $shared_mpu_reg[cur_shared_mpu_id] = APPEND(shared_mpu_reg[cur_shared_mpu_id], { 1, 1, 1 })$
+        $TRACE("********** srw *********")$
+        $TRACE(cur_shared_mpu_id)$
+        $TRACE(shared_mpu_reg[cur_shared_mpu_id])$
+        $cur_shared_mpu_id = cur_shared_mpu_id + 1$
+    $END$
+    $IF USE_MPU_SR_TEXT$
+$       // å
+±æãªã¼ãROM
+        $TRACE(shared_rom_mo_start)$
+        $shared_mpu_reg[cur_shared_mpu_id] = 
+        GET_MPUL_SET_MPRC(shared_rom_mo_start, shared_rom_mo_limit, 
+        TNUM_MPU_REG - cur_shared_mpu_id - 1)$
+        $shared_mpu_reg[cur_shared_mpu_id] = APPEND(shared_mpu_reg[cur_shared_mpu_id], { 1, 0, 1 })$
+        $cur_shared_mpu_id = cur_shared_mpu_id + 1$
+    $END$
+    $IF USE_MPU_SR_DATA_SDATA$
+$       // å
+±æãªã¼ãRAM
+        $shared_mpu_reg[cur_shared_mpu_id] = 
+        GET_MPUL_SET_MPRC(shared_ram_mo_start, shared_ram_mo_limit, 
+        TNUM_MPU_REG - cur_shared_mpu_id - 1)$
+        $shared_mpu_reg[cur_shared_mpu_id] = APPEND(shared_mpu_reg[cur_shared_mpu_id], { 1, 0, 1 })$
+        $cur_shared_mpu_id = cur_shared_mpu_id + 1$
+    $END$
+    $FOREACH mo shared_mem_area_mo$
+$       // å
+±æATT_MEM
+        $shared_mpu_reg[cur_shared_mpu_id] = 
+        GET_MPUL_SET_MPRC(MO.BASEADDR[mo], MO.LIMITADDR[mo], 
+        TNUM_MPU_REG - cur_shared_mpu_id - 1)$
+        $shared_mpu_reg[cur_shared_mpu_id] = APPEND(shared_mpu_reg[cur_shared_mpu_id], { MO.ACPTN_R[mo], 
+        MO.ACPTN_W[mo],
+        MO.ACPTN_X[mo] })$
+        $cur_shared_mpu_id = cur_shared_mpu_id + 1$
+    $END$
+    $FOREACH mpuid RANGE(cur_shared_mpu_id, TNUM_MPU_SHARED - 1)$
+        $shared_mpu_reg[cur_shared_mpu_id] = { 0, 0, 0, 0, 0 }$
+    $END$
+$END$
+
+$FUNCTION GENERATE_OSAPINIB_MPUINFOB$
+    $cur_osap_mpu_id = 1$
+
+$   // é¢æ°å¼ã³åºãã§ARGVãä¸æ¸ããããããããã§ä¿å­ãã
+    $arg_osapid = ARGV[1]$
+
+    $TAB$$TAB${$NL$
+    $IF !OSAP.TRUSTED[arg_osapid]$
+        $IF !LENGTH(OSAP.MPRC[arg_osapid])$
+            $OSAP.MPRC[arg_osapid] = 0x01$
+        $END$
+        $IF USE_MPU_SRPW_DATA$
+$           // å
+±æãªã¼ãå°æã©ã¤ããã¼ã¿
+            $osap_mpu_reg = GET_MPUL_SET_MPRC_OSAP(osap_mo_start[arg_osapid], 
+            osap_mo_limit[arg_osapid], 
+            cur_osap_mpu_id,
+            arg_osapid)$
+            $ipal = AT(osap_mpu_reg, 0)$
+            $ipau = AT(osap_mpu_reg, 1)$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipal)$) ), /* MPUL$cur_osap_mpu_id$ */$NL$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipau)$) ), /* MPUA$cur_osap_mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_SRPW_SDATA$
+$           // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+            $osap_mpu_reg = GET_MPUL_SET_MPRC_OSAP(sosap_mo_start[arg_osapid], 
+            sosap_mo_limit[arg_osapid], 
+            cur_osap_mpu_id,
+            arg_osapid)$
+            $ipal = AT(osap_mpu_reg, 0)$
+            $ipau = AT(osap_mpu_reg, 1)$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipal)$) ), /* MPLA$cur_osap_mpu_id$ */$NL$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipau)$) ), /* MPLA$cur_osap_mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_PR_TEXT$
+$           // å°æãªã¼ãROM
+            $osap_mpu_reg = GET_MPUL_SET_MPRC_OSAP(osap_text_start[arg_osapid], 
+            osap_text_limit[arg_osapid], 
+            cur_osap_mpu_id,
+            arg_osapid)$
+            $ipal = AT(osap_mpu_reg, 0)$
+            $ipau = AT(osap_mpu_reg, 1)$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipal)$) ), /* MPLA$cur_osap_mpu_id$ */$NL$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipau)$) ), /* MPLA$cur_osap_mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_PR_SDATA$
+$           // å°æãªã¼ãRAM
+            $osap_mpu_reg = GET_MPUL_SET_MPRC_OSAP(sosap_text_start[arg_osapid], 
+            sosap_text_limit[arg_osapid], 
+            cur_osap_mpu_id,
+            arg_osapid)$
+            $ipal = AT(osap_mpu_reg, 0)$
+            $ipau = AT(osap_mpu_reg, 1)$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipal)$) ), /* MPLA$cur_osap_mpu_id$ */$NL$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipau)$) ), /* MPLA$cur_osap_mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_PRW_DATA$
+$           // å°æãªã¼ãã©ã¤ããã¼ã¿
+            $osap_mpu_reg = GET_MPUL_SET_MPRC_OSAP(osap_data_start[arg_osapid], 
+            osap_data_limit[arg_osapid], 
+            cur_osap_mpu_id,
+            arg_osapid)$
+            $ipal = AT(osap_mpu_reg, 0)$
+            $ipau = AT(osap_mpu_reg, 1)$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipal)$) ), /* MPUL$cur_osap_mpu_id$ */$NL$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipau)$) ), /* MPUA$cur_osap_mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_PRW_SDATA$
+$           // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+            $osap_mpu_reg = GET_MPUL_SET_MPRC_OSAP(sosap_data_start[arg_osapid], 
+            sosap_data_limit[arg_osapid], 
+            cur_osap_mpu_id,
+            arg_osapid)$
+            $ipal = AT(osap_mpu_reg, 0)$
+            $ipau = AT(osap_mpu_reg, 1)$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipal)$) ), /* MPUL$cur_osap_mpu_id$ */$NL$
+            $TAB$$TAB$$TAB$( (uint8 *)($FORMAT("0x%x", +ipau)$) ), /* MPUA$cur_osap_mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF LENGTH(ENUM_MPU_OSAP_ATTMEM[arg_osapid]) &&
+            (ENUM_MPU_OSAP_ATTMEM[arg_osapid] > 0)$
+            $TAB$$TAB$$TAB$mpu_area_info_$arg_osapid$, /* mpu_area_info */$NL$
+            $TAB$$TAB$$TAB$$ENUM_MPU_OSAP_ATTMEM[arg_osapid]$U,$NL$
+        $ELSE$
+            $TAB$$TAB$$TAB$NULL, /* mpu_area_info */$NL$
+            $TAB$$TAB$$TAB$0U,$NL$
+        $END$
+        $TAB$$TAB$$TAB$( (uint32)$FORMAT("0x%x", +OSAP.MPRC[arg_osapid])$ ),/* MPRC */$NL$
+    $ELSE$
+        $IF USE_MPU_SRPW_DATA$
+$           // å
+±æãªã¼ãå°æã©ã¤ããã¼ã¿
+            $TAB$$TAB$$TAB$0, 0, /* MPU$mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_SRPW_SDATA$
+$           // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+            $TAB$$TAB$$TAB$0, 0, /* MPU$mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_PR_TEXT$
+$           // å°æãªã¼ãROM
+            $TAB$$TAB$$TAB$0, 0, /* MPU$mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_PR_SDATA$
+$           // å°æãªã¼ãRAM
+            $TAB$$TAB$$TAB$0, 0, /* MPU$mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_PRW_DATA$
+$           // å°æãªã¼ãã©ã¤ããã¼ã¿
+            $TAB$$TAB$$TAB$0, 0, /* MPU$mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $IF USE_MPU_PRW_SDATA$
+$           // å
+±æãªã¼ãå°æã©ã¤ãã·ã§ã¼ããã¼ã¿
+            $TAB$$TAB$$TAB$0, 0, /* MPU$mpu_id$ */$NL$
+            $cur_osap_mpu_id = cur_osap_mpu_id + 1$
+        $END$
+        $TAB$$TAB$$TAB$NULL, /* mpu_area_info */$NL$
+        $TAB$$TAB$$TAB$0U,$NL$
+        $TAB$$TAB$$TAB$( (uint32)0 ),/* MPRC */$NL$
+    $END$
+    $TAB$$TAB$}$NL$
+    $NL$
+$END$
+
+$FUNCTION GENERATE_TSKINICTXB$
+    $TAB$$TAB${$NL$
+    $TAB$$TAB$$TAB$$TSK.TINIB_SSTKSZ[ARGV[1]]$,$NL$
+    $TAB$$TAB$$TAB$((void *)((uint8 *)($TSK.TINIB_SSTK[ARGV[1]]$)
+    $SPC$+ ($TSK.TINIB_SSTKSZ[ARGV[1]]$))),$NL$
+    $IF OSAP.TRUSTED[TSK.OSAPID[ARGV[1]]] || (tmin_os_restarttask <= ARGV[1])$
+        $TAB$$TAB$$TAB$0,$NL$
+        $TAB$$TAB$$TAB$0,$NL$
+    $ELSE$
+        $TAB$$TAB$$TAB$$TSK.TINIB_USTKSZ[ARGV[1]]$,$NL$ 
+        $TAB$$TAB$$TAB$((void *)((uint8 *)($TSK.TINIB_USTK[ARGV[1]]$)
+        $SPC$+ ($TSK.TINIB_USTKSZ[ARGV[1]]$))),$NL$
+    $END$
+    $TAB$$TAB$},$NL$
+$END$
+
+$FUNCTION GENERATE_STKMPUINFOB$
+    $TAB$$TAB${$NL$
+    $IF OSAP.TRUSTED[TSK.OSAPID[ARGV[1]]] || (tmin_os_restarttask <= ARGV[1])$
+        $TAB$$TAB$$TAB$0,$NL$
+        $TAB$$TAB$$TAB$0,$NL$
+    $ELSE$
+        $IF EQ(TSK.STK[ARGV[1]],"NULL")$
+$			// stkãNULLã®å ´åã®å¦ç
+            $IF LENGTH(TSK.SHARED_USTK_ID[ARGV[1]])$
+$               // å
+±æã¹ã¿ãã¯
+                $section = SECTION_SHARED_USTACK(TSK.SHARED_USTK_ID[ARGV[1]])$
+            $ELSE$
+$               // åºæã¹ã¿ãã¯
+                $section = SECTION_USTACK(ARGV[1])$
+            $END$
+            $start_address = START_SYMBOL(section)$
+            $end_address = LIMIT_SYMBOL(section)$
+        $ELSE$
+$			// stkãNULLã§ãªãå ´åã®å¦ç
+            $p_tinib = SYMBOL("tinib_table")$
+            $p_tinib = p_tinib + TSK.ID[ARGV[1]] * sizeof_TINIB$
+            $start_address = PEEK(p_tinib + offsetof_TINIB_STKMPUINFOB_start_ustk, 4)$
+            $end_address = PEEK(p_tinib + offsetof_TINIB_STKMPUINFOB_limit_ustk, 4)$
+        $END$
+        $mpl = (start_address & MPU_PAGE_MASK)$ 
+        $mpu = (end_address & MPU_PAGE_MASK)$ 
+        $IF (mpl != start_address) || (mpu != end_address)$
+            $ERROR$
+                $FORMAT("task is %s", ARGV[1])$$NL$
+                $FORMAT("user stack in not aligned: start=0x%x, end=0x%x", start_address, end_address)$$NL$
+                $FORMAT("mpla=0x%x, mpua=0x%x", mpl, mpu)$
+            $END$
+        $END$
+        $IF mpl == mpu$
+            $ERROR$
+                $FORMAT("task is %s", ARGV[1])$$NL$
+                $FORMAT("user stack size is 0: start=0x%x, end=0x%x", start_address, end_address)$$NL$
+                $FORMAT("mpla=0x%x, mpua=0x%x", mpl, mpu)$
+            $END$
+        $END$
+        $mpu = (mpu - 0x1) & 0xfffffffc$
+        $TAB$$TAB$$TAB$$FORMAT("(void *)0x%x /* &__start_user_stack %s */", +mpl, ARGV[1])$,$NL$
+        $TAB$$TAB$$TAB$$FORMAT("(void *)0x%x /* &__limit_user_stack %s */", +mpu, ARGV[1])$,$NL$
+    $END$
+    $TAB$$TAB$},$NL$
+$END$
+
+$MEMORY_ALIGN = 4$
+$FUNCTION HOOK_ERRORCHECK_MEM_PASS4$
+$	// baseãã¡ã¢ãªä¿è­·å¢çã®å¶ç´ã«åè´ãã¦ããªãå ´å NOS0813
+    $TRACE(MEMORY_ALIGN)$
+    $IF (MO.BASEADDR[ARGV[1]] & (MEMORY_ALIGN - 1)) != 0$
+        $ERROR MO.TEXT_LINE[ARGV[1]]$
+            $FORMAT(_("%1% `%2%\' is not aligned to %3%"),
+            "OsMemoryAreaStartAddress", MO.BASEADDR[ARGV[1]], MEMORY_ALIGN)$
+        $END$
+    $END$
+$END$
+
+$ 
+$  éä¾å­é¨ã®èª­è¾¼ã¿
+$ 
+$INCLUDE "kernel/kernel_mem.tf"$
+
+$ 
+$  å
+±æã®MPUè¨­å®æ
+å ±ãçæ
+$  pass2ã§ã®å®£è¨ä½ç½®ã¨åããã
+$ 
+$FILE "kernel_mem.c"$
+
+$IF TNUM_MPU_SHARED > 0$
+    uint8 * const shared_meminib_table[$TNUM_MPU_SHARED * 3$] = {$NL$
+    $FOREACH memid RANGE(0,TNUM_MPU_SHARED-1)$
+        $TRACE(memid)$
+        $TRACE(shared_mpu_reg[memid])$
+        $TRACE(AT(shared_mpu_reg[memid], 0))$
+        $TRACE(AT(shared_mpu_reg[memid], 1))$
+        $TAB$$FORMAT("( (uint8 *)0x%x )", +AT(shared_mpu_reg[memid], 0))$, /* MPUL$TNUM_MPU_REG - 1 - memid$ */$NL$
+        $TAB$$FORMAT("( (uint8 *)0x%x )", +AT(shared_mpu_reg[memid], 1))$, /* MPUA$TNUM_MPU_REG - 1 - memid$ */$NL$
+$   // MPATã®ããã©ã«ãã¯E|G|SX|SW|SR
+        $osap_mpu_mpat = 0xF8$
+        $IF AT(shared_mpu_reg[memid], 2) != 0$
+$       // MPAT |= UR
+            $osap_mpu_mpat = osap_mpu_mpat | 0x01$
+        $END$
+        $IF AT(shared_mpu_reg[memid], 3) != 0$
+$       // MPAT |= UW
+            $osap_mpu_mpat = osap_mpu_mpat | 0x02$
+        $END$
+        $IF AT(shared_mpu_reg[memid], 4) != 0$
+$       // MPAT |= UX
+            $osap_mpu_mpat = osap_mpu_mpat | 0x04$
+        $END$
+        $TAB$$FORMAT("( (uint8 *)0x%x )", +osap_mpu_mpat)$, /* MPAT$TNUM_MPU_REG - 1 - memid$ */$NL$
+    $END$
+    };$NL$
+    $NL$
+$END$
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mpu.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mpu.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mpu.c	(revision 172)
@@ -0,0 +1,459 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013-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$
+ */
+
+/*
+ *	MPUãã©ã¤ã
+ */
+
+#include "kernel_impl.h"
+#include "task.h"
+#include "memory.h"
+#include "prc_sil.h"
+#include "Os_Lcfg.h"
+#include <t_syslog.h>
+
+void *p_ctxosap;
+
+void
+target_mpu_initialize(void)
+{
+#ifdef __v850e2v3__
+    uint8 *ipal;
+    uint8 *ipau;
+
+    /*
+     *  bselãä¿è­·è¨­å®ç¨ã«
+     */
+    ipal = (uint8 *)0x00001001;
+    LDSR_REG(BSEL, (uint32)ipal);
+
+    /*
+     *  IPA2: å
+±æãªã¼ãé å
+     */
+    ipal = shared_meminib_table[0];
+    ipau = shared_meminib_table[1];
+    IPA_WRITE(2, ipal, ipau);
+
+    /*
+     *  IPA3: å
+±ærosdata
+     */
+    ipal = shared_meminib_table[2];
+    ipau = shared_meminib_table[3];
+    IPA_WRITE(3, ipal, ipau);
+
+    /*
+     *  DPA5: å
+±æãªã¼ãã©ã¤ãé å
+     */
+    ipal = shared_meminib_table[4];
+    ipau = shared_meminib_table[5];
+    DPA_WRITE(5, ipal, ipau);
+
+    /*
+     *  MPUæå¹
+     *  ç¹æ¨©ã¢ã¼ãã§ã¯ããã©ã«ãã®ã¡ã¢ãªããã
+     *  ãã³ãã©å
+ã§ã¯MPUç¡å¹
+     */
+    ipal = (uint8 *)0x07;
+    LDSR_REG(MPM, (uint32)ipal);
+
+    /*
+     *  bselãåºæ¬è¨­å®ç¨ã«æ»ã
+     */
+    LDSR_REG(BSEL, (0U));
+
+#elif defined(__v850e3v5__)
+    uint32 mpm = 0x0U;
+
+    /*
+     * MPU0: ã¦ã¼ã¶ã¹ã¿ãã¯MPUé åã®è¨­å®
+     */
+    LDSR_REG(2, 6, (uint32)(MPAT_E | MPAT_G | MPAT_UX | MPAT_UW | MPAT_UR))
+
+    mpu_shared_area_initialize();
+
+    /*
+     *  MPUæå¹
+     *   DW = 0  ããã¯ã°ã©ã¦ã³ãã®æ¸è¾¼ã¿ã¯ç¦æ­¢
+     *   SVP = 0 ç¹æ¨©ã§ã®ã¢ã¯ã»ã¹å¶éã¯ããªã
+     *   MPE = 1 MPUæå¹
+     */
+    /*
+     *  RH850/F1Lç¨ã®è¨­å®
+     *   DR = 1  ããã¯ã°ã©ã¦ã³ãã®æ¸è¾¼ã¿ã¯ç¦æ­¢
+     *   DW = 0  ããã¯ã°ã©ã¦ã³ãã®æ¸è¾¼ã¿ã¯ç¦æ­¢
+     *   DX = 1  ããã¯ã°ã©ã¦ã³ãã®æ¸è¾¼ã¿ã¯ç¦æ­¢
+     *  RH850/F1Hç¨ã®è¨­å®
+     *   DR = 0  ããã¯ã°ã©ã¦ã³ãã®ã¢ã¯ã»ã¹ã¯ç¦æ­¢
+     *   DW = 0  ããã¯ã°ã©ã¦ã³ãã®ã¢ã¯ã»ã¹ã¯ç¦æ­¢
+     *   DX = 0  ããã¯ã°ã©ã¦ã³ãã®ã¢ã¯ã»ã¹ã¯ç¦æ­¢
+     */
+    LDSR_REG(0, 5, (uint32)TARGET_MPM_CONFIG);
+
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+}
+
+void
+target_impu_exc_handler(void *p_excinf)
+{
+    uint32 sreg;
+    uint32 vmtid;
+
+#if defined(__v850e2v3__)
+    sreg = 0x00001000;      /* ãã­ã»ããµä¿è­·éåãã³ã¯ */
+    LDSR_REG(BSEL, sreg);
+    STSR_REG(VMTID, vmtid);
+    STSR_REG(VMADR, sreg);
+    LDSR_REG(BSEL, (0U));
+
+#elif defined(__v850e3v5__)
+    vmtid = (uint32)p_runosap;
+    STSR_REG(2, 0, (sreg));
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+    syslog(LOG_EMERG, "MPU EXCEPTION (RX) at 0x%x OCCURED!!", sreg);
+    syslog(LOG_EMERG, "p_dominib = 0x%x", vmtid);
+    while(1);
+}
+
+void
+target_dmpu_exc_handler(void *p_excinf)
+{
+    uint32 sreg;
+    uint32 vmtid;
+
+#if defined(__v850e2v3__)
+    sreg = 0x00001000;      /* ãã­ã»ããµä¿è­·éåãã³ã¯ */
+    LDSR_REG(BSEL, (sreg));
+    STSR_REG(VMTID, (vmtid));
+    STSR_REG(VMADR, (sreg));
+    LDSR_REG(BSEL, (0U));
+#elif defined(__v850e3v5__)
+    vmtid = (uint32)p_runosap;
+    STSR_REG(2, 0, (sreg));
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+    syslog(LOG_EMERG, "MPU EXCEPTION (RWX) at 0x%x OCCURED!!", sreg);
+    syslog(LOG_EMERG, "p_dominib = 0x%x", vmtid);
+    while(1);
+}
+
+/*
+ *  ä¿è­·éåFEã¬ãã«ä¾å¤ãã³ãã©
+ */
+void
+target_protection_handler(void *p_excinf)
+{
+    uint32 feic = 0;
+
+    /*
+     *  FEã¬ãã«ä¾å¤è¦å ã®èª­åºã
+     */
+#if defined(__v850e2v3__)
+    LDSR_REG(BSEL, 0U);
+	STSR_REG(FEIC, feic);
+
+#elif defined(__v850e3v5__)
+	STSR_REG(FEIC, 0, feic);
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+    switch(feic){
+        case FE_MIP: /* å®è¡ä¿è­·éåä¾å¤ */
+            target_impu_exc_handler(NULL);
+            break;
+        case FE_MDP: /* ãã¼ã¿ä¿è­·éåä¾å¤ */
+            target_dmpu_exc_handler(NULL);
+            break;
+        default:
+            break;
+    }
+}
+
+#if 1
+/*
+ *  æå®ãããã¢ãã¬ã¹ãã¦ã¼ã¶ã¢ã¼ãæã«æ¸è¾¼ã¿å¯è½ãããã§ãã¯ãã
+ */
+#ifdef OMIT_PROBE_MEM_WRITE
+boolean
+probe_mem_write(const MemoryStartAddressType base, MemorySizeType size)
+{
+    uint32 sreg;
+    boolean ret;
+
+    /*
+     *  ä¿¡é ¼OSAPãªãã°ä»»æã®ã¢ãã¬ã¹ã«ã¢ã¯ã»ã¹å¯è½
+     */
+    if(run_trusted != FALSE){
+        return TRUE;
+    }
+
+#ifdef __v850e2v3__
+    sreg = 0x00001000;      /* ãã­ã»ããµä¿è­·éåãã³ã¯ */
+    /*
+     *  ãã³ã¯ãã»ãã
+     */
+    LDSR_REG(BSEL, (sreg));
+    /*
+     *  å
+é ­ã¢ãã¬ã¹ãMCAã«ã»ãã
+     */
+    LDSR_REG(MCA, (uint32)base);
+
+    /*
+     *  ãµã¤ãºãMCSã«ã»ãã
+     */
+    LDSR_REG(MCS, (uint32)size);
+
+    /*
+     *  ã¡ã¢ãªä¿è­·è¨­å®ãã§ãã¯éå§
+     */
+    LDSR_REG(MCC, 0U);
+
+    /*
+     *  ã¡ã¢ãªä¿è­·è¨­å®ãã§ãã¯çµæãèª­ã¿åºã
+     */
+    STSR_REG(MCR, sreg);
+#elif __v850e3v5__
+    /*
+     *  å
+é ­ã¢ãã¬ã¹ãMCAã«ã»ãã
+     */
+    LDSR_REG(8, 5, (uint32)base);
+    /*
+     *  ãµã¤ãºãMCSã«ã»ãã
+     */
+    LDSR_REG(9, 5, (uint32)size);
+    /*
+     *  ã¡ã¢ãªä¿è­·è¨­å®ãã§ãã¯éå§
+     */
+    LDSR_REG(10, 5, 0U);
+    /*
+     *  ã¡ã¢ãªä¿è­·è¨­å®ãã§ãã¯çµæãèª­ã¿åºã
+     */
+    STSR_REG(11, 5, sreg);
+#else
+#error hoge!
+#endif
+
+    if(sreg & 0x00000100){
+        /* ãªã¼ããã­ã¼ã®å ´å */
+        ret = FALSE;
+    } else if(sreg & 0x00000004){
+        /* ã©ã¤ãè¨±å¯ã®å ´å */
+        ret = TRUE;
+    } else {
+        ret = FALSE;
+    }
+
+#ifdef __v850e2v3__
+    /*
+     *  ãã³ã¯ãæ»ã
+     */
+    LDSR_REG(BSEL, 0U);
+#endif /* __v850e2v3__ */
+
+	return ret;
+}
+#endif /* OMIT_PROBE_MEM_WRITE */
+
+#ifdef __v850e2v3__
+/*
+ *  æå®ãããã¢ãã¬ã¹ãã¦ã¼ã¶ã¢ã¼ãæã«èª­è¾¼ã¿å¯è½ãããã§ãã¯ãã
+ */
+#ifdef OMIT_PROBE_MEM_READ
+boolean
+probe_mem_read(const MemoryStartAddressType base, MemorySizeType size)
+{
+    uint32 sreg;
+    boolean ret;
+
+    /*
+     *  ä¿¡é ¼OSAPãªãã°ä»»æã®ã¢ãã¬ã¹ã«ã¢ã¯ã»ã¹å¯è½
+     */
+    if(run_trusted != FALSE){
+        return TRUE;
+    }
+
+    sreg = 0x00001000;      /* ãã­ã»ããµä¿è­·éåãã³ã¯ */
+    /*
+     *  ãã³ã¯ãã»ãã
+     */
+    LDSR_REG(BSEL, sreg);
+
+    /*
+     *  å
+é ­ã¢ãã¬ã¹ãMCAã«ã»ãã
+     */
+    LDSR_REG(MCA, (uint32)base);
+
+    /*
+     *  ãµã¤ãºãMCSã«ã»ãã
+     */
+    LDSR_REG(MCS, (uint32)size);
+
+    /*
+     *  ã¡ã¢ãªä¿è­·è¨­å®ãã§ãã¯éå§
+     */
+    LDSR_REG(MCC, (uint32)size);
+
+    /*
+     *  ã¡ã¢ãªä¿è­·è¨­å®ãã§ãã¯çµæãèª­ã¿åºã
+     */
+    STSR_REG(MCR, sreg);
+
+    if(sreg & 0x00000100){
+        /* ãªã¼ããã­ã¼ã®å ´å */
+        ret = FALSE;
+    } else if(sreg & 0x00000002){
+        /* ãªã¼ãè¨±å¯ã®å ´å */
+        ret = TRUE;
+    } else {
+        ret = FALSE;
+    }
+
+    /*
+     *  ãã³ã¯ãæ»ã
+     */
+    LDSR_REG(BSEL, 0U);
+
+	return ret;
+}
+#endif /* OMIT_PROBE_MEM_READ */
+
+/*
+ *  æå®ãããé åãã¦ã¼ã¶ã¹ã¿ãã¯é åã«åã¾ã£ã¦ãããããã§ãã¯ãã
+ */
+#ifdef OMIT_PROBE_STACK
+
+boolean
+probe_stack(const void *base, MemorySizeType size)
+{
+    uint32 sreg;
+    boolean ret;
+
+    sreg = 0x00001000;      /* ãã­ã»ããµä¿è­·éåãã³ã¯ */
+    /*
+     *  ãã³ã¯ãã»ãã
+     */
+    LDSR_REG(BSEL, sreg);
+
+    /*
+     *  å
+é ­ã¢ãã¬ã¹ãMCAã«ã»ãã
+     */
+    LDSR_REG(MCA, (uint32)base);
+
+    /*
+     *  ãµã¤ãºãMCSã«ã»ãã
+     */
+    LDSR_REG(MCS, (uint32)size);
+
+    /*
+     *  ã¡ã¢ãªä¿è­·è¨­å®ãã§ãã¯éå§
+     */
+    LDSR_REG(MCC, 0U);
+
+    /*
+     *  ã¡ã¢ãªä¿è­·è¨­å®ãã§ãã¯çµæãèª­ã¿åºã
+     */
+    STSR_REG(MCR, sreg);
+
+    if(sreg & 0x00000100){
+        /* ãªã¼ããã­ã¼ã®å ´å */
+        ret = FALSE;
+    } else if(sreg & 0x00000010){
+        /* ã¹ã¿ãã¯ã®å ´å */
+        ret = TRUE;
+    } else {
+        ret = FALSE;
+    }
+
+    /*
+     *  ãã³ã¯ãæ»ã
+     */
+    LDSR_REG(BSEL, 0U);
+
+	
+	return ret;
+}
+#endif /* OMIT_PROBE_STACK */
+#endif /* __v850e2v3__ */
+#endif
+
+AccessType
+probe_trusted_osap_mem(const MemoryStartAddressType sadr, const MemoryStartAddressType eadr)
+{
+    /*
+     *  ä¿¡é ¼OSAPãªãã°ä»»æã®ã¢ãã¬ã¹ã«ã¢ã¯ã»ã¹å¯è½
+     */
+    return(AP_Executable|AP_Readable|AP_Writable);
+}
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mpu.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mpu.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_mpu.h	(revision 172)
@@ -0,0 +1,114 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+/*
+ *	MPUãã©ã¤ãï¼V850E2ç¨ï¼
+ */
+
+#ifndef TOPPERS_PRC_MPU_H
+#define TOPPERS_PRC_MPU_H
+
+#ifndef TOPPERS_MACRO_ONLY
+/*
+ * ã·ã¹ãã ã¬ã¸ã¹ã¿ã¸ã®æ¸ãè¾¼ã¿
+ */
+#define IPA_WRITE(n, ipal, ipau) {\
+    Asm("\tldsr %0, ipa" #n "l \n"\
+        "\tldsr %1, ipa" #n "u \n"\
+        : : "r"(ipal), "r"(ipau): );\
+}
+#define DPA_WRITE(n, dpal, dpau) {\
+    Asm("\tldsr %0, dpa" #n "l \n"\
+        "\tldsr %1, dpa" #n "u \n"\
+        : : "r"(dpal), "r"(dpau): );\
+}
+
+extern void *p_ctxosap;
+/* åæåã«ã¼ãã³ */
+extern void target_mpu_initialize(void);
+/* ã¡ã¢ãªä¿è­·éåä¾å¤ãã³ãã© */
+extern void target_impu_exc_handler(void *p_excinf);
+extern void target_dmpu_exc_handler(void *p_excinf);
+/* ã¿ã¹ã¯ä¾å¤å®è¡éå§æã¹ã¿ãã¯ä¸æ­£ãã³ãã© */
+extern void target_emulate_texrtn_handler(void *p_excinf);
+/* ã¿ã¹ã¯ä¾å¤ãªã¿ã¼ã³æã¹ã¿ãã¯ä¸æ­£ãã³ãã© */
+extern void target_emulate_ret_tex_handler(void *p_excinf);
+
+/*
+ *  ä¿è­·éåFEã¬ãã«ä¾å¤ãã³ãã©
+ */
+#define EXCNO_PROTECTION 3
+extern void target_protection_handler(void *p_excinf);
+
+/*
+ *  TODO: probe_memãã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ã§ããï¼
+ */
+#define OMIT_PROBE_MEM_WRITE
+#if 0
+#define PROBE_MEM_WRITE(p_var, type) \
+	(probe_mem_write((MemoryStartAddressType) (p_var), sizeof(type)))
+#endif
+#define OMIT_PROBE_MEM_READ
+#define OMIT_PROBE_STACK
+
+extern AccessType probe_trusted_osap_mem(const MemoryStartAddressType sadr, const MemoryStartAddressType eadr);
+
+/*
+ *  Os_Lcfg.c
+ */
+extern void mpu_shared_area_initialize(void);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_MPU_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_offset.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_offset.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_offset.tf	(revision 172)
@@ -0,0 +1,136 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+$  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: prc_offset.tf 189 2015-06-26 01:54:57Z t_ishikawa $
+$
+
+$
+$       ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤ã«ï¼V850ç¨ï¼
+$
+
+$
+$  ãªãã»ããå¤ã®ãã¯ã­å®ç¾©ã®çæ
+$
+$DEFINE("TCB_p_tinib", offsetof_TCB_p_tinib)$
+$DEFINE("TCB_curpri", offsetof_TCB_curpri)$
+$  =begin modified for SC3
+$DEFINE("TCB_ssp", offsetof_TCB_ssp)$
+$DEFINE("TCB_usp", offsetof_TCB_usp)$
+$DEFINE("TCB_priv_mode", offsetof_TCB_priv_mode)$
+$  =end modified for SC3
+$DEFINE("TCB_pc", offsetof_TCB_pc)$
+
+$DEFINE("TINIB_task", offsetof_TINIB_task)$
+$  =begin modified for SC3
+$DEFINE("TINIB_sstksz", offsetof_TINIB_TSKINICTXB_sstksz)$
+$DEFINE("TINIB_sstk_bottom", offsetof_TINIB_TSKINICTXB_sstk_bottom)$
+$DEFINE("TINIB_ustksz", offsetof_TINIB_TSKINICTXB_stksz)$
+$DEFINE("TINIB_ustk_bottom", offsetof_TINIB_TSKINICTXB_stk_bottom)$
+$DEFINE("TINIB_start_ustk", offsetof_TINIB_STKMPUINFOB_start_ustk)$
+$DEFINE("TINIB_limit_ustk", offsetof_TINIB_STKMPUINFOB_limit_ustk)$
+$DEFINE("TINIB_p_osapcb", offsetof_TINIB_p_osapcb)$
+$  =end modified for SC3
+$DEFINE("TINIB_exepri", offsetof_TINIB_exepri)$
+
+$DEFINE("INTINIB_remain_stksz", offsetof_INTINIB_remain_stksz)$
+$DEFINE("ISRCB_p_isrinib", offsetof_ISRCB_p_isrinib)$
+
+$  =begin modified for SC3
+$DEFINE("ISRINIB_p_intinib", offsetof_ISRINIB_p_intinib)$
+$DEFINE("ISRINIB_p_osapcb",         offsetof_ISRINIB_p_osapcb)$
+
+$DEFINE("OSAPCB_p_osapinib", offsetof_OSAPCB_p_osapinib)$
+ 
+$DEFINE("OSAPINIB_osap_trusted",    offsetof_OSAPINIB_osap_trusted)$
+$DEFINE("OSAPINIB_osapmpu",         offsetof_OSAPINIB_osapmpu)$
+$DEFINE("OSAPINIB_start_text",      offsetof_OSAPINIB_start_text)$
+$DEFINE("OSAPINIB_limit_text",      offsetof_OSAPINIB_limit_text)$
+$DEFINE("OSAPINIB_start_rosdata",   offsetof_OSAPINIB_start_rosdata)$
+$DEFINE("OSAPINIB_limit_rosdata",   offsetof_OSAPINIB_limit_rosdata)$
+$DEFINE("OSAPINIB_start_ram",       offsetof_OSAPINIB_start_ram)$
+$DEFINE("OSAPINIB_limit_ram",       offsetof_OSAPINIB_limit_ram)$
+$DEFINE("OSAPINIB_start_sram",      offsetof_OSAPINIB_start_sram)$
+$DEFINE("OSAPINIB_limit_sram",      offsetof_OSAPINIB_limit_sram)$
+$DEFINE("OSAPINIB_start_srpw",      offsetof_OSAPINIB_start_srpw)$
+$DEFINE("OSAPINIB_limit_srpw",      offsetof_OSAPINIB_limit_srpw)$
+$DEFINE("OSAPINIB_start_ssrpw",     offsetof_OSAPINIB_start_ssrpw)$
+$DEFINE("OSAPINIB_limit_ssrpw",     offsetof_OSAPINIB_limit_ssrpw)$
+$DEFINE("OSAPINIB_mpu_area_info",   offsetof_OSAPINIB_mpu_area_info)$
+$DEFINE("OSAPINIB_tnum_mpu_area",   offsetof_OSAPINIB_tnum_mpu_area)$
+$DEFINE("OSAPINIB_mprc",            offsetof_OSAPINIB_mprc)$
+$  =end modified for SC3
+$DEFINE("ISRCB_usp",           offsetof_ISRCB_usp)$
+$DEFINE("ISRCB_ssp",           offsetof_ISRCB_ssp)$
+$DEFINE("ISRINIB_sstk_bottom", offsetof_ISRINIB_sstk_bottom)$
+$DEFINE("ISRINIB_ustk_bottom", offsetof_ISRINIB_ustk_bottom)$
+$DEFINE("QUEUE_next",          offsetof_QUEUE_next)$
+$DEFINE("QUEUE_prev",          offsetof_QUEUE_prev)$
+$DEFINE("ISRCB_next",          offsetof_ISRCB_next)$
+$DEFINE("ISRCB_prev",          offsetof_ISRCB_prev)$
+$DEFINE("ISRINIB_start_ustk",  offsetof_ISRINIB_start_ustk)$
+$DEFINE("ISRINIB_limit_ustk",  offsetof_ISRINIB_limit_ustk)$
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_opt.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_opt.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_opt.tf	(revision 172)
@@ -0,0 +1,731 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+$DEBUG_OPT_TF = 1$
+
+$ 
+$  arch/v850_gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+$FUNCTION GENERATE_MEMORY$
+    $NOOP()$
+$END$
+
+$FUNCTION GENERATE_OUTPUT$
+    OUTPUT_FORMAT("elf32-v850","elf32-v850","elf32-v850")$NL$
+    OUTPUT_ARCH(v850)$NL$
+    $NL$
+$END$
+
+$
+$  ä¿è­·ãã¡ã¤ã³ã®ã©ãã«ã®ä½æ
+$	OSAP.LABEL[domid]ï¼ä¿è­·ãã¡ã¤ã³ã®ã©ãã«
+$
+$OSAP.LABEL[TDOM_KERNEL] = "kernel"$
+$FOREACH domid OSAP.ID_LIST$
+	$OSAP.LABEL[domid] = domid$
+$END$
+$OSAP.LABEL[TDOM_NONE] = "shared"$
+
+$ 
+$  æ¨æºã®ã»ã¯ã·ã§ã³ã®ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ã®å®ç¾©
+$ 
+$MEMATR_TEXT = (TA_NOWRITE|TA_EXEC)$
+$MEMATR_RODATA = (TA_NOWRITE|TA_EXEC)$
+$MEMATR_DATA = TA_MEMINI$
+$MEMATR_BSS = TA_NULL$
+$MEMATR_PRSV = TA_MEMPRSV$
+$MEMATR_ROSDATA = (TA_SDATA|TA_MEMINI|TA_NOWRITE|TA_EXEC)$
+$MEMATR_SDATA = (TA_SDATA|TA_MEMINI)$
+$MEMATR_SBSS = TA_SDATA$
+
+
+$ 
+$  ä¿è­·ãã¡ã¤ã³æ¯ã®ããã©ã«ãã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ã®ä½æ
+$ 
+$DEFAULT_ACPTN[TDOM_KERNEL] = VALUE("TACP_KERNEL", TACP_KERNEL)$
+$FOREACH domid OSAP.ID_LIST$
+	$DEFAULT_ACPTN[domid] = VALUE(FORMAT("TACP(%1%)", domid), 1 << (domid - 1))$
+$END$
+$DEFAULT_ACPTN[TDOM_NONE] = VALUE("TACP_SHARED", TACP_SHARED)$
+
+$ 
+$  ã¡ã¢ãªä¿è­·åä½ã®å®éã®ãµã¤ãºãåãåãï¼åãåã£ããµã¤ãºä»¥ä¸ã§ï¼
+$  ARM MPUã®ãµã¤ãºå¶ç´ãæºããæå°å¤ãè¿ã
+$  ARM MPUã®ãµã¤ãºå¶ç´ã¯ï¼16B~4GBã®ç¯å²ã®2ã®ã¹ãä¹
+$  ARGV[1]ï¼å®éã®ãµã¤ãº
+$  RESULTï¼ARM MPUã®ãµã¤ãºå¶ç´ãæºããæå°å¤
+$FUNCTION SEARCH_ARM_MPU_SIZE$
+    $IF ARGV[1] <= 0$
+        $RESULT = 0$
+    $ELSE$
+        $search_state = 0$
+        $FOREACH bit_offset { 31,30,...,4 }$
+            $compare_bit = 1 << bit_offset$
+            $IF ((ARGV[1] & compare_bit) != 0)$
+                $IF (search_state == 0)$
+                    $result_size = compare_bit$
+                    $search_state = 1$
+                $ELIF (search_state == 1)$
+                    $result_size = (result_size << 1)$
+                    $search_state = 2$
+                $END$
+            $END$
+        $END$
+        $IF (search_state == 0)$
+            $result_size = (1 << 4)$
+        $ELIF (search_state == 1) && ((ARGV[1] & 0xf) != 0)$
+            $result_size = (result_size << 1)$
+        $END$
+        $RESULT = result_size$
+    $END$
+$END$
+
+$ 
+$  åãåã£ãçªå°ä»¥ä¸ã§ï¼ARM MPUã®ã¢ã©ã¤ã³å¶ç´ã®æå°å¤ãè¿ã
+$  ARGV[1]ï¼çªå°
+$  ARGV[2]ï¼ãµã¤ãº
+$  RESULTï¼ARM MPUã®ã¢ã©ã¤ã³å¶ç´ãæºããæå°å¤
+$ 
+$FUNCTION SEARCH_ARM_MPU_ALIGN$
+    $result_align = ARGV[1]$
+    $compare_mask = ARGV[2] - 1$
+    $IF ((ARGV[1] & compare_mask) != 0)$
+        $result_align = ARGV[1] & ~compare_mask$
+        $result_align = result_align + ARGV[2]$
+    $END$
+
+    $RESULT = result_align$
+$END$
+
+$ 
+$  tsize_meminibã®è£æ­£
+$  sdata_sharedã®å
+é ­ã¢ãã¬ã¹ããã¹ã¯ãã¼ã¹æ¹å¼ã§ã¢ã©ã¤ã³ããããï¼
+$  ãã®ç´åã®ã»ã¯ã·ã§ã³ã®limitã¨sdata_sharedã®startãç°ãªãå¯è½æ§ããã
+$  ãã£ã¦+1ãã¦ãã
+$  prsv_sharedã®çµç«¯ã¢ãã¬ã¹ããã¹ã¯ãã¼ã¹æ¹å¼ã§ã¢ã©ã¤ã³ããããï¼
+$  prsv_sharedã®ãµã¤ãºãç©ºã§ãï¼ãã¹4ã§ã¯startã¨limitãç°ãªãå¯è½æ§ããã
+$  ãã£ã¦+1ãã¦ãã
+$  
+$FUNCTION CALC_TSIZE_MEMINIB$
+    $tsize_meminib = tsize_meminib + 2$
+$END$
+
+$OPTIMIZE_MEMINIB = 1$
+$OPTIMIZE_DATASEC_LIST = 1$
+$OPTIMIZE_BSSSEC_LIST = 1$
+
+$ 
+$  OSAPåæåã³ã³ãã­ã¹ããã­ãã¯ã®ããã®å®£è¨
+$ 
+$FUNCTION PREPARE_OSAPINICTXB$
+    $IF LENGTH(TSK.ID_LIST)$
+        $FOREACH tskid TSK.ID_LIST$
+            $IF !OSAP.TRUSTED[TSK.OSAPID[tskid]]$
+                extern uint8 $FORMAT("__start_user_stack%s", tskid)$;$NL$
+                extern uint8 $FORMAT("__limit_user_stack%s", tskid)$;$NL$
+            $END$
+        $END$
+    $END$
+    $FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
+        $IF LENGTH(shared_ustack_size[tskpri])$
+            extern uint8 $FORMAT("__start_shared_user_stack%s", tskpri)$;$NL$
+            extern uint8 $FORMAT("__limit_shared_user_stack%s", tskpri)$;$NL$
+        $END$
+    $END$
+
+
+    $IF LENGTH(OSAP.ID_LIST)$
+        $FOREACH domid OSAP.ID_LIST$
+            $IF !OSAP.TRUSTED[domid]$
+$   RXé åï¼å°ç¨ï¼
+                extern uint8 __start_text_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_text_$OSAP.LABEL[domid]$;$NL$
+$   Ré åï¼å°ç¨ï¼
+                extern uint8 __start_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+                extern uint8 __limit_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+$   RWXé åï¼å°ç¨ï¼
+                extern uint8 __start_ram_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_ram_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __start_sram_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_sram_$OSAP.LABEL[domid]$;$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ã
+                extern uint8 $FORMAT("__start_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                extern uint8 $FORMAT("__limit_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                extern uint8 $FORMAT("__start_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                extern uint8 $FORMAT("__limit_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+            $END$
+        $END$
+        $NL$
+    $END$$NL$
+
+$  å
+±æé å
+    extern uint8 __start_text_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __limit_text_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __start_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+    extern uint8 __limit_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+    extern uint8 __start_ram_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __limit_ram_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __start_sram_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __limit_sram_$OSAP.LABEL[TDOM_NONE]$;$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ãé åå
+¨ä½
+    extern uint8 __start_srpw_all;$NL$
+    extern uint8 __limit_srpw_all;$NL$
+    extern uint8 __start_ssrpw_all;$NL$
+    extern uint8 __limit_ssrpw_all;$NL$
+    $NL$
+$END$
+
+
+$FUNCTION GENERATE_TARGET_MPUINFOB$
+$ 
+$  ä¿è­·ãã¡ã¤ã³åæåãã­ãã¯ã®memä¾å­é¨ãçæ
+$ 
+    $FILE "kernel_mem3.c"$
+
+    $PREPARE_OSAPINICTXB()$
+
+$END$
+
+$ 
+$  TSKINICTXBã®åæåæ
+å ±ãçæ
+$ 
+$DOMINICTXB_KERNEL = "{ NULL }"$
+
+$FUNCTION GENERATE_OSAPINIB_MPUINFOB$
+    $TAB$$TAB${$NL$
+    $IF !OSAP.TRUSTED[ARGV[1]]$
+$   RXé åï¼å°ç¨ï¼
+        $TAB$$TAB$$TAB$( (uint8 *)&__start_text_$OSAP.LABEL[ARGV[1]]$ ), /* iregion 0 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)&__limit_text_$OSAP.LABEL[ARGV[1]]$ ), /* iregion 0 */$NL$
+$   RXé åï¼å°ç¨ã·ã§ã¼ããã¼ã¿ï¼
+        $TAB$$TAB$$TAB$( (uint8 *)&__start_sram_$OSAP.LABEL[ARGV[1]]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ ),/* iregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)&__limit_sram_$OSAP.LABEL[ARGV[1]]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ ),/* iregion 1 */$NL$
+$   RWXé åï¼å°ç¨ï¼
+        $TAB$$TAB$$TAB$( (uint8 *)&__start_ram_$OSAP.LABEL[ARGV[1]]$ ),/* dregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)&__limit_ram_$OSAP.LABEL[ARGV[1]]$ ),/* dregion 1 */$NL$
+$   RWXé åï¼å°ç¨ã·ã§ã¼ããã¼ã¿ï¼
+        $TAB$$TAB$$TAB$( (uint8 *)&__start_sram_$OSAP.LABEL[ARGV[1]]$ ),/* dregion 2 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)&__limit_sram_$OSAP.LABEL[ARGV[1]]$ ),/* dregion 2 */$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ã
+        $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__start_ram_%s_%x_%x )", OSAP.LABEL[ARGV[1]], +DEFAULT_ACPTN[ARGV[1]], +TACP_SHARED)$,/* dregion 3 */$NL$
+        $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__limit_ram_%s_%x_%x )", OSAP.LABEL[ARGV[1]], +DEFAULT_ACPTN[ARGV[1]], +TACP_SHARED)$,/* dregion 3 */$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ãï¼ã·ã§ã¼ããã¼ã¿ï¼
+        $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__start_sram_%s_%x_%x )", OSAP.LABEL[ARGV[1]], +DEFAULT_ACPTN[ARGV[1]], +TACP_SHARED)$,/* dregion 4 */$NL$
+        $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__limit_sram_%s_%x_%x )", OSAP.LABEL[ARGV[1]], +DEFAULT_ACPTN[ARGV[1]], +TACP_SHARED)$,/* dregion 4 */$NL$
+    $ELSE$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* iregion 0 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* iregion 0 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* iregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* iregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 2 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 2 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 3 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 3 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 4 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 4 */$NL$
+    $END$
+    $TAB$$TAB$}$NL$
+    $NL$
+$END$
+
+$FUNCTION GENERATE_TSKINICTXB$
+	$TAB$$TAB${$NL$
+    $TAB$$TAB$$TAB$$TSK.TINIB_SSTKSZ[ARGV[1]]$,$NL$
+	$TAB$$TAB$$TAB$((void *)((uint8 *)($TSK.TINIB_SSTK[ARGV[1]]$)
+    $SPC$+ ($TSK.TINIB_SSTKSZ[ARGV[1]]$))),$NL$
+	$IF OSAP.TRUSTED[TSK.OSAPID[ARGV[1]]]$
+        $TAB$$TAB$$TAB$0,$NL$
+        $TAB$$TAB$$TAB$0,$NL$
+    $ELSE$
+        $TAB$$TAB$$TAB$$TSK.TINIB_USTKSZ[ARGV[1]]$,$NL$ 
+        $TAB$$TAB$$TAB$((void *)((uint8 *)($TSK.TINIB_USTK[ARGV[1]]$)
+        $SPC$+ ($TSK.TINIB_USTKSZ[ARGV[1]]$))),$NL$
+    $END$
+	$TAB$$TAB$},$NL$
+$END$
+
+$FUNCTION GENERATE_STKMPUINFOB$
+	$TAB$$TAB${$NL$
+	$IF OSAP.TRUSTED[TSK.OSAPID[ARGV[1]]]$
+        $TAB$$TAB$$TAB$0,$NL$
+        $TAB$$TAB$$TAB$0,$NL$
+    $ELSE$
+		$IF EQ(TSK.STK[tskid],"NULL")$
+$			// stkãNULLã®å ´åã®å¦ç
+            $IF LENGTH(TSK.SHARED_USTK_ID[tskid])$
+$               // å
+±æã¹ã¿ãã¯
+                $TAB$$TAB$$TAB$$FORMAT("&__start_shared_user_stack%s", TSK.PRIORITY[ARGV[1]])$,$NL$
+                $TAB$$TAB$$TAB$$FORMAT("(&__limit_shared_user_stack%s - 0x10)", TSK.PRIORITY[ARGV[1]])$,$NL$
+            $ELSE$
+$               // åºæã¹ã¿ãã¯
+                $TAB$$TAB$$TAB$$FORMAT("&__start_user_stack%s", ARGV[1])$,$NL$
+                $TAB$$TAB$$TAB$$FORMAT("(&__limit_user_stack%s - 0x10)", ARGV[1])$,$NL$
+            $END$
+        $ELSE$
+$			// stkãNULLã§ãªãå ´åã®å¦ç
+            $TAB$$TAB$$TAB$$FORMAT("(uint8 *)%s", TSK.TINIB_USTK[ARGV[1]])$,$NL$
+            $TAB$$TAB$$TAB$$FORMAT("(uint8 *)((uint32)%s + %d - 0x10)", TSK.TINIB_USTK[ARGV[1]], TSK.TINIB_USTKSZ[ARGV[1]])$,$NL$
+        $END$
+    $END$
+	$TAB$$TAB$},$NL$
+$END$
+
+$INCLUDE "kernel/kernel_opt.tf"$
+
+$ 
+$  å
+±æãªã¼ãã©ã¤ãé å / å
+±æãªã¼ãå°æã©ã¤ãé åï¼sdataï¼ / rosdata_sharedé å
+$  ã®æ
+å ±åå¾
+$  
+$check_shared_mo = 0x00$
+$check_srpw_mo = 0x00$
+$check_rosdata_mo = 0x00$
+$check_sdata_mo = 0x00$
+$LIST_SHARED_MO = {}$
+$LIST_SRPW_MO = {}$
+$LIST_ROSDATA_MO = {}$
+$preid = -1$
+$FOREACH moid MO_START_LIST$
+$   // ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ããã¹2æç¹ã§ã®é ã«ãã§ãã¯
+    $IF LENGTH(FIND(MO_MPROTECT_LIST, moid))$
+$       // ã¡ã¢ãªä¿è­·åä½ã®å
+é ­ã®å ´å
+        $IF (MO.ACPTN1[moid] == TACP_SHARED) && (MO.ACPTN2[moid] == TACP_SHARED)$
+            $IF ((check_shared_mo & 0x10) != 0x10)$
+$               // å
+±æãªã¼ãã©ã¤ãé åã®å
+é ­ã®å ´å
+                $SHARED_AREA_BASE[check_shared_mo] = MO.BASEADDR[moid]$
+                $SHARED_AREA_MO[check_shared_mo] = moid$
+                $LIST_SHARED_MO = APPEND(LIST_SHARED_MO, check_shared_mo)$
+                $check_shared_mo = check_shared_mo | 0x10$
+            $END$
+        $ELIF (check_shared_mo & 0x10) == 0x10$
+$           // å
+±æãªã¼ãã©ã¤ãé åã®çµç«¯ã®å ´å
+            $IF preid == -1$
+                $ERROR$
+                    $FORMAT("unexpected preid.")$
+                $END$
+            $END$
+            $check_shared_mo = check_shared_mo & 0x0f$
+            $SHARED_AREA_LIMIT[check_shared_mo] = MO.LIMITADDR[preid]$
+            $SHARED_AREA_SIZE[check_shared_mo] = SHARED_AREA_LIMIT[check_shared_mo] - SHARED_AREA_BASE[check_shared_mo]$
+            $SHARED_AREA_LIMIT_MO[check_shared_mo] = preid$
+            $check_shared_mo = check_shared_mo + 1$
+        $END$
+
+    $END$
+
+    $preid = moid$
+$END$
+$IF (check_shared_mo & 0x10) == 0x10$
+    $IF preid == -1$
+        $ERROR$
+            $FORMAT("unexpected preid.")$
+        $END$
+    $END$
+    $check_shared_mo = check_shared_mo & 0x0f$
+    $SHARED_AREA_LIMIT[check_shared_mo] = MO.LIMITADDR[preid]$
+    $SHARED_AREA_LIMIT_MO[check_shared_mo] = preid$
+    $SHARED_AREA_SIZE[check_shared_mo] = SHARED_AREA_LIMIT[check_shared_mo] - SHARED_AREA_BASE[check_shared_mo]$
+    $check_shared_mo = check_shared_mo + 1$
+$END$
+$ 
+$  ã¨ã©ã¼ãã§ãã¯
+$  
+$FOREACH id LIST_SHARED_MO$
+    $IF DEBUG_OPT_TF$
+        $WARNING$
+            $id$$NL$
+            $SHARED_AREA_MO[id]$$NL$
+            $SHARED_AREA_LIMIT_MO[id]$$NL$
+            $FORMAT("0x%x", SHARED_AREA_BASE[id])$$NL$
+            $FORMAT("0x%x", SHARED_AREA_LIMIT[id])$$NL$
+            $FORMAT("0x%x", SHARED_AREA_SIZE[id])$$NL$
+        $END$
+    $END$
+    $IF ((MO.MEMATR[SHARED_AREA_MO[id]] & TA_SDATA) == TA_SDATA)$
+        $IF LENGTH(SHARED_DATA.BASE)$
+            $ERROR$
+                $FORMAT("unexpected mematr: %d, %x", id, MO.MEMATR[SHARED_AREA_MO[id]])$
+            $END$
+        $ELSE$
+            $SHARED_DATA.BASE = SHARED_AREA_BASE[id]$
+            $SHARED_DATA.LIMIT = SHARED_AREA_LIMIT[id]$
+            $SHARED_DATA.SIZE = SHARED_AREA_SIZE[id]$
+            $SHARED_DATA.BASE_MO = SHARED_AREA_MO[id]$
+            $SHARED_DATA.LIMIT_MO = SHARED_AREA_LIMIT_MO[id]$
+        $END$
+    $ELSE$
+        $ERROR$
+            $FORMAT("unexpected mematr: %d, %x", id, MO.MEMATR[SHARED_AREA_MO[id]])$
+        $END$
+    $END$
+$END$
+
+$ 
+$  data_sharedã®é
+ç½®ã¢ãã¬ã¹ãæ±ãã
+$ 
+$SHARED_DATA.REALSIZE = SEARCH_ARM_MPU_SIZE(SHARED_DATA.SIZE)$
+$SHARED_DATA.REALBASE = SEARCH_ARM_MPU_ALIGN(SHARED_DATA.BASE, SHARED_DATA.REALSIZE)$
+$IF DEBUG_OPT_TF$
+    $WARNING$
+        $FORMAT("data_shared: base[0x%x], size[0x%x]", SHARED_DATA.REALBASE, SHARED_DATA.REALSIZE)$$NL$
+    $END$
+$END$
+
+$  
+$  é
+ç½®ã¢ãã¬ã¹ãæå®ããã»ã¯ã·ã§ã³ã«å¯¾ããå¦ç
+$  é
+ç½®æãå¯¾è±¡ã®ã»ã¯ã·ã§ã³: å¿
+ããããã©ãã
+$    srpw_data_all: 0
+$    srpw_sdata_all: 0
+$    rosdata_shared: 1
+$    sdata_shared: 1
+$    data_shared: 1
+$  
+$check_shared_mo = 0$
+$preid = -1$
+$limit_align_flag = 1$
+$FOREACH moid MO_START_LIST$
+$   // ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ããã¹2æç¹ã§ã®é ã«ãã§ãã¯
+    $IF MO.LINKER[moid]$
+        $IF DEBUG_OPT_TF$
+            $WARNING$
+                $FORMAT("check mo %d: SEFLAG=0x%x", moid, MO.SEFLAG[moid])$$NL$
+            $END$
+        $END$
+        $IF (moid == SHARED_DATA.BASE_MO)$
+$           // data_sharedã®å
+é ­
+            $MO.REALBASE[moid] = SHARED_DATA.REALBASE$
+            $MO.COMMENT[moid] = "data_shared_top"$
+            $IF DEBUG_OPT_TF$
+                $WARNING$
+                    $FORMAT("%s[%d]=0x%x", MO.COMMENT[moid], moid, MO.REALBASE[moid])$$NL$
+                $END$
+            $END$
+        $END$
+        $IF (preid == SHARED_DATA.LIMIT_MO)$
+$           // data_sharedã®çµç«¯ã¯ãã¹ã¯ãã¼ã¹æ¹å¼ãªã®ã§ãµã¤ãºã®åæ°ã«ã¢ã©ã¤ã³
+            $at_mo_order = FIND(MO_ORDER, preid)$
+            $check_flag = 1$
+            $WHILE check_flag$
+                $IF LENGTH(AT(MO_ORDER, at_mo_order))$
+                    $IF DEBUG_OPT_TF$
+                        $WARNING$
+                            $FORMAT("check: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+                        $END$
+                    $END$
+                    $IF (MO.SEFLAG[AT(MO_ORDER, at_mo_order)] & 0x20) == 0x20$
+                        $IF DEBUG_OPT_TF$
+                            $WARNING$
+                                $FORMAT("hit: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+                            $END$
+                        $END$
+                        $MO.REALALIGN[AT(MO_ORDER, at_mo_order)] = SHARED_DATA.REALSIZE$
+                        $check_flag = 0$
+                    $END$
+                $ELSE$
+                    $ERROR$
+                        $FORMAT("shared data does not have limit label")$$NL$
+                    $END$
+                    $check_flag = 0$
+                $END$
+                $at_mo_order = at_mo_order + 1$
+            $END$
+        $END$
+    $END$
+
+    $preid = moid$
+$END$
+$IF (preid == SHARED_DATA.LIMIT_MO)$
+$   // data_sharedã®çµç«¯ã¯ãã¹ã¯ãã¼ã¹æ¹å¼ãªã®ã§ãµã¤ãºã®åæ°ã«ã¢ã©ã¤ã³
+    $at_mo_order = FIND(MO_ORDER, preid)$
+    $check_flag = 1$
+    $WHILE check_flag$
+        $IF LENGTH(AT(MO_ORDER, at_mo_order))$
+            $IF DEBUG_OPT_TF$
+                $WARNING$
+                    $FORMAT("check: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+                $END$
+            $END$
+            $IF (MO.SEFLAG[AT(MO_ORDER, at_mo_order)] & 0x20) == 0x20$
+                $IF DEBUG_OPT_TF$
+                    $WARNING$
+                        $FORMAT("hit: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+                    $END$
+                $END$
+                $MO.REALALIGN[AT(MO_ORDER, at_mo_order)] = SHARED_DATA.REALSIZE$
+                $check_flag = 0$
+            $END$
+        $ELSE$
+            $ERROR$
+                $FORMAT("shared data does not have limit label")$$NL$
+            $END$
+            $check_flag = 0$
+        $END$
+        $at_mo_order = at_mo_order + 1$
+    $END$
+$END$
+
+$ 
+$  arch/v850_gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$FUNCTION GENERATE_PROVIDE$
+    PROVIDE(_hardware_init_hook = 0);$NL$
+    PROVIDE(_software_init_hook = 0);$NL$
+    PROVIDE(_software_term_hook = 0);$NL$
+    PROVIDE(_bsssecinib_table = 0);$NL$
+    PROVIDE(_tnum_bsssec = 0);$NL$
+    PROVIDE(_datasecinib_table = 0);$NL$
+    PROVIDE(_tnum_datasec = 0);$NL$
+    $NL$
+
+    $IF LENGTH(OSAP.ID_LIST)$
+        $FOREACH domid OSAP.ID_LIST$
+            $IF !OSAP.TRUSTED[domid]$
+$   RXé åï¼å°ç¨ï¼
+                PROVIDE(___start_text_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                PROVIDE(___limit_text_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+$   Ré åï¼å°ç¨ï¼
+                PROVIDE(___start_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+                PROVIDE(___limit_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+$   RWXé åï¼å°ç¨ï¼
+                PROVIDE(___start_ram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                PROVIDE(___limit_ram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                PROVIDE(___start_sram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                PROVIDE(___limit_sram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ã
+                PROVIDE($FORMAT("___start_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                PROVIDE($FORMAT("___limit_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                PROVIDE($FORMAT("___start_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                PROVIDE($FORMAT("___limit_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+            $END$
+        $END$
+        $NL$
+    $END$$NL$
+
+$  å
+±æé å
+    PROVIDE(___start_text_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___limit_text_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___start_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+    PROVIDE(___limit_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+    PROVIDE(___start_ram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___limit_ram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___start_sram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    PROVIDE(___limit_sram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ãé åå
+¨ä½
+    PROVIDE(___start_srpw_all = 0xfffffff0);$NL$
+    PROVIDE(___limit_srpw_all = 0xfffffff0);$NL$
+    PROVIDE(___start_ssrpw_all = 0xfffffff0);$NL$
+    PROVIDE(___limit_ssrpw_all = 0xfffffff0);$NL$
+    STARTUP(start.o)
+    ENTRY(__reset)
+    $NL$
+$END$
+
+$FUNCTION GENERATE_GP_LABEL$
+    $TAB$$TAB$__gp = . + 32K;$NL$
+    $TAB$$TAB$__tp = . + 32K;$NL$
+$END$
+
+$TOPPERS_ATTMOD = TOPPERS_ATTSEC + 1$
+$TOPPERS_MPFAREA = TOPPERS_ATTSEC + 2$
+
+$INCLUDE "v850_gcc/ldscript.tf"$
+
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid]$
+$		// ã»ã¯ã·ã§ã³ã®éå§è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+$			// å
+±æãªã¼ãå°æã©ã¤ãé åã®å
+¨ä½ã®éå§çªå°
+            $IF (MO.SEFLAG[moid] & 0x100) != 0$
+$               // æåã«æ´æ°ãããå¤ãæå¹ã¨ãªã
+                $IF !LENGTH(SRPW.BASE)$
+                    $SRPW.BASE = MO.BASEADDR[moid]$
+                    $IF DEBUG_OPT_TF$
+                        $WARNING$
+                            $FORMAT("hit: %d, 0x%x", moid, +MO.SEFLAG[moid])$$NL$
+                        $END$
+                    $END$
+                $END$
+            $ELIF MO.ACPTN1[moid] == 0 && MO.ACPTN2[moid] == TACP_SHARED
+                && (MO.MEMATR[moid] & TA_SDATA) != 0$
+$               // æåã«æ´æ°ãããå¤ãæå¹ã¨ãªã
+                $IF !LENGTH(SRPW.BASE)$
+                    $SRPW.BASE = MO.BASEADDR[moid]$
+                $END$
+            $END$
+		$END$
+
+$	    // å
+±æãªã¼ãå°æã©ã¤ãé åã®å
+¨ä½ã®çµäºçªå°
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+            $IF !LENGTH(SRPW.BASE)$
+                $ERROR$
+                    "start_srpw label is not found"
+                $END$
+            $END$
+$           // æå¾ã«æ´æ°ãããå¤ãæå¹ã¨ãªã
+$             $SRPW.LIMIT = MO.LIMITADDR[moid]$
+            $SRPW.LIMIT = LIMIT_SYMBOL(MO.MLABEL[moid])$
+            $IF DEBUG_OPT_TF$
+                $WARNING$
+                    $FORMAT("hit end: %d, 0x%x", moid, SRPW.LIMIT)$$NL$
+                $END$
+            $END$
+        $ELIF MO.ACPTN1[moid] == 0 && MO.ACPTN2[moid] == TACP_SHARED
+            && (MO.MEMATR[moid] & TA_SDATA) != 0$
+$           // æå¾ã«æ´æ°ãããå¤ãæå¹ã¨ãªã
+$            $SRPW.LIMIT = MO.LIMITADDR[moid]$
+            $SRPW.LIMIT = LIMIT_SYMBOL(MO.MLABEL[moid])$
+            $IF DEBUG_OPT_TF$
+                $WARNING$
+                    $FORMAT("hit end: %d, 0x%x", moid, SRPW.LIMIT)$$NL$
+                $END$
+            $END$
+		$END$
+
+	$END$
+$END$
+
+$IF DEBUG_OPT_TF$
+    $WARNING$
+        $FORMAT("srpw area: 0x%x, 0x%x", SRPW.BASE, SRPW.LIMIT)$$NL$
+    $END$
+$END$
+
+$ 
+$  å
+±æé åã®åæåãã­ãã¯ãçæ
+$ 
+$FILE "kernel_mem3.c"$
+
+$TNUM_SHARED_REGION = 3$
+const uint32 tnum_shared_mem = $TNUM_SHARED_REGION * 2$;$NL$
+uint8 * const shared_meminib_table[$TNUM_SHARED_REGION * 2$] = {$NL$
+$shared_info = SYMBOL("shared_meminib_table")$
+$   RXé åï¼å
+±æï¼
+$start_label = PEEK(shared_info, 4)$
+$limit_label = PEEK(shared_info + 4, 4)$
+$TAB$((uint8 *)&__start_text_$OSAP.LABEL[TDOM_NONE]$),$TAB$/* iregion 2 */$NL$
+$TAB$((uint8 *)&__limit_text_$OSAP.LABEL[TDOM_NONE]$),$TAB$/* iregion 2 */$NL$
+
+$   RXé åï¼å
+±æã·ã§ã¼ããã¼ã¿ï¼å
+±æãªã¼ãå°æã©ã¤ãã®å
+¨ä½ï¼
+$   rosdata_shared
+$   srpw_data_all
+$start_label = PEEK(shared_info + 8, 4)$
+$limit_label = PEEK(shared_info + 12, 4)$
+$IF LENGTH(SRPW.BASE) && LENGTH(SRPW.LIMIT)$
+    $TAB$((uint8 *)$FORMAT("0x%x", SRPW.BASE)$),$TAB$/* iregion 3 */$NL$
+    $TAB$((uint8 *)$FORMAT("0x%x", SRPW.LIMIT)$),$TAB$/* iregion 3 */$NL$
+$ELSE$
+    $TAB$((uint8 *)NULL),$TAB$/* iregion 3 */$NL$
+    $TAB$((uint8 *)NULL),$TAB$/* iregion 3 */$NL$
+$END$
+
+$   RWXé åï¼å
+±æã·ã§ã¼ããã¼ã¿ï¼å
+±æãã¼ã¿ï¼
+$   //sdata_sharedã®å
+é ­ããdata_sharedã®çµç«¯ï¼dataã®å
+é ­ï¼ã¾ã§
+$   data_sharedã®å
+é ­ããsdata_sharedã®çµç«¯ï¼dataã®å
+é ­ï¼ã¾ã§
+$start_label = PEEK(shared_info + 16, 4)$
+$limit_label = PEEK(shared_info + 20, 4)$
+$start_label = SHARED_DATA.REALBASE$
+$limit_label = (SHARED_DATA.REALSIZE - 1) & ~0x0f$
+$TAB$$FORMAT("( (uint8 *)0x%x )", start_label)$,$TAB$/* dregion 5 : $FORMAT("0x%x", start_label)$ */$NL$
+$TAB$$FORMAT("( (uint8 *)0x%x )", limit_label)$,$TAB$/* dregion 5 : $FORMAT("0x%x", limit_label)$ */$NL$
+
+};$NL$
+$NL$
+
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_sil.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_sil.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_sil.h	(revision 172)
@@ -0,0 +1,185 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_sil.h 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *		ã¡ã¢ãªåã³å¨è¾ºã¢ãã¬ã¹ã¢ã¯ã»ã¹ããã®ãã­ã»ããµä¾å­é¨ï¼V850ç¨ï¼
+ */
+#include <prc_insn.h>
+
+#ifndef TOPPERS_PRC_SIL_H
+#define TOPPERS_PRC_SIL_H
+
+#define PSW_ID_BITPTN	(1U << 5)
+
+#define EIRFn		0x1000                      /* å²ãè¾¼ã¿è¦æ±ããã(bit12) */
+#define EIMKn		0x0080                      /* å²ãè¾¼ã¿è¨±å¯ããã(bit7) */
+
+/*
+ *  ãã­ã»ããµã®ã¨ã³ãã£ã¢ã³
+ */
+#define SIL_ENDIAN_LITTLE
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¡ã¢ãªç©ºéã¢ã¯ã»ã¹é¢æ°é¡
+ */
+
+/*
+ *  8ãããåä½ã®èª­åºãï¼æ¸è¾¼ã¿
+ */
+LOCAL_INLINE uint8
+sil_reb_mem(void *mem)
+{
+	uint8 data;
+
+	data = *((volatile uint8 *) mem);
+	return(data);
+}
+
+LOCAL_INLINE void
+sil_wrb_mem(void *mem, uint8 data)
+{
+	*((volatile uint8 *) mem) = data;
+}
+
+/*
+ *  16ãããåä½ã®èª­åºãï¼æ¸è¾¼ã¿
+ */
+LOCAL_INLINE uint16
+sil_reh_mem(void *mem)
+{
+	uint16 data;
+
+	data = *((volatile uint16 *) mem);
+	return(data);
+}
+
+LOCAL_INLINE void
+sil_wrh_mem(void *mem, uint16 data)
+{
+	*((volatile uint16 *) mem) = data;
+}
+
+/*
+ *  32ãããåä½ã®èª­åºãï¼æ¸è¾¼ã¿
+ */
+LOCAL_INLINE void
+sil_wrw_mem(void *mem, uint32 data)
+{
+	*((volatile uint32 *) mem) = data;
+}
+
+LOCAL_INLINE uint32
+sil_rew_mem(void *mem)
+{
+	uint32 data;
+
+	data = *((volatile uint32 *) mem);
+	return(data);
+}
+
+/*
+ *  NMIãé¤ããã¹ã¦ã®å²è¾¼ã¿ã®ç¦æ­¢
+ */
+LOCAL_INLINE uint32
+TOPPERS_disint(void)
+{
+	/* ç¾å¨ã®PSWãåå¾ãï¼IDããããã»ãããã */
+	volatile uint32 psw = current_psw();
+	set_psw(psw | PSW_ID_BITPTN);
+
+	return(psw);
+}
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ï¼å
+é¨è¡¨ç¾ï¼ã®ç¾å¨å¤ã®è¨­å®
+ */
+LOCAL_INLINE void
+TOPPERS_enaint(uint32 TOPPERS_psw)
+{
+	if ((TOPPERS_psw & PSW_ID_BITPTN) == 0u) {
+		set_psw(current_psw() & ~PSW_ID_BITPTN);
+	}
+}
+
+/*
+ *  å
+¨å²è¾¼ã¿ã­ãã¯ç¶æ
+ã®å¶å¾¡
+ */
+#define SIL_PRE_LOC		volatile uint32 TOPPERS_psw
+#define SIL_LOC_INT()	TOPPERS_psw = TOPPERS_disint()
+#define SIL_UNL_INT()	TOPPERS_enaint(TOPPERS_psw)
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_SIL_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_support.S
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_support.S	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_support.S	(revision 172)
@@ -0,0 +1,3188 @@
+/* 
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2016 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_support.S 189 2015-06-26 01:54:57Z t_ishikawa $
+ */
+
+/*
+ *		ã¿ã¼ã²ããä¾å­æ
+å ±ã®å®ç¾©
+ */
+#include <v850asm.inc>
+#include "offset.h"
+#include "Os_Cfg_asm.inc"
+
+#ifdef USE_ASMCONFIG_INC
+#include "asm_config.inc"
+#endif /* USE_ASMCONFIG_INC */
+
+#ifdef __v850e2v3__
+
+/*
+ *  V850E2ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ */
+.macro GET_ISPR reg
+	mov		ISPR_H, AMARG(reg)
+	ld.h	0[AMARG(reg)],AMARG(reg)
+.endm
+
+.macro CLEAR_ISPR reg1, reg2
+	mov		ISPC_H,AMARG(reg1)
+	mov		0xffff,AMARG(reg2)
+	st.h	AMARG(reg2),0[AMARG(reg1)]
+	mov		ISPR_H, AMARG(reg1)
+	st.h	r0,0[AMARG(reg1)]
+.endm
+
+.macro SET_PMR reg_val, reg_tmp
+	mov     PMR, AMARG(reg_tmp)
+	st.h    AMARG(reg_val), 0[AMARG(reg_tmp)]  /* set interrupt level */
+	syncm
+.endm
+
+#endif /* __v850e2v3__ */
+
+#ifdef __v850e3v5__
+
+/*
+ *  V850E3V5ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ */
+.macro GET_ISPR reg
+	stsr 10, AMARG(reg), 2
+.endm
+
+.macro SET_ISPR val, reg 
+	movea AMARG(val),r0,AMARG(reg)
+	ldsr AMARG(reg), 10, 2
+	syncp
+.endm
+
+.macro SET_INTCFG val, reg 
+	movea AMARG(val),r0,AMARG(reg)
+	ldsr AMARG(reg), 13, 2
+	syncp
+.endm
+
+.macro CLEAR_ISPR reg1, reg2
+	SET_INTCFG 1, AMARG(reg1) /* ISPR ãæ¸ãæãå¯è½ã« */
+	SET_ISPR   0, AMARG(reg1) /* ISPR ã®ã¯ãªã¢ */
+	SET_INTCFG 0, AMARG(reg1) /* ISPR ãæ¸ãæãç¦æ­¢ã«(èªåæ´æ°ã«) */
+.endm
+
+.macro GET_PMR reg
+	stsr 11, AMARG(reg), 2
+.endm
+
+.macro SET_PMR reg_val, reg_tmp
+	stsr psw, AMARG(reg_tmp)
+	di
+	ldsr AMARG(reg_val), 11, 2
+	ldsr AMARG(reg_tmp), psw
+	syncp
+.endm
+
+.macro GET_ICSR reg
+	stsr sr12, AMARG(reg), 2
+.endm
+
+.macro SET_ICSR val, reg 
+	movea AMARG(val),r0,AMARG(reg)
+	ldsr \reg, sr12, 2
+.endm
+
+#endif /* !__v850e3v5__ */
+
+
+/*
+ *  OSå²è¾¼ã¿ç¦æ­¢ãã¯ã­
+ *  ãã¹ãã®ä¸çªå¤å´ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+ */
+.macro OUTER_LOCK_OS_INT   reg12, reg13
+
+    /* pmr_isr2_mask -> PMR */
+    Lea     _pmr_isr2_mask, AMARG(reg13)
+    ld.h    0[AMARG(reg13)], AMARG(reg13)
+    SET_PMR AMARG(reg13), AMARG(reg12)
+
+    /* nested_lock_os_int_cnt = 1 */
+    Lea     _nested_lock_os_int_cnt, AMARG(reg12)
+    mov     1, AMARG(reg13)
+    st.b    AMARG(reg13), 0[AMARG(reg12)]
+
+.endm
+
+/*
+ *  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+ *  ãã¹ãã®ä¸çªå¤å´ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+ */
+.macro OUTER_UNLOCK_OS_INT  reg12, reg13
+
+    /* nested_lock_os_int_cnt = 0 */
+    Lea     _nested_lock_os_int_cnt, AMARG(reg12)
+    mov     r0, AMARG(reg13)
+    st.b    AMARG(reg13), 0[AMARG(reg12)]
+
+    /* pmr_setting_tbl[current_iintpri] -> PMR */
+    Lea     _current_iintpri, AMARG(reg12)
+    ld.bu   0[AMARG(reg12)], AMARG(reg12)
+    shl     1, AMARG(reg12)
+
+    Lea     _pmr_setting_tbl, AMARG(reg13)
+    add     AMARG(reg12), AMARG(reg13)
+    ld.h    0[AMARG(reg13)], AMARG(reg13)
+    SET_PMR AMARG(reg13), AMARG(reg12)  /* set interrupt level */
+
+.endm
+
+/* =begin modified for SC3 */
+/*
+ *  OSå²è¾¼ã¿ç¦æ­¢ãã¯ã­
+ *  ãã¹ããã
+ */
+.macro NESTED_LOCK_OS_INT   reg12, reg13
+    .macrolocal increment_nest_lock
+
+    /* nested_lock_os_int_cnt == 0 ? */
+    Lea     _nested_lock_os_int_cnt, AMARG(reg13)
+    ld.b    0[AMARG(reg13)], AMARG(reg12)
+    cmp     r0, AMARG(reg12)
+    bne     increment_nest_lock
+
+    /* pmr_isr2_mask -> PMR */
+    Lea     _pmr_isr2_mask, AMARG(reg13)
+    ld.h    0[AMARG(reg13)], AMARG(reg13)
+    SET_PMR AMARG(reg13), AMARG(reg12)  /* set interrupt level */
+    Lea     _nested_lock_os_int_cnt, AMARG(reg13)
+    mov     r0, AMARG(reg12)                /* nested_lock_os_int_cnt = 0 */
+
+FLABEL(increment_nest_lock)
+    /* nested_lock_os_int_cnt += 1 */
+    add     1, AMARG(reg12)
+    st.b    AMARG(reg12), 0[AMARG(reg13)]
+
+.endm
+
+/*
+ *  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+ *  ãã¹ããã
+ */
+.macro NESTED_UNLOCK_OS_INT  reg12, reg13
+    .macrolocal nested_unlock_exit
+
+    /* nested_lock_os_int_cnt -= 1 */
+    Lea     _nested_lock_os_int_cnt, AMARG(reg12)
+    ld.b    0[AMARG(reg12)], AMARG(reg13)
+    add     -1, AMARG(reg13)
+    st.b    AMARG(reg13), 0[AMARG(reg12)]
+    cmp     r0, AMARG(reg13)
+    bne     nested_unlock_exit
+
+    /* pmr_setting_tbl[current_iintpri] -> PMR */
+    Lea     _current_iintpri, AMARG(reg12)
+    ld.bu   0[AMARG(reg12)], AMARG(reg12)
+    shl     1, AMARG(reg12)
+
+    Lea     _pmr_setting_tbl, AMARG(reg13)
+    add     AMARG(reg12), AMARG(reg13)
+    ld.h    0[AMARG(reg13)], AMARG(reg13)
+    SET_PMR AMARG(reg13), AMARG(reg12)  /* set interrupt level */
+
+FLABEL(nested_unlock_exit)
+.endm
+
+.macro CHANGE_OS_STK   reg12
+    .macrolocal change_ostk
+
+    Lea     _saved_ostkpt, AMARG(reg12)
+    ld.w    0[AMARG(reg12)], AMARG(reg12)
+    cmp     r0, AMARG(reg12)
+    bne     change_ostk
+	Lea     __ostkpt, AMARG(reg12)
+	ld.w    0[AMARG(reg12)], AMARG(reg12)
+FLABEL(change_ostk)
+	add     -4, AMARG(reg12)
+	st.w    sp, 0[AMARG(reg12)]                      /* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ */
+	mov     AMARG(reg12), sp                         /* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åãæ¿ã */
+.endm
+
+
+/* =end modified for SC3 */
+
+	/* 
+	 * å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç 
+	*/
+.macro PRE_INT_EXC
+#ifdef _RH850G3M_
+	/* ä¸é¨ä¸­æ­åä¾å¤ãã³ãã©ã§ã®ã¿å¿
+è¦ã ãä¸å¾å®è¡ãã */
+	syncp
+#endif /* _RH850G3M_ */
+.endm
+
+	/*
+	 * å²è¾¼ã¿ä¾å¤å
+¥ãå£ã§ã®ã¬ã¸ã¹ã¿ã®ä¿å­ãã¯ã­
+	 */
+.macro INT_EXC_SAVEREG workreg
+#ifndef TOPPERS_USE_PUSHSP
+#ifdef TOPPERS_USE_HFLOAT
+	addi    -88 , sp , sp
+#else /* !TOPPERS_USE_HFLOAT */
+	addi    -84 , sp , sp
+#endif /* TOPPERS_USE_HFLOAT */
+	st.w    r30, 12[sp]  /* r30(ep) */
+    /*
+     * å²è¾¼ã¿çºçåã®r2ã¯eiwrã«ä¿å­ããã¦ãã
+     * ããã§ï¼r2ã¯ãã§ã«ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦
+     * ä½¿ç¨ä¸­ã§ããããï¼ä¸æ¸ãããªã
+     * r2ã«å
+¥ã£ã¦ããå²è¾¼ã¿çªå·ãç ´å£ããªãããã«
+     */
+    stsr    AMARG(workreg), r30    /* r2->r30ã«å¾©å¸° */
+	st.w    r30, 76[sp]
+	mov     sp, ep 
+	sst.w   r1, 80[ep]
+	sst.w   r5, 72[ep]
+	sst.w   r6, 68[ep]
+	sst.w   r7, 64[ep]
+	sst.w   r8, 60[ep]
+	sst.w   r9, 56[ep]
+	sst.w   r10, 52[ep]
+	sst.w   r11, 48[ep]
+	sst.w   r12, 44[ep]
+	sst.w   r13, 40[ep]
+	sst.w   r14, 36[ep]
+	sst.w   r15, 32[ep]
+	sst.w   r16, 28[ep]
+	sst.w   r17, 24[ep]
+	sst.w   r18, 20[ep]
+	sst.w   r19, 16[ep]
+	sst.w   r31, 8[ep]
+#ifdef TOPPERS_USE_HFLOAT
+	stsr    fpsr, r19     /* load FPSR */
+	sst.w   r19, 84[ep]
+#endif /* TOPPERS_USE_HFLOAT */
+
+#else /* TOPPERS_USE_PUSHSP */
+	pushsp  r1-r1
+    /*
+     * å²è¾¼ã¿çºçåã®r2ã¯eiwrã«ä¿å­ããã¦ãã
+     * ããã§ï¼r2ã¯ãã§ã«ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦
+     * ä½¿ç¨ä¸­ã§ããããï¼ä¸æ¸ãããªã
+     * r2ã«å
+¥ã£ã¦ããå²è¾¼ã¿çªå·ãç ´å£ããªãããã«
+     */
+    stsr    AMARG(workreg), r1    /* r2->r1ã«å¾©å¸° */
+	pushsp  r1-r1
+#ifdef TOPPERS_USE_HFLOAT
+	stsr    fpsr, r1     /* load FPSR */
+	pushsp  r1-r1
+#endif /* TOPPERS_USE_HFLOAT */
+#ifndef NTC2ISR
+	pushsp  r5-r19
+	pushsp  r30-r31
+#else /* NTC2ISR */
+	pushsp  r5-r31
+#endif /* NTC2ISR */
+	addi    -8, sp , sp
+	mov     sp, ep 
+#endif /* TOPPERS_USE_PUSHSP */
+.endm
+
+	/*
+	 * å²è¾¼ã¿ä¾å¤å
+¥ãå£ã§ã®ã¬ã¸ã¹ã¿ã®å¾©å¸°ãã¯ã­
+	 */
+.macro INT_EXC_RESTOREREG workreg
+#ifndef TOPPERS_USE_PUSHSP
+#ifdef TOPPERS_USE_HFLOAT
+	sld.w   84[ep], r19
+	ldsr    r19, fpsr     /* store FPSR */
+#endif /* TOPPERS_USE_HFLOAT */
+	sld.w   80[ep], r1
+	sld.w   76[ep], r2
+	sld.w   72[ep], r5
+	sld.w   68[ep], r6
+	sld.w   64[ep], r7
+	sld.w   60[ep], r8
+	sld.w   56[ep], r9
+	sld.w   52[ep], r10
+	sld.w   48[ep], r11
+	sld.w   44[ep], r12
+	sld.w   40[ep], r13
+	sld.w   36[ep], r14
+	sld.w   32[ep], r15
+	sld.w   28[ep], r16
+	sld.w   24[ep], r17
+	sld.w   20[ep], r18
+	sld.w   16[ep], r19
+	sld.w    8[ep], r31
+#ifdef TOPPERS_USE_HFLOAT
+	addi    88, ep, sp
+#else /* !TOPPERS_USE_HFLOAT */
+	addi    84, ep, sp
+#endif /* TOPPERS_USE_HFLOAT */
+	sld.w   12[ep], r30 /* r30(ep) */
+    ldsr    r2, AMARG(workreg)    /* r2ãéé¿ */
+
+#else /* TOPPERS_USE_PUSHSP */
+	addi    8, sp , sp
+#ifndef NTC2ISR
+	popsp   r30-r31
+	popsp   r5-r19
+#else /* NTC2ISR */
+	popsp   r5-r31
+#endif /* NTC2ISR */
+#ifdef TOPPERS_USE_HFLOAT
+	popsp   r1-r1
+	ldsr    r1, fpsr      /* store FPSR */
+#endif /* TOPPERS_USE_HFLOAT */
+    /*
+     * å²è¾¼ã¿çºçåã®r2ã¯eiwrã«å¾©å¸°
+     */
+	popsp   r1-r1
+    ldsr    r1, AMARG(workreg)     /* r2->eiwrã«å¾©å¸° */
+	popsp   r1-r1
+#endif /* TOPPERS_USE_PUSHSP */
+.endm
+
+
+#ifdef __v850e3v5__
+	/* 
+	 * V850E3V5ç¨ãã¯ã¿
+	 * ããã«RBASEãè¨­å®ããããã¨ãæ³å®ï¼ãããé»æºæå
+¥æã®éå§ã¢ãã¬ã¹ï¼
+	 * (EIã¬ãã«å²è¾¼ã¿ã¯ãã¼ãã«åç
+§æ¹å¼ãä½¿ç¨ããããæ¬ãã¯ã¿ã¯ä½¿ç¨ããªã)
+	 */
+	.section .reset.text
+	.global __reset
+__reset:
+	jr __start
+	.rept 6
+	nop
+	.endr
+__syserr: /* 0x0010 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endr
+__hvtrap: /* 0x0020 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endr
+__fetrap: /* 0x0030 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endr
+__trap0:  /* 0x0040 */
+	jr _ei_exception_entry
+	.rept 6
+	nop
+	.endr
+__trap1:  /* 0x0050 */
+	jr _ei_exception_entry
+	.rept 6
+	nop
+	.endr
+__rie:    /* 0x0060 */
+	jr _ei_exception_entry
+	.rept 6
+	nop
+	.endr
+__fppfpi: /* 0x0070 */
+	jr _ei_exception_entry
+	.rept 6
+	nop
+	.endr
+__ucpop:  /* 0x080 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endr
+__mip:    /* 0x0090 */
+	jr _fe_exception_entry_memory
+	.rept 6
+	nop
+	.endr
+__pie:   /* 0x00a0 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endr
+__debug:  /* 0x00b0 */
+	jr __debug
+	.rept 6
+	nop
+	.endr
+__mae:    /* 0x00c0 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endr
+__rfu:    /* 0x00d0 */
+	jr __rfu
+	.rept 6
+	nop
+	.endr
+__fenmi:  /* 0x00e0 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endr
+__feint:  /* 0x00f0 */
+	jr _fe_exception_entry_cpu
+	.rept 6
+	nop
+	.endr
+__eiintn0:  /*ï¼åªå
+åº¦0ï¼ 0x0100 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn1:  /*ï¼åªå
+åº¦1ï¼ 0x0110 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn2:  /*ï¼åªå
+åº¦2ï¼ 0x0120 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn3:  /*ï¼åªå
+åº¦3ï¼ 0x0130 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn4:  /*ï¼åªå
+åº¦4ï¼ 0x0140 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn5:  /*ï¼åªå
+åº¦5ï¼ 0x0150 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn6:  /*ï¼åªå
+åº¦6ï¼ 0x0160 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn7:  /*ï¼åªå
+åº¦7ï¼ 0x0170 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn8:  /*ï¼åªå
+åº¦8ï¼ 0x0180 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn9:  /*ï¼åªå
+åº¦9ï¼ 0x0190 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn10: /*ï¼åªå
+åº¦10ï¼ 0x01a0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn11: /*ï¼åªå
+åº¦11ï¼ 0x01b0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn12: /*ï¼åªå
+åº¦12ï¼ 0x01c0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn13: /*ï¼åªå
+åº¦13ï¼ 0x01d0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn14: /*ï¼åªå
+åº¦14ï¼ 0x01e0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+__eiintn15: /*ï¼åªå
+åº¦15ï¼ 0x01f0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endr
+
+#endif /* __v850e3v5__ */
+
+.macro FE_EXCEPTION_ENTRY
+    .macrolocal _fe_exception_macro
+    .macrolocal fe_exception_utask
+	/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+    ldsr    r2, fewr                /* ã¨ã©ã¼ã³ã¼ããä¿å­ */
+    stsr    fepsw, r2
+    shl     PSW_SV, r2              /* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    mov     r0, r2
+    bnc     _fe_exception_macro          /* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+#ifdef NTC2ISR
+    /*
+     *  NTC2ISRã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runisr, r2
+    ld.w    0[r2], r2
+    cmp     r0, r2          /* p_runisrãããï¼ã¦ã¼ã¶ã¢ã¼ããªãã°éä¿¡é ¼ISR */
+    be      fe_exception_utask
+    st.w    sp, ISRCB_usp[r2]         /* uspãä¿å­ */
+    ld.w    ISRCB_p_isrinib[r2], r2
+    ld.w    ISRINIB_sstk_bottom[r2], sp         /* sspãå¾©å¸° */
+    ori     0x1000, r0, r2             /* r2 = 0x1000 */
+    br      _fe_exception_macro
+FLABEL(fe_exception_utask)
+#endif /* NTC2ISR */
+    /*
+     *  ã¦ã¼ã¶ã¿ã¹ã¯ããã®ä¾å¤
+     */
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    st.w    sp, TCB_usp[r2]         /* uspãTCBã«ä¿å­ */
+    ld.w    TCB_p_tinib[r2], r2
+    ld.w    TINIB_sstk_bottom[r2], sp         /* sspãå¾©å¸° */
+    ori     0x1000, r0, r2             /* r2 = 0x1000 */
+FLABEL(_fe_exception_macro)
+.endm
+
+
+    .section .text_kernel
+	/*
+	 *  ä¾å¤ã¨ã³ããªï¼feretã§ãªã¿ã¼ã³ããä¾å¤ç¨ï¼
+     *  ããã§ï¼CY = FEPSW.IMPï¼r2 = error code
+     *  r2ã¯ä¾å¤ã¨ã³ããªã§ã¹ã¿ãã¯ã«ä¿å­æ¸ã¿
+     *  r2ã®æä¸ä½ãããã«ï¼ä¾å¤å
+ã®ã³ã³ãã­ã¹ããç¹æ¨©ãã©ãããä¿å­ãã
+	 */
+	.global _fe_exception_entry_cpu
+FLABEL(_fe_exception_entry_cpu)
+    FE_EXCEPTION_ENTRY
+    ori     E_OS_PROTECTION_EXCEPTION, r2, r2
+    br      fe_exception_0
+
+	.global _fe_exception_entry
+FLABEL(_fe_exception_entry_memory)
+    FE_EXCEPTION_ENTRY
+    ori     E_OS_PROTECTION_MEMORY, r2, r2
+
+FLABEL(fe_exception_0)
+    /* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ */
+    INT_EXC_SAVEREG fewr
+
+	/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®FEPCã¨FEPSWãä¿å­ */
+	stsr    fepc, r6
+	sst.w   r6, 4[ep]
+	stsr    fepsw, r6
+	sst.w   r6, 0[ep]
+
+	/*
+	 * ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå¦çã¬ãã«ã§å®è¡ããããOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+	 * OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ä¾å¤ãçºçããå¯è½æ§ãããããï¼ãã¹ãç®¡çãè¡ãï¼
+	 * ä¾å¤ã¯æ¬¡ã®æ¡ä»¶ã§çºçãã
+	 *  ã»ISR1å®è¡ç¶æ
+ã§çºçããå ´å
+	 *  ã»ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 *  ã»OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 *  ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§çºçããå ´å
+	 */
+
+	/*
+	 * ã«ãã´ãª1ã®å²è¾¼ã¿ä»¥å¤ã§ä¾å¤ãçºçãããã®å¤æ­ãã
+	 * ã«ãã´ãª1ã§ä¾å¤ãçºçï¼fe_exception_1ã¸ã¸ã£ã³ã
+	 */
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     fe_exception_1
+
+	/*
+	 *  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 */
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     1, r13
+	bne     fe_exception_1
+
+	/*
+	 * OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 * OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+	 */
+	Lea     _pmr_isr2_mask, r7
+	ld.h    0[r7], r7
+	SET_PMR r7, r6  /* pmr_isr2_mask -> PMR */
+
+FLABEL(fe_exception_1)
+	/*
+	 *  å²è¾¼ã¿çºçæã«å¤æ´ãããã®ã§å²è¾¼ã¿è§£é¤åã«åå¾
+	 */
+	stsr    feic, r19                   /* ä¾å¤è¦å  */
+	stsr    fepc, r18                   /* ä¾å¤çºçPC */
+
+	/* 
+	 * C1ISRãåãä»ããããï¼NPbit ã¯ãªã¢ 
+	 */
+	stsr    psw, r12
+	mov     ~0x0080, r13
+	and     r12, r13
+	ldsr    r13, psw
+
+FLABEL(fe_exception_2)
+	/*
+	 *  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã¯ï¼ç¡éã«ã¼ãã¸
+	 */
+	Lea   _kerflg, r12          /* kerflgãFALSEãªãç¡éã«ã¼ã */
+	ld.b  0[r12], r12
+	cmp   r0, r12
+FLABEL(infinity_loop_fe)
+	be    infinity_loop_fe
+
+	/*
+	 * å¤éå²è¾¼ã¿ãå¤å®
+	 */
+	Lea     _hook_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     1, r14                      /*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã */
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	mov     sp, r9                      /* sp ãr9ã«éé¿ */
+
+	cmp     1, r13
+	bne     fe_exception_3              /* _nested_lock_os_int_cnt > 1 -> fe_exception_3 */
+
+	/*
+	 * C1ISRå®è¡ç¶æ
+ã§çºçããå ´åã¯ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 */
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     fe_exception_3
+
+	/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+    CHANGE_OS_STK r12
+
+FLABEL(fe_exception_3)
+    /* FEPSW.ID == 1ã®å ´åã¯å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ãªã®ã§è§£é¤ããªã */
+	stsr    fepsw, r12
+    mov     0x20, r13
+    tst     r12, r13
+    bne     fe_exception_4
+	UNLOCK_ALL_INT
+
+FLABEL(fe_exception_4)
+#ifdef CFG_USE_PROTECTIONHOOK
+	/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãç¢ºä¿ */
+	addi    -12, sp, sp
+
+	/* v850_cpu_exp_spã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_sp, r12
+	st.w    r9, 0[r12]
+	st.w    ep, 0[sp]
+	mov     sp, ep
+
+	/* v850_cpu_exp_noã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_no, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 8[ep]
+	st.w    r19, 0[r12]                     /* r19 ä¾å¤è¦å  */
+
+	/* v850_cpu_exp_pcã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_pc, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 4[ep]
+	mov     r18, r17                        /* r18:fepc */
+	add     -4, r17
+	st.w    r17, 0[r12]
+
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+	/*
+	 * CPUä¾å¤ãçºçããå ´åï¼OSã¯E_OS_PROTECTION_EXCEPTIONããã©ã¡ã¼ã¿ã¨ãã¦
+	 * ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 */
+    /* =begin modified for SC3 */
+    andi    0xefff, r2, r6 /* ã¨ã©ã¼ã³ã¼ããç¬¬1å¼æ°ã«(r6=r2 & ~0x1000) */
+    shr     12, r2         /* ä¾å¤ã®çºçå
+ãã¦ã¼ã¶ã¢ã¼ããªãr2=1 */
+    xori    0x0001, r2, r2     /* r2 = r2==1? 0: 1 */
+    Lea     _pre_protection_supervised, r12
+    st.b    r2, 0[r12]
+    /* =end modified for SC3 */
+	jarl    _call_protectionhk_main, r31
+
+#ifdef CFG_USE_PROTECTIONHOOK
+	mov     sp, ep
+
+	/* v850_cpu_exp_noãå¾©å¸° */
+	Lea     _v850_cpu_exp_no, r12
+	sld.w   8[ep], r13
+	st.w    r13, 0[r12]
+
+	/* v850_cpu_exp_pcãå¾©å¸° */
+	Lea     _v850_cpu_exp_pc, r12
+	sld.w   4[ep], r13
+	st.w    r13, 0[r12]
+
+	/* v850_cpu_exp_spéé¿ */
+	Lea     _v850_cpu_exp_sp, r12
+	sld.w   0[ep], r13
+	st.w    r13, 0[r12]
+
+	/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãæ»ã */
+	addi    12, sp, sp
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+FLABEL(fe_ret_exc)
+	LOCK_ALL_INT
+
+	/*
+	 * ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å®è¡ãã
+	 */
+
+	/*
+	 *  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 */
+	Lea     _hook_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	/*
+	 *  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 */
+	/*
+	 * ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯
+	 * (1)ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ããããªã
+	 * (2)OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ãããªã
+	*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ret_exc_2
+
+	/*
+	 *  ãã¹ãåæ°ã1ä»¥ä¸ãªãå²è¾¼ã¿å
+ãISRãªããä¾å¤çºçå
+ã¸å¾©å¸°
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 */
+	cmp     r0, r13
+	bne     ret_exc_1
+
+	/*
+	 *  æ»ãå
+ãã¿ã¹ã¯ãªããã¹ã¿ãã¯ãæ»ã
+	 */
+	ld.w    0[sp], sp
+
+FLABEL(ret_exc_1)
+	/*
+	 *  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´åï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 */
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     r0, r13
+	bne     ret_exc_2
+
+	/* OSå²è¾¼ã¿ãè§£é¤ */
+	/* pmr_setting_tbl[current_iintpri] -> PMR */
+	Lea     _current_iintpri, r12
+	ld.bu   0[r12], r12
+	shl     1, r12
+
+	Lea     _pmr_setting_tbl, r13
+	add     r12, r13
+	ld.h    0[r13], r13
+	SET_PMR r13, r12     /* set interrupt level */
+
+	/*
+	 *  ä¾å¤çºçå
+ã¸å¾©å¸°
+	 */
+FLABEL(ret_exc_2)
+	/*
+	 * ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 */
+	mov     sp, ep
+	sld.w    4[ep], r10
+	ldsr    r10, fepc
+	sld.w   0[ep], r10
+	ldsr    r10, fepsw
+
+    /* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+    INT_EXC_RESTOREREG fewr
+
+	stsr    fepsw, r2   /* r2 = fepsw */
+    shl     PSW_SV, r2         /* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_fe_exception    /* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+#ifdef NTC2ISR
+    /*
+     *  NTC2ISRã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runisr, r2
+    ld.w    0[r2], r2
+    cmp     r0, r2          /* p_runisrãããï¼ã¦ã¼ã¶ã¢ã¼ããªãã°éä¿¡é ¼ISR */
+    be      fe_exception_to_utask
+    ld.w    ISRCB_usp[r2], sp     /* uspãå¾©å¸° */
+    br      return_from_fe_exception
+#endif /* NTC2ISR */
+FLABEL(fe_exception_to_utask)
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp         /* uspãå¾©å¸° */
+FLABEL(return_from_fe_exception)
+    stsr    fewr, r2
+	feret
+
+	/*
+	 *  ä¾å¤ã¨ã³ããªï¼eiretã§ãªã¿ã¼ã³ããä¾å¤ç¨ï¼
+     *  ããã§ï¼CY = EIPSW.IMPï¼r2 = error code
+     *  r2ã¯OSå´ã§äºç´ããï¼å²è¾¼ã¿ã»ä¾å¤ã®åºå
+¥å£ã®
+     *  ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ç¨ããï¼ããï¼
+     *  ã¹ã¿ãã¯ã«ä¿å­ããªã
+	 */
+	.global _ei_exception_entry
+FLABEL(_ei_exception_entry)
+	/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+    stsr    eipsw, r2
+    shl     PSW_SV, r2              /* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    mov     r0, r2                  /* movå½ä»¤ã§ã¯ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ã¯å¤åããªã */
+    bnc     ei_exception_0          /* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+#ifdef NTC2ISR
+    /*
+     *  NTC2ISRã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runisr, r2
+    ld.w    0[r2], r2
+    cmp     r0, r2          /* p_runisrãããï¼ã¦ã¼ã¶ã¢ã¼ããªãã°éä¿¡é ¼ISR */
+    be      ei_exception_utask
+    st.w    sp, ISRCB_usp[r2]         /* uspãä¿å­ */
+    ld.w    ISRCB_p_isrinib[r2], r2
+    ld.w    ISRINIB_sstk_bottom[r2], sp         /* sspãå¾©å¸° */
+    ori     0x1000, r0, r2          /* r2 = 0x1000 */
+    br      ei_exception_0
+FLABEL(ei_exception_utask)
+#endif /* NTC2ISR */
+    /*
+     *  ã¦ã¼ã¶ã¿ã¹ã¯ããã®ä¾å¤
+     */
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    st.w    sp, TCB_usp[r2]         /* uspãä¿å­ */
+    ld.w    TCB_p_tinib[r2], r2
+    ld.w    TINIB_sstk_bottom[r2], sp         /* sspãå¾©å¸° */
+    ori     0x1000, r0, r2          /* r2 = 0x1000 */
+FLABEL(ei_exception_0)
+    /*
+     *  EIä¾å¤ã«ããè¦å ã¯E_OS_PROTECTION_EXCEPTIONã®ã¿ã§ãã
+     */
+    ori E_OS_PROTECTION_EXCEPTION, r2, r2 /* r2 |= E_OS_PROTECTION_EXCEPTION */
+
+    /* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+    INT_EXC_SAVEREG eiwr
+
+	/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®EIPCã¨EIPSWãä¿å­ */
+	stsr    eipc, r6
+	sst.w   r6, 4[ep]
+	stsr    eipsw, r6
+	sst.w   r6, 0[ep]
+
+	/*
+	 * ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå¦çã¬ãã«ã§å®è¡ããããOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+	 * OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ä¾å¤ãçºçããå¯è½æ§ãããããï¼ãã¹ãç®¡çãè¡ãï¼
+	 * ä¾å¤ã¯æ¬¡ã®æ¡ä»¶ã§çºçãã
+	 *  ã»ISR1å®è¡ç¶æ
+ã§çºçããå ´å
+	 *  ã»ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 *  ã»OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 *  ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§çºçããå ´å
+	 */
+
+	/*
+	 * ã«ãã´ãª1ã®å²ãè¾¼ã¿ä»¥å¤ã§ä¾å¤ãçºçãããã®å¤æ­ãã
+	 * ã«ãã´ãª1ã§ä¾å¤ãçºçï¼ei_exception_1ã¸ã¸ã£ã³ã
+	 */
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_exception_1
+
+	/*
+	 *  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 */
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     1, r13
+	bne     ei_exception_1
+
+	/*
+	 * OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 * OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+	 */
+	Lea     _pmr_isr2_mask, r7
+	ld.h    0[r7], r7
+	SET_PMR r7, r6                   /* pmr_isr2_mask -> PMR */
+
+FLABEL(ei_exception_1)
+	/*
+	 *  å²è¾¼ã¿çºçæã«å¤æ´ãããã®ã§å²è¾¼ã¿è§£é¤åã«åå¾
+	 */
+	stsr    eiic, r19                   /* ä¾å¤è¦å  */
+	stsr    eipc, r18                   /* ä¾å¤çºçPC */
+
+
+FLABEL(ei_exception_2)
+	/*
+	 *  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã¯ï¼ç¡éã«ã¼ãã¸
+	 */
+	Lea   _kerflg, r12          /* kerflgãFALSEãªãç¡éã«ã¼ã */
+	ld.b  0[r12], r12
+	cmp   r0, r12
+FLABEL(infinity_loop_ei)
+	be    infinity_loop_ei
+
+	/*
+	 * å¤éå²è¾¼ã¿ãå¤å®
+	 */
+	Lea     _hook_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     1, r14                      /*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã */
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	mov     sp, r9                      /* sp ãr9ã«éé¿ */
+
+	cmp     1, r13
+	bne     ei_exception_3             /* _nested_lock_os_int_cnt > 1 -> ei_exception_3 */
+
+	/*
+	 * ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 */
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_exception_3
+
+	/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+    CHANGE_OS_STK r12
+
+FLABEL(ei_exception_3)
+    /* EIPSW.ID == 1ã®å ´åã¯ããã«ããªãããï¼æ¡ä»¶å¤å®ã¯ä¸è¦ */
+	UNLOCK_ALL_INT
+
+#ifdef CFG_USE_PROTECTIONHOOK
+	/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãç¢ºä¿ */
+	addi    -12, sp, sp
+
+	/* v850_cpu_exp_spã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_sp, r12
+	st.w    r9, 0[r12]
+	st.w    ep, 0[sp]
+	mov     sp, ep
+
+	/* v850_cpu_exp_noã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_no, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 8[ep]
+	st.w    r19, 0[r12]                     /* r19 ä¾å¤è¦å  */
+
+	/* v850_cpu_exp_pcã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_pc, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 4[ep]
+	mov     r18, r17                        /* r18:fepc */
+	add     -4, r17
+	st.w    r17, 0[r12]
+
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+	/*
+	 * CPUä¾å¤ãçºçããå ´åï¼OSã¯E_OS_PROTECTION_EXCEPTIONããã©ã¡ã¼ã¿ã¨ãã¦
+	 * ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 */
+    /* =begin modified for SC3 */
+    andi    0xefff, r2, r6 /* ã¨ã©ã¼ã³ã¼ããç¬¬1å¼æ°ã«(r6=r2 & ~0x1000) */
+    shr     12, r2         /* ä¾å¤ã®çºçå
+ãç¹æ¨©ã¢ã¼ããªãr2=1 */
+    xori    0x0001, r2, r2     /* r2 = r2==1? 0: 1 */
+    Lea     _pre_protection_supervised, r12
+    st.b    r2, 0[r12]
+    /* =end modified for SC3 */
+	jarl    _call_protectionhk_main, r31
+
+#ifdef CFG_USE_PROTECTIONHOOK
+	mov     sp, ep
+
+	/* v850_cpu_exp_noãå¾©å¸° */
+	Lea     _v850_cpu_exp_no, r12
+	sld.w   8[ep], r13
+	st.w    r13, 0[r12]
+
+	/* v850_cpu_exp_pcãå¾©å¸° */
+	Lea     _v850_cpu_exp_pc, r12
+	sld.w   4[ep], r13
+	st.w    r13, 0[r12]
+
+	/* v850_cpu_exp_spéé¿ */
+	Lea     _v850_cpu_exp_sp, r12
+	sld.w   0[ep], r13
+	st.w    r13, 0[r12]
+
+	/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãæ»ã */
+	addi    12, sp, sp
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+FLABEL(ei_ret_exc)
+	LOCK_ALL_INT
+
+	/*
+	 * ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å®è¡ãã
+	 */
+
+	/*
+	 *  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 */
+	Lea     _hook_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	/*
+	 *  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 */
+	/*
+	 * ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯
+	 * (1)ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ããããªã
+	 * (2)OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ãããªã
+	*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_ret_exc_2
+
+	/*
+	 *  ãã¹ãåæ°ã1ä»¥ä¸ãªãå²è¾¼ã¿å
+ãISRãªããä¾å¤çºçå
+ã¸å¾©å¸°
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 */
+	cmp     r0, r13
+	bne     ei_ret_exc_1
+
+	/*
+	 *  æ»ãå
+ãã¿ã¹ã¯ãªããã¹ã¿ãã¯ãæ»ã
+	 */
+	ld.w    0[sp], sp
+
+FLABEL(ei_ret_exc_1)
+	/*
+	 *  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´åï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 */
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     r0, r13
+	bne     ei_ret_exc_2
+
+	/* OSå²è¾¼ã¿ãè§£é¤ */
+	/* pmr_setting_tbl[current_iintpri] -> PMR */
+	Lea     _current_iintpri, r12
+	ld.bu   0[r12], r12
+	shl     1, r12
+
+	Lea     _pmr_setting_tbl, r13
+	add     r12, r13
+	ld.h    0[r13], r13
+	SET_PMR r13, r12             /* set interrupt level */
+
+	/*
+	 *  ä¾å¤çºçå
+ã¸å¾©å¸°
+	 */
+FLABEL(ei_ret_exc_2)
+	/*
+	 * ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 */
+	mov     sp, ep
+	sld.w    4[ep], r10
+	ldsr    r10, eipc
+	sld.w   0[ep], r10
+	ldsr    r10, eipsw
+
+    /* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+    INT_EXC_RESTOREREG eiwr
+
+	stsr    eipsw, r2   /* r2 = eipsw */
+    shl     PSW_SV, r2  /* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_ei_exception    /* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+#ifdef NTC2ISR
+    /*
+     *  NTC2ISRã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runisr, r2
+    ld.w    0[r2], r2
+    cmp     r0, r2          /* p_runisrãããï¼ã¦ã¼ã¶ã¢ã¼ããªãã°éä¿¡é ¼ISR */
+    be      ei_exception_to_utask
+    ld.w    ISRCB_usp[r2], sp     /* uspãå¾©å¸° */
+    br      return_from_ei_exception
+#endif /* NTC2ISR */
+FLABEL(ei_exception_to_utask)
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp         /* uspãå¾©å¸° */
+FLABEL(return_from_ei_exception)
+    stsr    eiwr, r2
+	eiret
+
+	/*
+	 *  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã®ç¡éã«ã¼ã
+	 */
+FLABEL(infinity_loop)
+	br infinity_loop
+
+	/*
+	 *  å²ãè¾¼ã¿ã¨ã³ããª
+	 *  V850E2
+	 *   ãã¯ã¿ã¼ãã¼ãã«ãã Os_Lcfg.c ã«çæãããåå²è¾¼ã¿ã®å²è¾¼ã¿ã¨ã³ããª
+	 *   ããã¸ã£ã³ããï¼r2ã«å²è¾¼ã¿çªå·ãä¿å­ãããç¶æ
+ã§å®è¡ããã
+	 *  V850E3V5
+	 *   ãã¯ã¿ã¼ãã¼ãã«ããç´æ¥å®è¡ãããããï¼ã¹ã¿ãã¯ã®ç¢ºä¿ãã¬ã¸ã¹ã¿ã®ä¿å­ã¯
+	 *   ç¹ã«è¡ããã¦ããªãç¶æ
+ã§å®è¡ããã
+	 */
+	.global _interrupt
+FLABEL(_interrupt)
+	/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+#ifdef __v850e3v5__
+    ldsr    r2, eiwr
+#endif /* __v850e3v5__ */
+	/*
+	 *  æ®ãã®ã¬ã¸ã¹ã¿éé¿ï¼ EPã§ã®ã¢ã¯ã»ã¹ã«åãæ¿ãã¦è¡ã
+     * ããã§ï¼CY = EIPSW.IMPï¼r2[31:16] = intno
+     *  r2ã¯OSå´ã§äºç´ããï¼å²è¾¼ã¿ã»ä¾å¤ã®åºå
+¥å£ã®
+     *  ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ç¨ããï¼ããï¼
+     *  ã¹ã¿ãã¯ã«ä¿å­ããªã
+	 */
+    stsr    eipsw, r2
+    shl     PSW_SV, r2              /* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     interrupt_0             /* ç¹æ¨©ããã®å²è¾¼ã¿ãªãã°ã¹ã­ãã */
+#ifdef NTC2ISR
+    /*
+     *  NTC2ISRã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runisr, r2
+    ld.w    0[r2], r2
+    cmp     r0, r2          /* p_runisrãããï¼ã¦ã¼ã¶ã¢ã¼ããªãã°éä¿¡é ¼ISR */
+    be      interrupt_utask
+    st.w    sp, ISRCB_usp[r2]         /* uspãä¿å­ */
+    ld.w    ISRCB_p_isrinib[r2], r2
+    ld.w    ISRINIB_sstk_bottom[r2], sp         /* sspãå¾©å¸° */
+    br      interrupt_0
+FLABEL(interrupt_utask)
+#endif /* NTC2ISR */
+    /*
+     *  ã¦ã¼ã¶ã¿ã¹ã¯ã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    st.w    sp, TCB_usp[r2]         /* uspãä¿å­ */
+    ld.w    TCB_p_tinib[r2], r2
+    ld.w    TINIB_sstk_bottom[r2], sp         /* sspãå¾©å¸° */
+FLABEL(interrupt_0)
+#ifdef __v850e3v5__
+	/* å²è¾¼ã¿è¦å ã®ç¹å® */
+	stsr	eiic,   r2
+	/* EICå²è¾¼ã¿ã¯0x1000 ãã */
+	addi   -0x1000, r2, r2
+#endif /* __v850e3v5__ */
+
+    /* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+    INT_EXC_SAVEREG eiwr
+
+	/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®EIPCã¨EIPSWãä¿å­ */
+	stsr    eipc, r6
+	sst.w   r6, 4[ep]
+	stsr    eipsw, r6
+	sst.w   r6, 0[ep]
+
+	mov     r2, r12
+
+	/* å²è¾¼ã¿åªå
+åº¦ãåå¾(r11) */
+	GET_ISPR r13
+	sch1r	r13, r11   
+	add		-1,r11
+
+	/* 
+	 *  _current_iintpri ã®æ´æ° 
+	 *  å²ãè¾¼ã¿å¦çä¸­ã¯ISPRãèªåçã«è¨­å®ããã¦ããããï¼PMRã¯è¨­å®ããå¿
+è¦ããªãï¼
+	 */
+	Lea     _current_iintpri, r6
+	ld.bu   0[r6], r19
+	st.b    r11,0[r6]
+
+#ifndef NTC2ISR
+	/*
+	 *  å¤éå²è¾¼ã¿ãå¤å®
+	 */
+	Lea     _except_nest_cnt, r13
+	ld.w    0[r13], r6
+
+	/*
+	 *  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã
+	 */
+	add     1,  r6
+	st.w    r6, 0[r13]
+	cmp     1,  r6
+	bne     interrupt_1     /* ãã¹ããã¦ããå ´åã¯ã¹ã¿ãã¯åæ¿ç¡ã */
+
+	/*
+	 *  ã¿ã¹ã¯ã«å²è¾¼ãã å ´å
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã
+	 */
+	mov     sp , r13
+	Lea     __ostkpt, sp
+	ld.w    0[r3], r3
+	add     -4, sp
+	st.w    r13, 0[sp]
+
+FLABEL(interrupt_1)
+#endif /* NTC2ISR */
+    /*
+     *  å²è¾¼ã¿çºçæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã¹ã¿ãã¯ã«ä¿å­
+     */
+    add     -4, sp
+    st.w    r19, 0[sp]
+
+#ifndef NTC2ISR
+	UNLOCK_ALL_INT
+#endif /* NTC2ISR */
+
+/* ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ã¯ã¨ããããç¡è¦ */
+#ifdef CFG_USE_STACKMONITORING
+    /* 
+     *  å²è¾¼ã¿çªå·ã®ä¿å­
+     *  ã¹ã¿ãã¯ãªã¼ããã­ã¼ã®ãã­ãã¯ã·ã§ã³ããã¯ã§ç ´å£ãããå¯è½æ§ããã
+     */
+    push    r12 
+	/*
+	 *  ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 */
+
+	/*
+	 * å¤éå²è¾¼ã¿ã®å ´åã¯ã¿ã¹ã¯ã¹ã¿ãã¯ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ãè¡ããªã
+	 */
+	cmp     1,  r6
+	bne     int_nested
+
+	/*
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 */
+	Lea     _p_runtsk, r6                   /* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             /* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    /* =begin modified for SC3 */
+    /* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            /* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       /* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     r0, r9
+	cmp     r6, r13                         /* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     stack_monitoring_exit, lp     
+    /* =end modified for SC3 */
+	bnh      stack_monitoring_error_isr
+
+	/*
+	 * ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 */
+    ld.w    0[r6], r6
+    mov     STACK_MAGIC_NUMBER, r7
+	/*
+	 *  ãã¸ãã¯ãã³ãã¼æªç ´å£ãªãï¼å²è¾¼ã¿å¦çã«é£ã¶
+	 *  ã¿ã¹ã¯ã«å²è¾¼ãã å ´åï¼å²è¾¼ã¿ã¹ã¿ãã¯ããã§ãã¯ããªã
+	 */
+	cmp     r7, r6
+	be      stack_monitoring_exit
+    /* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    /* =end modified for SC3 */
+	br      stack_monitoring_error_isr
+
+	/* 
+	 * å¤éå²è¾¼ã¿ã®å ´å 
+	 */
+FLABEL(int_nested)
+	/*
+	 *  å²è¾¼ã¿ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 */
+
+	/*
+	 *  ã¹ã¿ãã¯æ®éãã§ãã¯æ¹å¼
+	 */
+	Lea     _isr_p_isrcb_tbl, r7
+	mov     r12, r11
+	shl     2, r11                          /* å²è¾¼ã¿çªå·ã4åãã¦ãªãã»ãããçæ  */
+	add     r11, r7
+    ld.w    0[r7], r7                       /* r7 = &isrcb_table[x] */
+    /* =begin modified for SC3 */
+	ld.w    ISRCB_p_isrinib[r7], r7         
+	ld.w    ISRINIB_p_intinib[r7], r7
+    mov     1, r9
+    /* =end modified for SC3 */
+	ld.w    INTINIB_remain_stksz[r7], r7    /* å²è¾¼ã¿çªå·ã«å¯¾å¿ããã¹ã¿ãã¯ãµã¤ãºã®åå¾ */
+	Lea     __ostk, r6                      /* å²è¾¼ã¿ã¹ã¿ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	add     r6, r7                          /* å
+é ­ã¢ãã¬ã¹ï¼ISRã®ä½¿ç¨ããã¹ã¿ãã¯ãµã¤ãº */
+	cmp     r7, sp                          /* ã¹ã¿ãã¯ãã¤ã³ã¿ <= å
+é ­ã¢ãã¬ã¹ï¼ISRã®ä½¿ç¨ããã¹ã¿ãã¯ãµã¤ãºã®å ´åOK  */
+    /* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    /* =end modified for SC3 */
+	bnh     stack_monitoring_error_isr
+
+	/*
+	 * ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 */
+	ld.w    0[r6], r6                       /* ãã®ã¢ãã¬ã¹ã®ç¤ºãå
+ã«ãã¸ãã¯ãã³ãã¼ãå
+¥ã£ã¦ãã */
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    /* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    /* =end modified for SC3 */
+	bne     stack_monitoring_error_isr
+
+FLABEL(stack_monitoring_exit)
+    pop     r12 
+#endif /* CFG_USE_STACKMONITORING */
+
+	/*
+	 *  _callevel_stat ä¿å­
+	 */
+	Lea     _callevel_stat, r6
+	ld.h    0[r6], r7
+	Push    r7
+
+	/*
+	 *  _callevel_stat è¨­å®
+	 */
+	mov     TCL_ISR2, r8
+	or      r8, r7
+	st.h    r7, 0[r6]
+
+    /* =begin added for SC3 */
+#ifndef NTC2ISR
+	/*
+	 *  run_trusted ä¿å­
+	 */
+    Lea     _run_trusted, r6
+    ld.b    0[r6], r7
+    Push    r7
+
+	/*
+	 *  run_trusted è¨­å®
+	 */
+	mov     TRUE, r8
+    st.b    r8, 0[r6]
+#endif /* NTC2ISR */
+
+	/*
+	 *  p_runosap ä¿å­
+	 */
+    Lea     _p_runosap, r6
+    ld.w    0[r6], r7
+	Push    r7
+    /* =end added for SC3 */
+
+#ifndef NTC2ISR
+	/*
+	 * p_runisr ä¿å­
+	 */
+	Lea     _p_runisr, r6
+	ld.w    0[r6], r7
+	Push    r7
+#endif /* NTC2ISR */
+
+#ifdef NTC2ISR
+    /* ã³ã³ãã­ã¹ãä¿å­(ã¹ã¿ãã¯)ã¯ããã¾ã§ */
+isr_dispatch_entry:
+	Lea     _p_runisr, r6
+	ld.w    0[r6], r7
+    cmp     r0, r7
+    be      isr_dispatch_task
+    /* C2ISRã«å²ãè¾¼ãã å ´å */
+    st.w    sp, ISRCB_ssp[r7]
+    /* queue_insert_next(&isr_ready_queue, p_runisr) */
+    /*
+     *  r6 = &isr_ready_queue
+     *  r7 = p_runisr
+     *  r8 = &isr_ready_queue->p_next
+     */
+    Lea     _isr_ready_queue, r6
+    ld.w    QUEUE_next[r6], r8
+    st.w    r8, ISRCB_next[r7] /* p_runisr->p_next = &isr_ready_queue->p_next */
+    st.w    r6, ISRCB_prev[r7] /* p_runisr->p_prev = &isr_ready_queue */
+    st.w    r7, QUEUE_prev[r8] /* &isr_ready_queue->p_next->p_prev = p_runisr */
+    st.w    r7, QUEUE_next[r6] /* &isr_ready_queue->p_next = p_runisr */
+    br      isr_dispatch2
+isr_dispatch_task:
+    Lea     _p_runtsk, r6
+    ld.w    0[r6], r7
+    cmp     r0, r7
+    be      isr_dispatch_idle
+    /* TASKã«å²ãè¾¼ãã å ´å */
+    st.w    sp, TCB_ssp[r7]
+    br      isr_dispatch2
+isr_dispatch_idle:
+    /* IDLEã«å²ãè¾¼ãã å ´å */
+    Lea     _saved_ostkpt, r6
+    ld.w    0[r6], r7
+    Push    r7
+    st.w    sp, 0[r6]
+isr_dispatch2:
+#endif /* NTC2ISR */
+	/*
+	 * p_runisr è¨­å®
+	 */
+	Lea     _isr_p_isrcb_tbl, r7
+	shl     2, r12                      /* å²è¾¼ã¿çªå·ã4åãã¦ãªãã»ãããçæ  */
+	add     r12, r7
+	Lea     _p_runisr, r8
+	ld.w    0[r7], r7
+	st.w    r7, 0[r8]
+
+	/*
+	 *  å²è¾¼ã¿ãã³ãã©ã®ã¢ãã¬ã¹ãèª­ã¿è¾¼ã
+	 */
+	Lea     _isr_tbl, r6
+	add     r12, r6
+
+    /* =begin modified for SC3 */
+    /*
+     *  p_runosap è¨­å®
+     */
+    cmp     r7, r0                      /* r7 = p_runisr == NULL ? */
+    be      int_handler_call            /* p_runisr ã NULL ã§ãªããã°ã¹ã­ãã */
+    ld.w    ISRCB_p_isrinib[r7], r7     /* ep = p_runisr->p_isrinib */
+    ld.w    ISRINIB_p_osapcb[r7], r26    /* r8 = p_runisr->p_isrinib->p_osapcb */
+    Lea     _p_runosap, ep
+    sst.w   r26, 0[ep]                   /* p_runosap = p_runisr->p_isrinib->p_osapcb */
+#ifdef NTC2ISR
+    ld.w    OSAPCB_p_osapinib[r26], r29     /* ep = p_runisr->p_isrinib */
+    ld.w    OSAPINIB_osap_trusted[r29], r8    /* r8 = p_runisr->p_isrinib->p_osapcb */
+    Lea     _run_trusted, ep
+    sst.b   r8, 0[ep]                      /* run_trusted = trusted? */
+    cmp     r0, r8                         /* ä¿¡é ¼ãªãã°ã¹ã­ãã */
+    bne      int_handler_call
+
+    /* éä¿¡é ¼ISRæ¬ä½ã¸ */
+    /*
+     *  ã¦ã¼ã¶ã¹ã¿ãã¯é å
+     */
+    ld.w    ISRINIB_start_ustk[r7], r27   /* å
+é ­çªå° */
+    ld.w    ISRINIB_limit_ustk[r7], r28   /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, 0, 6                   /* MPLA0 */
+    ldsr    r28, 1, 6                   /* MPUA0 */
+
+   	/*
+	 *  å®è¡ãã¡ã¤ã³ã¨ä¿è­·ãã¡ã¤ã³(MPUã®è¨­å®)ãåããªãã°ï¼
+     *  ãã¡ã¤ã³æ¯ã®ã³ã¼ãé åã»ãã¼ã¿é åãMPUã«è¨­å®ãç´ãå¿
+è¦ã¯ãªã
+     */
+    Lea     _p_ctxosap, ep      /* ep = &p_ctxosap */	
+    sld.w   0[ep], r27          /* r27 = p_ctxosap */
+	cmp     r27, r26            /* p_ctxosap == p_runosap ? */
+	be      nt_int_handler_call        /* åããªãdispatcher_5ã¸ */
+    nop
+	sst.w   r26, 0[ep]          /* p_ctxosap = p_runosap : ä¿è­·ãã¡ã¤ã³ãåæ¿ã */
+
+    /*
+     * reg1: p_osapinib
+     * reg2: tmp1
+     * reg3: tmp2
+     * reg4: tmp3
+     * reg5: tmp4
+     * reg6: tmp5
+     */
+    DISPATCHER_MPU_SETTING r29, r24, r25, r26, r27, r28
+FLABEL(nt_int_handler_call)
+    ld.w    ISRINIB_ustk_bottom[r7], sp     /* r20 = ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ */
+	/*
+	 *  ã¿ã¹ã¯ãä¸æ­£çµäºããå ´åã¯ä¿è­·å¦çãè¡ããã
+	 *  æ»ãã¢ãã¬ã¹ã«exit_utaskãè¨­å®
+	 */
+    Lea     _exit_uisr, lp                 /* lp = _exit_utask */
+    stsr    psw, r10
+    /* NPããããç«ã¦ã¦ï¼ISPRãæ´æ°ãããªãããã«ãã */
+    ori     0x60, r10, r11
+    ldsr    r11, psw
+
+    /* 
+	 * éç¹æ¨©ã¢ã¼ãã§åä½ããããæºå
+     * ä¿è­·æ©è½æå¹ï¼éä¿¡é ¼ã¸ï¼ï¼å²è¾¼ã¿è¨±å¯
+     * PP,NPV,DMP,IMP = 1, ID = 0
+     */
+    movhi   0x4001, r0, r7  
+	ldsr    r7, eipsw      /* eipsw = psw */
+	ld.w    0[r6], r6
+	ldsr    r6, eipc               /* EIPC = pc */
+    eiret
+    /* =end modified for SC3 */
+
+#endif /* NTC2ISR */
+
+FLABEL(int_handler_call)
+    /* =end modified for SC3 */
+	/*
+	 *  å²è¾¼ã¿ãã³ãã©å¼ã³åºã
+	 */
+#ifdef NTC2ISR
+    UNLOCK_ALL_INT
+
+    ld.w    ISRINIB_sstk_bottom[r7], sp     /* r20 = ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ */
+#endif /* NTC2ISR */
+	Lea     end_int_handler, r31
+	ld.w    0[r6], r6
+	jmp     [r6]
+
+    .globl _exit_and_dispatch_isr
+	/*
+	 *  ã¹ã¿ãã¯ãªã¼ããã­ã¼æã®å¦ç
+	 */
+#ifdef CFG_USE_STACKMONITORING
+	/*
+	 *  ã¹ã¿ãã¯ãªã¼ããã­ã¼æãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 *  ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã
+     *  ISRã®åºå
+¥å£ããç¸å¯¾ã¸ã£ã³ãã§ããããã«ããã«ç½®ã
+     *  stack_monitoring_errorã¸ã®è¸ã¿å°
+	 */
+FLABEL(stack_monitoring_error_isr)
+    br  stack_monitoring_error
+#endif /* CFG_USE_STACKMONITORING */
+
+FLABEL(end_nt_int_handler)
+	stsr    eipsw, r12      /* eipsw = psw */
+    movhi   0x0001, r0, r11  
+    ori     0xffff, r11, r11
+    and     r12, r11
+	ldsr    r11, eipsw      /* eipsw = psw */
+    Lea     end_int_handler, r11
+    ldsr    r11, eipc
+    eiret   /* syscallç¶æ
+ãè§£é¤ */
+FLABEL(end_int_handler)
+
+#ifdef CFG_USE_STACKMONITORING
+	/*
+	 *  å²è¾¼ã¿ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 *  å²è¾¼ã¿ããæ»ã£ãæï¼ã¹ã¿ãã¯ãã¤ã³ã¿ãæ»ã£ãã¯ããªã®ã§ï¼
+	 *  ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼ã®ã¿å®æ½
+	 */
+
+	/*
+	 * ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 */
+	Lea     __ostk, r6                       /* å²è¾¼ã¿ã¹ã¿ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    0[r6], r6                       /* ãã®ã¢ãã¬ã¹ã®ç¤ºãå
+ã«ãã¸ãã¯ãã³ãã¼ãå
+¥ã£ã¦ãã */
+    /* =begin modified for SC3 */
+    mov     1, r9
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    Lea     stack_monitoring_exit2, lp     
+	bne     stack_monitoring_error_isr
+
+FLABEL(stack_monitoring_exit2)
+    /* =end modified for SC3 */
+#endif /* CFG_USE_STACKMONITORING */
+
+	/*
+	 * ISR2ã®ä¸æ­£çµäºãã§ãã¯
+	 */
+	jarl    _exit_isr2, r31
+
+#ifdef NTC2ISR
+FLABEL(_exit_and_dispatch_isr)
+FLABEL(isr_dispatcher)
+    LOCK_ALL_INT
+
+    Lea     _isr_ready_queue, r6
+    ld.w    QUEUE_next[r6], r8
+    cmp     r6, r8                  /* queue_empty(&isr_ready_queue)? */
+    be      isr_dispatch_to_task
+    Lea     _p_runisr, r7
+    st.w    r8, 0[r7]
+    /* queue_delete_next(&isr_ready_queue) */
+    /*
+     *  r6 = &isr_ready_queue
+     *  r8 = &isr_ready_queue->p_next = p_entry
+     */
+    ld.w    ISRCB_next[r8], r7 /* r7 = p_entry->p_next */
+    st.w    r7, QUEUE_next[r6] /* &isr_ready_queue->p_next = r7 */
+    st.w    r6, ISRCB_prev[r7] /* p_entry->p_next->p_prev = &isr_ready_queue */
+    
+    ld.w    ISRCB_ssp[r8], sp
+    ld.w    ISRCB_p_isrinib[r8], r7
+    ld.w    ISRINIB_start_ustk[r7], r27   /* å
+é ­çªå° */
+    ld.w    ISRINIB_limit_ustk[r7], r28   /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    br      isr_dispatch_r
+isr_dispatch_to_task:
+    Lea     _p_runisr, r6
+    st.w    r0, 0[r6]
+    Lea     _p_runtsk, r6
+    ld.w    0[r6], r7
+    cmp     r0, r7
+    be      isr_dispatch_to_idle
+    /* TASKã«å²ãè¾¼ãã å ´å */
+    ld.w    TCB_ssp[r7], sp
+    ld.w    TCB_p_tinib[r7], r7
+    ld.w    TINIB_start_ustk[r7], r27   /* å
+é ­çªå° */
+    ld.w    TINIB_limit_ustk[r7], r28   /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    br      isr_dispatch_r
+isr_dispatch_to_idle:
+    Lea     _saved_ostkpt, r6
+    ld.w    0[r6], sp
+    Pop     r7
+    st.w    r7, 0[r6]
+FLABEL(isr_dispatch_r)
+    /* ã³ã³ãã­ã¹ãå¾©å¸°(ã¹ã¿ãã¯)ã¯ãããã */
+#endif /* NTC2ISR */
+
+#ifndef NTC2ISR
+	/*
+	 * p_runisr ã®å¾©å¸°
+	 */
+	Lea     _p_runisr, r7
+	Pop     r6
+	st.w    r6, 0[r7]
+#endif /* NTC2ISR */
+
+    /* =begin modified for SC3 */
+	/*
+	 *  p_runosap å¾©å¸°
+	 */
+    Lea     _p_runosap, r7
+	Pop     r6
+    st.w    r6, 0[r7]
+
+#ifdef NTC2ISR
+    ld.w    OSAPCB_p_osapinib[r6], r29     /* ep = p_runisr->p_isrinib */
+    ld.w    OSAPINIB_osap_trusted[r29], r8    /* r8 = p_runisr->p_isrinib->p_osapcb */
+    Lea     _run_trusted, ep
+    sst.b   r8, 0[ep]                      /* run_trusted = trusted? */
+    cmp     r0, r8                         /* ä¿¡é ¼ãªãã°ã¹ã­ãã */
+    bne     isr_dispatch_r2
+
+    /*
+     *  ã¦ã¼ã¶ã¹ã¿ãã¯é å
+     */
+    ldsr    r27, 0, 6                   /* MPLA0 */
+    ldsr    r28, 1, 6                   /* MPUA0 */
+
+   	/*
+	 *  å®è¡ãã¡ã¤ã³ã¨ä¿è­·ãã¡ã¤ã³(MPUã®è¨­å®)ãåããªãã°ï¼
+     *  ãã¡ã¤ã³æ¯ã®ã³ã¼ãé åã»ãã¼ã¿é åãMPUã«è¨­å®ãç´ãå¿
+è¦ã¯ãªã
+     */
+    Lea     _p_ctxosap, ep      /* ep = &p_ctxosap */	
+    sld.w   0[ep], r27          /* r27 = p_ctxosap */
+	cmp     r27, r6            /* p_ctxosap == p_runosap ? */
+	be      isr_dispatch_r2        /* åããªãdispatcher_5ã¸ */
+    nop
+	sst.w   r6, 0[ep]          /* p_ctxosap = p_runosap : ä¿è­·ãã¡ã¤ã³ãåæ¿ã */
+
+    /*
+     * reg1: p_osapinib
+     * reg2: tmp1
+     * reg3: tmp2
+     * reg4: tmp3
+     * reg5: tmp4
+     * reg6: tmp5
+     */
+    DISPATCHER_MPU_SETTING r29, r24, r25, r26, r27, r28
+FLABEL(isr_dispatch_r2)
+#endif /* NTC2ISR */
+
+#ifndef NTC2ISR
+	/*
+	 *  run_trusted å¾©å¸°
+	 */
+    Lea     _run_trusted, r7
+	Pop     r6
+    st.b    r6, 0[r7]
+#endif /* NTC2ISR */
+    /* =end modified for SC3 */
+
+
+	/*
+	 * _callevel_stat ã®å¾©å¸°
+	 */
+	Lea     _callevel_stat, r7
+	Pop     r6
+	st.h    r6, 0[r7]
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©åºå£å¦ç
+ */
+FLABEL(ret_int)
+	/*
+	 * _except_nest_cntã®æä½ã¨ã¹ã¿ãã¯åãæ¿ãã®éã¯OSå²è¾¼ã¿ç¦æ­¢ã«ãã
+	 * å¿
+è¦ããã
+	 * ãã®å
+ï¼å²è¾¼ã¿å
+ã¸ã®ãªã¿ã¼ã³ãï¼é
+å»¶ãã£ã¹ãããã«åå²ããï¼
+	 * å²è¾¼ã¿å
+ã¸ã®ãªã¿ã¼ã³ã«ã¯å
+¨å²è¾¼ã¿ãå¿
+è¦ã§ããï¼é
+å»¶ãã£ã¹ãããæã«ã¯
+	 * ãã¹ãç®¡çã®OSå²è¾¼ã¿ç¦æ­¢ã«ããå¿
+è¦ãããããï¼ããã§ã¯ä¸æ¦å
+¨å²è¾¼ã¿ç¦
+	 * æ­¢ã¨ãã
+	 */
+
+#ifndef NTC2ISR
+	LOCK_ALL_INT
+#endif /* NTC2ISR */
+
+    /*
+     *  å²è¾¼ã¿çºçæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã¹ã¿ãã¯ããå¾©å¸°
+     */
+    ld.w    0[sp], r19
+    add     4, sp
+	Lea     _current_iintpri, r6
+	st.b    r19, 0[r6]              /* current_iintpriãå¾©å¸° */
+
+#ifndef NTC2ISR
+	/*
+	 *  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 */
+	Lea     _except_nest_cnt, r6
+	ld.w    0[r6], r7
+	add     -1, r7
+	st.w    r7, 0[r6]
+
+	/*
+	 *  ãã¹ãåæ°ã0ãªãï¼å²è¾¼ã¿å
+ãã¿ã¹ã¯
+	 */
+	cmp     r0, r7
+	be      ret_int_task
+
+	/*
+	 *  ISR2å²è¾¼ã¿ããã®ãªã¿ã¼ã³æã¯å²è¾¼ã¿å
+ã
+	 *  ISR2ã§ãããããã®ã¾ã¾ãªã¿ã¼ã³
+	 */
+	br      ret_int_1
+
+#else /* NTC2ISR */
+    /*
+     *  ISRã®å¼·å¶çµäºã«åãï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãISPRãä¸å¾ã¯ãªã¢ãï¼
+     *  PMRãã»ãã
+     */
+	CLEAR_ISPR r10, r12
+    OUTER_UNLOCK_OS_INT  r10, r12
+
+    Lea     _p_runisr, r7
+    ld.w    0[r7], r7
+	cmp     r0, r7
+	bne      ret_int_1
+
+    Lea     _p_runtsk, r7
+    ld.w    0[r7], r7
+	cmp     r0, r7
+	be      ret_int_1
+#endif /* NTC2ISR */
+
+	/*
+	 *  å²è¾¼ã¿å
+ãã¿ã¹ã¯ã®å ´å
+	 */
+FLABEL(ret_int_task)
+#ifndef NTC2ISR
+	ld.w    0[sp], sp                       /* ã¹ã¿ãã¯ãã¤ã³ã¿ãæ»ã     */
+#endif /* NTC2ISR */
+
+	/*  
+     *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå¤ããAPIããªãããï¼
+     *  ATK2ã§ã¯å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¾©å¸°å¦çã¯ä¸è¦
+     */
+	/*
+	 *  å²è¾¼ã¿ãã³ãã©å®è¡æã«ã¯ï¼ISPRã§åªå
+åº¦ãèªåçã«ä¸ããããï¼
+	 *  PMRã¯å¤æ´ãã¦ããªããï¼å²ãè¾¼ã¿ãã³ãã©å
+ã§ x_nested_unlock_os_int() ã
+	 *  å¼ã³åºãã¨PMRãæ¸ãæããï¼ãã£ã¹ããããå¿
+è¦ã§ãªãå ´åã¯ï¼ret_int_1ã§
+	 *  PMRãå
+ã®å¤ã«æ»ãï¼ãã£ã¹ããããå¿
+è¦ãªå ´åã¯ï¼OSå²ãè¾¼ã¿ç¦æ­¢ã¨ããããï¼
+	 *  ããã§ï¼PMRãæ´æ°ããå¿
+è¦ã¯ãªãï¼
+	 */
+
+	/*
+	 *  æ»ãå
+ãã¿ã¹ã¯ã®å ´åï¼ãã£ã¹ãããã®å¿
+è¦ãããããã§ãã¯
+	 */
+	Lea     _p_runtsk, r6
+	ld.w    0[r6], r6
+	Lea     _p_schedtsk, r7
+	ld.w    0[r7], r7
+	cmp     r6, r7
+	be      ret_int_1      /* ãã£ã¹ãããã®å¿
+è¦ããªããã°å²è¾¼ã¿å
+ã¸æ»ã */
+
+	/*
+	 *  ããã§ã¯ï¼æ»ãå
+ãã¿ã¹ã¯ã§ããï¼ã¹ã¿ãã¯ã¯ï¼ã¿ã¹ã¯ã¹ã¿ãã¯ã«
+	 *  ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ã¿ãä¿å­ãããç¶æ
+ã«ãªã£ã¦ããï¼ã¾ãï¼
+	 *  å
+¨å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+ã¨ãªã£ã¦ãã
+	 */
+
+#ifndef NTC2ISR
+	/* 
+	 *  åªå
+åº¦ãã¹ã¯ã®ã¯ãªã¢ 
+	 *  eiretãå®è¡ããªãããï¼eiretã«ããå²è¾¼ã¿ã³ã³ãã­ã¼ã©ã®åªå
+åº¦ãã¹ã¯
+	 *  (ã¤ã³ãµã¼ãã¹ãã©ã¤ãªãªãã£)ã®ã¯ãªã¢ãè¡ãããªãããï¼ä»£ããã«ISPC
+	 *  ãç¨ãã¦ã¯ãªã¢ããï¼
+	 */
+	CLEAR_ISPR r10, r12
+#endif /* NTC2ISR */
+
+	/*
+	 *  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ç§»è¡ãã
+	 *
+	 *  ãã®æç¹ã§OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ããã®ã¯ï¼dispatcherãå®è¡ããéã«
+	 *  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãªã£ã¦ããå¿
+è¦ãããããã§ãã
+	 *
+	 *  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼ISR1ä»¥å¤ã®å²è¾¼ã¿ã¯å
+¨ã¦ç¦æ­¢ãã
+	 */
+
+	OUTER_LOCK_OS_INT r12, r13
+	/* ret_int ã§å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ããããè§£é¤ */
+	UNLOCK_ALL_INT
+
+	/*
+	 * ã³ã³ãã­ã¹ãã®éé¿ 
+	 */
+#ifndef NTC2ISR
+#ifndef TOPPERS_USE_PUSHSP
+	addi    -40, sp, sp
+	mov     sp, ep
+	sst.w   r20, 36[ep]
+	sst.w   r21, 32[ep]
+	sst.w   r22, 28[ep]
+	sst.w   r23, 24[ep]
+	sst.w   r24, 20[ep]
+	sst.w   r25, 16[ep]
+	sst.w   r26, 12[ep]
+	sst.w   r27, 8[ep]
+	sst.w   r28, 4[ep]
+	sst.w   r29, 0[ep]
+#else /* TOPPERS_USE_PUSHSP */
+	pushsp  r20-r29
+#endif /* TOPPERS_USE_PUSHSP */
+#endif /* NTC2ISR */
+
+	/* ã¹ã¿ãã¯ã¨æ¬¡ã®èµ·åçªå°ãä¿å­ */
+	Lea     _p_runtsk, ep
+	sld.w   0[ep], ep
+    /* =begin modified for SC3 */
+	sst.w   sp, TCB_ssp[ep]
+    /* =end modified for SC3 */
+	Lea     ret_int_r, r6
+	sst.w   r6, TCB_pc[ep]
+	br      dispatcher
+
+	/*
+	 *  å²è¾¼ã¿ã»ä¾å¤ã§ã³ã³ãã­ã¹ãä¿å­ããå ´åã®å¾©å¸°ã«ã¼ãã³
+	 */
+FLABEL(ret_int_r)
+	/*
+	 * ã³ã³ãã­ã¹ãã®å¾©å¸°
+	 */
+#ifndef NTC2ISR
+#ifndef TOPPERS_USE_PUSHSP
+	mov     sp, ep
+	sld.w   36[ep], r20
+	sld.w   32[ep], r21
+	sld.w   28[ep], r22
+	sld.w   24[ep], r23
+	sld.w   20[ep], r24
+	sld.w   16[ep], r25
+	sld.w   12[ep], r26
+	sld.w   8[ep], r27
+	sld.w   4[ep], r28
+	sld.w   0[ep], r29
+	addi    40, ep, sp
+#else /* TOPPERS_USE_PUSHSP */
+	popsp   r20-r29
+#endif /* TOPPERS_USE_PUSHSP */
+#endif /* NTC2ISR */
+
+	LOCK_ALL_INT
+
+	OUTER_UNLOCK_OS_INT r12, r13
+	/*
+	 *  å²è¾¼ã¿ããã®å¾©å¸°ã«ã¼ãã³
+	 */
+FLABEL(ret_int_1)
+	/*
+	 * ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 */
+	mov     sp, ep
+#ifndef NTC2ISR
+
+	/*  
+     *  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå¤ããAPIããªãããï¼
+     *  ATK2ã§ã¯å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¾©å¸°å¦çã¯ä¸è¦
+     */
+	/*
+	 *  PMRãå
+ã«æ»ãï¼
+	 *  å²è¾¼ã¿ãã³ãã©å®è¡æã«ã¯ï¼ISPRã§åªå
+åº¦ãèªåçã«ä¸ããããï¼
+	 *  PMRã¯å¤æ´ãã¦ããªããï¼å²ãè¾¼ã¿ãã³ãã©å
+ã§ x_nested_unlock_os_int() ã
+	 *  å¼ã³åºãã¨PMRãæ¸ãæããããããã§å
+ã®å¤ã«æ»ãï¼
+	 *  OUTER_UNLOCK_OS_INT ã¯ nested_lock_os_int_cnt ã0ã«ãããï¼
+	 *  ããã§ã¯æ¢ã«0ã§ããããåé¡ãªãï¼
+	 */
+	OUTER_UNLOCK_OS_INT  r1, r6
+#endif /* NTC2ISR */
+
+	sld.w    4[ep], r10
+	ldsr    r10, eipc
+	sld.w   0[ep], r10
+	ldsr    r10, eipsw
+
+    /* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãå¾©å¸° */
+    INT_EXC_RESTOREREG eiwr
+
+	stsr    eipsw, r2           /* r2 = eipsw */
+    shl     PSW_SV, r2          /* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_int     /* ç¹æ¨©ããã®å²è¾¼ã¿ãªãã°ã¹ã­ãã */
+#ifdef NTC2ISR
+    /*
+     *  NTC2ISRã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runisr, r2
+    ld.w    0[r2], r2
+    cmp     r0, r2          /* p_runisrãããï¼ã¦ã¼ã¶ã¢ã¼ããªãã°éä¿¡é ¼ISR */
+    be      int_to_utask
+    ld.w    ISRCB_usp[r2], sp     /* uspãå¾©å¸° */
+    br      return_from_int
+#endif /* NTC2ISR */
+FLABEL(int_to_utask)
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp     /* uspãå¾©å¸° */
+FLABEL(return_from_int)
+    stsr    eiwr, r2
+	eiret
+
+/*
+ * ã¿ã¹ã¯ãã£ã¹ããã
+ */
+	.global _dispatch
+FLABEL(_dispatch)
+	/*
+	 *  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã»ãã£ã¹ããã
+	 *  è¨±å¯ç¶æ
+ã»ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºã
+	 *  ãã
+	 */
+#ifndef TOPPERS_USE_PUSHSP
+	addi    -48, sp, sp
+	st.w    ep,  0[sp]
+	mov     sp,  ep
+	sst.w   r20, 44[ep]
+	sst.w   r21, 40[ep]
+	sst.w   r22, 36[ep]
+	sst.w   r23, 32[ep]
+	sst.w   r24, 28[ep]
+	sst.w   r25, 24[ep]
+	sst.w   r26, 20[ep]
+	sst.w   r27, 16[ep]
+	sst.w   r28, 12[ep]
+	sst.w   r29, 8[ep]
+	sst.w   r31, 4[ep]
+#else /* TOPPERS_USE_PUSHSP */
+	pushsp  r20-r31
+#endif /* TOPPERS_USE_PUSHSP */
+	/* ã¹ã¿ãã¯ã¨æ¬¡ã®èµ·åçªå°ãä¿å­ */
+	Lea     _p_runtsk, ep
+	sld.w   0[ep], ep
+    /* =begin modified for SC3 */
+	sst.w   sp, TCB_ssp[ep]
+    /* =end modified for SC3 */
+	Lea     dispatch_r, r10
+	sst.w   r10, TCB_pc[ep]
+#ifdef CFG_USE_STACKMONITORING
+	/*
+	 *  å®è¡ä¸­ã¿ã¹ã¯ã®ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 */
+	/*
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 */
+	Lea     _p_runtsk, r6                   /* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             /* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    /* =begin modified for SC3 */
+    /* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            /* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       /* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     1, r9
+	cmp     r6, sp                          /* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     dispatcher, lp
+    /* =end modified for SC3 */
+	bnh      stack_monitoring_error
+	/*
+	 * ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 */
+	ld.w    0[r6], r6
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    /* =begin modified for SC3 */
+    Lea     dispatcher, lp
+    /* =end modified for SC3 */
+	bne     stack_monitoring_error
+#endif /* CFG_USE_STACKMONITORING */
+	br      dispatcher
+
+	/* 
+	 * ãã£ã¹ãããã£ã®å¾©å¸°ã«ã¼ãã³ 
+	 */
+FLABEL(dispatch_r)
+#ifndef TOPPERS_USE_PUSHSP
+	mov     sp, ep
+	sld.w   44[ep], r20
+	sld.w   40[ep], r21
+	sld.w   36[ep], r22
+	sld.w   32[ep], r23
+	sld.w   28[ep], r24
+	sld.w   24[ep], r25
+	sld.w   20[ep], r26
+	sld.w   16[ep], r27
+	sld.w   12[ep], r28
+	sld.w    8[ep], r29
+	sld.w    4[ep], r31
+	addi    48, ep, sp
+	ld.w    0[sp], ep
+#else /* TOPPERS_USE_PUSHSP */
+	popsp   r20-r31
+#endif /* TOPPERS_USE_PUSHSP */
+	jmp     [lp]
+
+	/*
+	 *  ã¹ã¿ãã¯ãªã¼ããã­ã¼æã®å¦ç
+	 */
+#ifdef CFG_USE_STACKMONITORING
+	/*
+	 *  ã¹ã¿ãã¯ãªã¼ããã­ã¼æãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 *  ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã
+     *  r9 = ostkptã®åæå¤ã«åãæ¿ããã?
+	 */
+FLABEL(stack_monitoring_error)
+	/*
+	 *  r9==0ã®å ´åã§ãï¼æ¢ã«_ostkptãä½¿ã£ã¦ããã®ã§ï¼
+	 *  except_nest_cntãã¤ã³ã¯ãªã¡ã³ããã¦ãåé¡ã¯ãªã
+	 */
+	Lea     _hook_nest_cnt, r12               /* _ostkptãä½¿ãå ´åã¯except_nest_cntãã¤ã³ã¯ãªã¡ã³ããã */
+	ld.w    0[r12], r13
+	add     1, r13
+	st.w    r13, 0[r12]
+
+    /* =begin modified for SC3 */
+    cmp     r0, r9
+    be      stack_monitoring_error_1
+    /* =end modified for SC3 */
+
+	Lea    __ostkpt, r12                        /* ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã */
+	ld.w    0[r12], r12
+	mov     r12, sp
+
+    /* =begin modified for SC3 */
+FLABEL(stack_monitoring_error_1)
+	/*
+	 *  ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºã
+	 */
+	NESTED_LOCK_OS_INT r12, r13
+    /* =end modified for SC3 */
+
+	mov     E_OS_STACKFAULT, r6                 /* ãã­ãã¯ã·ã§ã³ããã¯ã®å¼æ°ãè¨­å® */
+    /* =begin modified for SC3 */
+ 	Lea     _pre_protection_supervised, r12
+    mov     0x01, r13
+ 	st.b    r13, 0[r12]     /* pre_protection_supervised = 0x01 */
+	jr      _call_protectionhk_main        /* ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã */
+    /* ããã«ã¯æ¥ãªã */
+FLABEL(stack_monitoring_error_loop)
+    jr   stack_monitoring_error_loop
+    /* =end modified for SC3 */
+#endif /* CFG_USE_STACKMONITORING */
+
+
+/*
+ *  ãã£ã¹ãããã£ã®åä½éå§
+ */
+	.global _start_dispatch
+FLABEL(_start_dispatch)
+	/*
+	 *  ãã®ã«ã¼ãã³ã¯ï¼ã«ã¼ãã«èµ·åæã«ï¼ãã¹ã¦ã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+
+	 * ï¼å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨åç­ï¼ã§å¼ã³åºãããï¼ã¾ãï¼å²è¾¼ã¿ã¢ã¼ãï¼é
+	 *  ã¿ã¹ã¯ã³ã³ãã­ã¹ãã¨åç­ï¼ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+	 *
+	 *  dispatcherã¯ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºãï¼
+	 */
+    Lea     __ostkpt, sp
+    ld.w    0[sp], sp
+
+	/* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ */
+	OUTER_LOCK_OS_INT r12, r13
+	/* å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸ */
+	UNLOCK_ALL_INT
+	br    dispatcher_0
+
+    /* =begin modified for SC3 */
+	.global _exit_and_dispatch_nohook
+	/*
+	 *  ã¿ã¹ã¯å¼·å¶çµäºã®å ´åã¯PostTaskHookãå¼åºããªã
+	 *  ãã®å ´åã®ã¨ã³ããªã§ãã
+	 */
+    /* =end modified for SC3 */
+
+	/*
+	 *  ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ããã
+	 */
+	.global _exit_and_dispatch
+FLABEL(_exit_and_dispatch)
+#ifdef CFG_USE_STACKMONITORING
+	/*
+	 *  å®è¡ä¸­ã®ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 */
+	/*
+	 *  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 */
+	Lea     _p_runtsk, r6                   /* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             /* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    /* =begin modified for SC3 */
+    /* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            /* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       /* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     1, r9
+	cmp     r6, sp                          /* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     dispatcher, lp
+    /* =end modified for SC3 */
+	bnh      stack_monitoring_error
+	/*
+	 * ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 */
+	ld.w    0[r6], r6
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    /* =begin modified for SC3 */
+    Lea     dispatcher, lp
+    /* =end modified for SC3 */
+	bne     stack_monitoring_error
+#endif /* CFG_USE_STACKMONITORING */
+	/* ãã£ã¹ãããã£æ¬ä½ï¼dispatcherï¼ã¸ */
+
+FLABEL(dispatcher)
+	/*
+	 *  PostTaskHookã®å¼ã³åºã
+	 */
+#ifdef CFG_USE_POSTTASKHOOK
+FLABEL(posttaskhook_call)
+	Lea     _call_posttaskhook, r6
+	jarl    _stack_change_and_call_func_1, r31
+#endif /* CFG_USE_POSTTASKHOOK */
+
+_exit_and_dispatch_nohook:
+FLABEL(dispatcher_0)
+	/*
+	 *  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã»ãã£ã¹ããã
+	 *  è¨±å¯ç¶æ
+ã»ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºã
+	 *  ããï¼å®è¡åéçªå°ã¸ããã®ç¶æ
+ã®ã¾ã¾åå²ãã
+	 */
+#ifdef LOG_DSP_ENTER
+	Lea     _p_runtsk, r21
+	ld.w    0[r21], r21
+	cmp     r0, r21
+	be      dispatcher_0_1
+	mov     r21, r6                            /* å¼æ°ã«_p_runtskãæå® */
+	jarl    _log_dsp_enter, r31
+FLABEL(dispatcher_0_1)
+#endif	/* LOG_DSP_ENTER */
+
+	Lea     _callevel_stat, r21
+#if 0
+	ld.h    0[r21], r22
+	mov     TSYS_DISALLINT, r20
+	and     r22, r20
+	be      dispatcher_1
+
+	mov     ~TSYS_DISALLINT, r20
+	and     r22, r20
+#else /* 0 */
+    mov     TCL_TASK, r20
+#endif /* 0 */
+	st.h    r20, 0[r21]
+	UNLOCK_ALL_INT                             /* å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸ */
+
+	/*
+     *  ã¢ã¤ãã«ã«ã¼ãï¼ããã¯ã«ã¼ãã³ï¼OSå²è¾¼ã¿ã®ã³ã³ãã­ã¹ããæ¨ã¦ã
+	 */
+	Lea     _saved_ostkpt, r20
+	st.w    r0, 0[r20]
+FLABEL(dispatcher_1)
+	Lea     _p_runtsk, r21
+	Lea     _p_schedtsk, r20
+	ld.w    0[r20], r22
+	st.w    r22, 0[r21]
+	cmp     r22, r0
+	be      dispatcher_3
+
+	mov     r22, ep 
+    /* =begin modified for SC3 */
+	sld.w   TCB_ssp[ep], sp
+    /* =end modified for SC3 */
+
+    /* =begin modified for SC3 */
+    sld.w   TCB_p_tinib[ep], ep
+    mov     ep, r25                     /* r25 = p_tinib */
+    sld.w   TINIB_p_osapcb[ep], r26     /* r26 = p_osapcb */
+    Lea     _p_runosap, ep              /* ep = &p_runosap */
+    sst.w   r26, 0[ep]                  /* p_runosap = p_osapcb */
+    ld.w    OSAPCB_p_osapinib[r26], r29 /* r29 = p_osapinib */
+    ld.bu   OSAPINIB_osap_trusted[r29], r24 /* r24 = trusted? */
+    Lea     _run_trusted, ep
+    sst.b   r24, 0[ep]                      /* run_trusted = trusted? */
+    cmp     r0, r24                         /* ä¿¡é ¼ãªãã°ã¹ã­ãã */
+    bne     dispatcher_5
+
+#ifdef __v850e2v3__
+    ori     0x1001, r0, r27
+    ldsr    r27, bsel
+    /*
+     *  ã¦ã¼ã¶ã¹ã¿ãã¯é å
+     */
+    mov     r25, ep
+    sld.w   TINIB_start_ustk[ep], r27   /* å
+é ­çªå° */
+    ori     0x01, r27, r27
+    sld.w   TINIB_limit_ustk[ep], r28   /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ori     0x06, r28, r28
+    ldsr    r27, dpa0l
+    ldsr    r28, dpa0u
+#else /* defined(__v850e3v5__) */
+    /*
+     *  ã¦ã¼ã¶ã¹ã¿ãã¯é å
+     */
+    mov     r25, ep
+    sld.w   TINIB_start_ustk[ep], r27   /* å
+é ­çªå° */
+    sld.w   TINIB_limit_ustk[ep], r28   /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, 0, 6                   /* MPLA0 */
+    ldsr    r28, 1, 6                   /* MPUA0 */
+
+#endif /* __v850e2v3__ */
+
+   	/*
+	 *  å®è¡ãã¡ã¤ã³ã¨ä¿è­·ãã¡ã¤ã³(MPUã®è¨­å®)ãåããªãã°ï¼
+     *  ãã¡ã¤ã³æ¯ã®ã³ã¼ãé åã»ãã¼ã¿é åãMPUã«è¨­å®ãç´ãå¿
+è¦ã¯ãªã
+     */
+    Lea     _p_ctxosap, ep      /* ep = &p_ctxosap */	
+    sld.w   0[ep], r27          /* r27 = p_ctxosap */
+	cmp     r27, r26            /* p_ctxosap == p_runosap ? */
+	be      dispatcher_5        /* åããªãdispatcher_5ã¸ */
+    nop
+	sst.w   r26, 0[ep]          /* p_ctxosap = p_runosap : ä¿è­·ãã¡ã¤ã³ãåæ¿ã */
+#ifdef __v850e2v3__
+    ldsr    r26, vmtid          /* ã¡ã¢ãªä¿è­·éåã¿ã¹ã¯è­å¥å­ãp_runosapã¨ãã */
+    mov     r29, ep             /* ep = p_osapinib */
+
+    /*
+     *  èªä¿è­·ãã¡ã¤ã³å°ç¨ã®romé å
+     */
+    sld.w   OSAPINIB_start_text[ep], r27  /* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_text[ep], r28  /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, ipa0l
+    ldsr    r28, ipa0u
+    /*
+     *  èªä¿è­·ãã¡ã¤ã³å°ç¨ã®rosdataé å
+     */
+    sld.w   OSAPINIB_start_rosdata[ep], r27  /* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_rosdata[ep], r28  /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, ipa1l
+    ldsr    r28, ipa1u
+    /* 
+     * èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å
+     */
+    sld.w   OSAPINIB_start_ram[ep], r27  /* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_ram[ep], r28  /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa1l
+    ldsr    r28, dpa1u
+    /* 
+     * èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å(sdata)
+     */
+    sld.w   OSAPINIB_start_sram[ep], r27  /* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_sram[ep], r28  /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa2l
+    ldsr    r28, dpa2u
+    /*
+     * å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å
+     */
+    sld.w   OSAPINIB_start_srpw[ep], r27  /* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_srpw[ep], r28  /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa3l
+    ldsr    r28, dpa3u
+     /*
+     * å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å(sdata)
+     */
+    sld.w   OSAPINIB_start_ssrpw[ep], r27  /* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_ssrpw[ep], r28  /* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa4l
+    ldsr    r28, dpa4u
+
+#else /* defined(__v850e3v5__) */
+    /*
+     * reg1: p_osapinib
+     * reg2: tmp1
+     * reg3: tmp2
+     * reg4: tmp3
+     * reg5: tmp4
+     * reg6: tmp5
+     */
+    DISPATCHER_MPU_SETTING r29, r24, r25, r26, r27, r28
+#endif /* __v850e2v3__ */
+
+FLABEL(dispatcher_5)
+#ifdef __v850e2v3__
+    ldsr    r0, bsel    /* bselãæ»ã */
+#endif /* __v850e2v3__ */
+    /* =end modified for SC3 */
+
+#ifdef LOG_DSP_LEAVE
+	ld.w    0[r21], r6                          /* å¼æ°ã«_p_runtskãæå® */
+	jarl    _log_dsp_leave, r31
+#endif	/* LOG_DSP_LEAVE */
+
+#ifdef CFG_USE_PRETASKHOOK
+FLABEL(pretaskhook_call)
+	Lea     _call_pretaskhook, r6
+	jarl    _stack_change_and_call_func_1, r31
+#endif /* CFG_USE_PRETASKHOOK */
+
+FLABEL(dispatcher_2)
+	Lea     _p_runtsk, r20
+	ld.w    0[r20], r22
+	mov     r22, ep
+	sld.w   TCB_pc[ep], r31
+	jmp     [r31]
+
+FLABEL(dispatcher_3)
+	/*
+	 * OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ã¨ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãå®è¡ç¶æ
+ã¸ã®
+	 * æºåããã
+	 *
+	 *  ããã§éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæ¿ããï¼spï¼éã¿ã¹ã¯ã³ã³ãã­ã¹
+	 *  ãç¨ã¹ã¿ãã¯ãã¤ã³ã¿ï¼except_nest_cntï¼1)ã®ã¯ï¼OSå²è¾¼ã¿ç¦æ­¢è§£
+	 *  é¤å¾ã«çºçããå²è¾¼ã¿å¦çã«ã©ã®ã¹ã¿ãã¯ãä½¿ããã¨ããåé¡ã®è§£æ±º
+	 *  ã¨ï¼å²è¾¼ã¿ãã³ãã©å
+ã§ã®ã¿ã¹ã¯ãã£ã¹ãããã®é²æ­¢ã¨ãã2ã¤ã®æ
+	 *  å³ããã
+	 */
+	Lea     __ostkpt, r20		/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã®èª­ã¿è¾¼ã¿ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ã */
+	ld.w    0[r20], r3
+
+#if 0
+	Lea     _except_nest_cnt, r20
+	mov     1, r21
+	st.w    r21, 0[r20]
+#endif
+
+	/*
+	 *  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸
+	 *  å²è¾¼ã¿ãè¨±å¯ãï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãå®è¡ç¶æ
+ã¨ãå²è¾¼ã¿ãå¾
+ã¤
+	 *
+	 *  ãã­ã»ããµãå²è¾¼ã¿å¾
+ã¡ã«ç§»è¡ãããå¦çã¨ï¼å²è¾¼ã¿è¨±å¯ã¨ã¯ï¼ä¸å¯
+	 *  åã«è¡ãªãå¿
+è¦ããã
+	 *  ãããä¸å¯åã«è¡ãªããªãå ´åï¼å²è¾¼ã¿ãè¨±å¯ããç´å¾ã«å²è¾¼
+	 *  ã¿ãå
+¥ãï¼ãã®ä¸­ã§ã¿ã¹ã¯ãå®è¡å¯è½ç¶æ
+ã«ãªãã¨ï¼å®è¡ãã¹ãã¿ã¹
+	 *  ã¯ãããã«ãããããããã­ã»ããµãå²è¾¼ã¿å¾
+ã¡ã«ãªã£ã¦ãã¾ãï¼
+	 *  ä¸å¯åã«è¡ãããï¼diã«ããã³ã¢ã§ã®å²ãè¾¼ã¿ãç¦æ­¢ããç¶æ
+ã§ï¼
+	 *  INTCã®å²ãè¾¼ã¿åªå
+åº¦ãã¹ã¯ãä¸ãã¦ããhaltãå¼ã³åºãï¼
+	 *  å²ãè¾¼ã¿ãçºçããå ´åã¯ï¼haltããå¾©å¸°ãã¦æ¬¡ã®eiã§ãã¯ã¿ã«
+	 *  ã¸ã£ã³ãããï¼
+	 *
+	 *  å²è¾¼ã¿å¾
+ã¡ã®éã¯ï¼p_runtskãNULLï¼ï¼0ï¼ã«è¨­å®ããªããã°ãªããªã
+	 *  ãã®ããã«è¨­å®ããªãã¨ï¼å²è¾¼ã¿ãã³ãã©ããGetTaskIDãå¼ã³åº
+	 *  ããéã®åä½ãä»æ§ã«åè´ããªããªã
+	 */
+
+	di
+	OUTER_UNLOCK_OS_INT r12, r13
+
+#if 0
+	nop
+	nop
+	nop
+	nop
+#else
+	halt
+#endif
+	ei
+
+	/*
+	 *  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸
+	 *  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼ISR1ä»¥å¤ã®å²è¾¼ã¿ã¯å
+¨ã¦ç¦æ­¢ãã
+	 *  ã¹ã¿ãã¯ã¯éã¿ã¹ã¯ã³ã³ãã­ã¹ãã®ã¹ã¿ãã¯ãä½¿ç¨ãã¦ããããï¼_except_nest_cntã¯ï¼
+	 *  '1'ã®ã¾ã¾ã¨ãã
+	 */
+	OUTER_LOCK_OS_INT r12, r13
+	br      dispatcher_1
+
+
+/*
+ *  ã¿ã¹ã¯éå§æå¦ç
+ *
+ *  dispatcherããå¼ã³åºããã
+ */
+    /* =begin modified for SC3 */
+	.global _start_stask_r
+FLABEL(_start_stask_r)
+    Lea		_p_runtsk, ep                   /* ep = p_runtsk */
+	sld.w	0[ep], ep
+	/*
+	 *  ã¿ã¹ã¯ãä¸æ­£çµäºããå ´åã¯ä¿è­·å¦çãè¡ããã
+	 *  æ»ãã¢ãã¬ã¹ã«exit_taskãè¨­å®
+	 */
+	Lea     __kernel_exit_task, r31
+    mov     r0, r6
+    br      _start_r
+
+	.global _start_utask_r
+FLABEL(_start_utask_r)
+#ifndef __v850e3v5__
+    ldsr    r0, bsel
+#endif
+    Lea		_p_runtsk, ep                   /* ep = p_runtsk */
+	sld.w	0[ep], ep
+    clr1    0, TCB_priv_mode[ep]            /* ç¹æ¨©ã¢ã¼ãå®è¡ãæãã */
+    sld.w   TCB_p_tinib[ep], r20            /* ep = p_runtsk->p_tinib */
+    ld.w    TINIB_ustk_bottom[r20], r20     /* r20 = ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ */
+    mov     r20, sp
+	/*
+	 *  ã¿ã¹ã¯ãä¸æ­£çµäºããå ´åã¯ä¿è­·å¦çãè¡ããã
+	 *  æ»ãã¢ãã¬ã¹ã«exit_utaskãè¨­å®
+	 */
+    Lea     _exit_utask, lp                 /* lp = _exit_utask */
+    stsr    psw, r10
+
+    /* 
+     *  å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸
+     *  ã¿ã¹ã¯ã³ã³ãã­ã¹ãã¸ã®ã¸ã£ã³ãã§è§£é¤ããã
+     */
+    di
+
+    /* 
+	 * éç¹æ¨©ã¢ã¼ãã§åä½ããããæºå
+     * ä¿è­·æ©è½æå¹ï¼éä¿¡é ¼ã¸ï¼ï¼å²è¾¼ã¿è¨±å¯
+     * PP,NPV,DMP,IMP = 1, ID = 0
+     */
+#ifdef __v850e2v3__
+    movhi   0x000f, r0, r7                  
+#else /* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r7  
+#endif /* __v850e2v3__ */
+    or      r7, r10         /* psw |= (PP|NPV|DMP|IMP) */
+	ldsr    r10, eipsw      /* eipsw = psw */
+    mov     1, r6
+
+	.global _start_r
+FLABEL(_start_r)
+	ld.w    TCB_p_tinib[ep], r22
+#ifdef CFG_USE_STACKMONITORING
+	/*
+	 *  SC3ã§ã¯ã¿ã¹ã¯å¼·å¶çµäºãããã®ã§ï¼ã¿ã¹ã¯èµ·åæ¯ã«ãã¸ãã¯ãã³ãã¼
+	 *  ãåæåãã
+	 */
+	ld.w    TINIB_sstk_bottom[r22], r21
+    ld.w    TINIB_sstksz[r22], r10
+    sub     r10, r21
+	mov     STACK_MAGIC_NUMBER, r10
+	st.w	r10, 0[r21]
+#endif /* CFG_USE_STACKMONITORING */
+
+	/*
+	 *  OSå²è¾¼ã¿ç¦æ­¢è§£é¤åã«ç¾å¨åªå
+åº¦(TCB.curpri)ãå®è¡åªå
+åº¦(TINIB.exepri)ã«
+	 *  å¤æ´(å
+é¨ãªã½ã¼ã¹ãç²å¾)
+	 */
+	ld.b    TINIB_exepri[r22], r21			/* TINIB.exepri -> TCB.curpri */
+	st.b    r21, TCB_curpri[ep]
+
+	/*
+	 *  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸
+	 *  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼æå¹ãªå²è¾¼ã¿ã¯å
+¨ã¦è¨±å¯ãã
+	 */
+
+	OUTER_UNLOCK_OS_INT r12, r13
+
+	ld.w    TCB_p_tinib[ep], r22
+	ld.w    TINIB_task[r22], r10
+    cmp     r0, r6
+    bne     _start_r_1              /* r6 != 0 ãªãã° _start_r_1 ã¸*/
+	jmp     [r10]
+
+FLABEL(_start_r_1)
+	ldsr    r10, eipc               /* EIPC = pc */
+    eiret
+    /* =end modified for SC3 */
+
+    /*
+     *  ext_tskãsvcå½ä»¤ã§å¼ã³åºã
+     */
+    .section .text_shared
+    .align 4
+    .globl _exit_utask
+FLABEL(_exit_utask)
+    mov     TFN_EXIT_TASK, r11
+    syscall NO_SVC
+    nop
+
+#ifdef NTC2ISR
+    .globl _exit_uisr
+FLABEL(_exit_uisr)
+    syscall 2
+    nop
+#endif /* NTC2ISR */
+
+    .section .text_kernel
+	.global _stack_change_and_call_func_1 
+	.global _stack_change_and_call_func_2
+FLABEL(_stack_change_and_call_func_1)
+FLABEL(_stack_change_and_call_func_2)
+
+	Lea     _hook_nest_cnt, r12
+	ld.w    0[r12], r13
+	add     1, r13
+	st.w    r13, 0[r12]
+	cmp     1, r13
+	bne     _stack_change_and_call_func_1_1
+
+	/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+    CHANGE_OS_STK r12
+
+FLABEL(_stack_change_and_call_func_1_1)
+	push    lp
+	Lea     stack_change_and_call_func_r, lp  /* æ»ãã¢ãã¬ã¹ */
+	mov     r6, r12
+	mov     r7, r6
+	mov     r8, r7
+	jmp     [r12]
+
+FLABEL(stack_change_and_call_func_r)
+	pop     lp
+	Lea     _hook_nest_cnt, r12
+	ld.w    0[r12], r13
+	add     -1, r13
+	st.w    r13, 0[r12]
+	cmp     r0, r13
+	bne     stack_change_and_call_func_r_1
+
+	ld.w    0[sp], sp                    /* ã¹ã¿ãã¯ãã¤ã³ã¿ã®å¾©å¸°     */
+FLABEL(stack_change_and_call_func_r_1)
+	jmp     [lp]
+
+
+#ifdef ENABLE_RETURN_MAIN
+/*
+ *  AKTSPç¨ã®main()ã¸ã®ãªã¿ã¼ã³ã³ã¼ã
+ */
+	.global _return_main
+FLABEL(_return_main)
+	Lea   __ostkpt, sp
+	ld.w  0[sp],sp
+	jarl  _main, r31
+#endif /* ENABLE_RETURN_MAIN */
+
+    /* =begin modified for SC3 */
+/*
+ *  SYSCALLãã¼ãã«
+ *  syscallå½ä»¤ã¯ãscbp + scbp[x] ã®çªå°ã«ã¸ã£ã³ããã
+ */
+    .globl _syscall_table
+    .section .text_kernel
+    .align 4
+FLABEL(_syscall_table)
+    .word (_syscall_error_handler - _syscall_table)
+    .word (_svc_entry - _syscall_table)
+#ifdef NTC2ISR
+    .word (end_nt_int_handler - _syscall_table)
+#endif /* NTC2ISR */
+
+    .globl _syscall_error_handler
+    .globl _svc_entry
+/*
+ *  SYSCALLã¨ã©ã¼ãã³ãã©
+ */
+FLABEL(_syscall_error_handler)
+    br  _syscall_error_handler
+    nop
+
+/*
+ *  ãµã¼ãã¹ã³ã¼ã«ã®åºå
+¥å£
+ *  PP,NPV,DMP,IMP = 0, ID,EP = 1
+ *  eipc = pc, eipsw = psw : eiããåã«ä¿å­
+ *    r10 : è¿ãå¤
+ *    r11ï¼é¢æ°ã³ã¼ã
+ *    r6 - r9 : å¼æ°ï¼4ã¤ã¾ã§ï¼
+ *    r20 : ç¬¬5å¼æ°
+ *    ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä¿å­æ¸ã¿
+ *    lpä¿å­æ¸ã¿
+ */
+FLABEL(_svc_entry)
+    /*
+     *  å¼åºãå
+ãç¹æ¨©ã¢ã¼ããï¼
+     *  eipswããã§ãã¯ãã
+     */
+#ifndef __v850e3v5__
+    ldsr    r0, bsel
+#endif
+    stsr    eipsw, r13
+    shl     PSW_SV, r13         /* r13 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     svc_entry_2         /* ç¹æ¨©ã¢ã¼ãããã®å¼åºããªãã°ã¹ã­ãã */
+
+#ifdef NTC2ISR
+    /*
+     *  NTC2ISRã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runisr, r2
+    ld.w    0[r2], r2
+    cmp     r0, r2          /* p_runisrãããï¼ã¦ã¼ã¶ã¢ã¼ããªãã°éä¿¡é ¼ISR */
+    be      svc_entry_utask
+    st.w    sp, ISRCB_usp[r2]         /* uspãä¿å­ */
+    ld.w    ISRCB_p_isrinib[r2], r2
+    ld.w    ISRINIB_sstk_bottom[r2], sp         /* sspãå¾©å¸° */
+    br      svc_entry_2
+FLABEL(svc_entry_utask)
+#endif /* NTC2ISR */
+    /*
+     *  ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®å¼åºãã®å ´å
+     */
+    /*
+     *  ã¦ã¼ã¶ã¹ã¿ãã¯ã¨ã·ã¹ãã ã¹ã¿ãã¯ãå
+¥ãæ¿ãã
+     *  ã¿ã¹ã¯ã®ç¶æ
+ãç¹æ¨©ã¢ã¼ãå®è¡ä¸­ã«ç§»è¡ãã
+     *  æ»ãå
+ãéç¹æ¨©ã¢ã¼ãã§éä¿¡é ¼ããã¯å®è¡ä¸­ã§ãªããã°ï¼
+     *  ã¿ã¹ã¯å®è¡ä¸­ã§ããã¯ããªã®ã§ï¼p_runtskãNULLãã©ããã®
+     *  ãã§ãã¯ã¯å¿
+è¦ãªãã¯ã
+     */
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    set1    0, TCB_priv_mode[ep]    /* p_runtsk->priv_mode |= 0x01 */
+    sst.w   sp, TCB_usp[ep]         /* uspãä¿å­ */
+    sld.w   TCB_p_tinib[ep], ep
+    sld.w   TINIB_sstk_bottom[ep], sp         /* sspãå¾©å¸° */
+
+FLABEL(svc_entry_2)
+    /*
+     *  eipcã¨eipswï¼syscallå¼åºãå
+ã®pcã¨pswï¼ãä¿å­ãã¦
+     *  å²è¾¼ã¿ãããªã¿ã¼ã³
+     *  +--------------+ <- new sp
+     *  | eipsw        |
+     *  +--------------+
+     *  | eipc         |
+     *  +--------------+ <- old sp
+     */
+    addi    -8, sp, sp
+    mov     sp, ep
+    stsr    eipc, r12
+    sst.w   r12, 4[ep]
+    stsr    eipsw, r12
+    sst.w   r12, 0[ep]
+    /*
+     *  eipswã®ä¿è­·é¢é£ãããã0ã«ãã
+     */
+#ifdef __v850e2v3__
+    movhi   0x000f, r0, r13
+#else /* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r13
+#endif /* __v850e2v3__ */
+    not     r13, r13
+    and     r13, r12
+    ldsr    r12, eipsw          /* PP,NPV,DMP,IMP = 0 */
+    Lea     svc_entry_3, r12
+    ldsr    r12, eipc
+    eiret
+
+FLABEL(svc_entry_3)
+    /*
+     *  æ©è½ã³ã¼ãã®ãã§ãã¯
+     */
+    mov     TMAX_SVCID, r12
+    cmp     r12, r11            /* æ©è½ã³ã¼ãã®ä¸éãã§ãã¯(TMAX_SVCID < r11) */
+    bgt     svc_entry_error     /* ä¸éããªã¼ããã¦ãããªãã°ã¨ã©ã¼ */
+
+    /*
+     *  ãµã¼ãã¹ã³ã¼ã«ã®ãã¼ãã«ãå¼ãï¼
+     *  ãµã¼ãã¹ã³ã¼ã«ã®æ¬ä½ãå¼ã¶
+     */
+    Lea     _svc_table, r12
+    shl     2, r11                  /* r11 *= 4 */
+    add     r11, r12                /* r12 = &svc_table[r11] */
+	ld.w    0[r12], r12             /* ãã¼ãã«ãå¼ã */
+    Lea     svc_entry_r, lp         /* æ»ãçªå°ãè¨­å® */
+	jmp     [r12]                   /* ãµã¼ãã¹ã³ã¼ã«å¦çã«ã¼ãã³ãå¼ã¶ */
+    nop
+
+FLABEL(svc_entry_error)
+    jarl    _no_support_service, lp /* no_support_service ãå¼ã¶ */
+
+FLABEL(svc_entry_r)
+    /*
+     *  ãã®æç¹ã§ã®pswãr11ã«ä¿å­ãã
+     *  å
+¨å²è¾¼ã¿ç¦æ­¢ã§æ´æ°ããæã¸ã®å¯¾å¿
+     */
+    stsr    psw, r11
+
+    /*
+     *  å
+¨å²è¾¼ã¿ç¦æ­¢ãã¤EPç¶æ
+ã¸
+     *  ããã§EPç¶æ
+ã¨ããã®ã¯ï¼ISRããã·ã¹ãã ãµã¼ãã¹ãå¼ã°ãã
+     *  å ´åã«ï¼eiretã«ãã£ã¦ISPRãæ´æ°ãããã®ãé²ãããã§ãã
+     */
+    ori     0x60, r11, r12   /* psw |= EP|ID */
+    ldsr    r12, psw
+
+    /*
+     *  eipcã¨eipswï¼syscallå¼åºãå
+ã®pcã¨pswï¼ãå¾©å¸°
+     *  ããã§ã¯ï¼å²è¾¼ã¿å¦çä¸­ã§ãªãï¼ãµã¼ãã¹ã³ã¼ã«å¼åºãåã«
+     *  eiretãçºè¡ãã¦ããï¼ãï¼eiretãå©ç¨ãã¦ãªã¿ã¼ã³ãã
+     *  +--------------+ <- old sp
+     *  | eipc         |
+     *  +--------------+
+     *  | eipsw        |
+     *  +--------------+ <- new sp
+     */
+    mov     sp, ep
+    sld.w   4[ep], r15
+    sld.w   0[ep], r16
+    addi    8, sp, sp
+
+    /*
+	 *  ã¹ã¿ãã¯ãæ»ãããã§ãã¯
+	 */
+    /*
+     *  å¼åºãå
+ãç¹æ¨©ã¢ã¼ããï¼
+     *  eipswããã§ãã¯ãã
+     */
+#ifdef __v850e2v3__
+    ldsr    r0, bsel
+    movhi   0x000f, r0, r12
+#else /* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r12
+#endif /* __v850e2v3__ */
+    tst     r16, r12
+    be      svc_prv_r           /* ç¹æ¨©ã¢ã¼ãããã®å¼åºããªãã°ã¹ã­ãã */
+
+#ifdef NTC2ISR
+    /*
+     *  NTC2ISRã¸ã®å²è¾¼ã¿
+     */
+    Lea     _p_runisr, r2
+    ld.w    0[r2], r2
+    cmp     r0, r2          /* p_runisrãããï¼ã¦ã¼ã¶ã¢ã¼ããªãã°éä¿¡é ¼ISR */
+    be      svc_utask_r
+    ld.w    ISRCB_usp[r2], sp     /* uspãå¾©å¸° */
+    br      svc_prv_r
+FLABEL(svc_utask_r)
+#endif /* NTC2ISR */
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    tst1    0, TCB_priv_mode[ep]    /* uspãä¿å­ãããï¼ */
+    be      svc_prv_r               /* uspãä¿å­ãã¦ããªããªãã°ã¹ã­ãã */
+
+FLABEL(svc_usr_r)
+    /* 
+     *  ç¹æ¨©ã¢ã¼ãå®è¡ãæãã
+     *  sstkã¨ustkãå
+¥ãæ¿ãã
+     *  æ»ãå
+ãã¿ã¹ã¯ã³ã³ãã­ã¹ããªãã°ï¼ã¿ã¹ã¯å®è¡ä¸­ã§ããã¯ã
+     *  ãªã®ã§ï¼p_runtskãNULLãã©ããã®ãã§ãã¯ã¯å¿
+è¦ãªãã¯ã
+     */
+    clr1    0, TCB_priv_mode[ep]    /* p_runtsk->priv_mode &= ~0x01 */
+    sld.w   TCB_usp[ep], sp         /* uspãå¾©å¸° */
+    
+FLABEL(svc_prv_r)
+    /*
+     *  ã·ã¹ãã ãµã¼ãã¹ã§ã»ãããããå²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãåæ ãã
+     */
+    mov     0x20, r12
+    and     r12, r11    /* PSW.IDä»¥å¤ã0ã« */
+    not     r12, r12    /* r12 = ~0x20 */
+    and     r12, r16    /* eipsw &= ~0x20 */
+    or      r11, r16    /* eipsw |= r11 */
+    ldsr    r16, eipsw
+    ldsr    r15, eipc
+    eiret               /* å¼åºãå
+ã¸ãªã¿ã¼ã³ */
+    nop
+
+	/*
+	 *  ã¹ã¿ãã¯ãã§ãã¯é¢æ°
+	 *   å
+¥å r6  ä½¿ç¨ããã¹ã¿ãã¯é
+	 *   ä½¿ç¨ããã¹ã¿ãã¯éãæ®ã£ã¦ããªãå ´åã¯ã¨ã©ã¼
+	 */
+    .global _trustedfunc_stack_check
+FLABEL(_trustedfunc_stack_check)
+    Lea     _callevel_stat, ep
+    sld.h   0[ep], r10
+    addi    TCL_ISR2, r0, r11     
+    tst     r11, r10
+    be      trustedfunc_stack_check_1       /* TCL_TASKã®å ´åã¯ã¹ã­ãã */
+
+#ifndef NTC2ISR
+    /*
+     *  _ostkãä½¿ç¨ä¸­
+     */
+    Lea     __ostk, ep
+    sld.w   0[ep], r11
+#else /* NTC2ISR */
+    /*
+     *  ISRã®ã·ã¹ãã ã¹ã¿ãã¯ãä½¿ç¨ä¸­
+     */
+    Lea     _p_runisr, ep
+    sld.w   0[ep], ep
+    sld.w   ISRCB_p_isrinib[ep], ep
+    sld.w   ISRINIB_sstk_bottom[ep], r11
+    /*sld.w   ISRINIB_sstksz[ep], r12*/
+    /*TODO*/
+    mov     1024, r12
+    sub     r12, r11
+#endif /* NTC2ISR */
+    br      trustedfunc_stack_check_2
+
+FLABEL(trustedfunc_stack_check_1)
+    /*
+     *  ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ãä½¿ç¨ä¸­
+     */
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    sld.w   TCB_p_tinib[ep], ep
+    sld.w   TINIB_sstk_bottom[ep], r11
+    sld.w   TINIB_sstksz[ep], r12
+    sub     r12, r11
+FLABEL(trustedfunc_stack_check_2)
+    /*
+     *  ã¹ã¿ãã¯ã®æ®éããã§ãã¯
+     *  r11 = ã¹ã¿ãã¯ã®å
+é ­
+     */
+    subr    sp, r6                      /* r6 = ssp - tf_stksz */
+    bl      trustedfunc_stack_check_3   /* ssp < tfstksz ãªãã°ã¨ã©ã¼å¦çã¸ */
+    cmp     r11, r6                     /* r11 < r6 ï¼ */
+    bnh     trustedfunc_stack_check_3   /* ããã§ãªããã°ã¨ã©ã¼å¦çã¸ */
+    addi    E_OK, r0, r10
+    jmp     [lp]
+
+FLABEL(trustedfunc_stack_check_3)
+    addi    E_OS_STACKINSUFFICIENT, r0, r10
+    jmp     [lp]
+
+    /* =end modified for SC3 */
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_support.asm
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_support.asm	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_support.asm	(revision 172)
@@ -0,0 +1,2804 @@
+;/* 
+ ;*  TOPPERS ATK2
+ ;*      Toyohashi Open Platform for Embedded Real-Time Systems
+ ;*      Automotive Kernel Version 2
+ ;*
+ ;*  Copyright (C) 2012-2016 by Center for Embedded Computing Systems
+ ;*              Graduate School of Information Science, Nagoya Univ., JAPAN
+ ;*  Copyright (C) 2012-2013 by FUJI SOFT INCORPORATED, JAPAN
+ ;*  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ ;*  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ ;*  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ ;*  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ ;*  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ ;*  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ ;*  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ ;*  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ ;*      å
+è²¬ãããã¨ï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ ;*  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ ;*  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ ;*  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ ;*
+ ;*  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ ;*  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ ;*  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ ;*  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ ;*  ã®è²¬ä»»ãè² ããªãï¼
+ ;*
+ ;*  $Id: prc_support.S 189 2015-06-26 01:54:57Z t_ishikawa $
+ ;*/
+
+;/*
+ ;*		ã¿ã¼ã²ããä¾å­æ
+å ±ã®å®ç¾©
+ ;*/
+$include (v850asm.inc)
+$include (offset.h)
+$include (Os_Cfg_asm.inc)
+
+$ifdef USE_ASMCONFIG_INC
+$include (asm_config.inc)
+$endif ;/* USE_ASMCONFIG_INC */
+
+$ifdef __v850e2v3__
+
+;/*
+ ;*  V850E2ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ ;*/
+GET_ISPR .macro reg
+	mov		ISPR_H, reg
+	ld.h	0[reg],reg
+.endm
+
+CLEAR_ISPR .macro reg1, reg2
+	mov		ISPC_H,reg1
+	mov		0xffff,reg2
+	st.h	reg2,0[reg1]
+	mov		ISPR_H, reg1
+	st.h	r0,0[reg1]
+.endm
+
+SET_PMR .macro reg_val, reg_tmp
+	mov     PMR, reg_tmp
+	st.h    reg_val, 0[reg_tmp]  ;/* set interrupt level */
+	syncm
+.endm
+
+$endif ;/* __v850e2v3__ */
+
+$ifdef __v850e3v5__
+
+;/*
+ ;*  V850E3V5ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ ;*/
+GET_ISPR .macro reg
+	stsr 10, reg, 2
+.endm
+
+SET_ISPR .macro val, reg 
+	movea val,r0,reg
+	ldsr reg, 10, 2
+	syncp
+.endm
+
+SET_INTCFG .macro val, reg 
+	movea val,r0,reg
+	ldsr reg, 13, 2
+	syncp
+.endm
+
+CLEAR_ISPR .macro reg1, reg2
+	SET_INTCFG 1, reg1 ;/* ISPR ãæ¸ãæãå¯è½ã« */
+	SET_ISPR   0, reg1 ;/* ISPR ã®ã¯ãªã¢ */
+	SET_INTCFG 0, reg1 ;/* ISPR ãæ¸ãæãç¦æ­¢ã«(èªåæ´æ°ã«) */
+.endm
+
+GET_PMR .macro reg
+	stsr 11, reg, 2
+.endm
+
+SET_PMR .macro reg_val, reg_tmp
+	stsr psw, reg_tmp
+	di
+	ldsr reg_val, 11, 2
+	ldsr reg_tmp, psw
+	syncp
+.endm
+
+GET_ICSR .macro reg
+	stsr sr12, reg, 2
+.endm
+
+SET_ICSR .macro val, reg 
+	movea val,r0,reg
+	ldsr \reg, sr12, 2
+.endm
+
+$endif ;/* !__v850e3v5__ */
+
+
+;/*
+ ;*  OSå²è¾¼ã¿ç¦æ­¢ãã¯ã­
+ ;*  ãã¹ãã®ä¸çªå¤å´ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+ ;*/
+OUTER_LOCK_OS_INT .macro   reg12, reg13
+
+    ;/* pmr_isr2_mask -> PMR */
+    Lea     _pmr_isr2_mask, reg13
+    ld.h    0[reg13], reg13
+    SET_PMR reg13, reg12
+
+    ;/* nested_lock_os_int_cnt = 1 */
+    Lea     _nested_lock_os_int_cnt, reg12
+    mov     1, reg13
+    st.b    reg13, 0[reg12]
+
+.endm
+
+;/*
+ ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+ ;*  ãã¹ãã®ä¸çªå¤å´ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+ ;*/
+OUTER_UNLOCK_OS_INT .macro  reg12, reg13
+
+    ;/* nested_lock_os_int_cnt = 0 */
+    Lea     _nested_lock_os_int_cnt, reg12
+    mov     r0, reg13
+    st.b    reg13, 0[reg12]
+
+    ;/* pmr_setting_tbl[current_iintpri] -> PMR */
+    Lea     _current_iintpri, reg12
+    ld.bu   0[reg12], reg12
+    shl     1, reg12
+
+    Lea     _pmr_setting_tbl, reg13
+    add     reg12, reg13
+    ld.h    0[reg13], reg13
+    SET_PMR reg13, reg12  ;/* set interrupt level */
+
+.endm
+
+;/* =begin modified for SC3 */
+;/*
+ ;*  OSå²è¾¼ã¿ç¦æ­¢ãã¯ã­
+ ;*  ãã¹ããã
+ ;*/
+NESTED_LOCK_OS_INT .macro   reg12, reg13
+
+    ;/* nested_lock_os_int_cnt == 0 ? */
+    Lea     _nested_lock_os_int_cnt, reg13
+    ld.b    0[reg13], reg12
+    cmp     r0, reg12
+    bne     increment_nest_lock
+
+    ;/* pmr_isr2_mask -> PMR */
+    Lea     _pmr_isr2_mask, reg13
+    ld.h    0[reg13], reg13
+    SET_PMR reg13, reg12  ;/* set interrupt level */
+    Lea     _nested_lock_os_int_cnt, reg13
+    mov     r0, reg12                ;/* nested_lock_os_int_cnt = 0 */
+
+increment_nest_lock:
+    ;/* nested_lock_os_int_cnt += 1 */
+    add     1, reg12
+    st.b    reg12, 0[reg13]
+
+.endm
+
+;/*
+ ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+ ;*  ãã¹ããã
+ ;*/
+NESTED_UNLOCK_OS_INT .macro  reg12, reg13
+
+    ;/* nested_lock_os_int_cnt -= 1 */
+    Lea     _nested_lock_os_int_cnt, reg12
+    ld.b    0[reg12], reg13
+    add     -1, reg13
+    st.b    reg13, 0[reg12]
+    cmp     r0, reg13
+    bne     nested_unlock_exit
+
+    ;/* pmr_setting_tbl[current_iintpri] -> PMR */
+    Lea     _current_iintpri, reg12
+    ld.bu   0[reg12], reg12
+    shl     1, reg12
+
+    Lea     _pmr_setting_tbl, reg13
+    add     reg12, reg13
+    ld.h    0[reg13], reg13
+    SET_PMR reg13, reg12  ;/* set interrupt level */
+
+nested_unlock_exit:
+.endm
+
+;/* =end modified for SC3 */
+
+	;/* 
+	 ;* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç 
+	;*/
+PRE_INT_EXC .macro
+$ifdef _RH850G3M_
+	;/* ä¸é¨ä¸­æ­åä¾å¤ãã³ãã©ã§ã®ã¿å¿
+è¦ã ãä¸å¾å®è¡ãã */
+	syncp
+$endif ;/* _RH850G3M_ */
+.endm
+
+	;/*
+	 ;* å²è¾¼ã¿ä¾å¤å
+¥ãå£ã§ã®ã¬ã¸ã¹ã¿ã®ä¿å­ãã¯ã­
+	 ;*/
+INT_EXC_SAVEREG .macro
+$ifndef TOPPERS_USE_PUSHSP
+$ifdef TOPPERS_USE_HFLOAT
+	addi    -88 , sp , sp
+$else ;/* !TOPPERS_USE_HFLOAT */
+	addi    -84 , sp , sp
+$endif ;/* TOPPERS_USE_HFLOAT */
+	st.w    r30, 12[sp]  ;/* r30(ep) */
+    ;/*
+     ;* å²è¾¼ã¿çºçåã®r2ã¯eiwrã«ä¿å­ããã¦ãã
+     ;* ããã§ï¼r2ã¯ãã§ã«ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦
+     ;* ä½¿ç¨ä¸­ã§ããããï¼ä¸æ¸ãããªã
+     ;* r2ã«å
+¥ã£ã¦ããå²è¾¼ã¿çªå·ãç ´å£ããªãããã«
+     ;*/
+    stsr    eiwr, r30    ;/* r2->r30ã«å¾©å¸° */
+	st.w    r30, 76[sp]
+	mov     sp, ep 
+	sst.w   r1, 80[ep]
+	sst.w   r5, 72[ep]
+	sst.w   r6, 68[ep]
+	sst.w   r7, 64[ep]
+	sst.w   r8, 60[ep]
+	sst.w   r9, 56[ep]
+	sst.w   r10, 52[ep]
+	sst.w   r11, 48[ep]
+	sst.w   r12, 44[ep]
+	sst.w   r13, 40[ep]
+	sst.w   r14, 36[ep]
+	sst.w   r15, 32[ep]
+	sst.w   r16, 28[ep]
+	sst.w   r17, 24[ep]
+	sst.w   r18, 20[ep]
+	sst.w   r19, 16[ep]
+	sst.w   r31, 8[ep]
+$ifdef TOPPERS_USE_HFLOAT
+	stsr    fpsr, r19     ;/* load FPSR */
+	sst.w   r19, 84[ep]
+$endif ;/* TOPPERS_USE_HFLOAT */
+
+$else ;/* TOPPERS_USE_PUSHSP */
+	pushsp  r1-r1
+    ;/*
+     ;* å²è¾¼ã¿çºçåã®r2ã¯eiwrã«ä¿å­ããã¦ãã
+     ;* ããã§ï¼r2ã¯ãã§ã«ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦
+     ;* ä½¿ç¨ä¸­ã§ããããï¼ä¸æ¸ãããªã
+     ;* r2ã«å
+¥ã£ã¦ããå²è¾¼ã¿çªå·ãç ´å£ããªãããã«
+     ;*/
+    stsr    eiwr, r1    ;/* r2->r1ã«å¾©å¸° */
+	pushsp  r1-r1
+$ifdef TOPPERS_USE_HFLOAT
+	stsr    fpsr, r1     ;/* load FPSR */
+	pushsp  r1-r1
+$endif ;/* TOPPERS_USE_HFLOAT */
+	pushsp  r5-r19
+	pushsp  r30-r31
+	addi    -8, sp , sp
+	mov     sp, ep 
+$endif ;/* TOPPERS_USE_PUSHSP */
+.endm
+
+	;/*
+	 ;* å²è¾¼ã¿ä¾å¤å
+¥ãå£ã§ã®ã¬ã¸ã¹ã¿ã®å¾©å¸°ãã¯ã­
+	 ;*/
+INT_EXC_RESTOREREG .macro
+$ifndef TOPPERS_USE_PUSHSP
+$ifdef TOPPERS_USE_HFLOAT
+	sld.w   84[ep], r19
+	ldsr    r19, fpsr     ;/* store FPSR */
+$endif ;/* TOPPERS_USE_HFLOAT */
+	sld.w   80[ep], r1
+	sld.w   76[ep], r2
+	sld.w   72[ep], r5
+	sld.w   68[ep], r6
+	sld.w   64[ep], r7
+	sld.w   60[ep], r8
+	sld.w   56[ep], r9
+	sld.w   52[ep], r10
+	sld.w   48[ep], r11
+	sld.w   44[ep], r12
+	sld.w   40[ep], r13
+	sld.w   36[ep], r14
+	sld.w   32[ep], r15
+	sld.w   28[ep], r16
+	sld.w   24[ep], r17
+	sld.w   20[ep], r18
+	sld.w   16[ep], r19
+	sld.w    8[ep], r31
+$ifdef TOPPERS_USE_HFLOAT
+	addi    88, ep, sp
+$else ;/* !TOPPERS_USE_HFLOAT */
+	addi    84, ep, sp
+$endif ;/* TOPPERS_USE_HFLOAT */
+	sld.w   12[ep], r30 ;/* r30(ep) */
+    ldsr    r2, eiwr    ;/* r2ãéé¿ */
+
+$else ;/* TOPPERS_USE_PUSHSP */
+	addi    8, sp , sp
+	popsp   r30-r31
+	popsp   r5-r19
+$ifdef TOPPERS_USE_HFLOAT
+	popsp   r1-r1
+	ldsr    r1, fpsr      ;/* store FPSR */
+$endif ;/* TOPPERS_USE_HFLOAT */
+    ;/*
+     ;* å²è¾¼ã¿çºçåã®r2ã¯eiwrã«å¾©å¸°
+     ;*/
+	popsp   r1-r1
+    ldsr    r1, eiwr     ;/* r2->eiwrã«å¾©å¸° */
+	popsp   r1-r1
+$endif ;/* TOPPERS_USE_PUSHSP */
+.endm
+
+
+$ifdef __v850e3v5__
+	;/* 
+	 ;* V850E3V5ç¨ãã¯ã¿
+	 ;* ããã«RBASEãè¨­å®ããããã¨ãæ³å®ï¼ãããé»æºæå
+¥æã®éå§ã¢ãã¬ã¹ï¼
+	 ;* (EIã¬ãã«å²è¾¼ã¿ã¯ãã¼ãã«åç
+§æ¹å¼ãä½¿ç¨ããããæ¬ãã¯ã¿ã¯ä½¿ç¨ããªã)
+	 ;*/
+	RESET .cseg text
+	.extern __reset
+__reset:
+	jr __start
+	.rept 6
+	nop
+	.endm
+__syserr: ;/* 0x0010 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__hvtrap: ;/* 0x0020 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__fetrap: ;/* 0x0030 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__trap0:  ;/* 0x0040 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _ei_exception_entry
+	.rept 2
+	nop
+	.endm
+__trap1:  ;/* 0x0050 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _ei_exception_entry
+	.rept 2
+	nop
+	.endm
+__rie:    ;/* 0x0060 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _ei_exception_entry
+	.rept 2
+	nop
+	.endm
+__fppfpi: ;/* 0x0070 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _ei_exception_entry
+	.rept 2
+	nop
+	.endm
+__ucpop:  ;/* 0x080 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__mip:    ;/* 0x0090 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_MEMORY, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__pie:   ;/* 0x00a0 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__debug:  ;/* 0x00b0 */
+	jr __debug
+	.rept 6
+	nop
+	.endm
+__mae:    ;/* 0x00c0 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__rfu:    ;/* 0x00d0 */
+	jr __rfu
+	.rept 6
+	nop
+	.endm
+__fenmi:  ;/* 0x00e0 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__feint:  ;/* 0x00f0 */
+    ldsr  r2, eiwr
+    movea E_OS_PROTECTION_EXCEPTION, r0, r2
+	jr _fe_exception_entry
+	.rept 2
+	nop
+	.endm
+__eiintn0:  ;/*ï¼åªå
+åº¦0ï¼ 0x0100 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn1:  ;/*ï¼åªå
+åº¦1ï¼ 0x0110 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn2:  ;/*ï¼åªå
+åº¦2ï¼ 0x0120 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn3:  ;/*ï¼åªå
+åº¦3ï¼ 0x0130 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn4:  ;/*ï¼åªå
+åº¦4ï¼ 0x0140 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn5:  ;/*ï¼åªå
+åº¦5ï¼ 0x0150 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn6:  ;/*ï¼åªå
+åº¦6ï¼ 0x0160 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn7:  ;/*ï¼åªå
+åº¦7ï¼ 0x0170 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn8:  ;/*ï¼åªå
+åº¦8ï¼ 0x0180 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn9:  ;/*ï¼åªå
+åº¦9ï¼ 0x0190 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn10: ;/*ï¼åªå
+åº¦10ï¼ 0x01a0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn11: ;/*ï¼åªå
+åº¦11ï¼ 0x01b0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn12: ;/*ï¼åªå
+åº¦12ï¼ 0x01c0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn13: ;/*ï¼åªå
+åº¦13ï¼ 0x01d0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn14: ;/*ï¼åªå
+åº¦14ï¼ 0x01e0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+__eiintn15: ;/*ï¼åªå
+åº¦15ï¼ 0x01f0 */
+	jr _default_int_handler
+	.rept 6
+	nop
+	.endm
+
+$endif ;/* __v850e3v5__ */
+
+    .cseg text_kernel
+	;/*
+	 ;*  ä¾å¤ã¨ã³ããªï¼feretã§ãªã¿ã¼ã³ããä¾å¤ç¨ï¼
+     ;*  ããã§ï¼CY = FEPSW.IMPï¼r2 = error code
+     ;*  r2ã¯ä¾å¤ã¨ã³ããªã§ã¹ã¿ãã¯ã«ä¿å­æ¸ã¿
+     ;*  r2ã®æä¸ä½ãããã«ï¼ä¾å¤å
+ã®ã³ã³ãã­ã¹ããç¹æ¨©ãã©ãããä¿å­ãã
+	 ;*/
+	.extern _fe_exception_entry
+_fe_exception_entry:
+	;/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+    ldsr    r2, fewr                ;/* ã¨ã©ã¼ã³ã¼ããä¿å­ */
+    stsr    fepsw, r2
+    shl     PSW_SV, r2              ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    stsr    fewr, r2                ;/* ã¨ã©ã¼ã³ã¼ããå¾©å¸° */
+    bnc     fe_exception_0          ;/* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+    ;/*
+     ;*  ã¦ã¼ã¶ã¿ã¹ã¯ããã®ä¾å¤
+     ;*/
+    ori     0x1000, r2, r2             ;/* r2 |= 0x1000 */
+    ldsr    r6, fewr                ;/* r6ãéé¿ */
+    Lea     _p_runtsk, r6
+    ld.w    0[r6], r6
+    st.w    sp, TCB_usp[r6]         ;/* uspãTCBã«ä¿å­ */
+    ld.w    TCB_p_tinib[r6], r6
+    ld.w    TINIB_sstk_bottom[r6], sp         ;/* sspãå¾©å¸° */
+    stsr    fewr, r6                ;/* r6ãå¾©å¸° */
+fe_exception_0:
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãä¿å­ */
+    INT_EXC_SAVEREG
+
+	;/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®FEPCã¨FEPSWãä¿å­ */
+	stsr    fepc, r6
+	sst.w   r6, 4[ep]
+	stsr    fepsw, r6
+	sst.w   r6, 0[ep]
+
+	;/*
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå¦çã¬ãã«ã§å®è¡ããããOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ä¾å¤ãçºçããå¯è½æ§ãããããï¼ãã¹ãç®¡çãè¡ãï¼
+	 ;* ä¾å¤ã¯æ¬¡ã®æ¡ä»¶ã§çºçãã
+	 ;*  ã»ISR1å®è¡ç¶æ
+ã§çºçããå ´å
+	 ;*  ã»ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 ;*  ã»OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 ;*  ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§çºçããå ´å
+	 ;*/
+
+	;/*
+	 ;* ã«ãã´ãª1ã®å²è¾¼ã¿ä»¥å¤ã§ä¾å¤ãçºçãããã®å¤æ­ãã
+	 ;* ã«ãã´ãª1ã§ä¾å¤ãçºçï¼fe_exception_1ã¸ã¸ã£ã³ã
+	 ;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     fe_exception_1
+
+	;/*
+	 ;*  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 ;*/
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     1, r13
+	bne     fe_exception_1
+
+	;/*
+	 ;* OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+	 ;*/
+	Lea     _pmr_isr2_mask, r7
+	ld.h    0[r7], r7
+	SET_PMR r7, r6  ;/* pmr_isr2_mask -> PMR */
+
+fe_exception_1:
+	;/*
+	 ;*  å²è¾¼ã¿çºçæã«å¤æ´ãããã®ã§å²è¾¼ã¿è§£é¤åã«åå¾
+	 ;*/
+	stsr    feic, r19                   ;/* ä¾å¤è¦å  */
+	stsr    fepc, r18                   ;/* ä¾å¤çºçPC */
+
+	;/* 
+	 ;* C1ISRãåãä»ããããï¼NPbit ã¯ãªã¢ 
+	 ;*/
+	stsr    psw, r12
+	mov     !0x0080, r13
+	and     r12, r13
+	ldsr    r13, psw
+
+fe_exception_2:
+	;/*
+	 ;*  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã¯ï¼ç¡éã«ã¼ãã¸
+	 ;*/
+	Lea   _kerflg, r12          ;/* kerflgãFALSEãªãç¡éã«ã¼ã */
+	ld.b  0[r12], r12
+	cmp   r0, r12
+infinity_loop_fe:
+	be    infinity_loop_fe
+
+	;/*
+	 ;* å¤éå²è¾¼ã¿ãå¤å®
+	 ;*/
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     1, r14                      ;/*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã */
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	mov     sp, r9                      ;/* sp ãr9ã«éé¿ */
+
+	cmp     1, r13
+	bne     fe_exception_3              ;/* _nested_lock_os_int_cnt > 1 -> fe_exception_3 */
+
+	;/*
+	 ;* C1ISRå®è¡ç¶æ
+ã§çºçããå ´åã¯ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 ;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     fe_exception_3
+
+	;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+	Lea     __ostkpt, r12
+	ld.w    0[r12], r12
+	add     -4, r12
+	st.w    sp, 0[r12]                      ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ */
+	mov     r12, sp                         ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åãæ¿ã */
+
+fe_exception_3:
+    ;/* FEPSW.ID == 1ã®å ´åã¯å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ãªã®ã§è§£é¤ããªã */
+	stsr    fepsw, r12
+    mov     0x20, r13
+    tst     r12, r13
+    bne     fe_exception_4
+	UNLOCK_ALL_INT
+
+fe_exception_4:
+$ifdef CFG_USE_PROTECTIONHOOK
+	;/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãç¢ºä¿ */
+	addi    -12, sp, sp
+
+	;/* v850_cpu_exp_spã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_sp, r12
+	st.w    r9, 0[r12]
+	st.w    ep, 0[sp]
+	mov     sp, ep
+
+	;/* v850_cpu_exp_noã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_no, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 8[ep]
+	st.w    r19, 0[r12]                     ;/* r19 ä¾å¤è¦å  */
+
+	;/* v850_cpu_exp_pcã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_pc, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 4[ep]
+	mov     r18, r17                        ;/* r18:fepc */
+	add     -4, r17
+	st.w    r17, 0[r12]
+
+$endif ;/* CFG_USE_PROTECTIONHOOK */
+
+	;/*
+	 ;* CPUä¾å¤ãçºçããå ´åï¼OSã¯E_OS_PROTECTION_EXCEPTIONããã©ã¡ã¼ã¿ã¨ãã¦
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 ;*/
+    ;/* =begin modified for SC3 */
+    andi    0xefff, r2, r6 ;/* ã¨ã©ã¼ã³ã¼ããç¬¬1å¼æ°ã«(r6=r2 & !0x1000) */
+    shr     12, r2         ;/* ä¾å¤ã®çºçå
+ãã¦ã¼ã¶ã¢ã¼ããªãr2=1 */
+    xori    0x0001, r2, r2     ;/* r2 = r2==1? 0: 1 */
+    Lea     _pre_protection_supervised, r12
+    st.b    r2, 0[r12]
+    ;/* =end modified for SC3 */
+	jarl    _call_protectionhk_main, r31
+
+$ifdef CFG_USE_PROTECTIONHOOK
+	mov     sp, ep
+
+	;/* v850_cpu_exp_noãå¾©å¸° */
+	Lea     _v850_cpu_exp_no, r12
+	sld.w   8[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_pcãå¾©å¸° */
+	Lea     _v850_cpu_exp_pc, r12
+	sld.w   4[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_spéé¿ */
+	Lea     _v850_cpu_exp_sp, r12
+	sld.w   0[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãæ»ã */
+	addi    12, sp, sp
+$endif ;/* CFG_USE_PROTECTIONHOOK */
+
+fe_ret_exc:
+	LOCK_ALL_INT
+
+	;/*
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å®è¡ãã
+	 ;*/
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 ;*/
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 ;*/
+	;/*
+	 ;* ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯
+	 ;* (1)ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ããããªã
+	 ;* (2)OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ãããªã
+	;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ret_exc_2
+
+	;/*
+	 ;*  ãã¹ãåæ°ã1ä»¥ä¸ãªãå²è¾¼ã¿å
+ãISRãªããä¾å¤çºçå
+ã¸å¾©å¸°
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 ;*/
+	cmp     r0, r13
+	bne     ret_exc_1
+
+	;/*
+	 ;*  æ»ãå
+ãã¿ã¹ã¯ãªããã¹ã¿ãã¯ãæ»ã
+	 ;*/
+	ld.w    0[sp], sp
+
+ret_exc_1:
+	;/*
+	 ;*  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´åï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 ;*/
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     r0, r13
+	bne     ret_exc_2
+
+	;/* OSå²è¾¼ã¿ãè§£é¤ */
+	;/* pmr_setting_tbl[current_iintpri] -> PMR */
+	Lea     _current_iintpri, r12
+	ld.bu   0[r12], r12
+	shl     1, r12
+
+	Lea     _pmr_setting_tbl, r13
+	add     r12, r13
+	ld.h    0[r13], r13
+	SET_PMR r13, r12     ;/* set interrupt level */
+
+	;/*
+	 ;*  ä¾å¤çºçå
+ã¸å¾©å¸°
+	 ;*/
+ret_exc_2:
+	;/*
+	 ;* ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 ;*/
+	mov     sp, ep
+	sld.w    4[ep], r10
+	ldsr    r10, fepc
+	sld.w   0[ep], r10
+	ldsr    r10, fepsw
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+    INT_EXC_RESTOREREG
+
+	stsr    fepsw, r2   ;/* r2 = fepsw */
+    shl     PSW_SV, r2         ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_fe_exception    ;/* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+fe_exception_to_utask:
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp         ;/* uspãå¾©å¸° */
+return_from_fe_exception:
+    stsr    eiwr, r2
+	feret
+
+	;/*
+	 ;*  ä¾å¤ã¨ã³ããªï¼eiretã§ãªã¿ã¼ã³ããä¾å¤ç¨ï¼
+     ;*  ããã§ï¼CY = EIPSW.IMPï¼r2 = error code
+     ;*  r2ã¯OSå´ã§äºç´ããï¼å²è¾¼ã¿ã»ä¾å¤ã®åºå
+¥å£ã®
+     ;*  ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ç¨ããï¼ããï¼
+     ;*  ã¹ã¿ãã¯ã«ä¿å­ããªã
+	 ;*/
+	.extern _ei_exception_entry
+_ei_exception_entry:
+	;/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+    stsr    eipsw, r2
+    shl     PSW_SV, r2              ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    mov     r0, r2                  ;/* movå½ä»¤ã§ã¯ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿ã¯å¤åããªã */
+    bnc     ei_exception_0          ;/* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+    ;/*
+     ;*  ã¦ã¼ã¶ã¿ã¹ã¯ããã®ä¾å¤
+     ;*/
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    st.w    sp, TCB_usp[r2]         ;/* uspãä¿å­ */
+    ld.w    TCB_p_tinib[r2], r2
+    ld.w    TINIB_sstk_bottom[r2], sp         ;/* sspãå¾©å¸° */
+    ori     0x1000, r0, r2          ;/* r2 = 0x1000 */
+ei_exception_0:
+    ;/*
+     ;*  EIä¾å¤ã«ããè¦å ã¯E_OS_PROTECTION_EXCEPTIONã®ã¿ã§ãã
+     ;*/
+    ori E_OS_PROTECTION_EXCEPTION, r2, r2 ;/* r2 |= E_OS_PROTECTION_EXCEPTION */
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+    INT_EXC_SAVEREG
+
+	;/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®EIPCã¨EIPSWãä¿å­ */
+	stsr    eipc, r6
+	sst.w   r6, 4[ep]
+	stsr    eipsw, r6
+	sst.w   r6, 0[ep]
+
+	;/*
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå¦çã¬ãã«ã§å®è¡ããããOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ä¾å¤ãçºçããå¯è½æ§ãããããï¼ãã¹ãç®¡çãè¡ãï¼
+	 ;* ä¾å¤ã¯æ¬¡ã®æ¡ä»¶ã§çºçãã
+	 ;*  ã»ISR1å®è¡ç¶æ
+ã§çºçããå ´å
+	 ;*  ã»ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 ;*  ã»OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 ;*  ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§çºçããå ´å
+	 ;*/
+
+	;/*
+	 ;* ã«ãã´ãª1ã®å²ãè¾¼ã¿ä»¥å¤ã§ä¾å¤ãçºçãããã®å¤æ­ãã
+	 ;* ã«ãã´ãª1ã§ä¾å¤ãçºçï¼ei_exception_1ã¸ã¸ã£ã³ã
+	 ;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_exception_1
+
+	;/*
+	 ;*  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´å
+	 ;*/
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     1, r13
+	bne     ei_exception_1
+
+	;/*
+	 ;* OSå²è¾¼ã¿è§£é¤ç¶æ
+ã§çºçããå ´å
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+	 ;*/
+	Lea     _pmr_isr2_mask, r7
+	ld.h    0[r7], r7
+	SET_PMR r7, r6                   ;/* pmr_isr2_mask -> PMR */
+
+ei_exception_1:
+	;/*
+	 ;*  å²è¾¼ã¿çºçæã«å¤æ´ãããã®ã§å²è¾¼ã¿è§£é¤åã«åå¾
+	 ;*/
+	stsr    eiic, r19                   ;/* ä¾å¤è¦å  */
+	stsr    eipc, r18                   ;/* ä¾å¤çºçPC */
+
+
+ei_exception_2:
+	;/*
+	 ;*  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã¯ï¼ç¡éã«ã¼ãã¸
+	 ;*/
+	Lea   _kerflg, r12          ;/* kerflgãFALSEãªãç¡éã«ã¼ã */
+	ld.b  0[r12], r12
+	cmp   r0, r12
+infinity_loop_ei:
+	be    infinity_loop_ei
+
+	;/*
+	 ;* å¤éå²è¾¼ã¿ãå¤å®
+	 ;*/
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     1, r14                      ;/*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã */
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	mov     sp, r9                      ;/* sp ãr9ã«éé¿ */
+
+	cmp     1, r13
+	bne     ei_exception_3             ;/* _nested_lock_os_int_cnt > 1 -> ei_exception_3 */
+
+	;/*
+	 ;* ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 ;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_exception_3
+
+	;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+	Lea     __ostkpt, r12
+	ld.w    0[r12], r12
+	add     -4, r12
+	st.w    sp, 0[r12]                      ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ */
+	mov     r12, sp                         ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åãæ¿ã */
+
+ei_exception_3:
+    ;/* EIPSW.ID == 1ã®å ´åã¯ããã«ããªãããï¼æ¡ä»¶å¤å®ã¯ä¸è¦ */
+	UNLOCK_ALL_INT
+
+$ifdef CFG_USE_PROTECTIONHOOK
+	;/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãç¢ºä¿ */
+	addi    -12, sp, sp
+
+	;/* v850_cpu_exp_spã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_sp, r12
+	st.w    r9, 0[r12]
+	st.w    ep, 0[sp]
+	mov     sp, ep
+
+	;/* v850_cpu_exp_noã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_no, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 8[ep]
+	st.w    r19, 0[r12]                     ;/* r19 ä¾å¤è¦å  */
+
+	;/* v850_cpu_exp_pcã®éé¿ã¨è¨­å® */
+	Lea     _v850_cpu_exp_pc, r12
+	ld.w    0[r12], r13
+	sst.w   r13, 4[ep]
+	mov     r18, r17                        ;/* r18:fepc */
+	add     -4, r17
+	st.w    r17, 0[r12]
+
+$endif ;/* CFG_USE_PROTECTIONHOOK */
+
+	;/*
+	 ;* CPUä¾å¤ãçºçããå ´åï¼OSã¯E_OS_PROTECTION_EXCEPTIONããã©ã¡ã¼ã¿ã¨ãã¦
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 ;*/
+    ;/* =begin modified for SC3 */
+    andi    0xefff, r2, r6 ;/* ã¨ã©ã¼ã³ã¼ããç¬¬1å¼æ°ã«(r6=r2 & !0x1000) */
+    shr     12, r2         ;/* ä¾å¤ã®çºçå
+ãç¹æ¨©ã¢ã¼ããªãr2=1 */
+    xori    0x0001, r2, r2     ;/* r2 = r2==1? 0: 1 */
+    Lea     _pre_protection_supervised, r12
+    st.b    r2, 0[r12]
+    ;/* =end modified for SC3 */
+	jarl    _call_protectionhk_main, r31
+
+$ifdef CFG_USE_PROTECTIONHOOK
+	mov     sp, ep
+
+	;/* v850_cpu_exp_noãå¾©å¸° */
+	Lea     _v850_cpu_exp_no, r12
+	sld.w   8[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_pcãå¾©å¸° */
+	Lea     _v850_cpu_exp_pc, r12
+	sld.w   4[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_spéé¿ */
+	Lea     _v850_cpu_exp_sp, r12
+	sld.w   0[ep], r13
+	st.w    r13, 0[r12]
+
+	;/* v850_cpu_exp_*ãéé¿ããã¹ãã¼ã¹ãæ»ã */
+	addi    12, sp, sp
+$endif ;/* CFG_USE_PROTECTIONHOOK */
+
+ei_ret_exc:
+	LOCK_ALL_INT
+
+	;/*
+	 ;* ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å®è¡ãã
+	 ;*/
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 ;*/
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.w    r13, 0[r12]
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 ;*/
+	;/*
+	 ;* ISR1å®è¡ç¶æ
+ã§çºçããå ´åã¯
+	 ;* (1)ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ããããªã
+	 ;* (2)OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ãããªã
+	;*/
+	GET_ISPR r6
+	Lea     _pmr_isr1_mask, r7
+	ld.h    0[r7], r7
+	and     r7, r6
+	cmp     r0, r6
+	bne     ei_ret_exc_2
+
+	;/*
+	 ;*  ãã¹ãåæ°ã1ä»¥ä¸ãªãå²è¾¼ã¿å
+ãISRãªããä¾å¤çºçå
+ã¸å¾©å¸°
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ãããªã
+	 ;*/
+	cmp     r0, r13
+	bne     ei_ret_exc_1
+
+	;/*
+	 ;*  æ»ãå
+ãã¿ã¹ã¯ãªããã¹ã¿ãã¯ãæ»ã
+	 ;*/
+	ld.w    0[sp], sp
+
+ei_ret_exc_1:
+	;/*
+	 ;*  ISR1å®è¡ç¶æ
+ä»¥å¤ã§çºçããå ´åï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤
+	 ;*/
+	Lea     _nested_lock_os_int_cnt, r12
+	ld.b    0[r12], r13
+	mov     -1, r14
+	add     r14, r13
+	st.b    r13, 0[r12]
+	cmp     r0, r13
+	bne     ei_ret_exc_2
+
+	;/* OSå²è¾¼ã¿ãè§£é¤ */
+	;/* pmr_setting_tbl[current_iintpri] -> PMR */
+	Lea     _current_iintpri, r12
+	ld.bu   0[r12], r12
+	shl     1, r12
+
+	Lea     _pmr_setting_tbl, r13
+	add     r12, r13
+	ld.h    0[r13], r13
+	SET_PMR r13, r12             ;/* set interrupt level */
+
+	;/*
+	 ;*  ä¾å¤çºçå
+ã¸å¾©å¸°
+	 ;*/
+ei_ret_exc_2:
+	;/*
+	 ;* ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 ;*/
+	mov     sp, ep
+	sld.w    4[ep], r10
+	ldsr    r10, eipc
+	sld.w   0[ep], r10
+	ldsr    r10, eipsw
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®å¾©å¸° */
+    INT_EXC_RESTOREREG
+
+	stsr    eipsw, r2   ;/* r2 = eipsw */
+    shl     PSW_SV, r2  ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_ei_exception    ;/* ç¹æ¨©ããã®ä¾å¤ãªãã°ã¹ã­ãã */
+ei_exception_to_utask:
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp         ;/* uspãå¾©å¸° */
+return_from_ei_exception:
+    stsr    eiwr, r2
+	eiret
+
+	;/*
+	 ;*  ã«ã¼ãã«èµ·åãã¦ããªãå ´åã«èµ·ããCPUä¾å¤ã®ç¡éã«ã¼ã
+	 ;*/
+infinity_loop:
+	br infinity_loop
+
+	;/*
+	 ;*  å²ãè¾¼ã¿ã¨ã³ããª
+	 ;*  V850E2
+	 ;*   ãã¯ã¿ã¼ãã¼ãã«ãã Os_Lcfg.c ã«çæãããåå²è¾¼ã¿ã®å²è¾¼ã¿ã¨ã³ããª
+	 ;*   ããã¸ã£ã³ããï¼r2ã«å²è¾¼ã¿çªå·ãä¿å­ãããç¶æ
+ã§å®è¡ããã
+	 ;*  V850E3V5
+	 ;*   ãã¯ã¿ã¼ãã¼ãã«ããç´æ¥å®è¡ãããããï¼ã¹ã¿ãã¯ã®ç¢ºä¿ãã¬ã¸ã¹ã¿ã®ä¿å­ã¯
+	 ;*   ç¹ã«è¡ããã¦ããªãç¶æ
+ã§å®è¡ããã
+	 ;*/
+	.extern _interrupt
+_interrupt:
+	;/* å²è¾¼ã¿/ä¾å¤ã®å
+é ­ã§å®è¡ããå¦ç */
+	PRE_INT_EXC
+
+$ifdef __v850e3v5__
+    ldsr    r2, eiwr
+$endif ;/* __v850e3v5__ */
+	;/*
+	 ;*  æ®ãã®ã¬ã¸ã¹ã¿éé¿ï¼ EPã§ã®ã¢ã¯ã»ã¹ã«åãæ¿ãã¦è¡ã
+     ;* ããã§ï¼CY = EIPSW.IMPï¼r2[31:16] = intno
+     ;*  r2ã¯OSå´ã§äºç´ããï¼å²è¾¼ã¿ã»ä¾å¤ã®åºå
+¥å£ã®
+     ;*  ã¯ã¼ã¯ã¬ã¸ã¹ã¿ã¨ãã¦ä½¿ç¨ããï¼ããï¼
+     ;*  ã¹ã¿ãã¯ã«ä¿å­ããªã
+	 ;*/
+    stsr    eipsw, r2
+    shl     PSW_SV, r2              ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     interrupt_0             ;/* ç¹æ¨©ããã®å²è¾¼ã¿ãªãã°ã¹ã­ãã */
+    ;/*
+     ;*  ã¦ã¼ã¶ã¿ã¹ã¯ã¸ã®å²è¾¼ã¿
+     ;*/
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    st.w    sp, TCB_usp[r2]         ;/* uspãä¿å­ */
+    ld.w    TCB_p_tinib[r2], r2
+    ld.w    TINIB_sstk_bottom[r2], sp         ;/* sspãå¾©å¸° */
+interrupt_0:
+$ifdef __v850e3v5__
+	;/* å²è¾¼ã¿è¦å ã®ç¹å® */
+	stsr	eiic,   r2
+	;/* EICå²è¾¼ã¿ã¯0x1000 ãã */
+	addi   -0x1000, r2, r2
+$endif ;/* __v850e3v5__ */
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ä¿å­ */
+    INT_EXC_SAVEREG
+
+	;/* å¤éå²è¾¼ã¿ã®ããï¼ç¾å¨ã®EIPCã¨EIPSWãä¿å­ */
+	stsr    eipc, r6
+	sst.w   r6, 4[ep]
+	stsr    eipsw, r6
+	sst.w   r6, 0[ep]
+
+	mov     r2, r12
+
+	;/* å²è¾¼ã¿åªå
+åº¦ãåå¾(r11) */
+	GET_ISPR r13
+	sch1r	r13, r11   
+	add		-1,r11
+
+	;/* 
+	 ;*  _current_iintpri ã®æ´æ° 
+	 ;*  å²ãè¾¼ã¿å¦çä¸­ã¯ISPRãèªåçã«è¨­å®ããã¦ããããï¼PMRã¯è¨­å®ããå¿
+è¦ããªãï¼
+	 ;*/
+	Lea     _current_iintpri, r6
+	ld.bu   0[r6], r19
+	st.b    r11,0[r6]
+
+	;/*
+	 ;*  å¤éå²è¾¼ã¿ãå¤å®
+	 ;*/
+	Lea     _except_nest_cnt, r13
+	ld.w    0[r13], r6
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ã¤ã³ã¯ãªã¡ã³ã
+	 ;*/
+	add     1,  r6
+	st.w    r6, 0[r13]
+	cmp     1,  r6
+	bne     interrupt_1     ;/* ãã¹ããã¦ããå ´åã¯ã¹ã¿ãã¯åæ¿ç¡ã */
+
+	;/*
+	 ;*  ã¿ã¹ã¯ã«å²è¾¼ãã å ´å
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã
+	 ;*/
+	mov     sp , r13
+	Lea     __ostkpt, sp
+	ld.w    0[r3], r3
+	add     -4, sp
+	st.w    r13, 0[sp]
+
+interrupt_1:
+    ;/*
+     ;*  å²è¾¼ã¿çºçæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã¹ã¿ãã¯ã«ä¿å­
+     ;*/
+    add     -4, sp
+    st.w    r19, 0[sp]
+
+	UNLOCK_ALL_INT
+
+$ifdef CFG_USE_STACKMONITORING
+    ;/* 
+     ;*  å²è¾¼ã¿çªå·ã®ä¿å­
+     ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼ã®ãã­ãã¯ã·ã§ã³ããã¯ã§ç ´å£ãããå¯è½æ§ããã
+     ;*/
+    push    r12 
+	;/*
+	 ;*  ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*/
+
+	;/*
+	 ;* å¤éå²è¾¼ã¿ã®å ´åã¯ã¿ã¹ã¯ã¹ã¿ãã¯ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ãè¡ããªã
+	 ;*/
+	cmp     1,  r6
+	bne     int_nested
+
+	;/*
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     _p_runtsk, r6                   ;/* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             ;/* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    ;/* =begin modified for SC3 */
+    ;/* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     r0, r9
+	cmp     r6, r13                         ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     stack_monitoring_exit, lp     
+    ;/* =end modified for SC3 */
+	bnh      stack_monitoring_error_isr
+
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+    ld.w    0[r6], r6
+    mov     STACK_MAGIC_NUMBER, r7
+	;/*
+	 ;*  ãã¸ãã¯ãã³ãã¼æªç ´å£ãªãï¼å²è¾¼ã¿å¦çã«é£ã¶
+	 ;*  ã¿ã¹ã¯ã«å²è¾¼ãã å ´åï¼å²è¾¼ã¿ã¹ã¿ãã¯ããã§ãã¯ããªã
+	 ;*/
+	cmp     r7, r6
+	be      stack_monitoring_exit
+    ;/* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    ;/* =end modified for SC3 */
+	br      stack_monitoring_error_isr
+
+	;/* 
+	 ;* å¤éå²è¾¼ã¿ã®å ´å 
+	 ;*/
+int_nested:
+	;/*
+	 ;*  å²è¾¼ã¿ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*/
+
+	;/*
+	 ;*  ã¹ã¿ãã¯æ®éãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     _isr_p_isrcb_tbl, r7
+	mov     r12, r11
+	shl     2, r11                          ;/* å²è¾¼ã¿çªå·ã4åãã¦ãªãã»ãããçæ  */
+	add     r11, r7
+    ld.w    0[r7], r7                       ;/* r7 = &isrcb_table[x] */
+    ;/* =begin modified for SC3 */
+	ld.w    ISRCB_p_isrinib[r7], r7         
+	ld.w    ISRINIB_p_intinib[r7], r7
+    mov     1, r9
+    ;/* =end modified for SC3 */
+	ld.w    INTINIB_remain_stksz[r7], r7    ;/* å²è¾¼ã¿çªå·ã«å¯¾å¿ããã¹ã¿ãã¯ãµã¤ãºã®åå¾ */
+	Lea     __ostk, r6                      ;/* å²è¾¼ã¿ã¹ã¿ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	add     r6, r7                          ;/* å
+é ­ã¢ãã¬ã¹ï¼ISRã®ä½¿ç¨ããã¹ã¿ãã¯ãµã¤ãº */
+	cmp     r7, sp                          ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ <= å
+é ­ã¢ãã¬ã¹ï¼ISRã®ä½¿ç¨ããã¹ã¿ãã¯ãµã¤ãºã®å ´åOK  */
+    ;/* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    ;/* =end modified for SC3 */
+	bnh     stack_monitoring_error_isr
+
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+	ld.w    0[r6], r6                       ;/* ãã®ã¢ãã¬ã¹ã®ç¤ºãå
+ã«ãã¸ãã¯ãã³ãã¼ãå
+¥ã£ã¦ãã */
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    ;/* =begin modified for SC3 */
+    Lea     stack_monitoring_exit, lp     
+    ;/* =end modified for SC3 */
+	bne     stack_monitoring_error_isr
+
+stack_monitoring_exit:
+    pop     r12 
+$endif ;/* CFG_USE_STACKMONITORING */
+
+	;/*
+	 ;*  _callevel_stat ä¿å­
+	 ;*/
+	Lea     _callevel_stat, r6
+	ld.h    0[r6], r7
+	Push    r7
+
+	;/*
+	 ;*  _callevel_stat è¨­å®
+	 ;*/
+	mov     TCL_ISR2, r8
+	or      r8, r7
+	st.h    r7, 0[r6]
+
+    ;/* =begin added for SC3 */
+	;/*
+	 ;*  run_trusted ä¿å­
+	 ;*/
+    Lea     _run_trusted, r6
+    ld.b    0[r6], r7
+    Push    r7
+
+	;/*
+	 ;*  run_trusted è¨­å®
+	 ;*/
+	mov     TRUE, r8
+    st.b    r8, 0[r6]
+
+	;/*
+	 ;*  p_runosap ä¿å­
+	 ;*/
+    Lea     _p_runosap, r6
+    ld.w    0[r6], r7
+	Push    r7
+    ;/* =end added for SC3 */
+
+	;/*
+	 ;* p_runisr ä¿å­
+	 ;*/
+	Lea     _p_runisr, r6
+	ld.w    0[r6], r7
+	Push    r7
+
+	;/*
+	 ;* p_runisr è¨­å®
+	 ;*/
+	Lea     _isr_p_isrcb_tbl, r7
+	shl     2, r12                      ;/* å²è¾¼ã¿çªå·ã4åãã¦ãªãã»ãããçæ  */
+	add     r12, r7
+	Lea     _p_runisr, r8
+	ld.w    0[r7], r7
+	st.w    r7, 0[r8]
+
+	;/*
+	 ;*  å²è¾¼ã¿ãã³ãã©ã®ã¢ãã¬ã¹ãèª­ã¿è¾¼ã
+	 ;*/
+	Lea     _isr_tbl, r6
+	add     r12, r6
+
+    ;/* =begin modified for SC3 */
+    ;/*
+     ;*  p_runosap è¨­å®
+     ;*/
+    cmp     r7, r0                      ;/* r7 = p_runisr == NULL ? */
+    be      int_handler_call            ;/* p_runisr ã NULL ã§ãªããã°ã¹ã­ãã */
+    ld.w    ISRCB_p_isrinib[r7], ep     ;/* ep = p_runisr->p_isrinib */
+    sld.w   ISRINIB_p_osapcb[ep], r8    ;/* r8 = p_runisr->p_isrinib->p_osapcb */
+    Lea     _p_runosap, ep
+    sst.w   r8, 0[ep]                   ;/* p_runosap = p_runisr->p_isrinib->p_osapcb */
+
+int_handler_call:
+    ;/* =end modified for SC3 */
+	;/*
+	 ;*  å²è¾¼ã¿ãã³ãã©å¼ã³åºã
+	 ;*/
+	Lea     end_int_handler, r31
+	ld.w    0[r6], r6
+	jmp     [r6]
+
+	;/*
+	 ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼æã®å¦ç
+	 ;*/
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼æãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 ;*  ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã
+     ;*  ISRã®åºå
+¥å£ããç¸å¯¾ã¸ã£ã³ãã§ããããã«ããã«ç½®ã
+     ;*  stack_monitoring_errorã¸ã®è¸ã¿å°
+	 ;*/
+stack_monitoring_error_isr:
+    br  stack_monitoring_error
+$endif ;/* CFG_USE_STACKMONITORING */
+
+end_int_handler:
+
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  å²è¾¼ã¿ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*  å²è¾¼ã¿ããæ»ã£ãæï¼ã¹ã¿ãã¯ãã¤ã³ã¿ãæ»ã£ãã¯ããªã®ã§ï¼
+	 ;*  ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼ã®ã¿å®æ½
+	 ;*/
+
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     __ostk, r6                       ;/* å²è¾¼ã¿ã¹ã¿ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    0[r6], r6                       ;/* ãã®ã¢ãã¬ã¹ã®ç¤ºãå
+ã«ãã¸ãã¯ãã³ãã¼ãå
+¥ã£ã¦ãã */
+    ;/* =begin modified for SC3 */
+    mov     1, r9
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    Lea     stack_monitoring_exit2, lp     
+	bne     stack_monitoring_error_isr
+
+stack_monitoring_exit2:
+    ;/* =end modified for SC3 */
+$endif ;/* CFG_USE_STACKMONITORING */
+
+	;/*
+	 ;* ISR2ã®ä¸æ­£çµäºãã§ãã¯
+	 ;*/
+	jarl    _exit_isr2, r31
+
+	;/*
+	 ;* p_runisr ã®å¾©å¸°
+	 ;*/
+	Lea     _p_runisr, r7
+	Pop     r6
+	st.w    r6, 0[r7]
+
+    ;/* =begin modified for SC3 */
+	;/*
+	 ;*  p_runosap å¾©å¸°
+	 ;*/
+    Lea     _p_runosap, r7
+	Pop     r6
+    st.w    r6, 0[r7]
+
+	;/*
+	 ;*  run_trusted å¾©å¸°
+	 ;*/
+    Lea     _run_trusted, r7
+	Pop     r6
+    st.b    r6, 0[r7]
+    ;/* =end modified for SC3 */
+
+
+	;/*
+	 ;* _callevel_stat ã®å¾©å¸°
+	 ;*/
+	Lea     _callevel_stat, r7
+	Pop     r6
+	st.h    r6, 0[r7]
+
+;/*
+ ;*  å²è¾¼ã¿ãã³ãã©åºå£å¦ç
+ ;*/
+ret_int:
+	;/*
+	 ;* _except_nest_cntã®æä½ã¨ã¹ã¿ãã¯åãæ¿ãã®éã¯OSå²è¾¼ã¿ç¦æ­¢ã«ãã
+	 ;* å¿
+è¦ããã
+	 ;* ãã®å
+ï¼å²è¾¼ã¿å
+ã¸ã®ãªã¿ã¼ã³ãï¼é
+å»¶ãã£ã¹ãããã«åå²ããï¼
+	 ;* å²è¾¼ã¿å
+ã¸ã®ãªã¿ã¼ã³ã«ã¯å
+¨å²è¾¼ã¿ãå¿
+è¦ã§ããï¼é
+å»¶ãã£ã¹ãããæã«ã¯
+	 ;* ãã¹ãç®¡çã®OSå²è¾¼ã¿ç¦æ­¢ã«ããå¿
+è¦ãããããï¼ããã§ã¯ä¸æ¦å
+¨å²è¾¼ã¿ç¦
+	 ;* æ­¢ã¨ãã
+	 ;*/
+
+	LOCK_ALL_INT
+
+    ;/*
+     ;*  å²è¾¼ã¿çºçæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãã¹ã¿ãã¯ããå¾©å¸°
+     ;*/
+    ld.w    0[sp], r19
+    add     4, sp
+	Lea     _current_iintpri, r6
+	st.b    r19, 0[r6]              ;/* current_iintpriãå¾©å¸° */
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ã®ãã¯ãªã¡ã³ã
+	 ;*/
+	Lea     _except_nest_cnt, r6
+	ld.w    0[r6], r7
+	add     -1, r7
+	st.w    r7, 0[r6]
+
+	;/*
+	 ;*  ãã¹ãåæ°ã0ãªãï¼å²è¾¼ã¿å
+ãã¿ã¹ã¯
+	 ;*/
+	cmp     r0, r7
+	be      ret_int_task
+
+	;/*
+	 ;*  ISR2å²è¾¼ã¿ããã®ãªã¿ã¼ã³æã¯å²è¾¼ã¿å
+ã
+	 ;*  ISR2ã§ãããããã®ã¾ã¾ãªã¿ã¼ã³
+	 ;*/
+	br      ret_int_1
+
+
+	;/*
+	 ;*  å²è¾¼ã¿å
+ãã¿ã¹ã¯ã®å ´å
+	 ;*/
+ret_int_task:
+	ld.w    0[sp], sp                       ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ãæ»ã     */
+
+	;/*  
+     ;*  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå¤ããAPIããªãããï¼
+     ;*  ATK2ã§ã¯å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¾©å¸°å¦çã¯ä¸è¦
+     ;*/
+	;/*
+	 ;*  å²è¾¼ã¿ãã³ãã©å®è¡æã«ã¯ï¼ISPRã§åªå
+åº¦ãèªåçã«ä¸ããããï¼
+	 ;*  PMRã¯å¤æ´ãã¦ããªããï¼å²ãè¾¼ã¿ãã³ãã©å
+ã§ x_nested_unlock_os_int() ã
+	 ;*  å¼ã³åºãã¨PMRãæ¸ãæããï¼ãã£ã¹ããããå¿
+è¦ã§ãªãå ´åã¯ï¼ret_int_1ã§
+	 ;*  PMRãå
+ã®å¤ã«æ»ãï¼ãã£ã¹ããããå¿
+è¦ãªå ´åã¯ï¼OSå²ãè¾¼ã¿ç¦æ­¢ã¨ããããï¼
+	 ;*  ããã§ï¼PMRãæ´æ°ããå¿
+è¦ã¯ãªãï¼
+	 ;*/
+
+	;/*
+	 ;*  æ»ãå
+ãã¿ã¹ã¯ã®å ´åï¼ãã£ã¹ãããã®å¿
+è¦ãããããã§ãã¯
+	 ;*/
+	Lea     _p_runtsk, r6
+	ld.w    0[r6], r6
+	Lea     _p_schedtsk, r7
+	ld.w    0[r7], r7
+	cmp     r6, r7
+	be      ret_int_1      ;/* ãã£ã¹ãããã®å¿
+è¦ããªããã°å²è¾¼ã¿å
+ã¸æ»ã */
+
+	;/*
+	 ;*  ããã§ã¯ï¼æ»ãå
+ãã¿ã¹ã¯ã§ããï¼ã¹ã¿ãã¯ã¯ï¼ã¿ã¹ã¯ã¹ã¿ãã¯ã«
+	 ;*  ã¹ã¯ã©ããã¬ã¸ã¹ã¿ã®ã¿ãä¿å­ãããç¶æ
+ã«ãªã£ã¦ããï¼ã¾ãï¼
+	 ;*  å
+¨å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+ã¨ãªã£ã¦ãã
+	 ;*/
+
+	;/* 
+	 ;*  åªå
+åº¦ãã¹ã¯ã®ã¯ãªã¢ 
+	 ;*  eiretãå®è¡ããªãããï¼eiretã«ããå²è¾¼ã¿ã³ã³ãã­ã¼ã©ã®åªå
+åº¦ãã¹ã¯
+	 ;*  (ã¤ã³ãµã¼ãã¹ãã©ã¤ãªãªãã£)ã®ã¯ãªã¢ãè¡ãããªãããï¼ä»£ããã«ISPC
+	 ;*  ãç¨ãã¦ã¯ãªã¢ããï¼
+	 ;*/
+	CLEAR_ISPR r10, r12
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ç§»è¡ãã
+	 ;*
+	 ;*  ãã®æç¹ã§OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ããã®ã¯ï¼dispatcherãå®è¡ããéã«
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãªã£ã¦ããå¿
+è¦ãããããã§ãã
+	 ;*
+	 ;*  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼ISR1ä»¥å¤ã®å²è¾¼ã¿ã¯å
+¨ã¦ç¦æ­¢ãã
+	 ;*/
+
+	OUTER_LOCK_OS_INT r12, r13
+	;/* ret_int ã§å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ããããè§£é¤ */
+	UNLOCK_ALL_INT
+
+	;/*
+	 ;* ã³ã³ãã­ã¹ãã®éé¿ 
+	 ;*/
+$ifndef TOPPERS_USE_PUSHSP
+	addi    -40, sp, sp
+	mov     sp, ep
+	sst.w   r20, 36[ep]
+	sst.w   r21, 32[ep]
+	sst.w   r22, 28[ep]
+	sst.w   r23, 24[ep]
+	sst.w   r24, 20[ep]
+	sst.w   r25, 16[ep]
+	sst.w   r26, 12[ep]
+	sst.w   r27, 8[ep]
+	sst.w   r28, 4[ep]
+	sst.w   r29, 0[ep]
+$else ;/* TOPPERS_USE_PUSHSP */
+	pushsp  r20-r29
+$endif ;/* TOPPERS_USE_PUSHSP */
+
+	;/* ã¹ã¿ãã¯ã¨æ¬¡ã®èµ·åçªå°ãä¿å­ */
+	Lea     _p_runtsk, ep
+	sld.w   0[ep], ep
+    ;/* =begin modified for SC3 */
+	sst.w   sp, TCB_ssp[ep]
+    ;/* =end modified for SC3 */
+	Lea     ret_int_r, r6
+	sst.w   r6, TCB_pc[ep]
+	br      dispatcher
+
+	;/*
+	 ;*  å²è¾¼ã¿ã»ä¾å¤ã§ã³ã³ãã­ã¹ãä¿å­ããå ´åã®å¾©å¸°ã«ã¼ãã³
+	 ;*/
+ret_int_r:
+	;/*
+	 ;* ã³ã³ãã­ã¹ãã®å¾©å¸°
+	 ;*/
+$ifndef TOPPERS_USE_PUSHSP
+	mov     sp, ep
+	sld.w   36[ep], r20
+	sld.w   32[ep], r21
+	sld.w   28[ep], r22
+	sld.w   24[ep], r23
+	sld.w   20[ep], r24
+	sld.w   16[ep], r25
+	sld.w   12[ep], r26
+	sld.w   8[ep], r27
+	sld.w   4[ep], r28
+	sld.w   0[ep], r29
+	addi    40, ep, sp
+$else ;/* TOPPERS_USE_PUSHSP */
+	popsp   r20-r29
+$endif ;/* TOPPERS_USE_PUSHSP */
+
+	LOCK_ALL_INT
+
+	OUTER_UNLOCK_OS_INT r12, r13
+	;/*
+	 ;*  å²è¾¼ã¿ããã®å¾©å¸°ã«ã¼ãã³
+	 ;*/
+ret_int_1:
+	;/*
+	 ;* ã¬ã¸ã¹ã¿ãå¾©å¸°
+	 ;*/
+	mov     sp, ep
+
+	;/*  
+     ;*  å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãå¤ããAPIããªãããï¼
+     ;*  ATK2ã§ã¯å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®å¾©å¸°å¦çã¯ä¸è¦
+     ;*/
+	;/*
+	 ;*  PMRãå
+ã«æ»ãï¼
+	 ;*  å²è¾¼ã¿ãã³ãã©å®è¡æã«ã¯ï¼ISPRã§åªå
+åº¦ãèªåçã«ä¸ããããï¼
+	 ;*  PMRã¯å¤æ´ãã¦ããªããï¼å²ãè¾¼ã¿ãã³ãã©å
+ã§ x_nested_unlock_os_int() ã
+	 ;*  å¼ã³åºãã¨PMRãæ¸ãæããããããã§å
+ã®å¤ã«æ»ãï¼
+	 ;*  OUTER_UNLOCK_OS_INT ã¯ nested_lock_os_int_cnt ã0ã«ãããï¼
+	 ;*  ããã§ã¯æ¢ã«0ã§ããããåé¡ãªãï¼
+	 ;*/
+	OUTER_UNLOCK_OS_INT  r1, r6
+	sld.w    4[ep], r10
+	ldsr    r10, eipc
+	sld.w   0[ep], r10
+	ldsr    r10, eipsw
+
+    ;/* ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãå¾©å¸° */
+    INT_EXC_RESTOREREG
+
+	stsr    eipsw, r2           ;/* r2 = eipsw */
+    shl     PSW_SV, r2          ;/* r2 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     return_from_int     ;/* ç¹æ¨©ããã®å²è¾¼ã¿ãªãã°ã¹ã­ãã */
+int_to_utask:
+    Lea     _p_runtsk, r2
+    ld.w    0[r2], r2
+    ld.w    TCB_usp[r2], sp     ;/* uspãå¾©å¸° */
+return_from_int:
+    stsr    eiwr, r2
+	eiret
+
+;/*
+ ;* ã¿ã¹ã¯ãã£ã¹ããã
+ ;*/
+	.extern _dispatch
+_dispatch:
+	;/*
+	 ;*  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã»ãã£ã¹ããã
+	 ;*  è¨±å¯ç¶æ
+ã»ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºã
+	 ;*  ãã
+	 ;*/
+$ifndef TOPPERS_USE_PUSHSP
+	addi    -48, sp, sp
+	st.w    ep,  0[sp]
+	mov     sp,  ep
+	sst.w   r20, 44[ep]
+	sst.w   r21, 40[ep]
+	sst.w   r22, 36[ep]
+	sst.w   r23, 32[ep]
+	sst.w   r24, 28[ep]
+	sst.w   r25, 24[ep]
+	sst.w   r26, 20[ep]
+	sst.w   r27, 16[ep]
+	sst.w   r28, 12[ep]
+	sst.w   r29, 8[ep]
+	sst.w   r31, 4[ep]
+$else ;/* TOPPERS_USE_PUSHSP */
+	pushsp  r20-r31
+$endif ;/* TOPPERS_USE_PUSHSP */
+	;/* ã¹ã¿ãã¯ã¨æ¬¡ã®èµ·åçªå°ãä¿å­ */
+	Lea     _p_runtsk, ep
+	sld.w   0[ep], ep
+    ;/* =begin modified for SC3 */
+	sst.w   sp, TCB_ssp[ep]
+    ;/* =end modified for SC3 */
+	Lea     dispatch_r, r10
+	sst.w   r10, TCB_pc[ep]
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  å®è¡ä¸­ã¿ã¹ã¯ã®ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*/
+	;/*
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     _p_runtsk, r6                   ;/* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             ;/* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    ;/* =begin modified for SC3 */
+    ;/* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     1, r9
+	cmp     r6, sp                          ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     dispatcher, lp
+    ;/* =end modified for SC3 */
+	bnh      stack_monitoring_error
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+	ld.w    0[r6], r6
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    ;/* =begin modified for SC3 */
+    Lea     dispatcher, lp
+    ;/* =end modified for SC3 */
+	bne     stack_monitoring_error
+$endif ;/* CFG_USE_STACKMONITORING */
+	br      dispatcher
+
+	;/* 
+	 ;* ãã£ã¹ãããã£ã®å¾©å¸°ã«ã¼ãã³ 
+	 ;*/
+dispatch_r:
+$ifndef TOPPERS_USE_PUSHSP
+	mov     sp, ep
+	sld.w   44[ep], r20
+	sld.w   40[ep], r21
+	sld.w   36[ep], r22
+	sld.w   32[ep], r23
+	sld.w   28[ep], r24
+	sld.w   24[ep], r25
+	sld.w   20[ep], r26
+	sld.w   16[ep], r27
+	sld.w   12[ep], r28
+	sld.w    8[ep], r29
+	sld.w    4[ep], r31
+	addi    48, ep, sp
+	ld.w    0[sp], ep
+$else ;/* TOPPERS_USE_PUSHSP */
+	popsp   r20-r31
+$endif ;/* TOPPERS_USE_PUSHSP */
+	jmp     [lp]
+
+	;/*
+	 ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼æã®å¦ç
+	 ;*/
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  ã¹ã¿ãã¯ãªã¼ããã­ã¼æãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã
+	 ;*  ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã
+     ;*  r9 = ostkptã®åæå¤ã«åãæ¿ããã?
+	 ;*/
+stack_monitoring_error:
+	;/*
+	 ;*  r9==0ã®å ´åã§ãï¼æ¢ã«_ostkptãä½¿ã£ã¦ããã®ã§ï¼
+	 ;*  except_nest_cntãã¤ã³ã¯ãªã¡ã³ããã¦ãåé¡ã¯ãªã
+	 ;*/
+	Lea     _except_nest_cnt, r12               ;/* _ostkptãä½¿ãå ´åã¯except_nest_cntãã¤ã³ã¯ãªã¡ã³ããã */
+	ld.w    0[r12], r13
+	add     1, r13
+	st.w    r13, 0[r12]
+
+    ;/* =begin modified for SC3 */
+    cmp     r0, r9
+    be      stack_monitoring_error_1
+    ;/* =end modified for SC3 */
+
+	Lea    __ostkpt, r12                        ;/* ã¹ã¿ãã¯ãæ´ã«å£ããªãããï¼å²è¾¼ã¿ã¹ã¿ãã¯ã®åæå¤ãä½¿ç¨ãã */
+	ld.w    0[r12], r12
+	mov     r12, sp
+
+    ;/* =begin modified for SC3 */
+stack_monitoring_error_1:
+	;/*
+	 ;*  ãã­ãã¯ã·ã§ã³ããã¯ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºã
+	 ;*/
+	NESTED_LOCK_OS_INT r12, r13
+    ;/* =end modified for SC3 */
+
+	mov     E_OS_STACKFAULT, r6                 ;/* ãã­ãã¯ã·ã§ã³ããã¯ã®å¼æ°ãè¨­å® */
+    ;/* =begin modified for SC3 */
+ 	Lea     _pre_protection_supervised, r12
+    mov     0x01, r13
+ 	st.b    r13, 0[r12]     ;/* pre_protection_supervised = 0x01 */
+	jr      _call_protectionhk_main        ;/* ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºã */
+    ;/* ããã«ã¯æ¥ãªã */
+stack_monitoring_error_loop:
+    jr   stack_monitoring_error_loop
+    ;/* =end modified for SC3 */
+$endif ;/* CFG_USE_STACKMONITORING */
+
+
+;/*
+ ;*  ãã£ã¹ãããã£ã®åä½éå§
+ ;*/
+	.extern _start_dispatch
+_start_dispatch:
+	;/*
+	 ;*  ãã®ã«ã¼ãã³ã¯ï¼ã«ã¼ãã«èµ·åæã«ï¼ãã¹ã¦ã®å²è¾¼ã¿ãç¦æ­¢ããç¶æ
+
+	 ;* ï¼å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨åç­ï¼ã§å¼ã³åºãããï¼ã¾ãï¼å²è¾¼ã¿ã¢ã¼ãï¼é
+	 ;*  ã¿ã¹ã¯ã³ã³ãã­ã¹ãã¨åç­ï¼ã§å¼ã³åºããããã¨ãæ³å®ãã¦ãã
+	 ;*
+	 ;*  dispatcherã¯ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã³åºãï¼
+	 ;*/
+	;/* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ */
+	OUTER_LOCK_OS_INT r12, r13
+	;/* å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸ */
+	UNLOCK_ALL_INT
+	br    dispatcher_0
+
+    ;/* =begin modified for SC3 */
+	.extern _exit_and_dispatch_nohook
+	;/*
+	 ;*  ã¿ã¹ã¯å¼·å¶çµäºã®å ´åã¯PostTaskHookãå¼åºããªã
+	 ;*  ãã®å ´åã®ã¨ã³ããªã§ãã
+	 ;*/
+_exit_and_dispatch_nohook:
+
+	br    dispatcher_0
+    ;/* =end modified for SC3 */
+
+	;/*
+	 ;*  ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ããã
+	 ;*/
+	.extern _exit_and_dispatch
+_exit_and_dispatch:
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  å®è¡ä¸­ã®ã¿ã¹ã¯ã¹ã¿ãã¯ã®ãªã¼ããã­ã¼ãã§ãã¯
+	 ;*/
+	;/*
+	 ;*  ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼
+	 ;*/
+	Lea     _p_runtsk, r6                   ;/* ç®¡çãã­ãã¯ã®å
+é ­ã¢ãã¬ã¹åå¾ */
+	ld.w    0[r6], r6
+	ld.w    TCB_p_tinib[r6], r6             ;/* ã¿ã¹ã¯åæåãã­ãã¯å
+é ­ã¢ãã¬ã¹åå¾ */
+    ;/* =begin modified for SC3 */
+    ;/* ã·ã¹ãã ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+	ld.w    TINIB_sstksz[r6], r7            ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºåå¾ */
+	ld.w    TINIB_sstk_bottom[r6], r6       ;/* ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯çµç«¯ã¢ãã¬ã¹åå¾ */
+    sub     r7, r6
+    mov     1, r9
+	cmp     r6, sp                          ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ <= ã¹ã¿ãã¯ã®å
+é ­ã®å ´åNG  */
+    Lea     dispatcher, lp
+    ;/* =end modified for SC3 */
+	bnh      stack_monitoring_error
+	;/*
+	 ;* ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼
+	 ;*/
+	ld.w    0[r6], r6
+	mov     STACK_MAGIC_NUMBER, r7
+	cmp     r7, r6
+    ;/* =begin modified for SC3 */
+    Lea     dispatcher, lp
+    ;/* =end modified for SC3 */
+	bne     stack_monitoring_error
+$endif ;/* CFG_USE_STACKMONITORING */
+	;/* ãã£ã¹ãããã£æ¬ä½ï¼dispatcherï¼ã¸ */
+
+dispatcher:
+	;/*
+	 ;*  PostTaskHookã®å¼ã³åºã
+	 ;*/
+$ifdef CFG_USE_POSTTASKHOOK
+posttaskhook_call:
+	Lea     _call_posttaskhook, r6
+	jarl    _stack_change_and_call_func_1, r31
+$endif ;/* CFG_USE_POSTTASKHOOK */
+
+dispatcher_0:
+	;/*
+	 ;*  ãã®ã«ã¼ãã³ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã»ãã£ã¹ããã
+	 ;*  è¨±å¯ç¶æ
+ã»ï¼ã¢ãã«ä¸ã®ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºã
+	 ;*  ããï¼å®è¡åéçªå°ã¸ããã®ç¶æ
+ã®ã¾ã¾åå²ãã
+	 ;*/
+$ifdef LOG_DSP_ENTER
+	Lea     _p_runtsk, r21
+	ld.w    0[r21], r21
+	cmp     r0, r21
+	be      dispatcher_0_1
+	mov     r21, r6                            ;/* å¼æ°ã«_p_runtskãæå® */
+	jarl    _log_dsp_enter, r31
+dispatcher_0_1:
+$endif	;/* LOG_DSP_ENTER */
+
+	Lea     _callevel_stat, r21
+	ld.h    0[r21], r22
+	mov     TSYS_DISALLINT, r20
+	and     r22, r20
+	be      dispatcher_1
+
+	mov     !TSYS_DISALLINT, r20
+	and     r22, r20
+	st.h    r20, 0[r21]
+	UNLOCK_ALL_INT                             ;/* å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸ */
+
+	;/*
+	 ;*  ä¾å¤ï¼å²è¾¼ã¿/CPUä¾å¤ï¼ã®ãã¹ãåæ°ã¯start_dispatchãï¼dispatcher_3:
+	 ;*  ããæ¥ãå ´åã¯'1'ã¨ãªã£ã¦ããããï¼ã¿ã¹ã¯ã¹ã¿ãã¯ã«åãæãå¾ï¼
+	 ;*  '0'ã«åæåããï¼
+	 ;*/
+dispatcher_1:
+	Lea     _p_runtsk, r21
+	Lea     _p_schedtsk, r20
+	ld.w    0[r20], r22
+	st.w    r22, 0[r21]
+	cmp     r22, r0
+	be      dispatcher_3
+
+	mov     r22, ep 
+    ;/* =begin modified for SC3 */
+	sld.w   TCB_ssp[ep], sp
+    ;/* =end modified for SC3 */
+	Lea     _except_nest_cnt, r20
+	st.w    r0, 0[r20]
+
+    ;/* =begin modified for SC3 */
+    sld.w   TCB_p_tinib[ep], ep
+    mov     ep, r25                     ;/* r25 = p_tinib */
+    sld.w   TINIB_p_osapcb[ep], r26     ;/* r26 = p_osapcb */
+    Lea     _p_runosap, ep              ;/* ep = &p_runosap */
+    sst.w   r26, 0[ep]                  ;/* p_runosap = p_osapcb */
+    ld.w    OSAPCB_p_osapinib[r26], r29 ;/* r29 = p_osapinib */
+    ld.bu   OSAPINIB_osap_trusted[r29], r24 ;/* r24 = trusted? */
+    Lea     _run_trusted, ep
+    sst.b   r24, 0[ep]                      ;/* run_trusted = trusted? */
+    cmp     r0, r24                         ;/* ä¿¡é ¼ãªãã°ã¹ã­ãã */
+    bne     dispatcher_5
+
+$ifdef __v850e2v3__
+    ori     0x1001, r0, r27
+    ldsr    r27, bsel
+    ;/*
+     ;*  ã¦ã¼ã¶ã¹ã¿ãã¯é å
+     ;*/
+    mov     r25, ep
+    sld.w   TINIB_start_ustk[ep], r27   ;/* å
+é ­çªå° */
+    ori     0x01, r27, r27
+    sld.w   TINIB_limit_ustk[ep], r28   ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ori     0x06, r28, r28
+    ldsr    r27, dpa0l
+    ldsr    r28, dpa0u
+$else ;/* defined(__v850e3v5__) */
+    ;/*
+     ;*  ã¦ã¼ã¶ã¹ã¿ãã¯é å
+     ;*/
+    mov     r25, ep
+    sld.w   TINIB_start_ustk[ep], r27   ;/* å
+é ­çªå° */
+    sld.w   TINIB_limit_ustk[ep], r28   ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, 0, 6                   ;/* MPLA0 */
+    ldsr    r28, 1, 6                   ;/* MPUA0 */
+
+$endif ;/* __v850e2v3__ */
+
+   	;/*
+	 ;*  å®è¡ãã¡ã¤ã³ã¨ä¿è­·ãã¡ã¤ã³(MPUã®è¨­å®)ãåããªãã°ï¼
+     ;*  ãã¡ã¤ã³æ¯ã®ã³ã¼ãé åã»ãã¼ã¿é åãMPUã«è¨­å®ãç´ãå¿
+è¦ã¯ãªã
+     ;*/
+    Lea     _p_ctxosap, ep      ;/* ep = &p_ctxosap */	
+    sld.w   0[ep], r27          ;/* r27 = p_ctxosap */
+	cmp     r27, r26            ;/* p_ctxosap == p_runosap ? */
+	be      dispatcher_5        ;/* åããªãdispatcher_5ã¸ */
+    nop
+	sst.w   r26, 0[ep]          ;/* p_ctxosap = p_runosap : ä¿è­·ãã¡ã¤ã³ãåæ¿ã */
+$ifdef __v850e2v3__
+    ldsr    r26, vmtid          ;/* ã¡ã¢ãªä¿è­·éåã¿ã¹ã¯è­å¥å­ãp_runosapã¨ãã */
+    mov     r29, ep             ;/* ep = p_osapinib */
+
+    ;/*
+     ;*  èªä¿è­·ãã¡ã¤ã³å°ç¨ã®romé å
+     ;*/
+    sld.w   OSAPINIB_start_text[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_text[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, ipa0l
+    ldsr    r28, ipa0u
+    ;/*
+     ;*  èªä¿è­·ãã¡ã¤ã³å°ç¨ã®rosdataé å
+     ;*/
+    sld.w   OSAPINIB_start_rosdata[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_rosdata[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, ipa1l
+    ldsr    r28, ipa1u
+    ;/* 
+     ;* èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å
+     ;*/
+    sld.w   OSAPINIB_start_ram[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_ram[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa1l
+    ldsr    r28, dpa1u
+    ;/* 
+     ;* èªä¿è­·ãã¡ã¤ã³å°ç¨ã®RWXé å(sdata)
+     ;*/
+    sld.w   OSAPINIB_start_sram[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_sram[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa2l
+    ldsr    r28, dpa2u
+    ;/*
+     ;* å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å
+     ;*/
+    sld.w   OSAPINIB_start_srpw[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_srpw[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa3l
+    ldsr    r28, dpa3u
+     ;/*
+     ;* å
+±æãªã¼ã/å°ç¨ã©ã¤ãé åã®å°ç¨é å(sdata)
+     ;*/
+    sld.w   OSAPINIB_start_ssrpw[ep], r27  ;/* å
+é ­çªå° */
+    sld.w   OSAPINIB_limit_ssrpw[ep], r28  ;/* ä¿è­·å±æ§ã¨ãµã¤ãº */
+    ldsr    r27, dpa4l
+    ldsr    r28, dpa4u
+
+$else ;/* defined(__v850e3v5__) */
+    ;/*
+     ;* reg1: p_osapinib
+     ;* reg2: tmp1
+     ;* reg3: tmp2
+     ;* reg4: tmp3
+     ;* reg5: tmp4
+     ;* reg6: tmp5
+     ;*/
+    DISPATCHER_MPU_SETTING r29, r24, r25, r26, r27, r28
+$endif ;/* __v850e2v3__ */
+
+dispatcher_5:
+$ifdef __v850e2v3__
+    ldsr    r0, bsel    ;/* bselãæ»ã */
+$endif ;/* __v850e2v3__ */
+    ;/* =end modified for SC3 */
+
+$ifdef LOG_DSP_LEAVE
+	ld.w    0[r21], r6                          ;/* å¼æ°ã«_p_runtskãæå® */
+	jarl    _log_dsp_leave, r31
+$endif	;/* LOG_DSP_LEAVE */
+
+$ifdef CFG_USE_PRETASKHOOK
+pretaskhook_call:
+	Lea     _call_pretaskhook, r6
+	jarl    _stack_change_and_call_func_1, r31
+$endif ;/* CFG_USE_PRETASKHOOK */
+
+dispatcher_2:
+	Lea     _p_runtsk, r20
+	ld.w    0[r20], r22
+	mov     r22, ep
+	sld.w   TCB_pc[ep], r31
+	jmp     [r31]
+
+dispatcher_3:
+	;/*
+	 ;* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®è§£é¤ã¨ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãå®è¡ç¶æ
+ã¸ã®
+	 ;* æºåããã
+	 ;*
+	 ;*  ããã§éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæ¿ããï¼spï¼éã¿ã¹ã¯ã³ã³ãã­ã¹
+	 ;*  ãç¨ã¹ã¿ãã¯ãã¤ã³ã¿ï¼except_nest_cntï¼1)ã®ã¯ï¼OSå²è¾¼ã¿ç¦æ­¢è§£
+	 ;*  é¤å¾ã«çºçããå²è¾¼ã¿å¦çã«ã©ã®ã¹ã¿ãã¯ãä½¿ããã¨ããåé¡ã®è§£æ±º
+	 ;*  ã¨ï¼å²è¾¼ã¿ãã³ãã©å
+ã§ã®ã¿ã¹ã¯ãã£ã¹ãããã®é²æ­¢ã¨ãã2ã¤ã®æ
+	 ;*  å³ããã
+	 ;*/
+	Lea     __ostkpt, r20		;/* éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã®èª­ã¿è¾¼ã¿ã¹ã¿ãã¯ãã¤ã³ã¿ã®å
+¥ãæ¿ã */
+	ld.w    0[r20], r3
+
+	Lea     _except_nest_cnt, r20
+	mov     1, r21
+	st.w    r21, 0[r20]
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸
+	 ;*  å²è¾¼ã¿ãè¨±å¯ãï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãå®è¡ç¶æ
+ã¨ãå²è¾¼ã¿ãå¾
+ã¤
+	 ;*
+	 ;*  ãã­ã»ããµãå²è¾¼ã¿å¾
+ã¡ã«ç§»è¡ãããå¦çã¨ï¼å²è¾¼ã¿è¨±å¯ã¨ã¯ï¼ä¸å¯
+	 ;*  åã«è¡ãªãå¿
+è¦ããã
+	 ;*  ãããä¸å¯åã«è¡ãªããªãå ´åï¼å²è¾¼ã¿ãè¨±å¯ããç´å¾ã«å²è¾¼
+	 ;*  ã¿ãå
+¥ãï¼ãã®ä¸­ã§ã¿ã¹ã¯ãå®è¡å¯è½ç¶æ
+ã«ãªãã¨ï¼å®è¡ãã¹ãã¿ã¹
+	 ;*  ã¯ãããã«ãããããããã­ã»ããµãå²è¾¼ã¿å¾
+ã¡ã«ãªã£ã¦ãã¾ãï¼
+	 ;*  ä¸å¯åã«è¡ãããï¼diã«ããã³ã¢ã§ã®å²ãè¾¼ã¿ãç¦æ­¢ããç¶æ
+ã§ï¼
+	 ;*  INTCã®å²ãè¾¼ã¿åªå
+åº¦ãã¹ã¯ãä¸ãã¦ããhaltãå¼ã³åºãï¼
+	 ;*  å²ãè¾¼ã¿ãçºçããå ´åã¯ï¼haltããå¾©å¸°ãã¦æ¬¡ã®eiã§ãã¯ã¿ã«
+	 ;*  ã¸ã£ã³ãããï¼
+	 ;*
+	 ;*  å²è¾¼ã¿å¾
+ã¡ã®éã¯ï¼p_runtskãNULLï¼ï¼0ï¼ã«è¨­å®ããªããã°ãªããªã
+	 ;*  ãã®ããã«è¨­å®ããªãã¨ï¼å²è¾¼ã¿ãã³ãã©ããGetTaskIDãå¼ã³åº
+	 ;*  ããéã®åä½ãä»æ§ã«åè´ããªããªã
+	 ;*/
+
+	di
+	OUTER_UNLOCK_OS_INT r12, r13
+
+#if 0
+	nop
+	nop
+	nop
+	nop
+$else
+	halt
+$endif
+	ei
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸
+	 ;*  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼ISR1ä»¥å¤ã®å²è¾¼ã¿ã¯å
+¨ã¦ç¦æ­¢ãã
+	 ;*  ã¹ã¿ãã¯ã¯éã¿ã¹ã¯ã³ã³ãã­ã¹ãã®ã¹ã¿ãã¯ãä½¿ç¨ãã¦ããããï¼_except_nest_cntã¯ï¼
+	 ;*  '1'ã®ã¾ã¾ã¨ãã
+	 ;*/
+	OUTER_LOCK_OS_INT r12, r13
+	br      dispatcher_1
+
+
+;/*
+ ;*  ã¿ã¹ã¯éå§æå¦ç
+ ;*
+ ;*  dispatcherããå¼ã³åºããã
+ ;*/
+    ;/* =begin modified for SC3 */
+	.extern _start_stask_r
+_start_stask_r:
+    Lea		_p_runtsk, ep                   ;/* ep = p_runtsk */
+	sld.w	0[ep], ep
+	;/*
+	 ;*  ã¿ã¹ã¯ãä¸æ­£çµäºããå ´åã¯ä¿è­·å¦çãè¡ããã
+	 ;*  æ»ãã¢ãã¬ã¹ã«exit_taskãè¨­å®
+	 ;*/
+	Lea     __kernel_exit_task, r31
+    mov     r0, r6
+    br      _start_r
+
+	.extern _start_utask_r
+_start_utask_r:
+$ifndef __v850e3v5__
+    ldsr    r0, bsel
+$endif
+    Lea		_p_runtsk, ep                   ;/* ep = p_runtsk */
+	sld.w	0[ep], ep
+    clr1    0, TCB_priv_mode[ep]            ;/* ç¹æ¨©ã¢ã¼ãå®è¡ãæãã */
+    sld.w   TCB_p_tinib[ep], r20            ;/* ep = p_runtsk->p_tinib */
+    ld.w    TINIB_ustk_bottom[r20], r20     ;/* r20 = ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ */
+    mov     r20, sp
+	;/*
+	 ;*  ã¿ã¹ã¯ãä¸æ­£çµäºããå ´åã¯ä¿è­·å¦çãè¡ããã
+	 ;*  æ»ãã¢ãã¬ã¹ã«exit_utaskãè¨­å®
+	 ;*/
+    Lea     _exit_utask, lp                 ;/* lp = _exit_utask */
+    stsr    psw, r10
+
+    ;/* 
+     ;*  å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸
+     ;*  ã¿ã¹ã¯ã³ã³ãã­ã¹ãã¸ã®ã¸ã£ã³ãã§è§£é¤ããã
+     ;*/
+    di
+
+    ;/* 
+	 ;* éç¹æ¨©ã¢ã¼ãã§åä½ããããæºå
+     ;* ä¿è­·æ©è½æå¹ï¼éä¿¡é ¼ã¸ï¼ï¼å²è¾¼ã¿è¨±å¯
+     ;* PP,NPV,DMP,IMP = 1, ID = 0
+     ;*/
+$ifdef __v850e2v3__
+    movhi   0x000f, r0, r7                  
+$else ;/* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r7  
+$endif ;/* __v850e2v3__ */
+    or      r7, r10         ;/* psw |= (PP|NPV|DMP|IMP) */
+	ldsr    r10, eipsw      ;/* eipsw = psw */
+    mov     1, r6
+
+	.extern _start_r
+_start_r:
+	ld.w    TCB_p_tinib[ep], r22
+$ifdef CFG_USE_STACKMONITORING
+	;/*
+	 ;*  SC3ã§ã¯ã¿ã¹ã¯å¼·å¶çµäºãããã®ã§ï¼ã¿ã¹ã¯èµ·åæ¯ã«ãã¸ãã¯ãã³ãã¼
+	 ;*  ãåæåãã
+	 ;*/
+	ld.w    TINIB_sstk_bottom[r22], r21
+    ld.w    TINIB_sstksz[r22], r10
+    sub     r10, r21
+	mov     STACK_MAGIC_NUMBER, r10
+	st.w	r10, 0[r21]
+$endif ;/* CFG_USE_STACKMONITORING */
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤åã«ç¾å¨åªå
+åº¦(TCB.curpri)ãå®è¡åªå
+åº¦(TINIB.exepri)ã«
+	 ;*  å¤æ´(å
+é¨ãªã½ã¼ã¹ãç²å¾)
+	 ;*/
+	ld.b    TINIB_exepri[r22], r21			;/* TINIB.exepri -> TCB.curpri */
+	st.b    r21, TCB_curpri[ep]
+
+	;/*
+	 ;*  OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¸
+	 ;*  (ã¢ãã«ä¸ã®)å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯0ã§ããããï¼æå¹ãªå²è¾¼ã¿ã¯å
+¨ã¦è¨±å¯ãã
+	 ;*/
+
+	OUTER_UNLOCK_OS_INT r12, r13
+
+	ld.w    TCB_p_tinib[ep], r22
+	ld.w    TINIB_task[r22], r10
+    cmp     r0, r6
+    bne     _start_r_1              ;/* r6 != 0 ãªãã° _start_r_1 ã¸*/
+	jmp     [r10]
+
+_start_r_1:
+	ldsr    r10, eipc               ;/* EIPC = pc */
+    eiret
+    ;/* =end modified for SC3 */
+
+    ;/*
+     ;*  ext_tskãsvcå½ä»¤ã§å¼ã³åºã
+     ;*/
+    .cseg text_shared
+    .align 4
+    .public _exit_utask
+_exit_utask:
+    mov     TFN_EXIT_TASK, r11
+    syscall NO_SVC
+    nop
+
+    .cseg text_kernel
+	.extern _stack_change_and_call_func_1 
+	.extern _stack_change_and_call_func_2
+_stack_change_and_call_func_1:
+_stack_change_and_call_func_2:
+
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	add     1, r13
+	st.w    r13, 0[r12]
+	cmp     1, r13
+	bne     _stack_change_and_call_func_1_1
+
+	;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ã¨å
+¥ãæ¿ã */
+	Lea     __ostkpt, r12
+	ld.w    0[r12], r12
+	add     -4, r12
+	st.w    sp, 0[r12]                      ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­ */
+	mov     r12, sp                         ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åãæ¿ã */
+    
+
+_stack_change_and_call_func_1_1:
+	push    lp
+	Lea     stack_change_and_call_func_r, lp  ;/* æ»ãã¢ãã¬ã¹ */
+	mov     r6, r12
+	mov     r7, r6
+	mov     r8, r7
+	jmp     [r12]
+
+stack_change_and_call_func_r:
+	pop     lp
+	Lea     _except_nest_cnt, r12
+	ld.w    0[r12], r13
+	add     -1, r13
+	st.w    r13, 0[r12]
+	cmp     r0, r13
+	bne     stack_change_and_call_func_r_1
+
+	ld.w    0[sp], sp                    ;/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®å¾©å¸°     */
+stack_change_and_call_func_r_1:
+	jmp     [lp]
+
+
+$ifdef ENABLE_RETURN_MAIN
+;/*
+ ;*  AKTSPç¨ã®main()ã¸ã®ãªã¿ã¼ã³ã³ã¼ã
+ ;*/
+	.extern _return_main
+_return_main:
+	Lea   __ostkpt, sp
+	ld.w  0[sp],sp
+	jarl  _main, r31
+$endif ;/* ENABLE_RETURN_MAIN */
+
+    ;/* =begin modified for SC3 */
+;/*
+ ;*  SYSCALLãã¼ãã«
+ ;*  syscallå½ä»¤ã¯ãscbp + scbp[x] ã®çªå°ã«ã¸ã£ã³ããã
+ ;*/
+    .public _syscall_table
+    .cseg text_kernel
+    .align 4
+_syscall_table:
+    .dw (_syscall_error_handler - _syscall_table)
+    .dw (_svc_entry - _syscall_table)
+
+    .public _syscall_error_handler
+    .public _svc_entry
+;/*
+ ;*  SYSCALLã¨ã©ã¼ãã³ãã©
+ ;*/
+_syscall_error_handler:
+    br  _syscall_error_handler
+    nop
+
+;/*
+ ;*  ãµã¼ãã¹ã³ã¼ã«ã®åºå
+¥å£
+ ;*  PP,NPV,DMP,IMP = 0, ID,EP = 1
+ ;*  eipc = pc, eipsw = psw : eiããåã«ä¿å­
+ ;*    r10 : è¿ãå¤
+ ;*    r11ï¼é¢æ°ã³ã¼ã
+ ;*    r6 - r9 : å¼æ°ï¼4ã¤ã¾ã§ï¼
+ ;*    r20 : ç¬¬5å¼æ°
+ ;*    ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä¿å­æ¸ã¿
+ ;*    lpä¿å­æ¸ã¿
+ ;*/
+_svc_entry:
+    ;/*
+     ;*  å¼åºãå
+ãç¹æ¨©ã¢ã¼ããï¼
+     ;*  eipswããã§ãã¯ãã
+     ;*/
+$ifndef __v850e3v5__
+    ldsr    r0, bsel
+$endif
+    stsr    eipsw, r13
+    shl     PSW_SV, r13         ;/* r13 << PSW_SV ã«ããä¾å¤çºçæã®ã¢ã¼ãåå¾ */
+    bnc     svc_entry_2         ;/* ç¹æ¨©ã¢ã¼ãããã®å¼åºããªãã°ã¹ã­ãã */
+
+    ;/*
+     ;*  ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®å¼åºãã®å ´å
+     ;*/
+    ;/*
+     ;*  ã¦ã¼ã¶ã¹ã¿ãã¯ã¨ã·ã¹ãã ã¹ã¿ãã¯ãå
+¥ãæ¿ãã
+     ;*  ã¿ã¹ã¯ã®ç¶æ
+ãç¹æ¨©ã¢ã¼ãå®è¡ä¸­ã«ç§»è¡ãã
+     ;*  æ»ãå
+ãéç¹æ¨©ã¢ã¼ãã§éä¿¡é ¼ããã¯å®è¡ä¸­ã§ãªããã°ï¼
+     ;*  ã¿ã¹ã¯å®è¡ä¸­ã§ããã¯ããªã®ã§ï¼p_runtskãNULLãã©ããã®
+     ;*  ãã§ãã¯ã¯å¿
+è¦ãªãã¯ã
+     ;*/
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    set1    0, TCB_priv_mode[ep]    ;/* p_runtsk->priv_mode |= 0x01 */
+    sst.w   sp, TCB_usp[ep]         ;/* uspãä¿å­ */
+    sld.w   TCB_p_tinib[ep], ep
+    sld.w   TINIB_sstk_bottom[ep], sp         ;/* sspãå¾©å¸° */
+
+svc_entry_2:
+    ;/*
+     ;*  eipcã¨eipswï¼syscallå¼åºãå
+ã®pcã¨pswï¼ãä¿å­ãã¦
+     ;*  å²è¾¼ã¿ãããªã¿ã¼ã³
+     ;*  +--------------+ <- new sp
+     ;*  | eipsw        |
+     ;*  +--------------+
+     ;*  | eipc         |
+     ;*  +--------------+ <- old sp
+     ;*/
+    addi    -8, sp, sp
+    mov     sp, ep
+    stsr    eipc, r12
+    sst.w   r12, 4[ep]
+    stsr    eipsw, r12
+    sst.w   r12, 0[ep]
+    ;/*
+     ;*  eipswã®ä¿è­·é¢é£ãããã0ã«ãã
+     ;*/
+$ifdef __v850e2v3__
+    movhi   0x000f, r0, r13
+$else ;/* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r13
+$endif ;/* __v850e2v3__ */
+    not     r13, r13
+    and     r13, r12
+    ldsr    r12, eipsw          ;/* PP,NPV,DMP,IMP = 0 */
+    Lea     svc_entry_3, r12
+    ldsr    r12, eipc
+    eiret
+
+svc_entry_3:
+    ;/*
+     ;*  æ©è½ã³ã¼ãã®ãã§ãã¯
+     ;*/
+    mov     TMAX_SVCID, r12
+    cmp     r12, r11            ;/* æ©è½ã³ã¼ãã®ä¸éãã§ãã¯(TMAX_SVCID < r11) */
+    bgt     svc_entry_error     ;/* ä¸éããªã¼ããã¦ãããªãã°ã¨ã©ã¼ */
+
+    ;/*
+     ;*  ãµã¼ãã¹ã³ã¼ã«ã®ãã¼ãã«ãå¼ãï¼
+     ;*  ãµã¼ãã¹ã³ã¼ã«ã®æ¬ä½ãå¼ã¶
+     ;*/
+    Lea     _svc_table, r12
+    shl     2, r11                  ;/* r11 *= 4 */
+    add     r11, r12                ;/* r12 = &svc_table[r11] */
+	ld.w    0[r12], r12             ;/* ãã¼ãã«ãå¼ã */
+    Lea     svc_entry_r, lp         ;/* æ»ãçªå°ãè¨­å® */
+	jmp     [r12]                   ;/* ãµã¼ãã¹ã³ã¼ã«å¦çã«ã¼ãã³ãå¼ã¶ */
+    nop
+
+svc_entry_error:
+    jarl    _no_support_service, lp ;/* no_support_service ãå¼ã¶ */
+
+svc_entry_r:
+    ;/*
+     ;*  ãã®æç¹ã§ã®pswãr11ã«ä¿å­ãã
+     ;*  å
+¨å²è¾¼ã¿ç¦æ­¢ã§æ´æ°ããæã¸ã®å¯¾å¿
+     ;*/
+    stsr    psw, r11
+
+    ;/*
+     ;*  å
+¨å²è¾¼ã¿ç¦æ­¢ãã¤EPç¶æ
+ã¸
+     ;*  ããã§EPç¶æ
+ã¨ããã®ã¯ï¼ISRããã·ã¹ãã ãµã¼ãã¹ãå¼ã°ãã
+     ;*  å ´åã«ï¼eiretã«ãã£ã¦ISPRãæ´æ°ãããã®ãé²ãããã§ãã
+     ;*/
+    ori     0x60, r11, r12   ;/* psw |= EP|ID */
+    ldsr    r12, psw
+
+    ;/*
+     ;*  eipcã¨eipswï¼syscallå¼åºãå
+ã®pcã¨pswï¼ãå¾©å¸°
+     ;*  ããã§ã¯ï¼å²è¾¼ã¿å¦çä¸­ã§ãªãï¼ãµã¼ãã¹ã³ã¼ã«å¼åºãåã«
+     ;*  eiretãçºè¡ãã¦ããï¼ãï¼eiretãå©ç¨ãã¦ãªã¿ã¼ã³ãã
+     ;*  +--------------+ <- old sp
+     ;*  | eipc         |
+     ;*  +--------------+
+     ;*  | eipsw        |
+     ;*  +--------------+ <- new sp
+     ;*/
+    mov     sp, ep
+    sld.w   4[ep], r15
+    sld.w   0[ep], r16
+    addi    8, sp, sp
+
+    ;/*
+	 ;*  ã¹ã¿ãã¯ãæ»ãããã§ãã¯
+	 ;*/
+    ;/*
+     ;*  å¼åºãå
+ãç¹æ¨©ã¢ã¼ããï¼
+     ;*  eipswããã§ãã¯ãã
+     ;*/
+$ifdef __v850e2v3__
+    ldsr    r0, bsel
+    movhi   0x000f, r0, r12
+$else ;/* defined(__v850e3v5__) */
+    movhi   0x4000, r0, r12
+$endif ;/* __v850e2v3__ */
+    tst     r16, r12
+    be      svc_prv_r           ;/* ç¹æ¨©ã¢ã¼ãããã®å¼åºããªãã°ã¹ã­ãã */
+
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    tst1    0, TCB_priv_mode[ep]    ;/* uspãä¿å­ãããï¼ */
+    be      svc_prv_r               ;/* uspãä¿å­ãã¦ããªããªãã°ã¹ã­ãã */
+
+svc_usr_r:
+    ;/* 
+     ;*  ç¹æ¨©ã¢ã¼ãå®è¡ãæãã
+     ;*  sstkã¨ustkãå
+¥ãæ¿ãã
+     ;*  æ»ãå
+ãã¿ã¹ã¯ã³ã³ãã­ã¹ããªãã°ï¼ã¿ã¹ã¯å®è¡ä¸­ã§ããã¯ã
+     ;*  ãªã®ã§ï¼p_runtskãNULLãã©ããã®ãã§ãã¯ã¯å¿
+è¦ãªãã¯ã
+     ;*/
+    clr1    0, TCB_priv_mode[ep]    ;/* p_runtsk->priv_mode &= !0x01 */
+    sld.w   TCB_usp[ep], sp         ;/* uspãå¾©å¸° */
+    
+svc_prv_r:
+    ;/*
+     ;*  ã·ã¹ãã ãµã¼ãã¹ã§ã»ãããããå²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãåæ ãã
+     ;*/
+    mov     0x20, r12
+    and     r12, r11    ;/* PSW.IDä»¥å¤ã0ã« */
+    not     r12, r12    ;/* r12 = !0x20 */
+    and     r12, r16    ;/* eipsw &= !0x20 */
+    or      r11, r16    ;/* eipsw |= r11 */
+    ldsr    r16, eipsw
+    ldsr    r15, eipc
+    eiret               ;/* å¼åºãå
+ã¸ãªã¿ã¼ã³ */
+    nop
+
+	;/*
+	 ;*  ã¹ã¿ãã¯ãã§ãã¯é¢æ°
+	 ;*   å
+¥å r6  ä½¿ç¨ããã¹ã¿ãã¯é
+	 ;*   ä½¿ç¨ããã¹ã¿ãã¯éãæ®ã£ã¦ããªãå ´åã¯ã¨ã©ã¼
+	 ;*/
+    .extern _trustedfunc_stack_check
+_trustedfunc_stack_check:
+    Lea     _callevel_stat, ep
+    sld.h   0[ep], r10
+    addi    TCL_ISR2, r0, r11     
+    tst     r11, r10
+    be      trustedfunc_stack_check_1       ;/* TCL_TASKã®å ´åã¯ã¹ã­ãã */
+
+    ;/*
+     ;*  _ostkãä½¿ç¨ä¸­
+     ;*/
+    Lea     __ostk, ep
+    sld.w   0[ep], r11
+    br      trustedfunc_stack_check_2
+
+trustedfunc_stack_check_1:
+    ;/*
+     ;*  ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ãä½¿ç¨ä¸­
+     ;*/
+    Lea     _p_runtsk, ep
+    sld.w   0[ep], ep
+    sld.w   TCB_p_tinib[ep], ep
+    sld.w   TINIB_sstk_bottom[ep], r11
+    sld.w   TINIB_sstksz[ep], r12
+    sub     r12, r11
+trustedfunc_stack_check_2:
+    ;/*
+     ;*  ã¹ã¿ãã¯ã®æ®éããã§ãã¯
+     ;*  r11 = ã¹ã¿ãã¯ã®å
+é ­
+     ;*/
+    subr    sp, r6                      ;/* r6 = ssp - tf_stksz */
+    bl      trustedfunc_stack_check_3   ;/* ssp < tfstksz ãªãã°ã¨ã©ã¼å¦çã¸ */
+    cmp     r11, r6                     ;/* r11 < r6 ï¼ */
+    bnh     trustedfunc_stack_check_3   ;/* ããã§ãªããã°ã¨ã©ã¼å¦çã¸ */
+    addi    E_OK, r0, r10
+    jmp     [lp]
+
+trustedfunc_stack_check_3:
+    addi    E_OS_STACKINSUFFICIENT, r0, r10
+    jmp     [lp]
+
+    ;/* =end modified for SC3 */
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_svc.h	(revision 172)
@@ -0,0 +1,196 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+
+#ifndef TOPPERS_PRC_SVC_H
+#define TOPPERS_PRC_SVC_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef sint32 FunctionCodeType;                  /* æ©è½ã³ã¼ãã®å */
+
+/*
+ *  ã«ã¼ãã«ã®ãµã¼ãã¹ã³ã¼ã«ã®ã¤ã³ã¿ãã§ã¼ã¹
+ *
+ *  ã¹ã¯ã©ããã¬ã¸ã¹ã¿
+ *    r10 : è¿ãå¤
+ *    r11ï¼é¢æ°ã³ã¼ã
+ *    r6 - r9 : å¼æ°ï¼4ã¤ã¾ã§ï¼
+ *  é¢æ°å¼ã³åºã(jarl)ã§ãµã¼ãã¹ã³ã¼ã«ãå¼ã³åºãããï¼lpãä¿å­ãã
+ *  syscallã§svc_entryã¸ã¸ã£ã³ã
+ */
+
+/* "memory"æå®ãã */
+
+#define CAL_SVC_0M(TYPE, FNCD) \
+	register TYPE  r10 asm("r10"); \
+	register FunctionCodeType    r11 asm("r11") = (FunctionCodeType)(FNCD); \
+	Asm ( \
+        "syscall 1\n\t" \
+        "nop\n\t" \
+		:"=r"(r10),"+r"(r11) \
+		: \
+		:"memory","lp","r6","r7","r8","r9","r12","r13","r14","r15","r16","r17","r18","r19", "ep" \
+	); \
+	return(r10);
+
+#define CAL_SVC_1M(TYPE, FNCD, TYPE1, PAR1) \
+	register TYPE  r10 asm("r10"); \
+	register TYPE1  r6 asm("r6") = (TYPE1)(PAR1); \
+	register FunctionCodeType    r11 asm("r11") = (FunctionCodeType)(FNCD); \
+	Asm ( \
+        "syscall 1\n\t" \
+        "nop\n\t" \
+		:"=r"(r10),"+r"(r11),"+r"(r6) \
+		: \
+		:"memory","lp","r7","r8","r9","r12","r13","r14","r15","r16","r17","r18","r19", "ep" \
+	); \
+	return(r10);
+
+
+#define CAL_SVC_2M(TYPE, FNCD, TYPE1, PAR1, TYPE2, PAR2) \
+	register TYPE  r10 asm("r10"); \
+	register TYPE1  r6 asm("r6") = (TYPE1)(PAR1); \
+	register TYPE2  r7 asm("r7") = (TYPE2)(PAR2); \
+	register FunctionCodeType    r11 asm("r11") = (FunctionCodeType)(FNCD); \
+	Asm ( \
+        "syscall 1\n\t" \
+        "nop\n\t" \
+		:"=r"(r10),"+r"(r11),"+r"(r6),"+r"(r7) \
+		: \
+		:"memory","lp","r8","r9","r12","r13","r14","r15","r16","r17","r18","r19", "ep" \
+	); \
+	return(r10);
+
+
+#define CAL_SVC_3M(TYPE, FNCD, TYPE1, PAR1, \
+							TYPE2, PAR2, TYPE3, PAR3) \
+	register TYPE  r10 asm("r10"); \
+	register TYPE1  r6 asm("r6") = (TYPE1)(PAR1); \
+	register TYPE2  r7 asm("r7") = (TYPE2)(PAR2); \
+	register TYPE3  r8 asm("r8") = (TYPE3)(PAR3); \
+	register FunctionCodeType    r11 asm("r11") = (FunctionCodeType)(FNCD); \
+	Asm ( \
+        "syscall 1\n\t" \
+        "nop\n\t" \
+		:"=r"(r10),"+r"(r11),"+r"(r6),"+r"(r7),"+r"(r8) \
+		: \
+		:"memory","lp","r9","r12","r13","r14","r15","r16","r17","r18","r19", "ep" \
+	); \
+	return(r10);
+
+/* 
+ *  è¿ãå¤ãvoidã®å ´å
+ *  r10ãç ´å£ã¬ã¸ã¹ã¿ã«å ãã
+ */
+
+#define CAL_SVC_0N(TYPE, FNCD) \
+	register FunctionCodeType    r11 asm("r11") = (FunctionCodeType)(FNCD); \
+	Asm ( \
+        "syscall 1\n\t" \
+        "nop\n\t" \
+		:"+r"(r11) \
+		: \
+		:"memory","lp","r6","r7","r8","r9","r10","r12","r13","r14","r15","r16","r17","r18","r19", "ep" \
+	);
+
+#define CAL_SVC_1N(TYPE, FNCD, TYPE1, PAR1) \
+	register TYPE1  r6 asm("r6") = (TYPE1)(PAR1); \
+	register FunctionCodeType    r11 asm("r11") = (FunctionCodeType)(FNCD); \
+	Asm ( \
+        "syscall 1\n\t" \
+        "nop\n\t" \
+		:"+r"(r11),"+r"(r6) \
+		: \
+		:"memory","lp","r7","r8","r9","r10","r12","r13","r14","r15","r16","r17","r18","r19", "ep" \
+	);
+
+
+#define CAL_SVC_2N(TYPE, FNCD, TYPE1, PAR1, TYPE2, PAR2) \
+	register TYPE1  r6 asm("r6") = (TYPE1)(PAR1); \
+	register TYPE2  r7 asm("r7") = (TYPE2)(PAR2); \
+	register FunctionCodeType    r11 asm("r11") = (FunctionCodeType)(FNCD); \
+	Asm ( \
+        "syscall 1\n\t" \
+        "nop\n\t" \
+		:"+r"(r11),"+r"(r6),"+r"(r7) \
+		: \
+		:"memory","lp","r8","r9","r10","r12","r13","r14","r15","r16","r17","r18","r19", "ep" \
+	);
+
+
+#define CAL_SVC_3N(TYPE, FNCD, TYPE1, PAR1, \
+							TYPE2, PAR2, TYPE3, PAR3) \
+	register TYPE1  r6 asm("r6") = (TYPE1)(PAR1); \
+	register TYPE2  r7 asm("r7") = (TYPE2)(PAR2); \
+	register TYPE3  r8 asm("r8") = (TYPE3)(PAR3); \
+	register FunctionCodeType    r11 asm("r11") = (FunctionCodeType)(FNCD); \
+	Asm ( \
+        "syscall 1\n\t" \
+        "nop\n\t" \
+		:"+r"(r11),"+r"(r6),"+r"(r7),"+r"(r8) \
+		: \
+		:"memory","lp","r9","r10","r12","r13","r14","r15","r16","r17","r18","r19", "ep" \
+	);
+
+
+#ifndef TOPPERS_SVC_CALL
+#include "gcc/tool_svc.h"
+#endif /* TOPPERS_SVC_CALL */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+
+#endif /* TOPPERS_TARGET_SVC_H */
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_syslog.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_syslog.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_syslog.h	(revision 172)
@@ -0,0 +1,92 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2013 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_syslog.h 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *		ã·ã¹ã­ã°æ©è½ã®ãã­ã»ããµä¾å­é¨ï¼Nios2ç¨ï¼
+ */
+
+#ifndef TOPPERS_PRC_SYSLOG_H
+#define TOPPERS_PRC_SYSLOG_H
+
+#ifndef TOPPERS_MACRO_ONLY
+#include "kernel/kernel_impl.h"
+#include "prc_config.h"
+
+/*
+ *  ã¿ã¼ã²ããå®ç¾©ã·ã¹ãã ãµã¼ãã¹ã·ã¹ã­ã°æ©è½ã®trapå®ç¾©
+ */
+
+#define KernelLibrarySyslog	_trap_KernelLibrarySyslog
+
+#define TFN_KERNELLIBRARYSYSLOG	(TMAX_SVCID - PRC_SVC_NUM + 1)
+
+extern void _kernel_KernelLibrarySyslog(void *param);
+
+LOCAL_INLINE void
+_trap_KernelLibrarySyslog(void *param)
+{
+	CAL_SVC_1N(void, TFN_KERNELLIBRARYSYSLOG, void *, param);
+}
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_SYSLOG_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/prc_user.txt	(revision 172)
@@ -0,0 +1,402 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼V850ãã­ã»ããµä¾å­é¨ããã¥ã¢ã«(GCCç)ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯V850ãã­ã»ããµä¾å­é¨ã®GCCçæ
+å ±ãè¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: prc_user.txt 187 2015-06-25 03:39:04Z t_ishikawa $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+V850ãã­ã»ããµä¾å­é¨ï¼ä»¥ä¸ï¼V850ä¾å­é¨ï¼ã¯ï¼ã«ããµã¹ã¨ã¬ã¯ãã­ãã¯ã¹ã®
+V850E2M/V850E2Sã³ã¢(V850E2v3ã¢ã¼ã­ãã¯ãã£)ã¾ãã¯ï¼G3M/G3Kã³ã¢(V850E3V5ã¢
+ã¼ã­ãã¯ãã£)ãç¨ããLSIããµãã¼ããã¦ããï¼
+
+ç¾ç¶ãµãã¼ããã¦ããLSIã¯ï¼æ¬¡ã«2ç¨®é¡ã§ããï¼V850ãã­ã»ããµä¾å­é¨ã§ã¯ï¼
+ãã­ã»ããµã¨å²ãè¾¼ã¿ã³ã³ãã­ã¼ã©ã®ã¿ãä½¿ç¨ããããï¼ä»ã®
+V850E2M/V850E2Sã³ã¢ãããã¯G3M/G3Kã³ã¢ãç¨ããLSIã¸ã®ãã¼ãã£ã³ã°ã¯å®¹
+æã§ããï¼
+
+ ã»V850E2/Fx4
+ ã»RH850/F1L
+ ã»RH850/F1H
+
+âéçºç°å¢
+
+ã«ã¼ãã«ã®ã³ã³ãã¤ã«ã¯ï¼GCC ãç¨ãã¦ããï¼åä½ç¢ºèªãè¡ãªã£ããã¼ã¸ã§ã³
+ã¯ä»¥ä¸ã®ãã®ã§ããï¼
+
+V850E2v3ã¢ã¼ã­ãã¯ãã£
+V850E3v5ã¢ã¼ã­ãã¯ãã£
+ ã»gcc version 4.9-GNUV850_v14.01 (GCC_Build_2.01) 
+   KPITã®Webãµã¤ãããå
+¥æ
+   
+ãããã¬ã¯ï¼CS+ãä½¿ç¨ãã¦åä½ç¢ºèªããã¦ããï¼åä½ç¢ºèªããããã¼ã¸ã§ã³
+ã¯æ¬¡ã®éãã§ããï¼
+
+ ã»V3.00.000
+ 
+ãã®ãã¼ã¸ã§ã³ã§ã¯ï¼GCCã§çæãããªãã¸ã§ã¯ãã®LMAã«éå¯¾å¿ã§ããï¼ããª
+ãã¡ï¼åæå¤ä»ãå¤æ°ã®ããã«ãã¼ã¿ã»ã¯ã·ã§ã³(.data)ã®VMAã¨LMAãç°ãªã
+elfãã¡ã¤ã«ãä½æãã¦ãï¼VMAã®å ´æã«ãã¼ã¿ãã­ã¼ããããï¼ãªãã¸ã§ã¯ã
+ãã¡ã¤ã«ã®ãã¼ã¿ã»ã¯ã·ã§ã³ã®VMAãLMAã®ã¢ãã¬ã¹ã«ä¸æ¸ãããRubyã¹ã¯ãªã
+ãconv2cs+.rb ãç¨æãã¦ããï¼ãã«ãæã«æ¬¡ã®æ§ã«makeãå®è¡ããã¨ãªãã¸
+ã§ã¯ããã¡ã¤ã«ãå¤æ´ãããï¼
+
+ make cs
+
+
+âå¨è¾ºåè·¯
+
+ATK2ã®SC1ã«ã¼ãã«ã®ãµã³ãã«ãåä½ãããããã«ã¯ï¼å¨è¾ºåè·¯ã¨ãã¦ï¼UART
+ã¨ã¿ã¤ããå¿
+è¦ã¨ãªãï¼V850ä¾å­é¨ã§ã¯ï¼UARTã¨ãã¦ã¯ï¼ã¢ã·ã³ã¯ã­ãã¹ã»ã·
+ãªã¢ã«ã»ã¤ã³ã¿ãã§ã¼ã¹ï¼UARTEnï¼ãï¼ã¿ã¤ãã¨ãã¦ã¯ï¼ã¿ã¤ãã¢ã¬ã¤ã¦ãã
+ãï¼TAUnï¼ããµãã¼ããã¦ããï¼ä½¿ç¨ãããã£ãã«ã¯ã¿ã¼ã²ããæ¯ã«ç°ãªãï¼
+
+
+âTAUnå²è¾¼ã¿ãã³ãã©(in taua_timer.c)
+
+IncrementCounter(SysTimerCnt)ã«ããï¼SysTimerCntã®ã½ããã¦ã§ã¢ã«ã¦ã³ã¿ã
+ã¤ã³ã¯ãªã¡ã³ããã¦ããï¼IncrementCounter(SysTimerCnt)ã®æ»ãå¤ãE_OKä»¥å¤ã®
+å ´åï¼ShutdownOS()ãå¼ã³åºãã¦ããï¼
+
+
+âå²è¾¼ã¿åªå
+åº¦
+
+CFG_INTã«æå®å¯è½ãªå²è¾¼ã¿åªå
+åº¦ã¨ãã¦ã¯ï¼ä»¥ä¸ã®å¤ãè¨­å®å¯è½ã§ããï¼
+
+V850E2M : -1 ã -15 
+V850E2S : -1 ã -7
+G3M     : -1 ã -15 
+G3K     : -1 ã -7
+
+
+âå²è¾¼ã¿å±æ§
+
+CFG_INTã§ãµãã¼ããã¦ããå²è¾¼ã¿å±æ§ã¯ãªãï¼
+
+
+âæªç»é²ã®å²è¾¼ã¿
+
+æªç»é²ã®å²è¾¼ã¿ãçºçããå ´åã¯ï¼prc_config.c ã§å®ç¾©ããã¦ããï¼
+default_int_handler() ãå¼ã³åºãï¼default_int_handler() ã¯ï¼çºçããå²
+ãè¾¼ã¿ã®å²è¾¼ã¿çªå·ãã³ã³ã½ã¼ã«ã«åºåããå¾ï¼target_exit() ãå¼ã³åºãï¼
+
+
+âC1ISRã®æ±ã
+
+ã»C1ISRã«ã¯ã¦ã¼ã¶ã«ãã£ã¦ä»¥ä¸ã®å¦çãè¨è¿°ãããã¹ãã§ããï¼
+    ã»C1ISRã§ä½¿ç¨ããã¬ã¸ã¹ã¿ã®å
+å®¹ãéé¿
+    ã»C1ISRãå®è¡ä¸­ã§ãããã¨ãå¤å¥ããããã®æ
+å ±ãä¿å­ãã
+        ã»ç¾å¨ã®å®è£
+ã§ã¯iipm
+    ã»éé¿ããã¬ã¸ã¹ã¿ã®å¾©å¸°
+    ã»eretå½ä»¤ã§C1ISRãçµäºãã
+
+
+âCPUä¾å¤è¦å æ
+å ±åå¾
+
+ã»CPUä¾å¤çºçããå ´åï¼ã¦ã¼ã¶ã¯ï¼ãã­ãã¯ã·ã§ã³ããCPUä¾å¤æ
+å ±ãåå¾ã§
+  ãï¼åå¾ã§ããã®ã¯ï¼CPUä¾å¤çºçæã®ä»¥ä¸ã®æ
+å ±ãããï¼
+    ã»CPUä¾å¤è¦å çªå·(å¤æ°ï¼v850_cpu_exp_no)
+    ã»ãã­ã°ã©ã ã«ã¦ã³ã¿(å¤æ°ï¼v850_cpu_exp_pc)
+    ã»ã¹ã¿ãã¯ãã¤ã³ã¿(å¤æ°ï¼v850_cpu_exp_sp)
+        ã»æ´ã«ï¼CPUä¾å¤çºçæã«åã¬ã¸ã¹ã¿ã¯ã¹ã¿ãã¯ã«ä¿å­ãã¦ããã®ã§ï¼
+          v850_cpu_exp_spãä½¿ã£ã¦ä¿å­ãã¦ããã¬ã¸ã¹ã¿ã®å¤ãåå¾ããã
+          ã¨ãã§ããï¼ä¿å­ãã¦ããã¬ã¸ã¹ã¿ã¨ã¢ãã¬ã¹ã®æ
+å ±ã¯ã¢ã»ã³ããª
+          ã³ã¼ããåç
+§ããï¼
+
+ã»ãããï¼ãã­ãã¯ã·ã§ã³ããã¯ç¡å¹ã®å ´åï¼ä¸è¨ã®CPUä¾å¤è¦å ä¿æç¨å¤æ°ã
+  å®ç¾©ãããªãããï¼ä½¿ç¨ããªãã§ãã ãã(ä½¿ç¨ããå ´åï¼ã³ã³ãã¤ã«ã¨ã©ã¼
+  ã¨ãªã)ï¼
+
+
+âå¶éäºé 
+
+
+epç¸å¯¾ã§ã¢ã¯ã»ã¹ããtinyãã¼ã¿ã»ã¯ã·ã§ã³ã¯ãµãã¼ãããªãï¼
+
+
+âå¤æ´å±¥æ­´
+2015/04/10
+ã»prc_common.tf
+  å²è¾¼ã¿åªå
+åº¦ã¬ãã«ã®å¤æ´ã®è¿½å¾å¿ã
+
+2015/04/07
+ã»Platform_Types.h
+  stdint.h ãã¤ã³ã¯ã«ã¼ãããããå¤æ´ï¼
+
+2015/04/01
+ã»å²è¾¼ã¿åªå
+åº¦ã®ã¬ãã«ãG3M/E2Mã¯16æ®µéã«ï¼G3K/E2Sã¯8æ®µéã«ä¿®æ­£ï¼
+
+2015/03/31
+ã»prc_support.S/prc_insn.h
+  PSW.EBVï¼EBASEï¼INTBPï¼ISPRï¼PMRï¼ICSRï¼INTCFG ã®æ´æ°æã¯diç¶æ
+ã¨ã
+  ãå¿
+è¦ãããããï¼è©²å½ç®æãä¿®æ­£ï¼
+  
+2015/01/07
+ã»prc_support.S
+  _ei_exception_entry ã§ä¿å­ãã¦ããªãr20ãä½¿ç¨ãã¦ããåé¡ãä¿®æ­£ï¼
+
+2014/12/24
+ã»prc.tfï¼prc_config.cï¼prc_insn.hï¼prc_support.S
+  V850E3v5ã«ãããEIã¬ãã«å²è¾¼ã¿ãç´æ¥ãã¯ã¿æ¹å¼ãããã¼ãã«åç
+§æ¹å¼ã¸å¤æ´ï¼
+  â»v850-elf-objdump -d å®è¡æï¼Segmentation faultãçºçãããï¼å®è¡ã¢
+    ã¸ã¥ã¼ã«ã®çæã«ã¯åé¡ãªãï¼æ­£ããçæããããã«ã¯ï¼
+    v850-elf-objdumpã«ä»¥ä¸ã®ãªãã·ã§ã³ãè¿½å ããï¼
+    --architecture=v850-rh850
+
+2014/12/10
+ã»start.S
+  dataã»ã¯ã·ã§ã³ã®åæåã®çµäºæ¡ä»¶ã__idata_endã®ã¢ãã¬ã¹ã¯åæåããª
+  ãããã«ä¿®æ­£ï¼
+
+2014/12/09
+ã»ã³ã³ãã¤ã©ãKPITããå
+¬éããã¦ãã4.9ã«å¤æ´ï¼
+ã»CS+ã§ãã¼ã¿ã»ã¯ã·ã§ã³ãæ­£ããã­ã¼ãããããï¼VMAãLMAã«ä¸æ¸ãããã¹
+  ã¯ãªãããè¿½å ï¼
+
+2014/12/05
+ã»v850e2v3ã«ããã¦ï¼PMRãè¨­å®ããå¾ã«SYNCMãå®è¡ããããã«å¤æ´ï¼
+ã»v850e2v3ã®å¯¾è±¡ã³ã³ãã¤ã©ãv850e3v5ã¨åããã¦4.9ç³»ã«å¤æ´ï¼
+
+2014/12/04
+ã»prc_config.h
+  x_set_ipm()ã§PMRãå¤æ´ãã¦ãããï¼OSå²è¾¼ã¿ç¦æ­¢ãPMRã§å®ç¾ããã¦ãã
+  ããï¼APIå®è¡ä¸­ã«å²è¾¼ã¿ãOSå²è¾¼ã¿ç¦æ­¢ä»¥ä¸ã®å¤ã¨ãªã£ã¦ãã¾ãåé¡ãä¿®
+  æ­£ï¼
+
+2014/11/15
+ã»prc_support.S
+  _interruptã§å¤éå²è¾¼ã¿ã§ç ´å£ãããr2ãä½¿ç¨ãã¦ããåé¡ãä¿®æ­£ï¼
+  
+2014/11/05
+ã»tauj_hw_counter.c
+  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã¨ãã¦ä½¿ç¨ããTAUJã®ãã£ãã«ãå¤æ´ã§ããããã«å¤
+  æ´ï¼
+
+2014/10/23
+ã»Makefile.prc
+  ã»ã³ã¢ã¿ã¤ã(RH850G3K ã RH850G3M)ãã¿ã¼ã²ããä¾å­é¨ããåãåãï¼
+    RH850G3Kã®å ´åã¯ï¼ã³ã³ãã¤ã«ãªãã·ã§ã³ã« -msoft-float ãè¿½å ï¼
+    RH850G3Mãã¤USE_HFLOATãæå®ãããå ´åã¯ï¼FPUãæå¹ã«ããããã®ã
+    ã¯ã­ã¨ã³ã³ãã¤ã«ãªãã·ã§ã³ãæå¹ã«ããï¼å®ç¾©ããã¦ããªããã°ï¼
+    -msoft-floatã¨ããï¼
+
+2014/10/17
+ã»prc_support.S
+  ã»ã¢ã¤ãã«æã«diã«ããå²ãè¾¼ã¿ãç¦æ­¢ãã¦ããhaltãå¼ã³åºãããã«å¤æ´ï¼
+
+2014/10/15
+ã»prc_support.S
+  ã»ãã¯ã¿ãã¼ãã«ããä¾å¤ã«å¿ãã¦ï¼_fe_exception_entry/ 
+    _ei_exception_entry ãå¼ã³åºãããã«å¤æ´ï¼
+  
+2014/10/14
+ã»prc_support.S
+  ã»ã¢ã¤ãã«æã«haltãå¼ã³åºãããã«å¤æ´ï¼
+  ã»ãã£ã¹ãããã£ã®ã¢ã¤ãã«ã«ã¼ãã«ããã¦ï¼callevelãå¤æ´ããªãããã«ä¿®æ­£ï¼
+  ã»IPSRãå¤æ´å¾ï¼syncpãå¼ã³åºãããã«å¤æ´ï¼
+  
+2014/10/10
+ã»prc_support.S
+  dispatch_r ã§ r30(ep)ã®å¾©å¸°æã®ãã¼ã¹ã¢ãã¬ã¹ã«æ´æ°ããspãä½¿ç¨ãã¦
+  ãåé¡ãä¿®æ­£ï¼
+
+2014/09/25
+ã»v850e2_fx4.h ã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ããåçªããã³ã¢ã®ã¿ã¤ãã®æå®ã
+  ã¯ã­(_V850E2M_ or _V850E2S_)ãå®ç¾©ããããå¤æ´ï¼
+
+2014/09/14
+ã»PMRãå¤æ´ããå¾ã¯ï¼"syncp"ãå®è¡ãã¦è¨­å®ãåæ ãããã®ãåæãããã
+  ã«å¤æ´ï¼
+
+2014/09/08
+ã»RLIN3 UART ãã©ã¤ãã®ãã¼ããå¤æ´å¯è½ã«ï¼
+
+2014/08/19
+ã»V850ã®ã¿ã¼ã²ããæå®ã-mv850e2ã«å¤æ´ï¼-mv850e2v3ã ã¨ä»¥ä¸ã®åé¡ãçºç
+  ããããï¼
+  ã»ã¢ã»ã³ãã©ãã¡ã¤ã«ã«æ¸ãããbranchå½ä»¤ã32bitå½ä»¤ã¨ãã¦ã¢ã»ã³ãã«ãããï¼
+  ã»ä¸æ­£ãªå½ä»¤ãåºåããã
+      trncf.sw r8,r8
+  
+2014/07/17
+ã»RH850ã®ãµãã¼ãã®è¿½å ï¼
+
+2014/07/15
+ã»prc_support.S
+ ã»int_nestedã§isrcb_tableã®ã¢ãã¬ã¹ã®åå¾ã«åé¡ããã£ãããä¿®æ­£ï¼
+ ã»å²è¾¼ã¿ã»ãã£ã¹ãããã£ã§ä¿å­ããå¾©å¸°ããã¬ã¸ã¹ã¿ã®å¤æ´ï¼
+ 
+2014/07/10
+ã»start.S
+  hardware_init_hookã¨software_init_hookã¸ã®ã¸ã£ã³ããã©ãã«çµç±ã§ã¯ãª
+  ãï¼ã¬ã¸ã¹ã¿çµç±ã«å¤æ´ï¼
+ã»ã¿ã¼ã²ããä¾å­é¨ã®åç§°å¤æ´
+  v850e2_xxx ãã v850_xxx ã«å¤æ´      
+ã»V850E3V5ã®ãµãã¼ã
+  ã»ãã¯ã­ __v850e2v3__ ã¨ __v850e3v5__ ã«ããåãåã
+  ã»å²è¾¼ã¿ã³ã³ãã­ã¼ã©ã«å¯¾ããã¢ã¯ã»ã¹ãé¢æ°ããã¯ã­çµç±ã«å¤æ´  
+    ã»V850E3V5ã§ã¯ã³ã¢ã¨çµ±åããã¦ããããã¢ã¯ã»ã¹æ¹æ³ãç°ãªãï¼
+ã»tfã®ãã¯ã¿ã¼ãã¼ãã«ã®åºåç¨ã³ã¼ããCXçã¨å
+±æããããã«ï¼åºåç¨ã³ã¼ã
+  prc_common.tfã«ã¾ã¨ãï¼Os_Lcfg_asm.Sã«åºåããããã«å¤æ´ï¼
+ã»prc_support.Sãcxã¨ãã¼ã«å¤æã§å
+±æããããã«å¤æ´ï¼
+  ã»prc_support.S/start.S/v850asm.inc
+
+2014/07/09
+ã»prc_support.S ã§ Lea ã§ 32bitå³å¤ãã­ã¼ããã¦ããç®æã mov ã«å¤æ´ï¼
+
+2014/02/26
+ã»ãã£ã¹ãããã£ã¨å²è¾¼ã¿ã®åºå
+¥å£ã§ä¿å­ã»å¾©å¸°ããã¬ã¸ã¹ã¿ã®ä¿®æ­£ï¼
+  å²è¾¼ã¿åºå
+¥å£ : r2,r5ãä¿å­ããããå¤æ´
+  ãã£ã¹ãããã£ : r31, r2, ep(r30)ãä¿å­ããªãããã«å¤æ´
+ã»å²è¾¼ã¿åºå£å¦çã§ current_iintpri ãå¸¸ã«å
+ã®å¤ã«æ»ãããã«å¤æ´ï¼
+
+2014/01/10
+ã»éçAPIãã¡ã¤ã«ãåé¤
+
+2013/10/01
+ã»prc_support.S
+  OUTER_LOCK_OS_INT ã«ããã¦ï¼ä»¥ä¸ã®å½ä»¤ã2åå®è¡ãã¦ãããï¼1åã§ãã
+  ããï¼2åç®ãåé¤ï¼
+      Lea     _pmr_isr2_mask, AMARG(reg13)
+  ei_exception_2/fe_exception_2 ã«ããã¦ï¼_kerflgã®ã¢ãã¬ã¹ãèª­ã¿è¾¼ã
+  ã å¾ï¼å
+å®¹ãèª­ã¿è¾¼ã¾ãã«æ¯è¼ãã¦ããåé¡ãä¿®æ­£ï¼
+  
+2013/09/17
+ã»V850E2Sããµãã¼ãããããï¼ã¢ã¼ã­ãã¯ãã£ä¾å­é¨ã®åç§°ã v850e2m ãã 
+  v850e2 ã«å¤æ´ï¼
+ã»ã³ã¢ã®ãã¯ã­ãv850e2_fx4.h  v850e2_px4.h ã§å®ç¾©ããããã«å¤æ´ï¼ãã
+  ã«ä¼´ãï¼v850e2_fx4l.h ãè¿½å ï¼
+
+2013/09/14
+ã»ã³ã¢ã®ãã¯ã­ãè¿½å 
+  _V850E2S_
+  _V850E2M_
+
+2013/08/31
+ã»CubeSuite+ã®ãã¼ã¸ã§ã³ãæ´æ°ï¼
+
+2013/08/07
+ã»0x50 : EIã¬ãã«ã½ããã¦ã§ã¢ä¾å¤ ã¨ 0x70 : æµ®åå°æ°ç¹æ¼ç®ä¾å¤  ã§ï¼
+_ei_exception_entry ãå¼ã³åºãããã«ä¿®æ­£ï¼
+
+2013/06/24
+ã»prc_support.S prc_def.csv prc_offset.tf 
+  ã»å²è¾¼ã¿ã®ã¨ã³ããªã§ã®å¤éå²è¾¼ã¿æã®ã¹ã¿ãã¯ã®ãã§ãã¯æ¹æ³ã ã¹ã¿ãã¯
+    æ®éãã§ãã¯æ¹å¼ ã«å¤æ´ï¼
+ã»uart.c
+  ã»"Os_Lcfg.h" ãã¤ã³ã¯ã«ã¼ãããããå¤æ´ï¼
+
+2013/04/23
+ã»100ããç§åä½ã§æéè¨æ¸¬å¯è½ãª get_tim_100ntime() ãè¿½å ï¼
+  ã»ã¿ã¤ãã®åå¨æ¯ã2^5ãã2^0ã«å¤æ´ï¼
+ã»SystemTime100NsType ãè¿½å (uint32)
+
+2013/04/20
+ã»uart.c 
+  ã»ããªã¹ã±ã¼ã©ã¼ã®è¨­å®å¤ãã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ã§ããããã«å¤æ´ï¼
+ã»taua_timer.c
+  ã»ã«ã¦ã³ãå¤ãã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ã§ããããã«å¤æ´ï¼
+ã»v850e2_fx4.h
+  ã»FG4ç¨ã®å®ç¾©ãè¿½å ï¼
+  ã»ã«ã¦ã³ãå¤ãåé¤ï¼
+ã»v850e2_fx4.c
+  ã»write_protected_reg()ã§ä¿è­·ã¬ã¸ã¹ã¿ãæ¸ãè¾¼ãæã«di/eiãç¡æ¡ä»¶ã§å®
+    è¡ãã¦ããåé¡ãä¿®æ­£ï¼    
+ã»v850e2_px4.h
+  ã»ã«ã¦ã³ãå¤ãåé¤ï¼
+
+2013/04/18
+ã»get_tim_utime()
+  ã»ã¿ã¤ãã®ãªã¼ãã¼ãã­ã¼æã®æ±ãã«åé¡ããã£ãããä¿®æ­£ï¼
+ã»target_timer_get_current()
+  ã»ãã¼ãã¦ã§ã¢ã®ä»æ§ã¯ãã¦ã³ã«ã¦ã³ãã§ãããï¼ã¢ããã«ã¦ã³ãã¨ãã¦ã³
+    ã¼ããè¨è¿°ããã¦ããããä¿®æ­£ï¼
+
+2013/03/25
+ã»start_r ã§ ei ããã¦ãããï¼å¿
+è¦ç¡ãããåé¤ï¼
+
+2013/02/05
+ã»CHECK_STKSZ_ALIGN/CHECK_FUNC_ALIGN/CHECK_STACK_ALIGN ãä»ã®ç®æã§å®
+  ç¾©ããã¦ããã°å®ç¾©ããªãããã«å¤æ´ï¼
+
+2013/02/01
+ã»æåã®ãªãªã¼ã¹ï¼
+        
+ä»¥ä¸ï¼
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1h.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1h.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1h.c	(revision 172)
@@ -0,0 +1,271 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: rh850_f1h.c 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+#include "kernel_impl.h"
+#include "rh850_f1h.h"
+#include "Os.h"
+#include "prc_sil.h"
+
+/*******************************************************************************************/
+/*  Outline      : Write protected register                                                */
+/*  Argument     : Register address                                                        */
+/*                 Register data                                                           */
+/*                 Register No                                                             */
+/*  Return value : 0: write success / 1: write error                                       */
+/*  Description  : Write protected register                                                */
+/*                                                                                         */
+/*******************************************************************************************/
+static uint32
+write_protected_reg(uint32 addr, uint32 data, uint8 regno)
+{
+	uint8	wk;
+	const uint32	cmd_reg[24] = {
+		PROTCMD0,PROTCMD1,CLMA0PCMD,CLMA1PCMD,CLMA2PCMD,PROTCMDCLMA,
+		JPPCMD0,PPCMD0,PPCMD1,PPCMD2,PPCMD3,PPCMD8,
+		PPCMD9,PPCMD10,PPCMD11,PPCMD12,PPCMD13,PPCMD18,PPCMD19,PPCMD20,PPCMD21,PPCMD22,
+		PROTCMDCVM,FLMDPCMD};
+	const uint32	s_reg[24] = {
+		PROTS0,PROTS1,CLMA0PS,CLMA1PS,CLMA2PS,PROTSCLMA,
+		JPPROTS0,PPROTS0,PPROTS1,PPROTS2,PPROTS3,PPROTS8,
+		PPROTS9,PPROTS10,PPROTS11,PPROTS12,PPROTS13,PPROTS18,PPROTS19,PPROTS20,PPROTS21,PPROTS22,
+		PROTSCVM,FLMDPS};
+	SIL_PRE_LOC;
+
+	if (regno > 24) {
+		return(UC_INVALIDPARAM);
+	}
+
+	SIL_LOC_INT();
+	sil_wrw_mem((void *) cmd_reg[regno], 0xA5);
+
+	sil_wrw_mem((void *) addr, data);
+	sil_wrw_mem((void *) addr, ~data);
+	sil_wrw_mem((void *) addr, data);
+	SIL_UNL_INT();
+
+	wk = sil_rew_mem((void *) s_reg[regno]);
+	wk &= 0x01;
+
+	return((wk == 0) ? UC_SUCCESS : UC_PROTREGERROR);
+} /* write_protected_reg */
+
+
+/*******************************************************************************************/
+/*  Outline      : Sub Oscillator enable                                                   */
+/*  Argument     : -                                                                       */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Sub Oscillator register setting                                         */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnableSubOSC(void)
+{
+	/* stop SubOSC */
+	if (write_protected_reg(SOSCE, 0x00, PNO_CtrlProt0) != UC_SUCCESS) return(UC_ERROR);
+
+	/* Wait inactive */
+	while (((sil_rew_mem((void *) SOSCS)) & CLK_S_CLKEN) != 0) {}
+
+	/* start SubOSC */
+	if (write_protected_reg(SOSCE, 0x01, PNO_CtrlProt0) != UC_SUCCESS) return(UC_ERROR);
+
+	/* Wait stabilization */
+	while (((sil_rew_mem((void *) SOSCS)) & CLK_S_CLKEN) == 0) {}
+
+	return(UC_SUCCESS);
+} /* EnableSubOSC */
+
+/*******************************************************************************************/
+/*  Outline      : Main Oscillator enable                                                  */
+/*  Argument     : Main Cscillator frequency(Hz)                                           */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Main Oscillator register setting                                        */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnableMainOSC(uint32 clk_in)
+{
+	uint8	ampsel;
+
+	/* stop MainOSC */
+	if (write_protected_reg(MOSCE, 0x02, PNO_CtrlProt0) != UC_SUCCESS)  return(UC_ERROR);
+	
+	if (clk_in == CLK_MHz(8)) {
+		ampsel = 0x03;
+	} else if (CLK_MHz(8) < clk_in && clk_in <= CLK_MHz(16)) {
+		ampsel = 0x02;
+	} else if (CLK_MHz(16) < clk_in && clk_in <= CLK_MHz(20)) {
+		ampsel = 0x01;
+	} else if (CLK_MHz(20) < clk_in && clk_in <= CLK_MHz(24)) {
+		ampsel = 0x00;
+	} else {
+		return(UC_INVALIDPARAM);
+	}
+
+	/* Wait inactive */
+	while (((sil_rew_mem((void *) MOSCS)) & CLK_S_CLKEN) != 0) {}
+
+	sil_wrw_mem((void *) MOSCC, 0x00 | ampsel); /* Normal stabilization time mode */
+	sil_wrw_mem((void *) MOSCST, 0x00FF);       /* stabilization time -> Max */
+
+	/* MainOSC start */
+	if (write_protected_reg(MOSCE, 0x01, PNO_CtrlProt0) != UC_SUCCESS)  return(UC_ERROR);
+
+	/* Wait stabilization */
+	while (((sil_rew_mem((void *) MOSCS)) & CLK_S_CLKEN) == 0) {}
+
+	return(UC_SUCCESS);
+} /* EnableMainOSC */
+
+/*******************************************************************************************/
+/*  Outline      : PLL0 enable                                                              */
+/*  Argument     : none                                                                    */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : PLL register setting                                                    */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnablePLL0(void)
+{
+	/* stop PLL */
+	if (write_protected_reg(PLL0E, 0x02, PNO_CtrlProt1) != UC_SUCCESS)  return(UC_ERROR);
+
+	sil_wrw_mem((void*) PLL0C,
+				(PLL0C_FVV<<29) | (PLL0C_MF<<24) | (PLL0C_ADJ<<20) |
+				(PLL0C_MD<<14)  | (PLL0C_SMD<<13) | (PLL0C_M<<11) |
+				(PLL0C_P<<8) | (PLL0C_N));
+
+	/* start PLL */
+	if (write_protected_reg(PLL0E, 0x01, PNO_CtrlProt1) != UC_SUCCESS)  return(UC_ERROR);
+
+	/* Wait stabilization */
+	while (((sil_rew_mem((void *) PLL0S)) & CLK_S_CLKEN) == 0) {}
+
+	return(UC_SUCCESS);
+} /* EnablePLL0 */
+
+
+/*******************************************************************************************/
+/*  Outline      : PLL1 enable                                                              */
+/*  Argument     : none                                                                    */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : PLL register setting                                                    */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnablePLL1(void)
+{
+	/* stop PLL */
+	if (write_protected_reg(PLL1E, 0x02, PNO_CtrlProt1) != UC_SUCCESS)  return(UC_ERROR);
+
+	sil_wrw_mem((void*) PLL1C,  (PLL1C_M<<11) | (PLL1C_PA<<8) | PLL1C_N);
+
+	/* start PLL */
+	if (write_protected_reg(PLL1E, 0x01, PNO_CtrlProt1) != UC_SUCCESS)  return(UC_ERROR);
+
+	/* Wait stabilization */
+	while (((sil_rew_mem((void *) PLL1S)) & CLK_S_CLKEN) == 0) {}
+
+	return(UC_SUCCESS);
+} /* EnablePLL1 */
+
+/*******************************************************************************************/
+/*  Outline      : Clock switcher setting                                                  */
+/*  Argument     : Selector Control reginster address                                      */
+/*                 Selector Status reginster address                                       */
+/*                 Register No                                                             */
+/*                 Select No                                                               */
+/*                 Divider Control reginster address                                       */
+/*                 Divider Status reginster address                                        */
+/*                 divider                                                                 */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Select clock source of CKSCLK_mn                                        */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+SetClockSelection(uint32 s_control, uint32 s_status, uint8 regno, uint16 sel,
+					uint32 d_control, uint32 d_status, uint8 divider)
+{
+	/* Set Selector */
+	if (write_protected_reg(s_control, sel, regno) != UC_SUCCESS) { return(UC_ERROR);}
+
+	/* Set Divider */
+	if (d_control != 0) {
+		if (write_protected_reg(d_control, divider, regno) != UC_SUCCESS) { return(UC_ERROR);}
+	}
+
+	/* Wait untile enable */
+	while (sil_rew_mem((void *) s_control) != sil_rew_mem((void *) s_status)) {};
+	if (d_control != 0) {
+		while (sil_rew_mem((void *) d_control) != sil_rew_mem((void *) d_status)) {};
+	}
+
+	return(UC_SUCCESS);
+}
+
+void
+raise_ipir(uint8 ch) {
+	if (current_cpuid() == 1) {
+		sil_wrw_mem((void*)IPIC_ADDR(ch), 2);
+	}
+	else {
+		sil_wrw_mem((void*)IPIC_ADDR(ch), 1);
+	}
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1h.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1h.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1h.h	(revision 172)
@@ -0,0 +1,391 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: rh850_f1h.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		RH850/F1Lã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+
+#ifndef TOPPERS_RH850_F1H_H
+#define TOPPERS_RH850_F1H_H
+
+#define _RH850G3M_
+
+/*
+ * ä¿è­·ã³ãã³ãã¬ã¸ã¹ã¿
+ */
+#define PROTCMD0		0xFFF80000
+#define PROTCMD1		0xFFF88000
+#define CLMA0PCMD		0xFFF8C010
+#define CLMA1PCMD		0xFFF8D010
+#define CLMA2PCMD		0xFFF8E010
+#define PROTCMDCLMA		0xFFF8C200
+#define JPPCMD0			0xFFC204C0
+#define PPCMD0			0xFFC14C00
+#define PPCMD1			0xFFC14C04
+#define PPCMD2			0xFFC14C08
+#define PPCMD3			0xFFC14C0C
+#define PPCMD8			0xFFC14C20
+#define PPCMD9			0xFFC14C24
+#define PPCMD10			0xFFC14C28
+#define PPCMD11			0xFFC14C2C
+#define PPCMD12			0xFFC14C30
+#define PPCMD13			0xFFC14C34
+#define PPCMD18			0xFFC14C48
+#define PPCMD19			0xFFC14C4C
+#define PPCMD20			0xFFC14C50
+#define PPCMD21			0xFFC14C54
+#define PPCMD22			0xFFC14C58
+#define PROTCMDCVM		0xFFF83200
+#define FLMDPCMD		0xFFA00004
+
+/*
+ * ä¿è­·ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿
+ */
+#define PROTS0			0xFFF80004
+#define PROTS1			0xFFF88004
+#define CLMA0PS			0xFFF8C014
+#define CLMA1PS			0xFFF8D014
+#define CLMA2PS			0xFFF8E014
+#define PROTSCLMA		0xFFF8C204
+#define JPPROTS0		0xFFC204B0
+#define PPROTS0			0xFFC14B00
+#define PPROTS1			0xFFC14B04
+#define PPROTS2			0xFFC14B08
+#define PPROTS3			0xFFC14B0C
+#define PPROTS8			0xFFC14B20
+#define PPROTS9			0xFFC14B24
+#define PPROTS10		0xFFC14B28
+#define PPROTS11		0xFFC14B2C
+#define PPROTS12		0xFFC14B30
+#define PPROTS13		0xFFC14B34
+#define PPROTS18		0xFFC14B48
+#define PPROTS19		0xFFC14B4C
+#define PPROTS20		0xFFC14B50
+#define PPROTS21		0xFFC14B54
+#define PPROTS22		0xFFC14B58
+#define PROTSCVM		0xFFF83204
+#define FLMDPS			0xFFA00008
+
+/*
+ * ä¿è­·ã³ãã³ãã¬ã¸ã¹ã¿ã®çªå·
+ */
+#define PNO_CtrlProt0			0
+#define PNO_CtrlProt1			1
+#define PNO_ClkMonitorCtrlProt0	2
+#define PNO_ClkMonitorCtrlProt1	3
+#define PNO_ClkMonitorCtrlProt2	4
+#define PNO_ClkMonitorTestProt	5
+#define PNO_PortProt0			6
+#define PNO_PortProt0_0			7
+#define PNO_PortProt0_1			8
+#define PNO_PortProt0_2			9
+#define PNO_PortProt0_3			10
+#define PNO_PortProt0_8			11
+#define PNO_PortProt1_9			12
+#define PNO_PortProt1_10		13
+#define PNO_PortProt1_11		14
+#define PNO_PortProt1_12		15
+#define PNO_PortProt1_13		16
+#define PNO_PortProt1_18		17
+#define PNO_PortProt1_19		18
+#define PNO_PortProt1_20		19
+#define PNO_PortProt1_21		20
+#define PNO_PortProt1_22		21
+#define PNO_CoreVMonitorProt	22
+#define PNO_SelfProgProt		23
+
+/*
+ *  PORTã¬ã¸ã¹ã¿
+ */
+#define PORT_BASE	UINT_C(0xffc10000)
+
+/* ç«¯å­æ©è½è¨­å®  (USE)*/
+#define PMC(n)		((PORT_BASE) +0x0400 + (n * 0x04U))     /* ãã¼ãã»ã¢ã¼ãã»ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PMCSR(n)	((PORT_BASE) +0x0900 + (n * 0x04U))     /* ãã¼ãã»ã¢ã¼ãã»ã³ã³ãã­ã¼ã«ã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+#define PIPC(n)		((PORT_BASE) +0x4200 + (n * 0x04U))     /* ãã¼ãIP ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PM(n)		((PORT_BASE) +0x0300 + (n * 0x04U))     /* ãã¼ãã»ã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define PMSR(n)		((PORT_BASE) +0x0800 + (n * 0x04U))     /* ãã¼ãã»ã¢ã¼ãã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+#define PIBC(n)		((PORT_BASE) +0x4000 + (n * 0x04U))     /* ãã¼ãå
+¥åãããã¡ã»ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PFC(n)		((PORT_BASE) +0x0500 + (n * 0x04U))     /* ãã¼ãæ©è½ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PFCE(n)		((PORT_BASE) +0x0600 + (n * 0x04U))     /* ãã¼ãæ©è½ã³ã³ãã­ã¼ã«æ¡å¼µã»ã¬ã¸ã¹ã¿ */
+#define PFCAE(n)	((PORT_BASE) +0x0A00 + (n * 0x04U))     /* ãã¼ãæ©è½ã³ã³ãã­ã¼ã«è¿½å æ¡å¼µã»ã¬ã¸ã¹ã¿ */
+
+/* ç«¯å­ãã¼ã¿å
+¥åï¼åºå  (USE)*/
+#define PBDC(n)		((PORT_BASE) +0x4100 + (n * 0x04U))     /* ãã¼ãåæ¹åã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PPR(n)		((PORT_BASE) +0x0200 + (n * 0x04U))     /* ãã¼ãç«¯å­ãªã¼ãã»ã¬ã¸ã¹ã¿ */
+#define P(n)		((PORT_BASE) +0x0000 + (n * 0x04U))     /* ãã¼ãã»ã¬ã¸ã¹ã¿ */
+#define PNOT(n)		((PORT_BASE) +0x0700 + (n * 0x04U))     /* ãã¼ãã»ãããã»ã¬ã¸ã¹ã¿ */
+#define PSR(n)		((PORT_BASE) +0x0100 + (n * 0x04U))     /* ãã¼ãã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+
+
+#define RLN3xBASE			0xffce2040
+
+#define RLN3xLWBR_B			0x00000001
+#define RLN3xLBRP01_H		0x00000002
+#define RLN3xLBRP0_B		0x00000002
+#define RLN3xLBRP1_B		0x00000003
+#define RLN3xLSTC_B			0x00000004
+#define RLN3xLMD_B			0x00000008
+#define RLN3xLBFC_B			0x00000009
+#define RLN3xLSC_B			0x0000000a
+#define RLN3xLWUP_B			0x0000000b
+#define RLN3xLIE_B			0x0000000c
+#define RLN3xLEDE_B			0x0000000d
+#define RLN3xLCUC_B			0x0000000e
+#define RLN3xLTRC_B			0x00000010
+#define RLN3xLMST_B			0x00000011
+#define RLN3xLST_B			0x00000012
+#define RLN3xLEST_B			0x00000013
+#define RLN3xLDFC_B			0x00000014
+#define RLN3xLIDB_B			0x00000015
+#define RLN3xLCBR_B			0x00000016
+#define RLN3xLUDB0_B		0x00000017
+#define RLN3xLDBR1_B		0x00000018
+#define RLN3xLDBR2_B		0x00000019
+#define RLN3xLDBR3_B		0x0000001a
+#define RLN3xLDBR4_B		0x0000001b
+#define RLN3xLDBR5_B		0x0000001c
+#define RLN3xLDBR6_B		0x0000001d
+#define RLN3xLDBR7_B		0x0000001e
+#define RLN3xLDBR8_B		0x0000001f
+#define RLN3xLUOER_B		0x00000020
+#define RLN3xLUOR1_B		0x00000021
+#define RLN3xLUTDR_H		0x00000024
+#define RLN3xLUTDRL_B		0x00000024
+#define RLN3xLUTDRH_B		0x00000025
+#define RLN3xLURDR_H		0x00000026
+#define RLN3xLURDRL_B		0x00000026
+#define RLN3xLURDRH_B		0x00000027
+#define RLN3xLUWTDR_H		0x00000028
+#define RLN3xLUWTDRL_B		0x00000028
+#define RLN3xLUWTDRH_B		0x00000029
+
+
+/*
+ * OSTM
+ */
+#if 0
+#define OSTM_IRQ			UINT_C(147)
+
+#define OSTM0_BASE	0xFFD70000
+#define OSTM1_BASE	0xFFD70100
+#define OSTM2_BASE	0xFFD70200
+#define OSTM3_BASE	0xFFD70300
+#define OSTM4_BASE	0xFFD70400
+#define OSTM5_BASE	0xFFD71000
+#define OSTM6_BASE	0xFFD71100
+#define OSTM7_BASE	0xFFD71200
+#define OSTM8_BASE	0xFFD71300
+#define OSTM9_BASE	0xFFD71400
+
+#define OSTM_CMP_W	0x00
+#define OSTM_CNT_W	0x04
+#define OSTM_TE		0x10
+#define OSTM_TS_B	0x14
+#define OSTM_TT_B	0x18
+#define OSTM_CTL_B	0x20
+#endif
+/*
+ *  PLLé¢é£ã®ã¬ã¸ã¹ã¿ã¨å®ç¾©
+ */
+/* Main OSC */
+#define MOSCE		0xfff81100
+#define MOSCS		0xfff81104
+#define MOSCC		0xfff81108
+#define MOSCST		0xfff8110c
+#define MOSCSTPM	0xfff81118
+
+/* Sub OSC  */
+#define SOSCE		0xfff81200
+#define SOSCS		0xfff81204
+#define SOSCST		0xfff8120C
+
+/* PLL  */
+#define PLL0E		0xfff89000
+#define PLL0S		0xfff89004
+#define PLL0C		0xfff89008
+#define PLL1E		0xfff89100
+#define PLL1S		0xfff89104
+#define PLL1C		0xfff89108
+
+
+#define CKSC_CPUCLKS_CTL	0xfff8a000
+#define CKSC_CPUCLKS_ACT	0xfff8a008
+#define CKSC_CPUCLKD_CTL	0xfff8a100
+#define CKSC_CPUCLKD_ACT	0xfff8a108
+
+#define CKSC_ILINS_CTL		0xfff8a400
+#define CKSC_ILINS_ACT		0xfff8a408
+#define CKSC_ILIND_CTL		0xfff8a800
+#define CKSC_ILIND_ACT		0xfff8a808
+
+#define CKSC_ATAUJS_CTL		0xfff82100
+#define CKSC_ATAUJS_ACT		0xfff82108
+#define CKSC_ATAUJD_CTL		0xfff82200
+#define CKSC_ATAUJD_ACT		0xfff82208
+
+#define MHz(n)		((n) * 1000 * 1000)
+#define CLK_MHz(num)	(num * 1000 * 1000)
+
+/* xxxS Register (USE) */
+#define CLK_S_STPACK	0x08
+#define CLK_S_CLKEN		0x04
+#define CLK_S_CLKACT	0x02
+#define CLK_S_CLKSTAB	0x01
+
+
+/* Return Parameter */
+#define UC_SUCCESS			0
+#define UC_ERROR			1
+#define UC_INVALIDPARAM		2
+#define UC_PROTREGERROR		3
+#define UC_CLKSTATUSERR		4
+#define UC_CLKNOTENABLE		5
+#define UC_CLKNOTACTIVE		6
+#define UC_CLKNOTSTAB		7
+
+/*
+ *  RLIN3
+ */
+#define RLIN30_BASE 0xffce2000
+#define RLIN31_BASE 0xffce2040
+#define RLIN32_BASE 0xffce2080
+#define RLIN33_BASE 0xffce20c0
+#define RLIN34_BASE 0xffce2100
+#define RLIN35_BASE 0xffce2140
+  
+/*
+ *  INTC
+ */
+#define INTC1_BASE  0xFFFEEA00
+#define INTC2_BASE  0xFFFFB000
+
+#define INTC2_EIC   0x040
+#define INTC2_EIBD  0x880
+#define INTC2_INTNO_OFFSET 32
+
+/* intno ã¯ unsigned ãæ³å® */
+#define EIC_ADDRESS(intno)	(intno <= 31)? (INTC1_BASE + (intno * 2)) : (INTC2_BASE + INTC2_EIC  + ((intno - INTC2_INTNO_OFFSET) * 2))
+
+#define INTC_HAS_IBD
+
+#define IBD_ADDRESS(intno)	(intno <= 31)? (0xFFFEEB00 + (intno * 4)) : (0xFFFFB880 + ((intno - INTC2_INTNO_OFFSET) * 4))
+
+#define TMIN_INTNO	UINT_C(0)
+#define TMAX_INTNO	UINT_C(350)
+#define TNUM_INT	UINT_C(351)
+
+/*
+ *  INTNO
+ */
+#define RLIN30_TX_INTNO		UINT_C(34)
+#define RLIN30_RX_INTNO		UINT_C(35)
+#define RLIN30_ER_INTNO		UINT_C(36)
+#define RLIN31_TX_INTNO		UINT_C(121)
+#define RLIN31_RX_INTNO		UINT_C(122)
+#define RLIN31_ER_INTNO		UINT_C(123)
+#define RLIN35_TX_INTNO		UINT_C(237)
+#define RLIN35_RX_INTNO		UINT_C(238)
+#define RLIN35_ER_INTNO		UINT_C(239)
+
+#define TAUFJ0I0_INTNO		UINT_C(80)
+#define TAUFJ0I1_INTNO		UINT_C(81)
+#define TAUFJ0I2_INTNO		UINT_C(82)
+#define TAUFJ0I3_INTNO		UINT_C(83)
+#define TAUFJ1I0_INTNO		UINT_C(168)
+#define TAUFJ1I1_INTNO		UINT_C(169)
+#define TAUFJ1I2_INTNO		UINT_C(170)
+#define TAUFJ1I3_INTNO		UINT_C(171)
+
+/*
+ *  PEéå²è¾¼ã¿ã¬ã¸ã¹ã¿
+ */
+#define IPIR_CH0 0xfffeec80
+#define IPIR_CH1 0xfffeec84
+#define IPIR_CH2 0xfffeec88
+#define IPIR_CH3 0xfffeec8c
+
+#define IPIC_ADDR(ch)  (IPIR_CH0 + ch * 4)
+
+
+#ifndef TOPPERS_MACRO_ONLY
+
+extern uint32 EnableSubOSC(void);
+
+extern uint32 EnableMainOSC(uint32 clk_in);
+
+extern uint32 EnablePLL0(void);
+
+extern uint32 EnablePLL1(void);
+
+extern uint32 SetClockSelection(uint32 s_control, uint32 s_status, uint8 regno, uint16 sel,
+					uint32 d_control, uint32 d_status, uint8 divider);
+
+extern void raise_ipir(uint8 ch);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+
+#include "v850.h"
+
+#endif /* TOPPERS_RH850_F1H_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l.c	(revision 172)
@@ -0,0 +1,261 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: rh850_f1l.c 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+#include "kernel_impl.h"
+#include "rh850_f1l.h"
+#include "Os.h"
+#include "prc_sil.h"
+
+/*******************************************************************************************/
+/*  Outline      : Write protected register                                                */
+/*  Argument     : Register address                                                        */
+/*                 Register data                                                           */
+/*                 Register No                                                             */
+/*  Return value : 0: write success / 1: write error                                       */
+/*  Description  : Write protected register                                                */
+/*                                                                                         */
+/*******************************************************************************************/
+static uint32
+write_protected_reg(uint32 addr, uint32 data, uint8 regno)
+{
+	uint8			wk;
+	const uint32	cmd_reg[19] = {
+		PROTCMD0, PROTCMD1, CLMA0PCMD, CLMA1PCMD, CLMA2PCMD, PROTCMDCLMA,
+		JPPCMD0, PPCMD0, PPCMD1, PPCMD2, PPCMD8,
+		PPCMD9, PPCMD10, PPCMD11, PPCMD12, PPCMD18, PPCMD20,
+		PROTCMDCVM, FLMDPCMD
+	};
+	const uint32	s_reg[19] = {
+		PROTS0, PROTS1, CLMA0PS, CLMA1PS, CLMA2PS, PROTSCLMA,
+		JPPROTS0, PPROTS0, PPROTS1, PPROTS2, PPROTS8,
+		PPROTS9, PPROTS10, PPROTS11, PPROTS12, PPROTS18, PPROTS20,
+		PROTSCVM, FLMDPS
+	};
+	SIL_PRE_LOC;
+
+	if (regno > 19) {
+		return(UC_INVALIDPARAM);
+	}
+
+	SIL_LOC_INT();
+	sil_wrw_mem((void *) cmd_reg[regno], 0xA5);
+
+	sil_wrw_mem((void *) addr, data);
+	sil_wrw_mem((void *) addr, ~data);
+	sil_wrw_mem((void *) addr, data);
+	SIL_UNL_INT();
+
+	wk = sil_rew_mem((void *) s_reg[regno]);
+	wk &= 0x01;
+
+	return((wk == 0) ? UC_SUCCESS : UC_PROTREGERROR);
+} /* write_protected_reg */
+
+
+/*******************************************************************************************/
+/*  Outline      : Sub Oscillator enable                                                   */
+/*  Argument     : -                                                                       */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Sub Oscillator register setting                                         */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnableSubOSC(void)
+{
+	/* stop SubOSC */
+	if (write_protected_reg(SOSCE, 0x00, PNO_CtrlProt0) != UC_SUCCESS) {
+		return(UC_ERROR);
+	}
+
+	/* Wait inactive */
+	while (((sil_rew_mem((void *) SOSCS)) & CLK_S_CLKEN) != 0) {
+	}
+
+	/* start SubOSC */
+	if (write_protected_reg(SOSCE, 0x01, PNO_CtrlProt0) != UC_SUCCESS) return(UC_ERROR);
+
+	/* Wait stabilization */
+	while (((sil_rew_mem((void *) SOSCS)) & CLK_S_CLKEN) == 0) {
+	}
+
+	return(UC_SUCCESS);
+} /* EnableSubOSC */
+
+/*******************************************************************************************/
+/*  Outline      : Main Oscillator enable                                                  */
+/*  Argument     : Main Cscillator frequency(Hz)                                           */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Main Oscillator register setting                                        */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnableMainOSC(uint32 clk_in)
+{
+	uint8 ampsel;
+
+	/* stop MainOSC */
+	if (write_protected_reg(MOSCE, 0x02, PNO_CtrlProt0) != UC_SUCCESS) {
+		return(UC_ERROR);
+	}
+
+	if (clk_in == CLK_MHz(8)) {
+		ampsel = 0x03;
+	}
+	else if (CLK_MHz(8) < clk_in && clk_in <= CLK_MHz(16)) {
+		ampsel = 0x02;
+	}
+	else if (CLK_MHz(16) < clk_in && clk_in <= CLK_MHz(20)) {
+		ampsel = 0x01;
+	}
+	else if (CLK_MHz(20) < clk_in && clk_in <= CLK_MHz(24)) {
+		ampsel = 0x00;
+	}
+	else {
+		return(UC_INVALIDPARAM);
+	}
+
+	/* Wait inactive */
+	while (((sil_rew_mem((void *) MOSCS)) & CLK_S_CLKEN) != 0) {
+	}
+
+	sil_wrw_mem((void *) MOSCC, 0x00 | ampsel); /* Normal stabilization time mode */
+	sil_wrw_mem((void *) MOSCST, 0x00FF);       /* stabilization time -> Max */
+
+	/* MainOSC start */
+	if (write_protected_reg(MOSCE, 0x01, PNO_CtrlProt0) != UC_SUCCESS) {
+		return(UC_ERROR);
+	}
+
+	/* Wait stabilization */
+	while (((sil_rew_mem((void *) MOSCS)) & CLK_S_CLKEN) == 0) {
+	}
+
+	return(UC_SUCCESS);
+} /* EnableMainOSC */
+
+/*******************************************************************************************/
+/*  Outline      : PLL enable                                                              */
+/*  Argument     : none                                                                    */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : PLL register setting                                                    */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnablePLL(void)
+{
+	/* stop PLL */
+	if (write_protected_reg(PLLE, 0x02, PNO_CtrlProt1) != UC_SUCCESS) {
+		return(UC_ERROR);
+	}
+
+	sil_wrw_mem((void *) PLLC, (PLLC_OUTBSEL << 16) | ((PLLC_mr - 1) << 11) | ((PLLC_par >> 1) << 8) | (PLLC_nr - 1));
+
+	/* start PLL */
+	if (write_protected_reg(PLLE, 0x01, PNO_CtrlProt1) != UC_SUCCESS) {
+		return(UC_ERROR);
+	}
+
+	/* Wait stabilization */
+	while (((sil_rew_mem((void *) PLLS)) & CLK_S_CLKEN) == 0) {
+	}
+
+	return(UC_SUCCESS);
+} /* EnablePLL */
+
+/*******************************************************************************************/
+/*  Outline      : Clock switcher setting                                                  */
+/*  Argument     : Selector Control reginster address                                      */
+/*                 Selector Status reginster address                                       */
+/*                 Register No                                                             */
+/*                 Select No                                                               */
+/*                 Divider Control reginster address                                       */
+/*                 Divider Status reginster address                                        */
+/*                 divider                                                                 */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Select clock source of CKSCLK_mn                                        */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+SetClockSelection(uint32 s_control, uint32 s_status, uint8 regno, uint16 sel,
+				  uint32 d_control, uint32 d_status, uint8 divider)
+{
+	/* Set Selector */
+	if (write_protected_reg(s_control, sel, regno) != UC_SUCCESS) {
+		return(UC_ERROR);
+	}
+
+	/* Set Divider */
+	if (d_control != 0) {
+		if (write_protected_reg(d_control, divider, regno) != UC_SUCCESS) {
+			return(UC_ERROR);
+		}
+	}
+
+	/* Wait untile enable */
+	while (sil_rew_mem((void *) s_control) != sil_rew_mem((void *) s_status)) {
+	}
+
+	if (d_control != 0) {
+		while (sil_rew_mem((void *) d_control) != sil_rew_mem((void *) d_status)) {
+		}
+	}
+
+	return(UC_SUCCESS);
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l.h	(revision 172)
@@ -0,0 +1,276 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: rh850_f1l.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		RH850/F1Lã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+
+#ifndef TOPPERS_RH850_F1L_H
+#define TOPPERS_RH850_F1L_H
+
+#define _RH850G3K_
+
+/*
+ * ä¿è­·ã³ãã³ãã¬ã¸ã¹ã¿
+ */
+#define PROTCMD0		0xFFF80000
+#define PROTCMD1		0xFFF88000
+#define CLMA0PCMD		0xFFF8C010
+#define CLMA1PCMD		0xFFF8D010
+#define CLMA2PCMD		0xFFF8E010
+#define PROTCMDCLMA		0xFFF8C200
+#define JPPCMD0			0xFFC204C0
+#define PPCMD0			0xFFC14C00
+#define PPCMD1			0xFFC14C04
+#define PPCMD2			0xFFC14C08
+#define PPCMD8			0xFFC14C20
+#define PPCMD9			0xFFC14C24
+#define PPCMD10			0xFFC14C28
+#define PPCMD11			0xFFC14C2C
+#define PPCMD12			0xFFC14C30
+#define PPCMD18			0xFFC14C48
+#define PPCMD20			0xFFC14C50
+#define PROTCMDCVM		0xFFF50100
+#define FLMDPCMD		0xFFA00004
+
+/*
+ * ä¿è­·ã¹ãã¼ã¿ã¹ã¬ã¸ã¹ã¿
+ */
+#define PROTS0			0xFFF80004
+#define PROTS1			0xFFF88004
+#define CLMA0PS			0xFFF8C014
+#define CLMA1PS			0xFFF8D014
+#define CLMA2PS			0xFFF8E014
+#define PROTSCLMA		0xFFF8C204
+#define JPPROTS0		0xFFC204B0
+#define PPROTS0			0xFFC14B00
+#define PPROTS1			0xFFC14B04
+#define PPROTS2			0xFFC14B08
+#define PPROTS8			0xFFC14B20
+#define PPROTS9			0xFFC14B24
+#define PPROTS10		0xFFC14B28
+#define PPROTS11		0xFFC14B2C
+#define PPROTS12		0xFFC14B30
+#define PPROTS18		0xFFC14B48
+#define PPROTS20		0xFFC14B50
+#define PROTSCVM		0xFFF50104
+#define FLMDPS			0xFFA00008
+
+/*
+ * ä¿è­·ã³ãã³ãã¬ã¸ã¹ã¿ã®çªå·
+ */
+#define PNO_CtrlProt0			0
+#define PNO_CtrlProt1			1
+#define PNO_ClkMonitorCtrlProt0	2
+#define PNO_ClkMonitorCtrlProt1	3
+#define PNO_ClkMonitorCtrlProt2	4
+#define PNO_ClkMonitorTestProt	5
+#define PNO_PortProt1_0			6
+#define PNO_PortProt1_1			7
+#define PNO_PortProt1_2			8
+#define PNO_PortProt1_8			9
+#define PNO_PortProt1_9			10
+#define PNO_PortProt1_10		11
+#define PNO_PortProt1_11		12
+#define PNO_PortProt1_12		13
+#define PNO_PortProt1_18		14
+#define PNO_PortProt1_20		15
+#define PNO_PortProt2			16
+#define PNO_CoreVMonitorProt	17
+#define PNO_SelfProgProt		18
+
+/*
+ *  PORTã¬ã¸ã¹ã¿
+ */
+#define PORT_BASE	UINT_C(0xffc10000)
+
+/* ç«¯å­æ©è½è¨­å®  (USE)*/
+#define PMC(n)		((PORT_BASE) + 0x0400 + (n * 0x04U))         /* ãã¼ãã»ã¢ã¼ãã»ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PMCSR(n)	((PORT_BASE) + 0x0900 + (n * 0x04U))         /* ãã¼ãã»ã¢ã¼ãã»ã³ã³ãã­ã¼ã«ã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+#define PIPC(n)		((PORT_BASE) + 0x4200 + (n * 0x04U))         /* ãã¼ãIP ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PM(n)		((PORT_BASE) + 0x0300 + (n * 0x04U))         /* ãã¼ãã»ã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define PMSR(n)		((PORT_BASE) + 0x0800 + (n * 0x04U))         /* ãã¼ãã»ã¢ã¼ãã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+#define PIBC(n)		((PORT_BASE) + 0x4000 + (n * 0x04U))         /* ãã¼ãå
+¥åãããã¡ã»ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PFC(n)		((PORT_BASE) + 0x0500 + (n * 0x04U))         /* ãã¼ãæ©è½ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PFCE(n)		((PORT_BASE) + 0x0600 + (n * 0x04U))         /* ãã¼ãæ©è½ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PFCAE(n)	((PORT_BASE) + 0x0A00 + (n * 0x04U))         /* ãã¼ãæ©è½ã³ã³ãã­ã¼ã«ã»æ¡å¼µã¬ã¸ã¹ã¿ */
+
+/* ç«¯å­ãã¼ã¿å
+¥åï¼åºå  (USE)*/
+#define PBDC(n)		((PORT_BASE) + 0x4100 + (n * 0x04U))         /* ãã¼ãåæ¹åã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PPR(n)		((PORT_BASE) + 0x0200 + (n * 0x04U))         /* ãã¼ãç«¯å­ãªã¼ãã»ã¬ã¸ã¹ã¿ */
+#define P(n)		((PORT_BASE) + 0x0000 + (n * 0x04U))         /* ãã¼ãã»ã¬ã¸ã¹ã¿ */
+#define PNOT(n)		((PORT_BASE) + 0x0700 + (n * 0x04U))         /* ãã¼ãã»ãããã»ã¬ã¸ã¹ã¿ */
+#define PSR(n)		((PORT_BASE) + 0x0100 + (n * 0x04U))         /* ãã¼ãã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+
+
+/*
+ *  PLLé¢é£ã®ã¬ã¸ã¹ã¿ã¨å®ç¾©
+ */
+/* Main OSC */
+#define MOSCE		0xfff81100
+#define MOSCS		0xfff81104
+#define MOSCC		0xfff81108
+#define MOSCST		0xfff8110c
+#define MOSCSTPM	0xfff81118
+
+/* Sub OSC  */
+#define SOSCE		0xfff81200
+#define SOSCS		0xfff81204
+
+/* PLL  */
+#define PLLE		0xfff89000
+#define PLLS		0xfff89004
+#define PLLC		0xfff89008
+
+#define CKSC_CPUCLKS_CTL	0xfff8a000
+#define CKSC_CPUCLKS_ACT	0xfff8a008
+#define CKSC_CPUCLKD_CTL	0xfff8a100
+#define CKSC_CPUCLKD_ACT	0xfff8a108
+
+#define CKSC_ATAUJS_CTL         0xfff82100 
+#define CKSC_ATAUJS_ACT         0xfff82108 
+#define CKSC_ATAUJD_CTL         0xfff82200 
+#define CKSC_ATAUJD_ACT         0xfff82208 
+
+#define MHz(n)		((n) * 1000 * 1000)
+#define CLK_MHz(num)	(num * 1000 * 1000)
+
+/* xxxS Register (USE) */
+#define CLK_S_STPACK	0x08
+#define CLK_S_CLKEN		0x04
+#define CLK_S_CLKACT	0x02
+#define CLK_S_CLKSTAB	0x01
+
+/* Return Parameter */
+#define UC_SUCCESS			0
+#define UC_ERROR			1
+#define UC_INVALIDPARAM		2
+#define UC_PROTREGERROR		3
+#define UC_CLKSTATUSERR		4
+#define UC_CLKNOTENABLE		5
+#define UC_CLKNOTACTIVE		6
+#define UC_CLKNOTSTAB		7
+
+/*
+ *  INTC
+ */
+#define INTC1_BASE	0xFFFF9000
+#define INTC2_BASE	0xFFFFA000
+
+#define INTC2_EIC	0x040
+#define INTC2_EIBD	0x880
+#define INTC2_INTNO_OFFSET	32
+
+/* intno ã¯ unsigned ãæ³å® */
+#define EIC_ADDRESS(intno)	(intno <= 31) ? (INTC1_BASE + (intno * 2)) : (INTC2_BASE + INTC2_EIC  + ((intno - INTC2_INTNO_OFFSET) * 2))
+
+#define TMIN_INTNO	UINT_C(0)
+#define TMAX_INTNO	UINT_C(287)
+#define TNUM_INT	UINT_C(288)
+
+
+#define RLIN30_BASE	0xffcf0000
+#define RLIN31_BASE	0xffcf0040
+#define RLIN32_BASE	0xffcf0080
+#define RLIN33_BASE	0xffcf00c0
+#define RLIN34_BASE	0xffcf0100
+#define RLIN35_BASE	0xffcf0140
+
+/*
+ *  INTNO
+ */
+#define RLIN31_TX_INTNO		UINT_C(113)
+#define RLIN31_RX_INTNO		UINT_C(114)
+#define RLIN32_TX_INTNO		UINT_C(157)
+#define RLIN32_RX_INTNO		UINT_C(158)
+#define RLIN32_ER_INTNO		UINT_C(159)
+#define RLIN35_TX_INTNO		UINT_C(229)
+#define RLIN35_RX_INTNO		UINT_C(230)
+#define RLIN35_ER_INTNO		UINT_C(231)
+
+#define TAUFJ0I0_INTNO		UINT_C(72)
+#define TAUFJ0I1_INTNO		UINT_C(73)
+#define TAUFJ0I2_INTNO		UINT_C(74)
+#define TAUFJ0I3_INTNO		UINT_C(75)
+#define TAUFJ1I0_INTNO		UINT_C(160)
+#define TAUFJ1I1_INTNO		UINT_C(161)
+#define TAUFJ1I2_INTNO		UINT_C(162)
+#define TAUFJ1I3_INTNO		UINT_C(163)
+
+#ifndef TOPPERS_MACRO_ONLY
+
+extern uint32 EnableSubOSC(void);
+
+extern uint32 EnableMainOSC(uint32 clk_in);
+
+extern uint32 EnablePLL(void);
+
+extern uint32	SetClockSelection(uint32 s_control, uint32 s_status, uint8 regno, uint16 sel,
+								  uint32 d_control, uint32 d_status, uint8 divider);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+
+#include "v850.h"
+
+#endif /* TOPPERS_RH850_F1L_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l_2m.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l_2m.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/rh850_f1l_2m.ld	(revision 172)
@@ -0,0 +1,107 @@
+/*
+ *	RH850/F1L-2Mãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 2M
+	INTRAM(wax)  : org = 0xFEDE0000, len = 128k
+};
+
+PROVIDE(_hardware_init_hook = 0);
+PROVIDE(_software_init_hook = 0);
+PROVIDE(_software_term_hook = 0);
+
+PROVIDE(StartupHook = 0);
+PROVIDE(ShutdownHook = 0);
+PROVIDE(PreTaskHook = 0);
+PROVIDE(PostTaskHook = 0);
+PROVIDE(ErrorHook = 0);
+PROVIDE(ProtectionHook = 0);
+
+PROVIDE(_bsssecinib_table = 0);
+PROVIDE(_tnum_bsssec = 0);
+PROVIDE(_datasecinib_table = 0);
+PROVIDE(_tnum_datasec = 0);
+
+OUTPUT_FORMAT("elf32-v850-rh850", "elf32-v850-rh850",
+	      "elf32-v850-rh850")
+OUTPUT_ARCH(v850-rh850)
+STARTUP(start.o)
+SECTIONS
+{
+	.text :	
+	{
+		__text = . ;
+		__tp = . ;
+		*(.reset.text)
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+	
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(4);
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data);
+	
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+	
+	.sdata ALIGN (4) :
+	{
+		PROVIDE (__gp = . + 0x8000);
+		*(.sdata)
+	} > INTRAM
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }	
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/start.S
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/start.S	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/start.S	(revision 172)
@@ -0,0 +1,262 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: start.S 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ã«ã¼ãã«å¯¾å¿ã®ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ */
+
+#define OMIT_INCLUDE_OS_CFG		/* Os_Cfg.hã¤ã³ã¯ã«ã¼ãææ­¢ */
+
+#include <v850asm.inc>
+
+	.section .text_kernel
+	.align  4
+	.global __start
+    .extern _bsssecinib_table
+    .extern _tnum_bsssec
+    .extern _datasecinib_table
+    .extern _tnum_datasec
+    .extern _syscall_table
+FLABEL(__start)
+	di                                  /* å²ãè¾¼ã¿ç¦æ­¢ */
+
+	/*
+	 * åç¨®ãã¤ã³ã¿ã®åæå(SP/TP/EP/GP/CTBP)
+	 */
+	Lea     __ostkpt, r3
+	ld.w	0[r3],r3
+    /* =begin modified for SC3 */
+    /*
+     * ep, ctbpã¯ã¨ããããä½¿ç¨ããªã
+     * tp, gpã¯sdataã¢ã¯ã»ã¹ã§ã³ã³ãã¤ã©ãä½¿ç¨ãã
+     */
+	Lea		__tp, tp 
+	/* Lea		__ep , ep */
+	Lea 	__gp , gp
+	/* Lea		__ctbp , r6 */
+	/* ldsr	r6 , 20 */
+    /*
+     *  syscallã®åä½è¨­å®
+     */
+#ifdef __v850e2v3__
+    mov     SYSCALL_SIZE, r6
+    ldsr    r6, sccfg
+    Lea     _syscall_table, r6
+    ldsr    r6, scbp
+#elif defined(__v850e3v5__)
+    mov     SYSCALL_SIZE, r6
+    ldsr    r6, 11, 1
+    Lea     _syscall_table, r6
+    ldsr    r6, 12, 1
+    syncp
+#endif /* __v850e2v3__ */
+
+    /* =end modified for SC3 */
+
+#ifdef TOPPERS_USE_HFLOAT
+	/* 
+	 *  FPUãæå¹ã«
+	 */
+	stsr psw, r12       /* load psw */
+	mov  0x00010000,r13 /* PSW.CU0(PSW[16]) = 1 */
+	or   r13, r12
+	ldsr r12, psw       /* store psw */
+#endif /* TOPPERS_USE_HFLOAT */
+ 	
+	/*
+	 *  hardware_init_hook ã®å¼åºãï¼0 ã§ãªãå ´åï¼
+	 *
+	 *  ã¿ã¼ã²ãããã¼ãã¦ã§ã¢ã«ä¾å­ãã¦å¿
+è¦ãªåæåå¦çãããå ´å
+	 *  ã¯ï¼hardware_init_hook ã¨ããé¢æ°ãç¨æããï¼
+	 */
+	Lea		_hardware_init_hook, r1
+	cmp		r0, r1
+	be		hardware_init_hook_end
+	jarl	_hardware_init_hook, lp
+FLABEL(hardware_init_hook_end)
+	
+	/*
+	 *  BSSã»ã¯ã·ã§ã³åæå
+     *  r0: ã¼ã­ã¬ã¸ã¹ã¿
+	 */
+    mov     r0, r6                  /* r6: ãã¼ãã«ã®ã¤ã³ããã¯ã¹ i */
+    Lea     _tnum_bsssec, r7
+    ld.w    0[r7], r7               /* r7: ãã¼ãã«ã®è¦ç´ æ° num */
+    Lea     _bsssecinib_table, r8   /* r8: ãã¼ãã«ã®ã¢ãã¬ã¹ */
+FLABEL(bss_clear_start)
+    cmp     r7, r6                  /* ã«ã¼ãçµäºæ¡ä»¶: i >= num */
+    bnl     bss_clear_end
+    ld.w    0[r8], ep               /* ep: bssã®å
+é ­çªå° */
+    ld.w    4[r8], r9               /* r9: bssã®çµäºçªå° */
+	cmp     r9, ep                  /* bssãç©ºãï¼ */
+	bnl 	bss_clear_start_hook    /* ç©ºãªãã°æ¬¡ã®bssã¸ */
+    nop
+FLABEL(bss_clear_body)
+    /*
+     *  bssã®é åã¯ï¼4byteå¢çã«ã¢ã©ã¤ã³ããã¦ãã
+     *  ãã£ã¦ï¼4byteãã¤ãã¼ã¿ãã³ãã¼ãã¦ãã
+     */
+	sst.w   r0, 0[ep]           /* bssã®é åã0ã§åæå */
+	add     4, ep              /* æ¬¡ã®çªå°ã¸ */
+	cmp     r9, ep              /* bssã®çµäºçªå°ã¾ã§æ¥ããï¼ */
+	bl      bss_clear_body      /* çµäºçªå°ã§ãªããã°ã«ã¼ã */
+#ifdef BSSSEC_ALIGN_MASK
+    /*
+     *  å¢çã«ãªãã¾ã§åæåãç¶ãã
+     */
+    mov     BSSSEC_ALIGN_MASK, r10
+FLABEL(bss_clear_body2)
+    tst     r10, ep         /* ep & 0xf == 0 ? */
+    bz      bss_clear_start_hook
+	sst.w	r0, 0[ep]       /* 0åæå */
+    add     4, ep
+    jr      bss_clear_body2
+#endif /* BSSSEC_ALIGN_MASK */
+    nop
+FLABEL(bss_clear_start_hook)
+    add     8, r8 /* ãã¼ãã«ã®ã¢ãã¬ã¹ãã¤ã³ã¯ãªã¡ã³ã 4byte * 2 -> 8 */
+    add     1, r6 /* ãã¼ãã«ã®ã¤ã³ããã¯ã¹ãã¤ã³ã¯ãªã¡ã³ã: i++ */
+    br      bss_clear_start
+    nop
+FLABEL(bss_clear_end)
+
+#ifndef OMIT_DATA_INIT
+	/*
+	 *  dataã»ã¯ã·ã§ã³ã®åæåï¼ROMåå¯¾å¿ï¼
+	 *
+	 */
+    mov     r0, r6                  /* r6: ãã¼ãã«ã®ã¤ã³ããã¯ã¹ i */
+    Lea     _tnum_datasec, r7
+    ld.w    0[r7], r7               /* r7: ãã¼ãã«ã®è¦ç´ æ° num */
+    Lea     _datasecinib_table, r8  /* r8: ãã¼ãã«ã®ã¢ãã¬ã¹ */
+FLABEL(data_init_start)
+    cmp     r7, r6                  /* ã«ã¼ãçµäºæ¡ä»¶: i >= num */
+    bnl     data_init_end
+    ld.w    0[r8], ep               /* ep : dataã®å
+é ­çªå° */
+    ld.w    4[r8], r9               /* r9 : dataã®çµäºçªå° */
+    ld.w    8[r8], r2               /* r2: idataã®çµäºçªå° */
+	cmp     r9, ep                  /* dataãç©ºãï¼ */
+	bnl 	data_init_start_hook    /* ç©ºãªãã°æ¬¡ã®dataã¸ */
+    nop
+FLABEL(data_init_body)
+	ld.b	0[r2], r10      /* idataã®å¤ãã­ã¼ã */
+	sst.b	r10, 0[ep]      /* idataã®å¤ãdataã®ã¢ãã¬ã¹ã¸ã¹ãã¢ */
+	add		1, ep           /* dataã®æ¬¡ã®çªå°ã¸ */
+	add		1, r2           /* idataã®æ¬¡ã®çªå°ã¸ */
+    cmp     r9, ep          /* dataã®çµäºçªå°ã¾ã§æ¥ããï¼ */
+    bl      data_init_body  /* çµäºçªå°ã§ãªããã°ã«ã¼ã */
+#ifdef DATASEC_ALIGN_MASK
+    /*
+     *  å¢çã«ãªãã¾ã§åæåãç¶ãã
+     */
+    mov     DATASEC_ALIGN_MASK, r10
+FLABEL(data_init_body2)
+    tst     r10, ep         /* ep & 0xf == 0 ? */
+    bz      data_init_start_hook
+	sst.b	r0, 0[ep]       /* 0åæå */
+    add     1, ep
+    jr      data_init_body2
+#endif /* DATASEC_ALIGN_MASK */
+    nop
+FLABEL(data_init_start_hook)        
+    add     12, r8  /* ãã¼ãã«ã®ã¢ãã¬ã¹ãã¤ã³ã¯ãªã¡ã³ã 4byte * 3 -> 12 */
+    add     1, r6   /* ãã¼ãã«ã®ã¤ã³ããã¯ã¹ãã¤ã³ã¯ãªã¡ã³ã: i++ */
+	br		data_init_start         
+    nop
+FLABEL(data_init_end)
+#endif /* OMIT_DATA_INIT */
+
+	/*
+	 *  software_init_hook ãå¼åºãï¼0 ã§ãªãå ´åï¼
+	 *
+	 *  ã½ããã¦ã§ã¢ç°å¢ï¼ç¹ã«ã©ã¤ãã©ãªï¼ã«ä¾å­ãã¦å¿
+è¦ãªåæåå¦
+	 *  çãããå ´åã¯ï¼software_init_hook ã¨ããé¢æ°ãç¨æããã°
+	 *  ããï¼
+	 */
+
+	Lea		_software_init_hook, r1
+	cmp		r0, r1
+	be		software_init_hook_end
+	jarl	_software_init_hook, r31
+FLABEL(software_init_hook_end)
+
+	/*
+	 *  ã«ã¼ãã«ãèµ·åããï¼
+	 */
+	jarl    _target_hardware_initialize, r31
+	jarl    _main, r31
+	halt
+
+	.end
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.arxml	(revision 172)
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.0.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+  <AR-PACKAGES>
+    <AR-PACKAGE>
+      <SHORT-NAME>Ecuc</SHORT-NAME>
+      <ELEMENTS>
+        <ECUC-MODULE-CONFIGURATION-VALUES>
+          <SHORT-NAME>Os</SHORT-NAME>
+          <DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+          <ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+          <IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+          <CONTAINERS>
+            <ECUC-CONTAINER-VALUE>
+              <SHORT-NAME>TRUSTED_OSAP_for_SysTimerCnt</SHORT-NAME>
+              <DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+              <PARAMETER-VALUES>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+                  <VALUE>true</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+              </PARAMETER-VALUES>
+              <REFERENCE-VALUES>
+                <ECUC-REFERENCE-VALUE>
+                  <DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppIsrRef</DEFINITION-REF>
+                  <VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/target_timer_hdr</VALUE-REF>
+                </ECUC-REFERENCE-VALUE>
+                <ECUC-REFERENCE-VALUE>
+                  <DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+                  <VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SysTimerCnt</VALUE-REF>
+                </ECUC-REFERENCE-VALUE>
+              </REFERENCE-VALUES>
+              <SUB-CONTAINERS>
+                <ECUC-CONTAINER-VALUE>
+                  <SHORT-NAME>OsApplicationHooks</SHORT-NAME>
+                  <DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks</DEFINITION-REF>
+                  <PARAMETER-VALUES>
+                    <ECUC-NUMERICAL-PARAM-VALUE>
+                      <DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppErrorHook</DEFINITION-REF>
+                      <VALUE>false</VALUE>
+                    </ECUC-NUMERICAL-PARAM-VALUE>
+                    <ECUC-NUMERICAL-PARAM-VALUE>
+                      <DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppShutdownHook</DEFINITION-REF>
+                      <VALUE>false</VALUE>
+                    </ECUC-NUMERICAL-PARAM-VALUE>
+                    <ECUC-NUMERICAL-PARAM-VALUE>
+                      <DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppStartupHook</DEFINITION-REF>
+                      <VALUE>false</VALUE>
+                    </ECUC-NUMERICAL-PARAM-VALUE>
+                  </PARAMETER-VALUES>
+                </ECUC-CONTAINER-VALUE>
+              </SUB-CONTAINERS>
+            </ECUC-CONTAINER-VALUE>
+            <ECUC-CONTAINER-VALUE>
+              <SHORT-NAME>target_timer_hdr</SHORT-NAME>
+              <DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIsr</DEFINITION-REF>
+              <PARAMETER-VALUES>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptNumber</DEFINITION-REF>
+                  <VALUE>INTNO_TIMER</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptPriority</DEFINITION-REF>
+                  <VALUE>INTPRI_TIMER</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrStackSize</DEFINITION-REF>
+                  <VALUE>592</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-TEXTUAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrCategory</DEFINITION-REF>
+                  <VALUE>CATEGORY_2</VALUE>
+                </ECUC-TEXTUAL-PARAM-VALUE>
+                <ECUC-TEXTUAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptSource</DEFINITION-REF>
+                  <VALUE>ENABLE</VALUE>
+                </ECUC-TEXTUAL-PARAM-VALUE>
+              </PARAMETER-VALUES>
+            </ECUC-CONTAINER-VALUE>
+            <ECUC-CONTAINER-VALUE>
+              <SHORT-NAME>SysTimerCnt</SHORT-NAME>
+              <DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+              <PARAMETER-VALUES>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+                  <VALUE>999U</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+                  <VALUE>1</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+                  <VALUE>1U</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-TEXTUAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+                  <VALUE>SOFTWARE</VALUE>
+                </ECUC-TEXTUAL-PARAM-VALUE>
+              </PARAMETER-VALUES>
+            </ECUC-CONTAINER-VALUE>
+          </CONTAINERS>
+        </ECUC-MODULE-CONFIGURATION-VALUES>
+      </ELEMENTS>
+    </AR-PACKAGE>
+  </AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.c	(revision 172)
@@ -0,0 +1,230 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: taua_timer.c 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *		ã¿ã¤ããã©ã¤ãï¼TAUA0 Timerï¼
+ */
+
+#include "kernel_impl.h"
+#include "target_timer.h"
+#include "taua_timer.h"
+#include "Os_Lcfg.h"
+
+/*
+ *  ç¾å¨ã®ã·ã¹ãã æå»ï¼åä½: ããªç§ï¼
+ *
+ *  å³å¯ã«ã¯ï¼åã®ã¿ã¤ã ãã£ãã¯ã®ã·ã¹ãã æå»
+ */
+SystemTimeMsType current_time;
+
+/*
+ *	å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+ISR(target_timer_hdr);
+
+/*
+ *  ãã¤ã¯ã­ç§åä½ã§ã®æå»ãåå¾
+ */
+SystemTimeUsType
+get_tim_utime(void)
+{
+	SystemTimeUsType	utime;
+	SystemTimeMsType	mtime;
+	TickType			clock1, clock2;
+	boolean				ireq;
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+	mtime = current_time;
+	clock1 = target_timer_get_current();
+	ireq = target_timer_probe_int();
+	clock2 = target_timer_get_current();
+	SIL_UNL_INT();
+	utime = ((SystemTimeUsType) mtime) * 1000U;
+
+	if ((ireq != FALSE) && (clock2 >= clock1)) {
+		/*
+		 *  å²è¾¼ã¿ãå
+¥ã£ã¦ããï¼clock2ã®æ¹ãclock1ã®æ¹ãå¤§ããã¾ãã¯ç­ããå ´åã¯ï¼
+		 *  current_time ãå²è¾¼ã¿ã«ããæ´æ°ããã¦ããªããã¤ï¼clock1ã¯ãªã¼ããã­ã¼å¾
+		 *  ã®å¤ã§ããããï¼utimeã«1mè¿½å ããï¼clock1ã®èª­ã¿è¾¼ã¿ï¼å²è¾¼ã¿ã®ãã§ãã¯ï¼
+		 *  clock2ã®èª­ã¿è¾¼ã¿ã1Î¼sä»¥ä¸ã§å®è¡å¯è½ãªãã­ã»ããµãå­å¨ããããï¼ç­å·ä»ã
+		 *  ã§æ¯è¼ãã¦ããï¼
+		 */
+		utime += 1000U;
+	}
+	utime += TO_USEC(clock1);
+
+	return(utime);
+}
+
+SystemTime100NsType
+get_tim_100ntime(void)
+{
+	SystemTime100NsType	ntime;
+	SystemTimeMsType	mtime;
+	TickType			clock1, clock2;
+	boolean				ireq;
+	SIL_PRE_LOC;
+
+	SIL_LOC_INT();
+	mtime = current_time;
+	clock1 = target_timer_get_current();
+	ireq = target_timer_probe_int();
+	clock2 = target_timer_get_current();
+	SIL_UNL_INT();
+	ntime = ((SystemTime100NsType) mtime) * 10000U;
+
+	if ((ireq != FALSE) && (clock2 >= clock1)) {
+		/*
+		 *  å²è¾¼ã¿ãå
+¥ã£ã¦ããï¼clock2ã®æ¹ãclock1ã®æ¹ãå¤§ããã¾ãã¯ç­ããå ´åã¯ï¼
+		 *  current_time ãå²è¾¼ã¿ã«ããæ´æ°ããã¦ããªããã¤ï¼clock1ã¯ãªã¼ããã­ã¼å¾
+		 *  ã®å¤ã§ããããï¼utimeã«1mè¿½å ããï¼clock1ã®èª­ã¿è¾¼ã¿ï¼å²è¾¼ã¿ã®ãã§ãã¯ï¼
+		 *  clock2ã®èª­ã¿è¾¼ã¿ã1Î¼sä»¥ä¸ã§å®è¡å¯è½ãªãã­ã»ããµãå­å¨ããããï¼ç­å·ä»ã
+		 *  ã§æ¯è¼ãã¦ããï¼
+		 */
+		ntime += 10000U;
+	}
+	ntime += TO_100NSEC(clock1);
+
+	return(ntime);
+}
+
+/*
+ *  ã¿ã¤ãã®èµ·åå¦ç
+ *
+ *  ã¿ã¤ãã¯ã¿ã¤ã0ãä½¿ç¨
+ */
+void
+target_timer_initialize(void)
+{
+	uint16 wk;
+	current_time = 0U;
+
+	wk = sil_reh_mem((void *) TAUA0TPS);
+	wk &= ~MCU_TAUA0_MASK_CK0;
+	wk |= MCU_TAUA0_CK0;
+	sil_wrh_mem((void *) TAUA0TPS, wk);                         /* Set prescaler value for CK0  */
+
+	sil_wrh_mem((void *) TAUA0CMOR(0), MCU_TAUA00_CMOR);        /* ã¤ã³ã¿ã¼ãã«ã¿ã¤ãã¨ãã¦ä½¿ç¨ */
+	sil_wrb_mem((void *) TAUA0CMUR(0), MCU_TAUA00_CMUR);
+
+	sil_wrh_mem((void *) TAUA0CDR(0), TIMER_CLOCK);             /* 1ms */
+
+	wk = sil_reh_mem((void *) TAUA0TE);
+	wk |= 0x0001;                                                   /* TAUT0ãã£ã³ãã«ï¼è¨±å¯ */
+	sil_wrh_mem((void *) TAUA0TS, wk);                              /* ã«ã¦ã³ã¿åä½ãè¨±å¯ */
+}
+
+/*
+ *  ã¿ã¤ãã®åæ­¢å¦ç
+ */
+void
+target_timer_terminate(void)
+{
+	uint16 wk;
+
+	/* ã¿ã¤ãåæ­¢ */
+	wk = sil_reh_mem((void *) TAUA0TE);
+	wk &= ~0x0001;                                          /* ãã£ã³ãã«0åæ­¢ */
+	sil_wrh_mem((void *) TAUA0TT, wk);                      /* ã«ã¦ã³ã¿åä½åæ­¢ */
+
+	/* å²è¾¼ã¿ã®ç¦æ­¢ã¨ã¯ãªã¢ */
+	x_disable_int(TAUA0_IRQ);
+	x_clear_int(TAUA0_IRQ);
+}
+
+/*
+ *  target_timer.arxmlãä½¿ç¨ããªãå ´åã®å¯¾å¦
+ */
+#ifndef SysTimerCnt
+#define SysTimerCnt		UINT_C(0)
+#endif /* SysTimerCnt */
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿ãã³ãã©
+ */
+ISR(target_timer_hdr)
+{
+	StatusType ercd;
+
+	/* current_timeãæ´æ°ãã */
+	current_time++;
+
+	/*
+	 *  ã«ã¦ã³ã¿å ç®éç¥å¦çå®è¡
+	 */
+	ercd = IncrementCounter(SysTimerCnt);
+	/* ã¨ã©ã¼ãªã¿ã¼ã³ã®å ´åã¯ã·ã£ãããã¦ã³ */
+	if (ercd != E_OK) {
+		ShutdownOS(ercd);
+	}
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.h	(revision 172)
@@ -0,0 +1,142 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: taua_timer.h 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *		ã¿ã¤ããã©ã¤ãï¼TAUA0 Timerç¨ï¼
+ */
+
+#ifndef TOPPERS_TAUA0_TIMER_H
+#define TOPPERS_TAUA0_TIMER_H
+
+#include "prc_sil.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¿ã¤ãå¤ã®å
+é¨è¡¨ç¾ã¨ãã¤ã¯ã­ç§åä½ã¨ã®å¤æ
+ *
+ */
+#define TO_USEC(clock)	((((SystemTimeUsType) (clock)) * 1000U) / TIMER_CLOCK)
+
+/*
+ *  ã¿ã¤ãå¤ã®å
+é¨è¡¨ç¾ã¨100ããç§åä½ã¨ã®å¤æ
+ *
+ */
+#define TO_100NSEC(clock)	((((SystemTimeUsType) (clock)) * 10000U) / TIMER_CLOCK)
+
+/*
+ *  ãã¤ã¯ã­ç§åä½ã§ã®æå»ãåå¾
+ */
+extern SystemTimeUsType get_tim_utime(void);
+
+/*
+ *  100ããç§åä½ã§ã®æå»ãåå¾
+ */
+extern SystemTime100NsType get_tim_100ntime(void);
+
+/*
+ *  ã¿ã¤ãã®èµ·åå¦ç
+ *
+ *  ã¿ã¤ããåæåãï¼å¨æçãªã¿ã¤ãå²è¾¼ã¿è¦æ±ãçºçããã
+ */
+extern void target_timer_initialize(void);
+
+/*
+ *  ã¿ã¤ãã®åæ­¢å¦ç
+ *
+ *  ã¿ã¤ãã®åä½ãåæ­¢ããã
+ */
+extern void target_timer_terminate(void);
+
+/*
+ *  ã¿ã¤ãã®ç¾å¨å¤ã®èª­åºã
+ */
+LOCAL_INLINE TickType
+target_timer_get_current(void)
+{
+	TickType count;
+
+	count = sil_reh_mem((void *) (TAUA0CNT(0)));
+
+	return(TIMER_CLOCK - count);
+}
+
+/*
+ *  ã¿ã¤ãå²è¾¼ã¿è¦æ±ã®ãã§ãã¯
+ */
+LOCAL_INLINE boolean
+target_timer_probe_int(void)
+{
+	return(x_probe_int(TAUA0_IRQ));
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_TAUA0_TIMER_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/taua_timer.yaml	(revision 172)
@@ -0,0 +1,93 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJISOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: taua_timer.yaml 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    TRUSTED_OSAP_for_SysTimerCnt:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsApplicationHooks:
+        OsAppErrorHook: false
+        OsAppShutdownHook: false
+        OsAppStartupHook: false
+      OsAppIsrRef:
+        - /Ecuc/Os/target_timer_hdr
+      OsAppCounterRef:
+        - /Ecuc/Os/SysTimerCnt
+    target_timer_hdr:
+      DefinitionRef: OsIsr
+      OsIsrInterruptNumber: INTNO_TIMER
+      OsIsrInterruptPriority: INTPRI_TIMER
+      OsIsrStackSize: 0x250
+      OsIsrCategory: CATEGORY_2
+      OsIsrInterruptSource: ENABLE
+    SysTimerCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 999U
+      OsCounterMinCycle: 1
+      OsCounterTicksPerBase: 1U
+      OsCounterType: SOFTWARE
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/tauj_hw_counter.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/tauj_hw_counter.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/tauj_hw_counter.c	(revision 172)
@@ -0,0 +1,422 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2014 by Spansion LLC, USA
+ *  Copyright (C) 2014 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: tauj_hw_counter.c 154 2015-01-28 11:33:39Z t_ishikawa $
+ */
+
+/*
+ *		ä»¥ä¸ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼fl850fx4ç¨ï¼
+ *
+ *  ä½¿ç¨ããã¿ã¤ãï¼
+ *    å·®åã¿ã¤ãï¼ç®çã®æéãè¨­å®ããæã®ç¾å¨æé(ç¾å¨å¤ã¿ã¤ã)
+ *              ã¨æ¬¡ã®æºäºæéã¨ã®ç¸å¯¾æéãã«ã¦ã³ããããã¨ã§
+ *              ç®çã®çµ¶å¯¾æéã«æºäºãããã¨ã¨ãã
+ *              count mode:count down once
+ *
+ *    ç¾å¨å¤ã¿ã¤ãï¼ã«ã¦ã³ã¿å¨æåã®ãã¼ã¹ã¿ã¤ããå®ç¾
+ *              (çµ¶å¯¾æéãã«ã¦ã³ã)
+ *              count mode:continuous count down
+ *
+ *    ã¾ãä¸è¨ã®ã¿ã¤ãã¯32bitã®ãã¦ã³ã«ã¦ã³ã¿ã¿ã¤ãã§ãã
+ *
+ *  å¶å¾¡æ¹éï¼
+ *
+ *   ç¾å¨å¤ã¿ã¤ãã¯ã¦ã¼ã¶å®ç¾©ã«ã¦ã³ã¿æå¤§å¤2å+1ã¾ã§ã«ã¦ã³ããï¼
+ *   å¨æã¿ã¤ãã¨ãã¦é£ç¶ã«ã¦ã³ããã¦ã³ãã¦ï¼å¸¸ã«ç¾å¨æå»ã
+ *   åå¾ããï¼å²è¾¼ã¿çºçããå¿
+è¦ããªãããï¼å²è¾¼ã¿ãªãã¢ã¼ã
+ *
+ *   å·®åã¿ã¤ãã¯ï¼æºäºå¦çãè¡ãããï¼å²è¾¼ã¿ããã¢ã¼ãã§åã
+ *   ã¢ã©ã¼ã ãªã©ã®æºäºç¹ã¨ã¿ã¤ãã¼1ã§ç¤ºããç¾å¨æå»ã®å·®ã
+ *   ç¾å¨å¤ã¿ã¤ãã«è¨­å®ãã
+ *
+ *  ãã¤ã³ãï¼
+ *   æºäºå¦çã¯ï¼ç¾å¨æå»ãå½±é¿ããªãããï¼ç¾å¨å¤ã¿ã¤ããè¨­ãã¦ãã
+ *
+ */
+
+#include "Os.h"
+#include "prc_sil.h"
+#include "target_hw_counter.h"
+
+/*
+ *  =begin ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®TAUJnä¾å­é¨
+ */
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®åæå
+ *   n_d  : å·®åã¿ã¤ãã®ã¦ãããçªå·
+ *   ch_d : å·®åã¿ã¤ãã®ãã£ãã«
+ *   n_c  : ç¾å¨å¤ã¿ã¤ãã®ã¦ãããçªå·
+ *   ch_c : ç¾å¨å¤ã¿ã¤ãã®ãã£ãã«
+ */
+static void
+init_hwcounter_tauj(uint8 n_d, uint8 ch_d, uint8 n_c, uint8 ch_c, TickType maxval, TimeType nspertick, TickRefType cycle)
+{
+	uint16	wk;
+	*cycle = maxval;
+
+	/* assert((tauj_id + 1) < TAUJ_MAX); */
+
+	/* å·®åã¿ã¤ãåæ­¢å¦ç */
+	SetTimerStopTAUJ(n_d, ch_d);
+	/* å²è¾¼ã¿ç¦æ­¢ */
+	HwcounterDisableInterrupt(TAUJ_INTNO(n_d, ch_d));
+	/* å²è¾¼ã¿è¦æ±ã¯ãªã¢ */
+	HwcounterClearInterrupt(TAUJ_INTNO(n_d, ch_d));
+
+	/* å·®åã¿ã¤ãã®ããªã¹ã±ã¼ã©ãè¨­å® PCLK/2^0 */
+	wk = sil_reh_mem((void *) TAUJTPS(n_d));
+	wk &= MCU_TAUJ_MASK_CK0;
+	wk |= MCU_TAUJ_CK0_0;
+	sil_wrh_mem((void *) TAUJTPS(n_d), wk);
+
+	/* ç¾å¨å¤ã¿ã¤ãã®ããªã¹ã±ã¼ã©ãè¨­å® PCLK/2^0 */
+	wk = sil_reh_mem((void *) TAUJTPS(n_c));
+	wk &= MCU_TAUJ_MASK_CK0;
+	wk |= MCU_TAUJ_CK0_0;
+	sil_wrh_mem((void *) TAUJTPS(n_c), wk);
+
+	/* å·®åã¿ã¤ããã¤ã³ã¿ã¼ãã«ã¿ã¤ãã¨ãã¦è¨­å® */
+	sil_wrh_mem((void *) TAUJCMOR(n_d, ch_d), MCU_TAUJ00_CMOR);
+	sil_wrb_mem((void *) TAUJCMUR(n_d, ch_d), MCU_TAUJ00_CMUR);
+
+	/* ç¾å¨å¤ã¿ã¤ãåæ­¢å¦ç */
+	SetTimerStopTAUJ(n_c, ch_c);
+	/* å²è¾¼ã¿ç¦æ­¢ */
+	HwcounterDisableInterrupt(TAUJ_INTNO(n_c, ch_c));
+	/* å²è¾¼ã¿è¦æ±ã¯ãªã¢ */
+	HwcounterClearInterrupt(TAUJ_INTNO(n_c, ch_c));
+
+	/* ç¾å¨å¤ã¿ã¤ããã¤ã³ã¿ã¼ãã«ã¿ã¤ãã¨ãã¦è¨­å® */
+	sil_wrh_mem((void *) TAUJCMOR(n_c, ch_c), MCU_TAUJ00_CMOR);
+	sil_wrb_mem((void *) TAUJCMUR(n_c, ch_c), MCU_TAUJ00_CMUR);
+
+	/* ã¿ã¤ãã«ã¦ã³ãå¨æè¨­å® */
+	sil_wrw_mem((void *) TAUJCDR(n_c, ch_c), maxval);
+}
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®éå§
+ */
+static void
+start_hwcounter_tauj(uint8 n_c, uint8 ch_c)
+{
+	/* ç¾å¨å¤ã¿ã¤ãéå§ */
+	SetTimerStartTAUJ(n_c, ch_c);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®åæ­¢
+ *   n_d  : å·®åã¿ã¤ãã®ã¦ãããçªå·
+ *   ch_d : å·®åã¿ã¤ãã®ãã£ãã«
+ *   n_c  : ç¾å¨å¤ã¿ã¤ãã®ã¦ãããçªå·
+ *   ch_c : ç¾å¨å¤ã¿ã¤ãã®ãã£ãã«  
+ */
+static void
+stop_hwcounter_tauj(uint8 n_d, uint8 ch_d, uint8 n_c, uint8 ch_c)
+{
+	/* å·®åã¿ã¤ãã®åæ­¢ */
+	SetTimerStopTAUJ(n_d, ch_d);
+
+	/* å·®åã¿ã¤ãã®å²è¾¼ã¿ç¦æ­¢ */
+	HwcounterDisableInterrupt(TAUJ_INTNO(n_d, ch_d));
+	/* å·®åã¿ã¤ãã®å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢ */
+	HwcounterClearInterrupt(TAUJ_INTNO(n_d, ch_d));
+
+	/* ç¾å¨å¤ã¿ã¤ãã®åæ­¢ */
+	SetTimerStopTAUJ(n_c, ch_c);
+
+	/* ç¾å¨å¤ã¿ã¤ãã®å²è¾¼ã¿ç¦æ­¢ */
+	/* HwcounterDisableInterrupt(TAUJ_INTNO(tauj_id + 1)); */
+	/* ç¾å¨å¤ã¿ã¤ãã®å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢ */
+	HwcounterClearInterrupt(TAUJ_INTNO(n_c, ch_c));
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã¸ã®æºäºæéã®è¨­å®
+ *   n_d  : å·®åã¿ã¤ãã®ã¦ãããçªå·
+ *   ch_d : å·®åã¿ã¤ãã®ãã£ãã«
+ *   n_c  : ç¾å¨å¤ã¿ã¤ãã®ã¦ãããçªå·
+ *   ch_c : ç¾å¨å¤ã¿ã¤ãã®ãã£ãã«    
+ */
+static void
+set_hwcounter_tauj(uint8 n_d, uint8 ch_d, uint8 n_c, uint8 ch_c, TickType exprtick, TickType maxval)
+{
+	TickType	curr_time;
+	TickType	value;
+
+	/* å·®åã¿ã¤ãã®å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢ */
+	HwcounterClearInterrupt(TAUJ_INTNO(n_d, ch_d));
+	/* å·®åã¿ã¤ãã®å²è¾¼ã¿è¨±å¯ */
+	HwcounterEnableInterrupt(TAUJ_INTNO(n_d, ch_d));
+
+	/* ç¾å¨æå»ã®åå¾ */
+	curr_time = GetCurrentTimeTAUJ(n_c, ch_c, maxval);
+
+	/* ã¿ã¤ãã«è¨­å®ããå¤ãç®åº	*/
+	if (exprtick >= curr_time) {
+		value = exprtick - curr_time;
+	}
+	else {
+		value = (exprtick - curr_time) + (maxval + 1U);
+	}
+
+	/*
+	 *  ã¿ã¤ãã«0x00ãè¨­å®ãï¼å²è¾¼ã¿çºçå¾ï¼ååº¦0ãè¨­å®ããå ´åï¼2åç®ã®
+	 *  0x00è¨­å®å¾ã®å²è¾¼ã¿ã¯çºçããªãã®ã§ï¼0x00è¨­å®å¤ã0x01ã«ç´ãã¦è¨­å®
+	 */
+	if (value == 0x00U) {
+		value = 0x01U;
+	}
+
+	/* å·®åã¿ã¤ãã®ã¿ã¤ãå¤è¨­å® */
+	sil_wrw_mem((void *) TAUJCDR(n_d, ch_d), (value));
+
+	/*
+	 * ã«ã¦ã³ãéå§
+	 */
+	SetTimerStartTAUJ(n_d, ch_d);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ç¾å¨æéã®åå¾
+ */
+static TickType
+get_hwcounter_tauj(uint8 n_c, uint8 ch_c, TickType maxval)
+{
+	return(GetCurrentTimeTAUJ(n_c, ch_c, maxval));
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®è¨­å®ãããæºäºæéã®åæ¶
+ */
+static void
+cancel_hwcounter_tauj(uint8 n_d, uint8 ch_d)
+{
+	/* å·®åã¿ã¤ãã®åæ­¢ */
+	SetTimerStopTAUJ(n_d, ch_d);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®å¼·å¶å²è¾¼ã¿è¦æ±
+ */
+static void
+trigger_hwcounter_tauj(uint8 n_d, uint8 ch_d)
+{
+	/* å·®åã¿ã¤ãåæ­¢ */
+	SetTimerStopTAUJ(n_d, ch_d);
+
+	/* å·®åã¿ã¤ãã®å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢ */
+	HwcounterClearInterrupt(TAUJ_INTNO(n_d, ch_d));
+	/* å·®åã¿ã¤ãã®å²è¾¼ã¿è¨±å¯ */
+	HwcounterEnableInterrupt(TAUJ_INTNO(n_d, ch_d));
+
+	/* å·®åã¿ã¤ãã«ã¦ã³ã¿ã¼ã«0x01ãã»ãããããã¨ã§ï¼ããæºäº */
+	sil_wrw_mem((void *) TAUJCDR(n_d, ch_d), (1));
+
+	/*  å·®åã¿ã¤ãéå§ */
+	SetTimerStartTAUJ(n_d, ch_d);
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+static void
+int_clear_hwcounter_tauj(uint8 n_d, uint8 ch_d)
+{
+	/* å²è¾¼ã¿è¦æ±ã¯ãªã¢ */
+	HwcounterClearInterrupt(TAUJ_INTNO(n_d, ch_d));
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã­ã£ã³ã»ã«
+ *  ãã³ãã£ã³ã°ããã¦ããå²è¾¼ã¿è¦æ±ãã­ã£ã³ã»ã«
+ */
+static void
+int_cancel_hwcounter_tauj(uint8 n_d, uint8 ch_d)
+{
+	/* å²è¾¼ã¿è¦æ±ã¯ãªã¢ */
+	HwcounterClearInterrupt(TAUJ_INTNO(n_d, ch_d));
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+ */
+static void
+increment_hwcounter_tauj(uint8 n_d, uint8 ch_d)
+{
+	/* æªãµãã¼ã */
+	return;
+}
+/*
+ *  =end ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®TAUJnä¾å­é¨
+ */
+
+
+/*
+ *  =begin MAIN_HW_COUNTERã®å®ç¾©
+ */
+/* ã«ã¦ã³ã¿ã®æå¤§å¤ã®2å+1 */
+static TickType MAIN_HW_COUNTER_maxval;
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®åæå
+ */
+void
+init_hwcounter_MAIN_HW_COUNTER(TickType maxval, TimeType nspertick)
+{
+	init_hwcounter_tauj(HWC_DTIM_UNIT, HWC_DTIM_ID,
+						HWC_CTIM_UNIT, HWC_CTIM_ID,
+						maxval, nspertick, &MAIN_HW_COUNTER_maxval);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®éå§
+ */
+void
+start_hwcounter_MAIN_HW_COUNTER(void)
+{
+	start_hwcounter_tauj(HWC_CTIM_UNIT, HWC_CTIM_ID);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®åæ­¢
+ */
+void
+stop_hwcounter_MAIN_HW_COUNTER(void)
+{
+	stop_hwcounter_tauj(HWC_DTIM_UNIT, HWC_DTIM_ID,
+						HWC_CTIM_UNIT, HWC_CTIM_ID);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã¸ã®æºäºæéã®è¨­å®
+ */
+void
+set_hwcounter_MAIN_HW_COUNTER(TickType exprtick)
+{
+	set_hwcounter_tauj(HWC_DTIM_UNIT, HWC_DTIM_ID,
+					   HWC_CTIM_UNIT, HWC_CTIM_ID,
+					   exprtick, MAIN_HW_COUNTER_maxval);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ç¾å¨æéã®åå¾
+ */
+TickType
+get_hwcounter_MAIN_HW_COUNTER(void)
+{
+	return(get_hwcounter_tauj(HWC_CTIM_UNIT, HWC_CTIM_ID,
+							  MAIN_HW_COUNTER_maxval));
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®è¨­å®ãããæºäºæéã®åæ¶
+ */
+void
+cancel_hwcounter_MAIN_HW_COUNTER(void)
+{
+	cancel_hwcounter_tauj(HWC_DTIM_UNIT, HWC_DTIM_ID);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®å¼·å¶å²è¾¼ã¿è¦æ±
+ */
+void
+trigger_hwcounter_MAIN_HW_COUNTER(void)
+{
+	trigger_hwcounter_tauj(HWC_DTIM_UNIT, HWC_DTIM_ID);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®è¨­å®ãããæºäºæéã®åæ¶
+ */
+void
+int_clear_hwcounter_MAIN_HW_COUNTER(void)
+{
+	int_clear_hwcounter_tauj(HWC_DTIM_UNIT, HWC_DTIM_ID);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®è¨­å®ãããæºäºæéã®åæ¶
+ */
+void
+int_cancel_hwcounter_MAIN_HW_COUNTER(void)
+{
+	int_cancel_hwcounter_tauj(HWC_DTIM_UNIT, HWC_DTIM_ID);
+}
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+ */
+void
+increment_hwcounter_MAIN_HW_COUNTER(void)
+{
+	increment_hwcounter_tauj(HWC_DTIM_UNIT, HWC_DTIM_ID);
+}
+
+/*
+ *  =end MAIN_HW_COUNTERã®å®ç¾©
+ */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.arxml	(revision 172)
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.0.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+  <AR-PACKAGES>
+    <AR-PACKAGE>
+      <SHORT-NAME>Ecuc</SHORT-NAME>
+      <ELEMENTS>
+        <ECUC-MODULE-CONFIGURATION-VALUES>
+          <SHORT-NAME>Os</SHORT-NAME>
+          <DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+          <ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+          <IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+          <CONTAINERS>
+            <ECUC-CONTAINER-VALUE>
+              <SHORT-NAME>TRUSTED_OSAP_for_RxHwSerialInt</SHORT-NAME>
+              <DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+              <PARAMETER-VALUES>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+                  <VALUE>true</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+              </PARAMETER-VALUES>
+              <REFERENCE-VALUES>
+                <ECUC-REFERENCE-VALUE>
+                  <DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppIsrRef</DEFINITION-REF>
+                  <VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RxHwSerialInt</VALUE-REF>
+                </ECUC-REFERENCE-VALUE>
+              </REFERENCE-VALUES>
+              <SUB-CONTAINERS>
+                <ECUC-CONTAINER-VALUE>
+                  <SHORT-NAME>OsApplicationHooks</SHORT-NAME>
+                  <DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks</DEFINITION-REF>
+                  <PARAMETER-VALUES>
+                    <ECUC-NUMERICAL-PARAM-VALUE>
+                      <DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppErrorHook</DEFINITION-REF>
+                      <VALUE>false</VALUE>
+                    </ECUC-NUMERICAL-PARAM-VALUE>
+                    <ECUC-NUMERICAL-PARAM-VALUE>
+                      <DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppShutdownHook</DEFINITION-REF>
+                      <VALUE>false</VALUE>
+                    </ECUC-NUMERICAL-PARAM-VALUE>
+                    <ECUC-NUMERICAL-PARAM-VALUE>
+                      <DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppStartupHook</DEFINITION-REF>
+                      <VALUE>false</VALUE>
+                    </ECUC-NUMERICAL-PARAM-VALUE>
+                  </PARAMETER-VALUES>
+                </ECUC-CONTAINER-VALUE>
+              </SUB-CONTAINERS>
+            </ECUC-CONTAINER-VALUE>
+            <ECUC-CONTAINER-VALUE>
+              <SHORT-NAME>RxHwSerialInt</SHORT-NAME>
+              <DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIsr</DEFINITION-REF>
+              <PARAMETER-VALUES>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptNumber</DEFINITION-REF>
+                  <VALUE>INTNO_SIO</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptPriority</DEFINITION-REF>
+                  <VALUE>INTPRI_SIO</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-NUMERICAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrStackSize</DEFINITION-REF>
+                  <VALUE>592</VALUE>
+                </ECUC-NUMERICAL-PARAM-VALUE>
+                <ECUC-TEXTUAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrCategory</DEFINITION-REF>
+                  <VALUE>CATEGORY_2</VALUE>
+                </ECUC-TEXTUAL-PARAM-VALUE>
+                <ECUC-TEXTUAL-PARAM-VALUE>
+                  <DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptSource</DEFINITION-REF>
+                  <VALUE>ENABLE</VALUE>
+                </ECUC-TEXTUAL-PARAM-VALUE>
+              </PARAMETER-VALUES>
+            </ECUC-CONTAINER-VALUE>
+          </CONTAINERS>
+        </ECUC-MODULE-CONFIGURATION-VALUES>
+      </ELEMENTS>
+    </AR-PACKAGE>
+  </AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.c	(revision 172)
@@ -0,0 +1,154 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: uart.c 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *		ã·ãªã¢ã«I/Oããã¤ã¹ï¼SIOï¼ãã©ã¤ãï¼UARTç¨ï¼
+ */
+
+#include "Os.h"
+#include "target_serial.h"
+#include "uart.h"
+#include "Os_Lcfg.h"
+
+/*
+ *  åä¿¡ç¨ãããã¡
+ */
+static uint8 rx_buf;
+
+/* å
+é¨é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */
+LOCAL_INLINE boolean uart_getready(void);
+LOCAL_INLINE uint8 uart_getchar(void);
+
+/*
+ *  æå­ãåä¿¡ããããã§ãã¯
+ */
+LOCAL_INLINE boolean
+uart_getready(void)
+{
+	boolean ans;
+	uint8	stat;
+	uint8	rx_tmp;
+
+	stat = sil_reb_mem((void *) URTEnSTR1);                     /* ã¹ãã¼ã¿ã¹ã®èª­ã¿è¾¼ã¿ */
+	rx_tmp = sil_reb_mem((void *) URTEnRX);                     /* åä¿¡ãã¼ã¿ãèª­ã¿è¾¼ã¿ */
+
+	ans = FALSE;
+	if ((stat & 0x07) == 0)	{
+		rx_buf = rx_tmp;
+		ans = TRUE;
+	}
+	sil_wrb_mem((void *) URTEnSTC, 0x1f);                            /* ã¹ãã¼ã¿ã¹ã¯ãªã¢ */
+
+	return(ans);
+}
+
+/*
+ *  åä¿¡ããæå­ã®åãåºã
+ */
+LOCAL_INLINE uint8
+uart_getchar(void)
+{
+	return(rx_buf);
+}
+
+/*
+ *  åæåå¦ç
+ */
+void
+InitHwSerial(void)
+{
+	sil_wrh_mem((void *) URTEnCTL2, URTEnCTL2_VAL);
+	sil_wrh_mem((void *) URTEnCTL1, 0x0103);        /* 8bit, LSB First */
+	sil_wrb_mem((void *) URTEnCTL0, 0x80);
+	sil_wrb_mem((void *) URTEnCTL0, 0xe0);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã®ã¯ã­ã¼ãº
+ */
+void
+TermHwSerial(void)
+{
+	/* åä¿¡å²è¾¼ã¿ã®ç¦æ­¢ */
+	sil_wrb_mem((void *) URTEnCTL0, 0x00);
+}
+
+/*
+ *  SIOã®å²è¾¼ã¿ãã³ãã©
+ */
+ISR(RxHwSerialInt)
+{
+	if (uart_getready() != FALSE) {
+		/*
+		 *  åä¿¡éç¥ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºã
+		 */
+		RxSerialInt(uart_getchar());
+	}
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.h	(revision 172)
@@ -0,0 +1,115 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: uart.h 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *		ã·ãªã¢ã«I/Oããã¤ã¹ï¼SIOï¼ãã©ã¤ãï¼V850 UARTç¨ï¼
+ */
+
+#ifndef TOPPERS_UARTL_H
+#define TOPPERS_UARTL_H
+
+#include "prc_sil.h"
+#include "target_serial.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+/*
+ *  ã«ã¼ãã«ã®ä½ã¬ãã«åºåç¨é¢æ°
+ */
+LOCAL_INLINE void uart_putc(char8 c);
+
+LOCAL_INLINE void
+uart_putc(char8 c)
+{
+	while ((sil_rew_mem((void *) (URTEnSTR0)) & 0x01) == 0x01) ;
+	sil_wrw_mem((void *) (URTEnTX), c);
+}
+
+/*
+ *  serial.c ããå¼ã³åºãããé¢æ°ç¾¤
+ */
+
+/*
+ *  åæåå¦ç
+ */
+extern void InitHwSerial(void);
+
+/*
+ *  çµäºå¦ç
+ */
+extern void TermHwSerial(void);
+
+/*
+ *  åä¿¡ã³ã¼ã«ããã¯ãã³ãã©
+ */
+extern void RxSerialInt(uint8 character);
+
+extern ISR(RxHwSerialInt);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_UARTL_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart.yaml	(revision 172)
@@ -0,0 +1,85 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJISOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: uart.yaml 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    TRUSTED_OSAP_for_RxHwSerialInt:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsApplicationHooks:
+        OsAppErrorHook: false
+        OsAppShutdownHook: false
+        OsAppStartupHook: false
+      OsAppIsrRef:
+        - /Ecuc/Os/RxHwSerialInt
+    RxHwSerialInt:
+      DefinitionRef: OsIsr
+      OsIsrInterruptNumber: INTNO_SIO
+      OsIsrInterruptPriority: INTPRI_SIO
+      OsIsrStackSize: 0x250
+      OsIsrCategory: CATEGORY_2
+      OsIsrInterruptSource: ENABLE
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart_rlin.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart_rlin.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart_rlin.c	(revision 172)
@@ -0,0 +1,139 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: uart_rlin.c 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã·ãªã¢ã«I/Oããã¤ã¹ï¼SIOï¼ãã©ã¤ãï¼RLINç¨ï¼
+ */
+
+#include "Os.h"
+#include "target_serial.h"
+#include "uart_rlin.h"
+#include "Os_Lcfg.h"
+
+
+/* å
+é¨é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */
+LOCAL_INLINE uint8 uart_getchar(void);
+
+/*
+ *  åä¿¡ããæå­ã®åãåºã
+ */
+LOCAL_INLINE uint8
+uart_getchar(void)
+{
+	return(sil_reb_mem((void *) (RLIN3x_BASE + RLIN3xLURDRL_B)));
+}
+
+/*
+ *  åæåå¦ç
+ */
+void
+InitHwSerial(void)
+{
+
+	/* Uart Mode ãæå¹(ãã¤ãºãã£ã«ã¿ãæå¹) */
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLMD_B), 0x31);
+
+	/* ãã¼ã¬ã¼ãè¨­å® */
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLWBR_B), RLIN3xLWBR_VAL);
+	sil_wrh_mem((void *) (RLIN3x_BASE + RLIN3xLBRP01_H), RLIN3xLBRP01_VAL);
+
+	/* ã¨ã©ã¼æ¤åºè¨±å¯ */
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLEDE_B), 0x0d);
+
+	/* ãã¼ã¿ ãã©ã¼ããã */
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLBFC_B), 0x00);
+
+	/* ãªã»ããè§£é¤ */
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLCUC_B), 0x01);
+
+	/* ãªã»ããè§£é¤å¾
+ã¡ */
+	while (sil_reb_mem((void *) (RLIN3x_BASE + RLIN3xLMST_B)) == 0x00) {
+	}
+
+	/* éåä¿¡åä½è¨±å¯ */
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLUOER_B), 0x03);
+
+	/* åä¿¡å²è¾¼ã¿è¨±å¯ */
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLIE_B), 0x02);
+}
+
+/*
+ *  ã·ãªã¢ã«I/Oãã¼ãã®ã¯ã­ã¼ãº
+ */
+void
+TermHwSerial(void)
+{
+	/* åä¿¡å²è¾¼ã¿ã®ç¦æ­¢ */
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLIE_B), 0x00);
+}
+
+/*
+ *  SIOã®å²è¾¼ã¿ãã³ãã©
+ */
+ISR(RxHwSerialInt)
+{
+	/*
+	 *  åä¿¡éç¥ã³ã¼ã«ããã¯ã«ã¼ãã³ãå¼ã³åºã
+	 */
+	RxSerialInt(uart_getchar());
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart_rlin.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart_rlin.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/uart_rlin.h	(revision 172)
@@ -0,0 +1,164 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: uart_rlin.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã·ãªã¢ã«I/Oããã¤ã¹ï¼SIOï¼ãã©ã¤ãï¼RLINç¨ï¼
+ */
+
+#ifndef TOPPERS_UART_RLIN_H
+#define TOPPERS_UART_RLIN_H
+
+#include "prc_sil.h"
+#include "target_serial.h"
+
+#ifdef RLIN3x_USE_PORT0
+#define RLIN3x_BASE	RLIN30_BASE
+#elif  defined(RLIN3x_USE_PORT1)
+#define RLIN3x_BASE	RLIN31_BASE
+#elif  defined(RLIN3x_USE_PORT2)
+#define RLIN3x_BASE	RLIN32_BASE
+#elif  defined(RLIN3x_USE_PORT3)
+#define RLIN3x_BASE	RLIN33_BASE
+#elif  defined(RLIN3x_USE_PORT4)
+#define RLIN3x_BASE	RLIN34_BASE
+#elif  defined(RLIN3x_USE_PORT5)
+#define RLIN3x_BASE	RLIN35_BASE
+#else
+#error please define RLIN3x port number.
+#endif /* RLIN3x_USE_PORT0 */
+
+#define RLIN3xLWBR_B		0x00000001
+#define RLIN3xLBRP01_H		0x00000002
+#define RLIN3xLBRP0_B		0x00000002
+#define RLIN3xLBRP1_B		0x00000003
+#define RLIN3xLSTC_B		0x00000004
+#define RLIN3xLMD_B			0x00000008
+#define RLIN3xLBFC_B		0x00000009
+#define RLIN3xLSC_B			0x0000000a
+#define RLIN3xLWUP_B		0x0000000b
+#define RLIN3xLIE_B			0x0000000c
+#define RLIN3xLEDE_B		0x0000000d
+#define RLIN3xLCUC_B		0x0000000e
+#define RLIN3xLTRC_B		0x00000010
+#define RLIN3xLMST_B		0x00000011
+#define RLIN3xLST_B			0x00000012
+#define RLIN3xLEST_B		0x00000013
+#define RLIN3xLDFC_B		0x00000014
+#define RLIN3xLIDB_B		0x00000015
+#define RLIN3xLCBR_B		0x00000016
+#define RLIN3xLUDB0_B		0x00000017
+#define RLIN3xLDBR1_B		0x00000018
+#define RLIN3xLDBR2_B		0x00000019
+#define RLIN3xLDBR3_B		0x0000001a
+#define RLIN3xLDBR4_B		0x0000001b
+#define RLIN3xLDBR5_B		0x0000001c
+#define RLIN3xLDBR6_B		0x0000001d
+#define RLIN3xLDBR7_B		0x0000001e
+#define RLIN3xLDBR8_B		0x0000001f
+#define RLIN3xLUOER_B		0x00000020
+#define RLIN3xLUOR1_B		0x00000021
+#define RLIN3xLUTDR_H		0x00000024
+#define RLIN3xLUTDRL_B		0x00000024
+#define RLIN3xLUTDRH_B		0x00000025
+#define RLIN3xLURDR_H		0x00000026
+#define RLIN3xLURDRL_B		0x00000026
+#define RLIN3xLURDRH_B		0x00000027
+#define RLIN3xLUWTDR_H		0x00000028
+#define RLIN3xLUWTDRL_B		0x00000028
+#define RLIN3xLUWTDRH_B		0x00000029
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã«ã¼ãã«ã®ä½ã¬ãã«åºåç¨é¢æ°
+ */
+LOCAL_INLINE void uart_putc(char8 c);
+
+LOCAL_INLINE void
+uart_putc(char8 c)
+{
+	while ((sil_reb_mem((void *) (RLIN3x_BASE + RLIN3xLST_B)) & 0x10) == 0x10) ;
+	sil_wrb_mem((void *) (RLIN3x_BASE + RLIN3xLUTDRL_B), c);
+}
+
+/*
+ *  serial.c ããå¼ã³åºãããé¢æ°ç¾¤
+ */
+
+/*
+ *  åæåå¦ç
+ */
+extern void InitHwSerial(void);
+
+/*
+ *  çµäºå¦ç
+ */
+extern void TermHwSerial(void);
+
+/*
+ *  åä¿¡ã³ã¼ã«ããã¯ãã³ãã©
+ */
+extern void RxSerialInt(uint8 character);
+
+extern ISR(RxHwSerialInt);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_UART_RLIN_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850.h	(revision 172)
@@ -0,0 +1,201 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: v850.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		V850ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©ï¼éçºç°å¢å
+±éï¼
+ */
+
+#ifndef TOPPERS_V850_H
+#define TOPPERS_V850_H
+
+#ifdef __v850e2v3__
+
+#ifdef _V850E2M_
+#define TNUM_INTPRI	16
+#elif defined(_V850E2S_)
+#define TNUM_INTPRI	8
+#else
+#error please define ether _V850E2M_ or _V850E2S_
+#endif /* _V850E2M_ */
+
+/*
+ *  V850E2ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+#include "prc_sil.h"
+
+LOCAL_INLINE void
+set_pmr(uint16 pmr)
+{
+	sil_wrh_mem((void *) PMR, pmr);
+	SYNCM;
+}
+
+LOCAL_INLINE uint16
+get_ispr(void)
+{
+	return(sil_reh_mem((void *) ISPR_H));
+}
+
+LOCAL_INLINE void
+clear_ispr(void)
+{
+	sil_wrh_mem((void *) ISPC_H, 0xffff);
+	sil_wrh_mem((void *) ISPR_H, 0x0000);
+}
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#define FE_MIP 0x430U
+#define FE_MDP 0x431U
+#define FE_PPI 0x432U
+#define FE_TSI 0x433U
+
+#elif defined(__v850e3v5__)
+
+#ifdef _RH850G3M_
+#define TNUM_INTPRI	8
+#elif defined(_RH850G3K_)
+#define TNUM_INTPRI	8
+#else
+#error please define ether _RH850G3M_ or _RH850G3K_
+#endif /* _RH850G3M_ */
+
+#define FE_MIP 0x90U
+#define FE_MDP 0x91U
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+/*
+ *  V850E2M ã·ã¹ãã ã¬ã¸ã¹ã¿
+ */
+ 
+#define FEIC	14
+#define SCBP	12
+#define SCCFG	11
+#define VMTID	 5
+#define VMADR	 6
+
+#define IPA0L	 6
+#define IPA0U	 7
+#define IPA1L	 8
+#define IPA1U	 9
+#define IPA2L	10
+#define IPA2U	11
+#define IPA3L	12
+#define IPA3U	13
+#define IPA4L	14
+#define IPA4U	15
+
+#define DPA0L	16
+#define DPA0U	17
+#define DPA1L	18
+#define DPA1U	19
+#define DPA2L	20
+#define DPA2U	21
+#define DPA3L	22
+#define DPA3U	23
+#define DPA4L	24
+#define DPA4U	25
+#define DPA5L	26
+#define DPA5U	27
+
+#define MCA		24
+#define MCS		25
+#define MCC		26
+#define MCR		27
+
+#define MPM		 0
+
+#define BSEL	31
+
+#ifdef __v850e2v3__
+#define PSW_SV  16
+#define FE_MP_MASK 0x43e
+#define FE_MP_BIT  0x430
+
+#elif defined(__v850e3v5__)
+#define PSW_SV  2
+#define FE_MP_MASK 0x9e
+#define FE_MP_BIT  0x90
+#define MPAT_E  0x80    /* æå¹ */
+#define MPAT_G  0x40    /* ASIDãç¡è¦ */
+#define MPAT_UX 0x04    /* ã¦ã¼ã¶å®è¡ */
+#define MPAT_UW 0x02    /* ã¦ã¼ã¶æ¸è¾¼ */
+#define MPAT_UR 0x01    /* ã¦ã¼ã¶èª­åº */
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+#endif /* TOPPERS_V850_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850asm.inc
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850asm.inc	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850asm.inc	(revision 172)
@@ -0,0 +1,147 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: v850asm.inc 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *  V850ã¢ã»ã³ãã©ç¨å®ç¾©ãã¡ã¤ã«
+ */
+#define TOPPERS_MACRO_ONLY
+#define UINT_C(val)			(val)		/* ç¬¦å·ç¡ãæ´æ°åã®å®æ°ãä½ããã¯ã­ */
+#define CAST(type, val)		(val)		/* åã­ã£ã¹ããè¡ããã¯ã­ */
+
+#include "kernel_impl.h"
+
+/*
+ * ã¢ã»ã³ãã©ãã¯ã­å
+ã§ã®å¼æ°ã®åç
+§
+ */
+#define AMARG(name)  \name
+
+	/*
+	 * ã©ãã«ã­ã¼ã Lea (Load Effective Address)
+	 */
+	.macro	Lea name, destination
+	mov	hilo(\name), \destination
+	.endm
+
+	/*
+	 * ã©ãã«å®£è¨ Flabel
+	 *
+	 *   é¢æ°åã¨ãã¦ä½¿ãã©ãã«å²ä»ãè¡ã
+	 */
+	.macro	Flabel name
+	.type	\name,@function
+\name:
+	.endm
+
+#define FLABEL(name) Flabel name
+
+	/*
+	 * ã¹ã¿ãã¯æä½ - ããã·ã¥
+	 */
+	
+	.macro	Push source
+	add	-4, sp
+	st.w	\source, 0[sp]
+	.endm
+	
+	/*
+	 * ã¹ã¿ãã¯æä½ - ããã
+	 */
+	
+	.macro	Pop dest
+	ld.w	0[sp], \dest
+	add	4, sp
+	.endm
+
+	/*
+	 * å²ãè¾¼ã¿ç¦æ­¢
+	 */
+	.macro	X_LOCK_ALL_INT reg1 reg2
+	ld.w	PMR, \reg1
+	ld.w	0xffff, \reg2
+	and		\reg2, \reg1
+	st.w	\reg2
+	.endm
+
+/*
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢ãã¯ã­
+ */
+.macro LOCK_ALL_INT
+    di
+.endm
+
+/*
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+ */
+.macro UNLOCK_ALL_INT
+    ei
+.endm
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fg4_1m.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fg4_1m.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fg4_1m.ld	(revision 172)
@@ -0,0 +1,108 @@
+/*
+ *	V850E2/FG4-1Mãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 1M
+	INTRAM(wax)  : org = 0xFEDEC000, len = 80k
+};
+
+PROVIDE(hardware_init_hook = 0);
+PROVIDE(software_init_hook = 0);
+PROVIDE(software_term_hook = 0);
+
+PROVIDE(_StartupHook = 0);
+PROVIDE(_ShutdownHook = 0);
+PROVIDE(_PreTaskHook = 0);
+PROVIDE(_PostTaskHook = 0);
+PROVIDE(_ErrorHook = 0);
+PROVIDE(_ProtectionHook = 0);
+
+
+OUTPUT_FORMAT("elf32-v850-rh850", "elf32-v850-rh850",
+	      "elf32-v850-rh850")
+OUTPUT_ARCH(v850-rh850)
+STARTUP(start.o)
+ENTRY(__reset)
+SECTIONS
+{
+	.vector : AT(0)
+	{
+		*(.vector)
+	} > INTROM
+
+	.text :	
+	{
+		__text = . ;
+		__tp = . ;
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+	
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(4);
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data);
+	
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+	
+	.sdata ALIGN (4) :
+	{
+		PROVIDE (__gp = . + 0x8000);
+		*(.sdata)
+	} > INTRAM
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }	
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fg4_l_384k.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fg4_l_384k.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fg4_l_384k.ld	(revision 172)
@@ -0,0 +1,107 @@
+/*
+ *	V850E2/FG4-L-384Kãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 384K
+	INTRAM(wax)  : org = 0xFEDF9000, len = 28k
+};
+
+PROVIDE(hardware_init_hook = 0);
+PROVIDE(software_init_hook = 0);
+PROVIDE(software_term_hook = 0);
+
+PROVIDE(_StartupHook = 0);
+PROVIDE(_ShutdownHook = 0);
+PROVIDE(_PreTaskHook = 0);
+PROVIDE(_PostTaskHook = 0);
+PROVIDE(_ErrorHook = 0);
+PROVIDE(_ProtectionHook = 0);
+
+OUTPUT_FORMAT("elf32-v850-rh850", "elf32-v850-rh850",
+	      "elf32-v850-rh850")
+OUTPUT_ARCH(v850-rh850)
+STARTUP(start.o)
+ENTRY(__reset)
+SECTIONS
+{
+	.vector : AT(0)
+	{
+		*(.vector)
+	} > INTROM
+
+	.text :	
+	{
+		__text = . ;
+		__tp = . ;
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+	
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(4);
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data);
+	
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+	
+	.sdata ALIGN (4) :
+	{
+		PROVIDE (__gp = . + 0x8000);
+		*(.sdata)
+	} > INTRAM
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }	
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fl4_2m.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fl4_2m.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fl4_2m.ld	(revision 172)
@@ -0,0 +1,113 @@
+/*
+ *	V850E2/FL4-2Mãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 2M
+	INTRAM(wax)  : org = 0xFEDDC000, len = 144k
+};
+
+PROVIDE(_software_init_hook = 0);
+PROVIDE(_software_term_hook = 0);
+PROVIDE(_hardware_init_hook = 0);
+PROVIDE(_hardware_term_hook = 0);
+PROVIDE(_bsssecinib_table = 0);
+PROVIDE(_tnum_bsssec = 0);
+PROVIDE(_datasecinib_table = 0);
+PROVIDE(_tnum_datasec = 0);
+
+PROVIDE(_StartupHook = 0);
+PROVIDE(_ShutdownHook = 0);
+PROVIDE(_PreTaskHook = 0);
+PROVIDE(_PostTaskHook = 0);
+PROVIDE(_ErrorHook = 0);
+PROVIDE(_ProtectionHook = 0);
+
+OUTPUT_FORMAT( "elf32-v850",
+               "elf32-v850",
+               "elf32-v850" )
+OUTPUT_ARCH( v850 )
+STARTUP(start.o)
+ENTRY(__reset)
+SECTIONS
+{
+	.vector : AT(0)
+	{
+		*(.vector)
+	} > INTROM
+
+	.text :	
+	{
+		__text = . ;
+		__tp = . ;
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+	
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(4);
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data);
+	
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+	
+	.sdata ALIGN (4) :
+	{
+		PROVIDE (__gp = . + 0x8000);
+		*(.sdata)
+	} > INTRAM
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }	
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4.c	(revision 172)
@@ -0,0 +1,308 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: v850e2_fx4.c 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+#include "kernel_impl.h"
+#include "v850e2_fx4.h"
+#include "Os.h"
+#include "prc_sil.h"
+
+/*******************************************************************************************/
+/*  Outline      : Write protected register                                                */
+/*  Argument     : Register address                                                        */
+/*                 Register data                                                           */
+/*                 Register No                                                             */
+/*  Return value : 0: write success / 1: write error                                       */
+/*  Description  : Write protected register                                                */
+/*                                                                                         */
+/*******************************************************************************************/
+static uint32
+write_protected_reg(uint32 addr, uint32 data, uint8 regno)
+{
+	uint32	reg_top = 0xff420000;
+	uint32	reg_stat;
+	uint8	wk;
+	SIL_PRE_LOC;
+
+	if (regno > 2) {
+		return(UC_INVALIDPARAM);
+	}
+
+	switch (regno) {
+	case  0:
+		reg_top += 0x4000;      /* PROTCMD0 */
+		break;
+	case  1:
+		reg_top += 0x8000;      /* PROTCMD1 */
+		break;
+	case  2:
+		reg_top += 0x0300;      /* PROTCMD2 */
+		break;
+	}
+	reg_stat = reg_top + 4;     /* PROTS0/PROTS1/PROTS2 */
+
+	SIL_LOC_INT();
+	sil_wrb_mem((void *) reg_top, 0xA5);
+
+	sil_wrw_mem((void *) addr, data);
+	sil_wrw_mem((void *) addr, ~data);
+	sil_wrw_mem((void *) addr, data);
+	SIL_UNL_INT();
+
+	wk = sil_reb_mem((void *) reg_stat);
+	wk &= 0x01;
+
+	return((wk == 0) ? UC_SUCCESS : UC_PROTREGERROR);
+} /* write_protected_reg */
+
+/********************************************************************************************/
+/*  Function Name : V850Drv_nop                                                             */
+/*  Input         : none                                                                    */
+/*  Output        : none                                                                    */
+/*  Description   : nop command                                                             */
+/********************************************************************************************/
+static void
+V850Drv_nop(void)
+{
+	Asm("nop");
+
+} /* V850Drv_nop */
+
+/*******************************************************************************************/
+/*  Outline      : Sub Oscillator enable                                                   */
+/*  Argument     : -                                                                       */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Sub Oscillator register setting                                         */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnableSubOSC(void)
+{
+	uint32 ucret;
+
+	sil_wrw_mem((void *) SOSCST, 0x02);      /* stabilization time -> 262ms */
+
+	ucret = write_protected_reg(SOSCE, 0x01, PROT_SOSCE);  /* SubOSC start */
+
+	if (ucret != UC_SUCCESS) return(ucret);
+
+	while (((sil_rew_mem((void *) SOSCS)) & CLK_S_CLKSTAB) == 0) {     /* Wait stabilization */
+		V850Drv_nop();
+	}
+	return(UC_SUCCESS);
+} /* EnableSubOSC */
+
+/*******************************************************************************************/
+/*  Outline      : Main Oscillator enable                                                  */
+/*  Argument     : Main Cscillator frequency(Hz)                                           */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Main Oscillator register setting                                        */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+EnableMainOSC(uint32 clk_in)
+{
+	uint8	ampsel;
+	uint32	ucret;
+
+	if (clk_in == CLK_MHz(4)) {
+		ampsel = 0x03;
+	}
+	else if (CLK_MHz(4) < clk_in && clk_in <= CLK_MHz(8)) {
+		ampsel = 0x02;
+	}
+	else if (CLK_MHz(8) < clk_in && clk_in <= CLK_MHz(16)) {
+		ampsel = 0x01;
+	}
+	else if (CLK_MHz(16) < clk_in && clk_in <= CLK_MHz(20)) {
+		ampsel = 0x00;
+	}
+	else {
+		return(UC_INVALIDPARAM);
+	}
+
+	sil_wrw_mem((void *) MOSCC, 0x00 | ampsel); /* Normal stabilization time mode */
+	sil_wrw_mem((void *) MOSCST, 0x0F);         /* stabilization time -> Max */
+
+	ucret = write_protected_reg(MOSCE, 0x01, PROT_MOSCE);   /* MainOSC start */
+
+	if (ucret != UC_SUCCESS) return(ucret);
+
+	while (((sil_rew_mem((void *) MOSCS)) & CLK_S_CLKSTAB) == 0) {     /* Wait stabilization */
+		V850Drv_nop();
+	}
+
+	return(UC_SUCCESS);
+} /* EnableMainOSC */
+
+/*******************************************************************************************/
+/*  Outline      : PLL enable                                                              */
+/*  Argument     : PLL No                                                                  */
+/*                 Multiplying rate                                                        */
+/*                 Register data                                                           */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : PLL register setting                                                    */
+/*                                                                                         */
+/*******************************************************************************************/
+static uint32
+EnablePLL(uint32 pllno, uint8 clk_mul, uint8 p_val)
+{
+	uint32 ucret;
+
+	if (clk_mul > 50)
+		return(UC_INVALIDPARAM);
+
+	sil_wrw_mem((void *) PLLC(pllno), (0x800000 | (p_val << 8) | (clk_mul - 1)));   /* PLL Mode, P, Nr */
+	sil_wrw_mem((void *) PLLST(pllno),  0x07);                                      /* stabilization time -> Max */
+
+	ucret = write_protected_reg(PLLE(pllno), 0x01, PROT_PLLE);  /* PLL Start */
+
+	if (ucret != UC_SUCCESS)
+		return(ucret);
+
+	while (((sil_rew_mem((void *) PLLS(pllno))) & CLK_S_CLKSTAB) == 0) {     /* Wait stabilization */
+		/* V850Drv_nop(); */
+	}
+
+	return(UC_SUCCESS);
+} /* EnablePLL */
+
+/*******************************************************************************************/
+/*  Outline      : Set PLL frequency                                                       */
+/*  Argument     : PLL select No                                                           */
+/*                 PLL frequency                                                           */
+/*                 PLL frequency                                                           */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Set PLL register from frequency                                         */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+SetPLL(uint32 pllno, uint32 mhz, uint32 *outclk)
+{
+	uint32 mul;
+
+	if (mhz < 20) {
+		return(UC_ERROR);
+	}
+	else if (mhz < 50) {
+		mul = (mhz / MAINOSC_CLOCK) * 4;
+		if (mul <= 5 && 51 <= mul)
+			return(UC_ERROR);
+		*outclk = MAINOSC_CLOCK * mul / 4;
+		return(EnablePLL(pllno, mul, PDIV4R0_025TO050));
+	}
+	else if (mhz < 100) {
+		mul = (mhz / MAINOSC_CLOCK) * 2;
+		if (mul <= 5 && 51 <= mul)
+			return(UC_ERROR);
+		*outclk = MAINOSC_CLOCK * mul / 2;
+		return(EnablePLL(pllno, mul, PDIV2R0_050TO100));
+	}
+	else if (mhz < 200) {
+		mul = (mhz / MAINOSC_CLOCK) * 1;
+		if (mul <= 5 && 51 <= mul)
+			return(UC_ERROR);
+		*outclk = MAINOSC_CLOCK * mul / 1;
+		return(EnablePLL(pllno, mul, PDIV1R0_100TO200));
+	}
+	else if (mhz < 400) {
+		mul = (mhz / MAINOSC_CLOCK) / 2;
+		if (mul <= 5 && 51 <= mul)
+			return(UC_ERROR);
+		*outclk = MAINOSC_CLOCK * mul * 2;
+		return(EnablePLL(pllno, mul, PDIV0R5_200TO400));
+	}
+	return(UC_ERROR);
+} /* SetPLL */
+
+/*******************************************************************************************/
+/*  Outline      : Clock switcher setting                                                  */
+/*  Argument     : Control reginster address                                               */
+/*                 Status reginster address                                                */
+/*                 Register No                                                             */
+/*                 Select No                                                               */
+/*  Return value : 0: successfly set / 1: set error                                        */
+/*  Description  : Select clock source of CKSCLK_mn                                        */
+/*                                                                                         */
+/*******************************************************************************************/
+uint32
+set_clock_selection(uint32 control, uint32 status, uint8 regno, uint16 sel)
+{
+	uint32 ucret;
+
+	ucret = write_protected_reg(control, sel << 1, regno);
+	if (ucret != UC_SUCCESS) {
+		return(ucret);
+	}
+
+	/* Wait for SelectEnable */
+	while (((sil_rew_mem((void *) status)) & 0x01) == 0) {
+		V850Drv_nop();
+	}
+
+	return(UC_SUCCESS);
+} /* set_clock_selection */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4.h	(revision 172)
@@ -0,0 +1,423 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: v850e2_fx4.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		V850E2/Fx4ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+
+#ifndef TOPPERS_V850E2_FX4_H
+#define TOPPERS_V850E2_FX4_H
+
+#if defined(V850FG4) || defined(V850FL4)
+#define _V850E2M_
+#elif defined(V850FG4_L)
+#define _V850E2S_
+#endif /* V850FG4 */
+
+/*
+ *  PORTã¬ã¸ã¹ã¿
+ */
+#define PORT_BASE	UINT_C(0xff400000)
+
+/* ç«¯å­æ©è½è¨­å® */
+#define PMC(n)		((PORT_BASE) +0x0400 + (n * 0x04U))     /* ãã¼ãã»ã¢ã¼ãã»ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PMCSR(n)	((PORT_BASE) +0x0900 + (n * 0x04U))     /* ãã¼ãã»ã¢ã¼ãã»ã³ã³ãã­ã¼ã«ã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+#define PIPC(n)		((PORT_BASE) +0x4200 + (n * 0x04U))     /* ãã¼ãIP ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PM(n)		((PORT_BASE) +0x0300 + (n * 0x04U))     /* ãã¼ãã»ã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define PMSR(n)		((PORT_BASE) +0x0800 + (n * 0x04U))     /* ãã¼ãã»ã¢ã¼ãã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+#define PIBC(n)		((PORT_BASE) +0x4000 + (n * 0x04U))     /* ãã¼ãå
+¥åãããã¡ã»ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PFC(n)		((PORT_BASE) +0x0500 + (n * 0x04U))     /* ãã¼ãæ©è½ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PFCE(n)		((PORT_BASE) +0x0600 + (n * 0x04U))     /* ãã¼ãæ©è½ã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+
+/* ç«¯å­ãã¼ã¿å
+¥åï¼åºå */
+#define PBDC(n)		((PORT_BASE) +0x4100 + (n * 0x04U))     /* ãã¼ãåæ¹åã³ã³ãã­ã¼ã«ã»ã¬ã¸ã¹ã¿ */
+#define PPR(n)		((PORT_BASE) +0x0200 + (n * 0x04U))     /* ãã¼ãç«¯å­ãªã¼ãã»ã¬ã¸ã¹ã¿ */
+#define P(n)		((PORT_BASE) +0x0000 + (n * 0x04U))     /* ãã¼ãã»ã¬ã¸ã¹ã¿ */
+#define PNOT(n)		((PORT_BASE) +0x0700 + (n * 0x04U))     /* ãã¼ãã»ãããã»ã¬ã¸ã¹ã¿ */
+#define PSR(n)		((PORT_BASE) +0x0100 + (n * 0x04U))     /* ãã¼ãã»ã»ããï¼ãªã»ããã»ã¬ã¸ã¹ã¿ */
+
+#define FCLA27CTL1	0xff416244      /* UARTE3ãã£ã«ã¿ã¬ã¸ã¹ã¿ */
+#define FCLA27CTL3	0xff41624c
+#define FCLA7CTL0	0xff415040
+#define FCLA0CTL2	0xff414008
+#define FCLA0CTL4	0xff414010
+
+/*
+ *  PLLé¢é£ã®ã¬ã¸ã¹ã¿ã¨å®ç¾©
+ */
+#define MOSCC		0xff421018
+#define MOSCE		0xff421010
+#define MOSCS		0xff421014
+#define MOSCST		0xff42101c
+#define OCDIDH		0xff470008
+#define OCDIDL		0xff470000
+#define OCDIDM		0xff470004
+#define OPBT0		0xff47000c
+#define OSCWUFMSK	0xff4201a4
+
+#define SOSCE		0xff421020
+#define SOSCS		0xff421024
+#define SOSCST		0xff42102c
+
+#define CKSC_0_BASE		0xff426000
+#define CKSC_0(n)		(CKSC_0_BASE + (0x10 * n))
+
+#define CKSC_1_BASE		0xff42a000
+#define CKSC_1(n)		(CKSC_1_BASE + (0x10 * n))
+
+#define CKSC_A_BASE		0xff422000
+#define CKSC_A(n)		(CKSC_A_BASE + (0x10 * n))
+
+#define CSCSTAT_0_BASE	0xff426000
+#define CSCSTAT_0(n)	(CSCSTAT_0_BASE + (0x10 * n)) + 4
+
+#define CSCSTAT_1_BASE	0xff42a000
+#define CSCSTAT_1(n)	(CSCSTAT_1_BASE + (0x10 * n)) + 4
+
+#define CSCSTAT_A_BASE	0xff422000
+#define CSCSTAT_A(n)	(CSCSTAT_A_BASE + (0x10 * n)) + 4
+
+#define PLLE_BASE	0xff425000
+#define PLLE(n)		(PLLE_BASE + (0x10 * n))
+
+#define PLLS_BASE	0xff425004
+#define PLLS(n)		(PLLS_BASE + (0x10 * n))
+
+#define PLLC_BASE	0xff425008
+#define PLLC(n)		(PLLC_BASE + (0x10 * n))
+
+#define PLLST_BASE	0xff42500c
+#define PLLST(n)	(PLLST_BASE + (0x10 * n))
+
+#define MHz(n)		((n) * 1000 * 1000)
+#define CLK_MHz(num)	(num * 1000 * 1000)
+
+/* CKSC_000 CPU, CPU SubSystem */
+#define HIGH_SPEED_INTOSC_DIV2	0x08
+#define HIGH_SPEED_INTOSC_DIV4	0x09
+#define HIGH_SPEED_INTOSC_DIV8	0x0A
+#define HIGH_SPEED_INTOSC_DIV32	0x0B
+#define MAINOSC_DIV1			0x0C
+#define PLL0_DIV1				0x14
+#define PLL0_DIV2				0x15
+#define PLL0_DIV3				0x16
+#define PLL0_DIV4				0x17
+#define PLL0_DIV5				0x18
+#define PLL0_DIV6				0x19
+#define PLL0_DIV8				0x1A
+#define PLL0_DIV10				0x1B
+#define INTOSC_AUTOSELECT		0x3A
+
+/* CKSC_A03 TAUJ0:PCLK */
+#define LOW_SPEED_INTOSC_DIV1	0x01
+#define HIGH_SPEED_INTOSC_DIV1	0x07
+#define SUBOSC					0x12
+#define NO_CLOCKSELECT			0x00
+
+#define PROT_PLLE	2 /*  Fx4 Setting */
+#define PROT_CKSC0	0
+#define PROT_CKSC1	1
+#define PROT_MOSCE	2
+#define PROT_SOSCE	2
+#define PROT_ROSCE	2
+#define PROT_CKSCA	2
+
+/* xxxS Register */
+#define CLK_S_STPACK	0x08
+#define CLK_S_CLKEN		0x04
+#define CLK_S_CLKACT	0x02
+#define CLK_S_CLKSTAB	0x01
+
+/* PLL P-Value */
+#define PDIV0R5_200TO400	0x0     /* Div 0.5, 200-400MHz Output */
+#define PDIV1R0_100TO200	0x1     /* Div 1.0, 100-200MHz Output */
+#define PDIV2R0_050TO100	0x2     /* Div 2.0,  50-100MHz Output */
+#define PDIV4R0_025TO050	0x3     /* Div 4.0,  25- 50MHz Output */
+
+#define UC_SUCCESS			0
+#define UC_ERROR			1
+#define UC_INVALIDPARAM		2
+#define UC_PROTREGERROR		3
+#define UC_CLKSTATUSERR		4
+#define UC_CLKNOTENABLE		5
+#define UC_CLKNOTACTIVE		6
+#define UC_CLKNOTSTAB		7
+
+#ifndef TOPPERS_MACRO_ONLY
+
+extern uint32 EnableSubOSC(void);
+
+extern uint32 EnableMainOSC(uint32 clk_in);
+
+extern uint32 SetPLL(uint32 pllno, uint32 mhz, uint32 *outclk);
+
+extern uint32 set_clock_selection(uint32 control, uint32 status, uint8 regno, uint16 sel);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  Interval Timer(TAUA0)
+ */
+#define TAUA0_BASE			UINT_C(0xFF808000)  /* TAUA0 */
+
+#define TAUA0_IRQ			UINT_C(20)          /* TAUA0 */
+#define TAUA1_IRQ			UINT_C(21)          /* TAUA1 */
+#define TAUA2_IRQ			UINT_C(22)          /* TAUA2 */
+#define TAUA3_IRQ			UINT_C(23)          /* TAUA3 */
+#define TAUA4_IRQ			UINT_C(24)          /* TAUA4 */
+#define TAUA5_IRQ			UINT_C(25)          /* TAUA5 */
+#define TAUA6_IRQ			UINT_C(26)          /* TAUA6 */
+#define TAUA7_IRQ			UINT_C(27)          /* TAUA7 */
+#define TAUA8_IRQ			UINT_C(28)          /* TAUA8 */
+#define TAUA9_IRQ			UINT_C(29)          /* TAUA9 */
+#define TAUA10_IRQ			UINT_C(30)          /* TAUA10 */
+#define TAUA11_IRQ			UINT_C(31)          /* TAUA11 */
+#define TAUA12_IRQ			UINT_C(32)          /* TAUA12 */
+#define TAUA13_IRQ			UINT_C(33)          /* TAUA13 */
+#define TAUA14_IRQ			UINT_C(34)          /* TAUA14 */
+#define TAUA15_IRQ			UINT_C(35)          /* TAUA15 */
+
+#define TAUA_CH0			0
+#define TAUA_CH1			1
+#define TAUA_CH2			2
+#define TAUA_CH3			3
+#define TAUA_CH4			4
+#define TAUA_CH5			5
+#define TAUA_CH6			6
+#define TAUA_CH7			7
+#define TAUA_CH8			8
+#define TAUA_CH9			9
+#define TAUA_CH10			10
+#define TAUA_CH11			11
+#define TAUA_CH12			12
+#define TAUA_CH13			13
+#define TAUA_CH14			14
+#define TAUA_CH15			15
+
+/*
+ *  TAUA0 Timer ãã¼ãã¦ã§ã¢å®ç¾©
+ */
+
+/*
+ *  ã¬ã¸ã¹ã¿
+ */
+/* TAUA0 ããªã¹ã±ã¼ã©ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TPS		(TAUA0_BASE + 0x240U)               /* ããªã¹ã±ã¼ã©ã»ã¯ã­ãã¯é¸æã¬ã¸ã¹ */
+#define TAUA0BRS		(TAUA0_BASE + 0x244U)               /* ããªã¹ã±ã¼ã©ã»ãã¼ã»ã¬ã¼ãè¨­å®ã¬ã¸ã¹ã¿ */
+
+/* TAUA0 å¶å¾¡ã¬ã¸ã¹ã¿ */
+#define TAUA0CDR(CH)	(TAUA0_BASE + (CH * 4U))            /* ãã¼ã¿ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0CNT(CH)	(TAUA0_BASE + (0x80U + (CH * 4U)))  /* ã«ã¦ã³ã¿ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0CMOR(CH)	(TAUA0_BASE + (0x200U + (CH * 4U))) /* ã¢ã¼ãOS ã¬ã¸ã¹ã¿ */
+#define TAUA0CMUR(CH)	(TAUA0_BASE + (0xC0 + (CH * 4U)))   /* ã¢ã¼ãã»ã¦ã¼ã¶ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0CSR(CH)	(TAUA0_BASE + (0x140U + (CH * 4U))) /* ã¹ãã¼ã¿ã¹ã»ã¬ã¸ã¹ã¿ */
+#define TATA0CSC(CH)	(TAUA0_BASE + (0x180U + (CH * 4U))) /* ã¹ãã¼ã¿ã¹ã»ã¯ãªã¢ã»ããªã¬ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TS		(TAUA0_BASE + 0x1C4U)                   /* ã¹ã¿ã¼ãã»ããªã¬ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TE		(TAUA0_BASE + 0x1C0U)                   /* è¨±å¯ã¹ãã¼ã¿ã¹ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TT		(TAUA0_BASE + 0x1C8U)                   /* ã¹ãããã»ããªã¬ã»ã¬ã¸ã¹ã¿ */
+
+/* TAUA0 åºåã¬ã¸ã¹ã¿ */
+#define TAUA0TOE	(TAUA0_BASE + 0x5CU)                    /* åºåè¨±å¯ã¬ã¸ã¹ã¿ */
+#define TAUA0TO		(TAUA0_BASE + 0x58U)                    /* åºåã¬ã¸ã¹ã¿ */
+#define TAUA0TOM	(TAUA0_BASE + 0x248U)                   /* åºåã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TOC	(TAUA0_BASE + 0x24CU)                   /* åºåã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã»ã¬ã¸ã¹ã¿ */
+
+#define TAUA0TOL	(TAUA0_BASE + 0x40U)                    /* åºåã¢ã¯ãã£ãã»ã¬ãã«ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TDE	(TAUA0_BASE + 0x250U)                   /* ãããã»ã¿ã¤ã åºåè¨±å¯ã¬ã¸ã¹ã¿ */
+#define TAUA0TDM	(TAUA0_BASE + 0x254U)                   /* ãããã»ã¿ã¤ã åºåã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TDL	(TAUA0_BASE + 0x54U)                    /* ãããã»ã¿ã¤ã åºåã¬ãã«ã»ã¬ã¸ã¹ã¿ */
+
+#define TAUA0TRO	(TAUA0_BASE + 0x4CU)                    /* ãªã¢ã«ã¿ã¤ã åºåã¬ã¸ã¹ã¿ */
+#define TAUA0TRE	(TAUA0_BASE + 0x258U)                   /* ãªã¢ã«ã¿ã¤ã åºåè¨±å¯ã¬ã¸ã¹ã¿ */
+#define TAUA0TRC	(TAUA0_BASE + 0x25CU)                   /* ãªã¢ã«ã¿ã¤ã åºåå¶å¾¡ã¬ã¸ã¹ã¿ */
+#define TAUA0TME	(TAUA0_BASE + 0x50U)                    /* å¤èª¿åºåè¨±å¯ã¬ã¸ã¹ã¿ */
+/* TAUA0 ãªã­ã¼ãã»ãã¼ã¿ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0RDE	(TAUA0_BASE + 0x260U)                   /* ãªã­ã¼ãã»ãã¼ã¿è¨±å¯ã¬ã¸ã¹ã¿ */
+#define TAUA0RDM	(TAUA0_BASE + 0x264U)                   /* ãªã­ã¼ãã»ãã¼ã¿ã»ã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define TAUA0RDS	(TAUA0_BASE + 0x268U)                   /* ãªã­ã¼ãã»ãã¼ã¿å¶å¾¡CH é¸æã»ãªã­ã¼ãã»ãã¼ã¿å¶å¾¡CH é¸æ */
+#define TAUA0RDC	(TAUA0_BASE + 0x26CU)                   /* ãªã­ã¼ãã»ãã¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+#define TAUA0RDT	(TAUA0_BASE + 0x44U)                    /* ãªã­ã¼ãã»ãã¼ã¿ã»ããªã¬ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0RSF	(TAUA0_BASE + 0x48U)                    /* ãªã­ã¼ãã»ã¹ãã¼ã¿ã¹ã»ã¬ã¸ã¹ã¿ */
+
+#define MCU_TAUA0_MASK_CK0				((uint16) 0x000f)
+#define MCU_TAUA0_CK0					((uint16) 0x0000)
+#define MCU_TAUA00_CMOR					((uint16) 0x0001)
+#define MCU_TAUA00_CMUR					((uint8) 0x01)
+#define MCU_TAUA00_DI					((uint16) 0x0080)
+#define MCU_TAUA00_EI					((uint16) 0x0000)
+#define MCU_TAUA00_MASK_ENB				((uint16) 0x0001)
+#define MCU_TIMER_STOP					((uint8) 0x0)
+#define MCU_TIMER_START					((uint8) 0x1)
+
+#define ICTAUA0_BASE					0xffff6028                  /* ãã£ã³ãã«ï¼å²ãè¾¼ã¿ */
+#define ICTAUA0I(CH)					(ICTAUA0_BASE + (CH * 0x02))
+
+
+/*
+ *  TAUA0 ãã¹ã¯å®ç¾©
+ */
+#define TAUA0_MASK_BIT	0x0xfffe                                    /* bit0 = TAUA0 */
+
+/*
+ * OSTM
+ */
+#define OSTM_IRQ			UINT_C(147)
+
+#define OSTM0_BASE	0xFF800000
+
+#define OSTM_CMP_W	(0xFF800000 + 0x00)
+#define OSTM_CNT_W	(0xFF800000 + 0x04)
+#define OSTM_TE		(0xFF800000 + 0x10)
+#define OSTM_TS_B	(0xFF800000 + 0x14)
+#define OSTM_TT_B	(0xFF800000 + 0x18)
+#define OSTM_CTL_B	(0xFF800000 + 0x20)
+
+/*
+ *  UARTE
+ */
+#define URTE3_BASE	UINT_C(0xff5f0000)
+#define URTE5_BASE	UINT_C(0xff610000)
+#define URTE10_BASE	UINT_C(0xff660000)
+#define URTEnCTL0	(UARTE_BASE + 0x00U)
+#define URTEnCTL1	(UARTE_BASE + 0x20U)
+#define URTEnCTL2	(UARTE_BASE + 0x24U)
+#define URTEnTRG	(UARTE_BASE + 0x04U)
+#define URTEnSTR0	(UARTE_BASE + 0x08U)
+#define URTEnSTR1	(UARTE_BASE + 0x0cU)
+#define URTEnSTC	(UARTE_BASE + 0x10U)
+#define URTEnRX		(UARTE_BASE + 0x14U)
+#define URTEnTX		(UARTE_BASE + 0x18U)
+#define URTEnEMU	(UARTE_BASE + 0x34U)
+
+#define INTLMA3IT	0xffff618C      /* è»¢éå®äº */
+#define INTLMA3IR	0xffff618A      /* åä¿¡å®äº */
+
+#define INTLMA5IT	0xffff61C4      /* UART5 RX */
+#define INTLMA5IR	0xffff61C6      /* UART5 TX */
+
+#define INTLMA10IT	0xffff6204      /* UART10 TX */
+#define INTLMA10IR	0xffff6202      /* UART10 RX */
+
+#define URTE3_INTNO		UINT_C(197)
+#define URTE5_INTNO		UINT_C(226)
+
+#ifndef URTE10_INTNO
+#define URTE10_INTNO	UINT_C(249)
+#endif /* URTE10_INTNO */
+
+/*
+ *  TAUJ
+ */
+#ifdef V850FG4
+#define TAUFJ0I0_INTNO	135        
+#define TAUFJ0I1_INTNO	136
+#define TAUFJ0I2_INTNO	137
+#define TAUFJ0I3_INTNO	138
+#define TAUFJ1I0_INTNO	139
+#define TAUFJ1I1_INTNO	140
+#define TAUFJ1I2_INTNO	141
+#define TAUFJ1I3_INTNO	142
+#elif defined(V850FG4_L)
+#define TAUFJ0I0_INTNO	78
+#define TAUFJ0I1_INTNO	79
+#define TAUFJ0I2_INTNO	80
+#define TAUFJ0I3_INTNO	81
+#endif /* V850FG4 */
+
+
+/*
+ *  TAUJé¢é£ã¬ã¸ã¹ã¿
+ */
+#define TAUJ_BASE(n)	((uint32) (0xff811000U + (n * 0x1000U)))
+#define TAUJTPS(n)		(TAUJ_BASE(n) + 0x90U)
+#define TAUJCDR(n, ch)	(TAUJ_BASE(n) + (ch * 0x04U))
+#define TAUJCNT(n, ch)	(TAUJ_BASE(n) + 0x10U + (ch * 0x04U))
+#define TAUJCMOR(n, ch)	(TAUJ_BASE(n) + 0x80U + (ch * 0x04U))
+#define TAUJCMUR(n, ch)	(TAUJ_BASE(n) + 0x20U + (ch * 0x04U))
+#define TAUJTS(n)		(TAUJ_BASE(n) + 0x54U)
+#define TAUJTT(n)		(TAUJ_BASE(n) + 0x58U)
+
+/*
+ *  INT
+ */
+#define EIC_BASE			UINT_C(0xffff6000)
+#define EIC_ADDRESS(intno)	(EIC_BASE + (intno * 2))
+#define PMR					UINT_C(0xFFFF6448)
+#define ISPR_H				UINT_C(0xFFFF6440)
+#define ISPC_H				UINT_C(0xffff6450)
+
+#define TMIN_INTNO	UINT_C(0)
+#define TMAX_INTNO	UINT_C(255)
+#define TNUM_INT	UINT_C(256)
+
+#include "v850.h"
+
+#endif /* TOPPERS_V850E2_FX4_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4l.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4l.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_fx4l.h	(revision 172)
@@ -0,0 +1,83 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: v850e2_fx4l.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		V850E2/Fx4ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+
+#ifndef TOPPERS_V850E2_FX4L_H
+#define TOPPERS_V850E2_FX4L_H
+
+#define _V850E2S_
+
+#define URTE10_INTNO	UINT_C(108)
+
+#include "v850e2_fx4.h"
+
+#endif /* TOPPERS_V850E2_FX4_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_px4.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_px4.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_px4.h	(revision 172)
@@ -0,0 +1,249 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: v850e2_px4.h 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *		V850E2/Px4ã®ãã¼ãã¦ã§ã¢è³æºã®å®ç¾©
+ */
+
+#ifndef TOPPERS_V850E2_PX4_H
+#define TOPPERS_V850E2_PX4_H
+
+#define _V850E2M_
+
+#define VPNECR	0xffff5110
+#define VPNADR	0xffff5114
+#define VPNTID	0xffff5118
+#define VPTTID	0xffff511A
+#define VPTECR	0xffff5120
+#define VPTADR	0xffff5124
+
+/*
+ *  ãã¼ãã¬ã¸ã¹ã¿
+ */
+#define PM0		0xffff8300
+#define PMC0	0xffff8400
+#define PFC0	0xffff8500
+#define PFCE0	0xffff8600
+
+#define P4		0xffff8010
+#define PM4		0xffff8310
+#define PMC4	0xffff8410
+#define PFC4	0xffff8510
+#define PFCE4	0xffff8610
+
+#define FCLA0CTL0	0xFF414000
+#define FCLA1CTL2	0xFF414028
+#define FCLA1CTL3	0xFF41402c
+
+#define FCLA27CTL3	0xff41624c
+#define FCLA27CTL6	0xff416258
+
+/*
+ *  Interval Timer(TAUA0)
+ */
+#define TAUA0_BASE0			UINT_C(0xFF808000)  /* TAUA0 */
+#define TAUA0_BASE1			UINT_C(0xFFFFC400)  /* TAUA0 */
+
+#define TAUA0_IRQ			UINT_C(54)          /* TAUA0 */
+#define TAUA1_IRQ			UINT_C(55)          /* TAUA1 */
+#define TAUA2_IRQ			UINT_C(56)          /* TAUA2 */
+#define TAUA3_IRQ			UINT_C(57)          /* TAUA3 */
+#define TAUA4_IRQ			UINT_C(58)          /* TAUA4 */
+#define TAUA5_IRQ			UINT_C(59)          /* TAUA5 */
+#define TAUA6_IRQ			UINT_C(60)          /* TAUA6 */
+#define TAUA7_IRQ			UINT_C(61)          /* TAUA7 */
+#define TAUA8_IRQ			UINT_C(62)          /* TAUA8 */
+#define TAUA9_IRQ			UINT_C(63)          /* TAUA9 */
+#define TAUA10_IRQ			UINT_C(64)          /* TAUA10 */
+#define TAUA11_IRQ			UINT_C(65)          /* TAUA11 */
+#define TAUA12_IRQ			UINT_C(66)          /* TAUA12 */
+#define TAUA13_IRQ			UINT_C(67)          /* TAUA13 */
+#define TAUA14_IRQ			UINT_C(68)          /* TAUA14 */
+#define TAUA15_IRQ			UINT_C(69)          /* TAUA15 */
+
+#define TAUA_CH0			0
+#define TAUA_CH1			1
+#define TAUA_CH2			2
+#define TAUA_CH3			3
+#define TAUA_CH4			4
+#define TAUA_CH5			5
+#define TAUA_CH6			6
+#define TAUA_CH7			7
+#define TAUA_CH8			8
+#define TAUA_CH9			9
+#define TAUA_CH10			10
+#define TAUA_CH11			11
+#define TAUA_CH12			12
+#define TAUA_CH13			13
+#define TAUA_CH14			14
+#define TAUA_CH15			15
+
+/*
+ *  TAUA0 Timer ãã¼ãã¦ã§ã¢å®ç¾©
+ */
+
+/*
+ *  ã¬ã¸ã¹ã¿
+ */
+/* TAUA0 ããªã¹ã±ã¼ã©ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TPS		(TAUA0_BASE0 + 0x240U)              /* ããªã¹ã±ã¼ã©ã»ã¯ã­ãã¯é¸æã¬ã¸ã¹ */
+#define TAUA0BRS		(TAUA0_BASE0 + 0x244U)              /* ããªã¹ã±ã¼ã©ã»ãã¼ã»ã¬ã¼ãè¨­å®ã¬ã¸ã¹ã¿ */
+
+/* TAUA0 å¶å¾¡ã¬ã¸ã¹ã¿ */
+#define TAUA0CDR(CH)	(TAUA0_BASE1 + (CH * 4U))               /* ãã¼ã¿ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0CNT(CH)	(TAUA0_BASE1 + (0x80U + (CH * 4U)))     /* ã«ã¦ã³ã¿ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0CMOR(CH)	(TAUA0_BASE0 + (0x200U + (CH * 4U)))    /* ã¢ã¼ãOS ã¬ã¸ã¹ã¿ */
+#define TAUA0CMUR(CH)	(TAUA0_BASE1 + (0xC0 + (CH * 4U)))      /* ã¢ã¼ãã»ã¦ã¼ã¶ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0CSR(CH)	(TAUA0_BASE1 + (0x140U + (CH * 4U)))    /* ã¹ãã¼ã¿ã¹ã»ã¬ã¸ã¹ã¿ */
+#define TATA0CSC(CH)	(TAUA0_BASE1 + (0x180U + (CH * 4U)))    /* ã¹ãã¼ã¿ã¹ã»ã¯ãªã¢ã»ããªã¬ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TS		(TAUA0_BASE1 + 0x1C4U)                      /* ã¹ã¿ã¼ãã»ããªã¬ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TE		(TAUA0_BASE1 + 0x1C0U)                      /* è¨±å¯ã¹ãã¼ã¿ã¹ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TT		(TAUA0_BASE1 + 0x1C8U)                      /* ã¹ãããã»ããªã¬ã»ã¬ã¸ã¹ã¿ */
+
+/* TAUA0 åºåã¬ã¸ã¹ã¿ */
+#define TAUA0TOE	(TAUA0_BASE1 + 0x5CU)                   /* åºåè¨±å¯ã¬ã¸ã¹ã¿ */
+#define TAUA0TO		(TAUA0_BASE1 + 0x58U)                   /* åºåã¬ã¸ã¹ã¿ */
+#define TAUA0TOM	(TAUA0_BASE0 + 0x248U)                  /* åºåã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TOC	(TAUA0_BASE0 + 0x24CU)                  /* åºåã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã»ã¬ã¸ã¹ã¿ */
+
+#define TAUA0TOL	(TAUA0_BASE1 + 0x40U)                   /* åºåã¢ã¯ãã£ãã»ã¬ãã«ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TDE	(TAUA0_BASE0 + 0x250U)                  /* ãããã»ã¿ã¤ã åºåè¨±å¯ã¬ã¸ã¹ã¿ */
+#define TAUA0TDM	(TAUA0_BASE0 + 0x254U)                  /* ãããã»ã¿ã¤ã åºåã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define TAUA0TDL	(TAUA0_BASE1 + 0x54U)                   /* ãããã»ã¿ã¤ã åºåã¬ãã«ã»ã¬ã¸ã¹ã¿ */
+
+#define TAUA0TRO	(TAUA0_BASE1 + 0x4CU)                   /* ãªã¢ã«ã¿ã¤ã åºåã¬ã¸ã¹ã¿ */
+#define TAUA0TRE	(TAUA0_BASE0 + 0x258U)                  /* ãªã¢ã«ã¿ã¤ã åºåè¨±å¯ã¬ã¸ã¹ã¿ */
+#define TAUA0TRC	(TAUA0_BASE0 + 0x25CU)                  /* ãªã¢ã«ã¿ã¤ã åºåå¶å¾¡ã¬ã¸ã¹ã¿ */
+#define TAUA0TME	(TAUA0_BASE1 + 0x50U)                   /* å¤èª¿åºåè¨±å¯ã¬ã¸ã¹ã¿ */
+/* TAUA0 ãªã­ã¼ãã»ãã¼ã¿ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0RDE	(TAUA0_BASE0 + 0x260U)                  /* ãªã­ã¼ãã»ãã¼ã¿è¨±å¯ã¬ã¸ã¹ã¿ */
+#define TAUA0RDM	(TAUA0_BASE0 + 0x264U)                  /* ãªã­ã¼ãã»ãã¼ã¿ã»ã¢ã¼ãã»ã¬ã¸ã¹ã¿ */
+#define TAUA0RDS	(TAUA0_BASE0 + 0x268U)                  /* ãªã­ã¼ãã»ãã¼ã¿å¶å¾¡CH é¸æã»ãªã­ã¼ãã»ãã¼ã¿å¶å¾¡CH é¸æ */
+#define TAUA0RDC	(TAUA0_BASE0 + 0x26CU)                  /* ãªã­ã¼ãã»ãã¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+#define TAUA0RDT	(TAUA0_BASE1 + 0x44U)                   /* ãªã­ã¼ãã»ãã¼ã¿ã»ããªã¬ã»ã¬ã¸ã¹ã¿ */
+#define TAUA0RSF	(TAUA0_BASE1 + 0x48U)                   /* ãªã­ã¼ãã»ã¹ãã¼ã¿ã¹ã»ã¬ã¸ã¹ã¿ */
+
+#define MCU_TAUA0_MASK_CK0				((uint16) 0x000f)
+#define MCU_TAUA0_CK0					((uint16) 0x0000) /* 2^0 */
+#define MCU_TAUA00_CMOR					((uint16) 0x0001)
+#define MCU_TAUA00_CMUR					((uint8) 0x01)
+#define MCU_TAUA00_DI					((uint16) 0x0080)
+#define MCU_TAUA00_EI					((uint16) 0x0000)
+#define MCU_TAUA00_MASK_ENB				((uint16) 0x0001)
+#define MCU_TIMER_STOP					((uint8) 0x0)
+#define MCU_TIMER_START					((uint8) 0x1)
+
+#define ICTAUA0_BASE					0xffff606c                  /* ãã£ã³ãã«ï¼å²ãè¾¼ã¿ */
+#define ICTAUA0I(CH)					(ICTAUA0_BASE + (CH * 0x02))
+
+/*
+ *  TAUA0 ãã¹ã¯å®ç¾©
+ */
+#define TAUA0_MASK_BIT	0x0xfffe                                    /* bit0 = TAUA0 */
+
+/*
+ *  UARTE
+ */
+#define URTE0_BASE	0xFF5C0000
+#define URTE1_BASE	0xFF5D0000
+#define URTE2_BASE0	0xFF5E0000
+#define URTE2_BASE1	0xFFFFEC00
+
+#define URTEnCTL0	(URTE2_BASE1 + 0x00U)
+#define URTEnCTL1	(URTE2_BASE0 + 0x40U)
+#define URTEnCTL2	(URTE2_BASE0 + 0x44U)
+#define URTEnTRG	(URTE2_BASE1 + 0x0cU)
+#define URTEnSTR0	(URTE2_BASE1 + 0x10U)
+#define URTEnSTR1	(URTE2_BASE1 + 0x14U)
+#define URTEnSTC	(URTE2_BASE1 + 0x18U)
+#define URTEnRX		(URTE2_BASE1 + 0x1cU)
+#define URTEnTX		(URTE2_BASE1 + 0x2cU)
+
+#define URTE2_INTNO	UINT_C(197)
+
+#define INTNO_URTE2_IS	114
+#define INTNO_URTE2_IR	115
+#define INTNO_URTE2_IT	116
+
+/*
+ *  INT
+ */
+#define EIC_BASE			UINT_C(0xffff6000)
+#define EIC_ADDRESS(intno)	(EIC_BASE + (intno * 2))
+#define PMR					UINT_C(0xFFFF6448)
+#define ISPR_H				UINT_C(0xFFFF6440)
+#define ISPC_H				UINT_C(0xffff6450)
+
+#define TMIN_INTNO	UINT_C(0)
+#define TMAX_INTNO	UINT_C(255)
+#define TNUM_INT	UINT_C(256)
+
+#include "v850.h"
+
+#endif /* TOPPERS_V850E2_PX4_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_px4_3507.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_px4_3507.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_gcc/v850e2_px4_3507.ld	(revision 172)
@@ -0,0 +1,109 @@
+/*
+ *	V850E2/PX4-3507ãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 512K
+	INTRAM(wax)  : org = 0xFEDF6000, len = 40k
+};
+
+PROVIDE(_software_init_hook = 0);
+PROVIDE(_software_term_hook = 0);
+PROVIDE(_hardware_init_hook = 0);
+PROVIDE(_hardware_term_hook = 0);
+PROVIDE(_bsssecinib_table = 0);
+PROVIDE(_tnum_bsssec = 0);
+PROVIDE(_datasecinib_table = 0);
+PROVIDE(_tnum_datasec = 0);
+
+PROVIDE(_StartupHook = 0);
+PROVIDE(_ShutdownHook = 0);
+PROVIDE(_PreTaskHook = 0);
+PROVIDE(_PostTaskHook = 0);
+PROVIDE(_ErrorHook = 0);
+PROVIDE(_ProtectionHook = 0);
+
+OUTPUT_FORMAT( "elf32-v850",
+               "elf32-v850",
+               "elf32-v850" )
+OUTPUT_ARCH(v850)
+SECTIONS
+{
+	.vector : AT(0)
+	{
+		*(.vector)
+	} > INTROM
+
+	.text :	
+	{
+		__text = . ;
+		__tp = . ;
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+	
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(4);
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data);
+	
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+	
+	.sdata ALIGN (4) :
+	{
+		PROVIDE (__gp = . + 0x8000);
+		*(.sdata)
+	} > INTRAM
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }
+}
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/MANIFEST	(revision 172)
@@ -0,0 +1,21 @@
+PACKAGE atk2-sc3
+
+MANIFEST
+Makefile.prc
+Makefile.sample
+Platform_Types.h
+ldscript.tf
+prc.tf
+prc_insn.h
+prc_mpu.h
+prc_opt.tf
+prc_svc.h
+prc_tool.S
+prc_user.txt
+rh850_f1h_6m_pe1only.ld
+rh850_f1h_6m_pe2only.ld
+rh850_f1l_1m.ld
+rh850_f1l_2m.ld
+v850asm.inc
+v850e2_fl4_2m.ld
+v850e2_px4_3507.ld
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Makefile.prc
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Makefile.prc	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Makefile.prc	(revision 172)
@@ -0,0 +1,234 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2012-2013 by Spansion LLC, USA
+#  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+#  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.prc 182 2015-06-24 07:14:37Z t_ishikawa $
+#
+
+#
+#		Makefile ã®ãã­ã»ããµä¾å­é¨ï¼V850ç¨ï¼
+#
+
+#
+#  ãã­ã»ããµåï¼éçºç°å¢åã®å®ç¾©
+#
+PRC  = v850
+TOOL = ghs
+
+#
+#  ãã­ã»ããµä¾å­é¨ãã£ã¬ã¯ããªåã®å®ç¾©
+#
+PRCDIR = $(SRCDIR)/arch/$(PRC)_$(TOOL)
+PRCDIR_GCC = $(SRCDIR)/arch/$(PRC)_gcc
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES := $(INCLUDES) -I$(PRCDIR) -I$(PRCDIR_GCC) -I$(SRCDIR)/arch/$(TOOL) 
+COPTS := $(COPTS) -ansi -preprocess_assembly_files \
+         -srec -kanji=utf8 -noobj \
+         -no_callt \
+         -prepare_dispose \
+         -registermode=32 \
+         -keeptempfiles \
+         --no_commons \
+         -dual_debug -G\
+         --no_slash_comment \
+         -sda=all \
+         -reserve_r2 \
+         -large_sda
+
+LDFLAGS := $(LDFLAGS) -Wl,-append
+
+#
+#  ã¢ã¼ã­ãã¯ãã£ã®åãæ¿ã
+#
+ifeq ($(ARCH),V850E2V3)
+	CDEFS := $(CDEFS) -D__v850e2v3__
+	KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) Os_Lcfg_asm.o
+endif
+ifeq ($(ARCH),V850E3V5)
+	CDEFS := $(CDEFS) -D__v850e3v5__
+endif
+
+#
+#  ã³ã¢ã¿ã¤ã(å®è£
+)ã«ããåãæ¿ã
+#
+ifeq ($(CORETYPE),RH850G3M)
+	COPTS := $(COPTS) -cpu=rh850g3m
+	ifeq ($(USE_HARD_FLOAT),true)
+		COPTS := $(COPTS) -mhard-float -DTOPPERS_USE_HFLOAT
+	else
+		COPTS := $(COPTS) -msoft-float
+	endif
+endif
+
+#
+#  æé©åã«é¢ãããªãã·ã§ã³
+#
+# Makefile ã§ -O2 ãä»ããªã
+OMIT_OPTIMIZATION = true
+COPTS := $(COPTS) -Ospeed -Omax -Olink -Ointerproc
+#COPTS := $(COPTS) -Odebug
+
+#
+#  è­¦åã«é¢ãããªãã·ã§ã³
+#
+COPTS := $(COPTS) --prototype_warnings  \
+                   -Wimplicit-int \
+                   -Wshadow \
+                   -Wundef \
+                   -Wtrigraphs \
+                   --assembler_warnings \
+                   -linker_warnings \
+                   --diag_suppress 174,188,191,767,177,826
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIR := $(KERNEL_DIR) $(PRCDIR) $(PRCDIR_GCC)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) prc_support.o prc_tool.o 
+KERNEL_COBJS := $(KERNEL_COBJS) prc_config.o prc_mpu.o 
+
+#
+#  GNUéçºç°å¢ã®ã¿ã¼ã²ããã¢ã¼ã­ãã¯ãã£ã®å®ç¾©
+#
+GCC_TARGET = v850-elf
+
+#
+#  ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã«é¢ããå®ç¾©
+#
+START_OBJS := $(START_OBJS) start.o
+
+$(START_OBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(START_OBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+
+
+#
+#  ãªã³ã¯ã«é¢ããè¨­å®
+#
+LDFLAGS := $(LDFLAGS) -e __reset -nostartfiles
+
+CFG1_OUT_LDFLAGS := -nostartfiles
+CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS) $(LDFLAGS)
+CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) $(LDFLAGS)
+CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) $(LDFLAGS)
+
+# ã¡ã¢ãªé
+ç½®æ±ºå®åã®æ«å®çãªãªã³ã«ã¹ã¯ãªãã
+CFG2_OUT_LDSCRIPT = cfg2_out.ld
+# ã¡ã¢ãªé
+ç½®æ±ºå®æã®ãªã³ã«ã¹ã¯ãªãã
+CFG3_OUT_LDSCRIPT = cfg3_out.ld
+# æçµçãªãªã³ã«ã¹ã¯ãªãã
+LDSCRIPT = ldscript.ld
+ifeq ($(ARCH),V850E2V3)
+	USE_CFG_PASS3 = true
+endif
+
+$(LDSCRIPT): kernel_cfg.timestamp
+$(CFG2_OUT_LDSCRIPT): kernel_cfg.timestamp
+
+#
+#  ä¾å­é¢ä¿ã®å®ç¾©
+#
+cfg1_out.c: $(PRCDIR_GCC)/prc_def.csv
+Os_Lcfg.timestamp: $(PRCDIR)/prc.tf
+$(OBJFILE): $(PRCDIR_GCC)/prc_mem.tf
+offset.h: $(PRCDIR_GCC)/prc_offset.tf
+
+
+#
+#  ã¸ã§ãã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+CFG_TABS := $(CFG_TABS) --cfg1-def-table $(PRCDIR_GCC)/prc_def.csv
+
+#
+#  éçºãã¼ã«ã®ã³ãã³ãåã®å®ç¾©
+#
+ifeq ($(ARCH),V850E2V3)
+	CC = ccv850.exe
+	AR = ccv850.exe
+endif
+
+ifeq ($(ARCH),V850E3V5)
+	CC = ccrh850.exe
+	AR = ccrh850.exe
+endif
+
+NM = gnm -p -h -no_debug -no_dotdot -no_line
+
+#
+#  clean ã§åé¤ãããã¡ã¤ã«
+#
+CLEAN_FILES := $(CLEAN_FILES) *.dbo *.dla *.map *.run *.dnm *.dep *.dba *.si *.inf
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Makefile.sample
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Makefile.sample	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Makefile.sample	(revision 172)
@@ -0,0 +1,707 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2012-2013 by Spansion LLC, USA
+#  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.sample 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+#
+#  ã¿ã¼ã²ããã®æå®ï¼Makefile.targetã§ä¸æ¸ããããã®ãé²ãããï¼
+#
+all:
+
+#
+#  ã¿ã¼ã²ããç¥ç§°ã®å®ç¾©
+#
+TARGET = @(TARGET)
+
+OMIT_WARNING_ALL = true
+
+#
+#  ãã­ã°ã©ãã³ã°è¨èªã®å®ç¾©
+#
+SRCLANG = @(SRCLANG)
+ifeq ($(SRCLANG),c++)
+  USE_CXX = true
+  CXXLIBS = -lstdc++ -lm -lc
+  CXXRTS = cxxrt.o newlibrt.o
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+SRCDIR = @(SRCDIR)
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ã®è¨­å®
+#
+OBJEXT = @(OBJEXT)
+
+#
+#  å®è¡ç°å¢ã®å®ç¾©ï¼ã¿ã¼ã²ããä¾å­ã«ä¸æ¸ããããå ´åãããï¼
+#
+DBGENV := @(DBGENV)
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#  ï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeå¯¾è±¡ã«ããæã¯ï¼ç©ºã«å®ç¾©ããï¼
+#
+KERNEL_LIB = @(KERNEL_LIB)
+
+#
+#  ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®å®ç¾©
+#
+KERNEL_FUNCOBJS = @(KERNEL_FUNCOBJS)
+
+#
+#  ãã¬ã¼ã¹ã­ã°ãåå¾ãããã©ããã®å®ç¾©
+#
+ENABLE_TRACE = @(ENABLE_TRACE)
+
+#
+#  ã·ã¹ãã ã¿ã¤ã(ã¿ã¤ããã©ã¤ã)ãä½¿ç¨ãããã©ããã®å®ç¾©
+#
+ENABLE_SYS_TIMER = @(ENABLE_SYS_TIMER)
+
+#
+#  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãç¡å¹ã«ãããã©ããã®å®ç¾©
+#
+OMIT_HW_COUNTER = @(OMIT_HW_COUNTER)
+
+#
+#  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+#
+ifeq ($(ENABLE_TRACE),true)
+      ENABLE_SYS_TIMER = true
+      CDEFS := $(CDEFS) -DTOPPERS_ENABLE_TRACE
+      KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/arch/logtrace
+      KERNEL_COBJS := $(KERNEL_COBJS) trace_config.o trace_dump.o
+endif
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«é¢ããå®ç¾©
+#
+CFGNAME = @(CFGNAME)
+@(CFG_SERIAL)
+ifdef ENABLE_SYS_TIMER
+  CFGNAME := $(CFGNAME) target_timer
+endif
+ifndef OMIT_HW_COUNTER
+  CFGNAME := $(CFGNAME) target_hw_counter
+endif
+CFGNAME := $(CFGNAME) target_mem
+
+#
+#  ã¦ã¼ãã£ãªãã£ãã­ã°ã©ã ã®åç§°
+#
+PERL = @(PERL)
+CFG = @(CFG)
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®å®ç¾©
+#
+OBJNAME = atk2-sc3
+ifdef OBJEXT
+  OBJFILE = $(OBJNAME).$(OBJEXT)
+  CFG1_OUT = cfg1_out.$(OBJEXT)
+  CFG2_OUT = cfg2_out.$(OBJEXT)
+  CFG3_OUT = cfg3_out.$(OBJEXT)
+else
+  OBJFILE = $(OBJNAME)
+  CFG1_OUT = cfg1_out
+  CFG2_OUT = cfg2_out
+  CFG3_OUT = cfg3_out
+endif
+
+#
+#  ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TARGETDIR = $(SRCDIR)/target/$(TARGET)
+
+#
+#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(TARGETDIR)/Makefile.target
+
+#
+#  ã¸ã§ãã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+PASS2_TF = $(SRCDIR)/kernel/kernel.tf $(SRCDIR)/kernel/kernel_common.tf
+DEF_TABS = $(SRCDIR)/kernel/kernel.csv
+CFG_KERNEL = atk2
+CFG_TABS := --ini-file $(SRCDIR)/kernel/kernel.ini $(CFG_TABS)
+CFG_TABS := --api-table $(DEF_TABS) \
+			--cfg1-def-table $(SRCDIR)/kernel/kernel_def.csv $(CFG_TABS)
+CFG_OBJS := Os_Lcfg.o kernel_mem.o ioc.o $(CFG_OBJS)
+CFG2_OUT_SRCS := Os_Lcfg.h Os_Lcfg.c Os_Cfg.h kernel_mem2.c Ioc.c Ioc.h $(CFG2_OUT_SRCS)
+CFG3_OUT_SRCS := kernel_mem3.c $(CFG3_OUT_SRCS)
+CFG2_OBJS := Os_Lcfg.o kernel_mem2.o ioc.o $(CFG2_OBJS)
+CFG3_OBJS := Os_Lcfg.o kernel_mem3.o ioc.o $(CFG3_OBJS)
+ifndef USE_CFG_PASS3
+	ALL_CFG_OBJS := $(CFG_OBJS) cfg1_out.o kernel_mem2.o $(ALL_CFG_OBJS)
+else
+	ALL_CFG_OBJS := $(CFG_OBJS) cfg1_out.o kernel_mem2.o kernel_mem3.o $(ALL_CFG_OBJS)
+endif
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+
+COPTS := $(COPTS) -g @(COPTS)
+ifndef OMIT_WARNING_ALL
+  COPTS := $(COPTS) -Wall -Wno-unused-label -Wpointer-arith
+endif
+ifndef OMIT_OPTIMIZATION
+  COPTS := $(COPTS) -O2
+endif
+CDEFS := $(CDEFS) @(CDEFS) -DUSE_KERNEL_LIBRARY_SYSLOG
+INCLUDES := -I. -I$(SRCDIR)/include -I$(SRCDIR)/arch -I$(SRCDIR) $(INCLUDES)
+LDFLAGS := $(LDFLAGS) @(LDFLAGS)
+CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS) @(LDFLAGS)
+CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) @(LDFLAGS)
+CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) @(LDFLAGS)
+LIBS := $(LIBS) $(CXXLIBS)
+CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©
+#
+APPLNAME = @(APPLNAME)
+APPLDIR = @(APPLDIR)
+APPL_CFG_INPUT := $(foreach file,$(CFGNAME),$(file).arxml)
+
+APPL_DIR = $(APPLDIR) $(SRCDIR)/library
+APPL_ASMOBJS =
+ifdef USE_CXX
+  APPL_CXXOBJS = $(APPLNAME).o @(APPLOBJS)
+  APPL_COBJS =
+else
+  APPL_COBJS = $(APPLNAME).o @(APPLOBJS)
+endif
+APPL_CFLAGS =
+APPL_LIBS =
+ifdef APPLDIR
+  INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIR),-I$(dir))
+endif
+
+
+#
+#  ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã«é¢ããå®ç¾©
+#
+SYSMOD_DIR := $(SYSMOD_DIR) $(SRCDIR)/sysmod $(SRCDIR)/library
+SYSMOD_ASMOBJS := $(SYSMOD_ASMOBJS)
+SYSMOD_COBJS := $(SYSMOD_COBJS) banner.o syslog.o serial.o \
+				log_output.o vasyslog.o t_perror.o strerror.o chkobj.o \
+				$(CXXRTS)
+SYSMOD_CFLAGS := $(SYSMOD_CFLAGS)
+SYSMOD_LIBS := $(SYSMOD_LIBS)
+INCLUDES := $(INCLUDES)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+#  KERNEL_ASMOBJS: ã«ã¼ãã«ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãã¢ã»ã³ããªè¨èªã®
+#				   ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_COBJS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãCè¨èªã§ï¼ã½ã¼ã¹
+#				 ãã¡ã¤ã«ã¨1å¯¾1ã«å¯¾å¿ãããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_LCSRCS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããCè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ã§ï¼
+#				  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãç
+#				  æãããã®ï¼
+#  KERNEL_LCOBJS: ä¸ã®ã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_AUX_COBJS: ã­ã¼ãã¢ã¸ã¥ã¼ã«ã«å«ããªããï¼ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡
+#					 ã¤ã«ã¨åããªãã·ã§ã³ãé©ç¨ãã¦ã³ã³ãã¤ã«ãã¹ãï¼ã½ã¼
+#					 ã¹ãCè¨èªã®ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#
+KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/kernel
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS)
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel
+ifdef OMIT_MAKEOFFSET
+  OFFSET_H =
+else
+  OFFSET_H = offset.h
+endif
+
+
+#
+#  ã¿ã¼ã²ãããã¡ã¤ã«ï¼è¤æ°ãåæã«é¸æãã¦ã¯ãªããªãï¼
+#
+all: $(OBJFILE)
+#all: $(OBJNAME).bin
+#all: $(OBJNAME).srec
+
+##### ä»¥ä¸ã¯ç·¨éããªããã¨ #####
+
+#
+#  ç°å¢ã«ä¾å­ããã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+ifdef DBGENV
+  CDEFS := $(CDEFS) -D$(DBGENV)
+endif
+
+#
+#  ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+include $(SRCDIR)/kernel/Makefile.kernel
+ifdef KERNEL_FUNCOBJS
+  KERNEL_LCSRCS := $(KERNEL_FCSRCS)
+  KERNEL_LCOBJS := $(foreach file,$(KERNEL_FCSRCS),$($(file:.c=)))
+else
+  KERNEL_CFLAGS := -DALLFUNC $(KERNEL_CFLAGS)
+  KERNEL_COBJS := $(KERNEL_COBJS) \
+					$(foreach file,$(KERNEL_FCSRCS),$(file:.c=.o))
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãããã£ã¬ã¯ããªã«é¢ããå®ç¾©
+#
+vpath %.c $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+vpath %.S $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+vpath %.arxml $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+
+#
+#  ã³ã³ãã¤ã«ã®ããã®å¤æ°ã®å®ç¾©
+#
+KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
+SYSMOD_OBJS = $(SYSMOD_ASMOBJS) $(SYSMOD_COBJS)
+APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
+ALL2_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSMOD_OBJS) $(CFG_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ifdef KERNEL_LIB
+  ALL_LIBS = $(APPL_LIBS) $(SYSMOD_LIBS) -lkernel $(LIBS)
+  LIBS_DEP = $(filter %.a,$(ALL_LIBS)) $(KERNEL_LIB)/libkernel.a
+  LDFLAGS := $(LDFLAGS) -L$(KERNEL_LIB)
+  CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) -L$(KERNEL_LIB)
+  CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) -L$(KERNEL_LIB)
+else
+  ALL_LIBS = $(APPL_LIBS) $(SYSMOD_LIBS) libkernel.a $(LIBS)
+  LIBS_DEP = $(filter %.a,$(ALL_LIBS))
+endif
+
+ifdef LDSCRIPT
+  LDFLAGS := $(LDFLAGS) -T $(LDSCRIPT)
+endif
+ifdef CFG1_OUT_LDSCRIPT
+  CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS) -T $(CFG1_OUT_LDSCRIPT)
+endif
+ifdef CFG2_OUT_LDSCRIPT
+  CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) -T $(CFG2_OUT_LDSCRIPT)
+endif
+ifdef CFG3_OUT_LDSCRIPT
+  CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) -T $(CFG3_OUT_LDSCRIPT)
+endif
+
+#
+#  ãªãã»ãããã¡ã¤ã«ï¼offset.hï¼ã®çæè¦å
+#
+offset.h: $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(SRCDIR)/kernel/genoffset.tf
+	$(CFG) --pass 3 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg1_out.srec --symbol-table cfg1_out.syms \
+				-T $(OFFSET_TF) $(CFG_TABS) $(filter %.arxml,$^)
+
+#
+#  ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+cfg1_out.c: $(APPL_CFG_INPUT) $(SRCDIR)/kernel/kernel_def.csv
+	$(CFG) --pass 1 --kernel $(CFG_KERNEL) $(INCLUDES) $(CFG_TABS) $(filter %.arxml,$^)
+
+$(CFG2_OUT_SRCS): Os_Lcfg.timestamp
+Os_Lcfg.timestamp: $(APPL_CFG_INPUT) $(START_OBJS) cfg1_out.o $(END_OBJS) $(HIDDEN_OBJS) $(PASS2_TF) $(DEF_TABS)
+	$(LINK) $(CFLAGS) $(CFG1_OUT_LDFLAGS) -o $(CFG1_OUT) \
+						$(START_OBJS) cfg1_out.o $(END_OBJS)
+	$(NM) -v $(CFG1_OUT) > cfg1_out.syms
+	cp cfg1_out.run cfg1_out.srec
+	$(CFG) --pass 2 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				-T $(TARGETDIR)/target.tf $(CFG_TABS) $(filter %.arxml,$^)
+
+#  æ¢å­Os_Cfg.hã¨pass2ã§çæããOs_Cfg_tmp.hã¨ã®å·®åãããå ´åOs_Cfg.hãä¸æ¸ã
+	if ! cmp Os_Cfg.h Os_Cfg_tmp.h >/dev/null 2>&1 ; then \
+		mv Os_Cfg_tmp.h Os_Cfg.h ;\
+	else \
+		rm Os_Cfg_tmp.h ;\
+	fi
+ifdef KERNEL_LIB
+	if ! cmp Os_Cfg.h $(KERNEL_LIB)/Os_Cfg.h >/dev/null 2>&1 ; then \
+		echo Config files Os_Cfg.h and $(KERNEL_LIB)/Os_Cfg.h differ! ;\
+		diff -c Os_Cfg.h $(KERNEL_LIB)/Os_Cfg.h ;\
+		false;\
+	fi
+endif
+
+	touch -r Os_Lcfg.c Os_Lcfg.timestamp
+#
+#	ãã¹3ãä½¿ç¨ããå ´å
+#
+ifdef USE_CFG_PASS3
+kernel_mem3.c: $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(ALL2_OBJS) $(LIBS_DEP) $(SRCDIR)/kernel/kernel_mem.tf
+	$(LINK) $(CFLAGS) $(CFG2_OUT_LDFLAGS) -o $(CFG2_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG2_OUT) > cfg2_out.syms
+	cp cfg2_out.run cfg2_out.srec
+	rm -f $(CFG3_OUT_LDSCRIPT)
+	$(CFG) --pass 3 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg2_out.srec --symbol-table cfg2_out.syms \
+				-T $(TARGETDIR)/target_opt.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(CFG3_OUT_LDSCRIPT) ]; then \
+		sed "s/kernel_mem2\.o/kernel_mem3\.o/g" < $(CFG2_OUT_LDSCRIPT) \
+													> $(CFG3_OUT_LDSCRIPT); \
+	fi
+
+
+kernel_mem.c: $(APPL_CFG_INPUT) $(CFG3_OBJS) $(SRCDIR)/kernel/kernel_opt.tf $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(CFG3_OUT_LDFLAGS) -o $(CFG3_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG3_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG3_OUT) > cfg3_out.syms
+	cp cfg3_out.run cfg3_out.srec
+	rm -f $(LDSCRIPT)
+	$(CFG) --pass 4 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg3_out.srec --symbol-table cfg3_out.syms \
+				-T $(TARGETDIR)/target_mem.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(LDSCRIPT) ]; then \
+		sed "s/kernel_mem3\.o/kernel_mem\.o/g" < $(CFG3_OUT_LDSCRIPT) \
+															> $(LDSCRIPT); \
+	fi
+	sed -e '/_kernel_mo_/d' cfg3_out.syms | awk '{print $$1" "$$3}' > cfg3_out-tmp.syms
+	mv cfg3_out-tmp.syms cfg3_out.syms
+endif
+
+#
+#  ãã¹3ãä½¿ç¨ããªãå ´å
+#
+ifndef USE_CFG_PASS3
+kernel_mem.c: $(APPL_CFG_INPUT) $(CFG2_OBJS) $(SRCDIR)/kernel/kernel_mem.tf $(ATK2_SCHEMA) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(CFG2_OUT_LDFLAGS) -o $(CFG2_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG2_OUT) > cfg2_out.syms
+	cp cfg2_out.run cfg2_out.srec
+	touch cfg3_out.tf
+	$(CFG) --pass 4 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg2_out.srec --symbol-table cfg2_out.syms \
+				-T $(TARGETDIR)/target_mem.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(LDSCRIPT) ]; then \
+		sed "s/kernel_mem2\.o/kernel_mem\.o/g" < $(CFG2_OUT_LDSCRIPT) \
+															> $(LDSCRIPT); \
+	fi
+	sed -e '/_kernel_mo_/d' cfg2_out.syms | awk '{print $$1" "$$3}' > cfg2_out-tmp.syms
+	mv cfg2_out-tmp.syms cfg2_out.syms
+endif
+
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªãã¡ã¤ã«ã®çæ
+#
+libkernel.a: $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f libkernel.a
+	$(AR) $(KERNEL_LIB_OBJS) -archive -o libkernel.a
+
+#
+#  ç¹å¥ãªä¾å­é¢ä¿ã®å®ç¾©
+#
+banner.o: Os_Lcfg.timestamp $(filter-out banner.o,$(ALL2_OBJS)) $(LIBS_DEP)
+
+#
+#  å
+¨ä½ã®ãªã³ã¯
+#
+$(OBJFILE): $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(ALL_OBJS) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(LDFLAGS) -o $(OBJFILE) $(START_OBJS) \
+			-Wl,-map=$(OBJNAME).map \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(OBJFILE) | awk '{print $$1" "$$3}' > $(OBJNAME).syms
+	cp $(OBJFILE) $(OBJNAME).srec
+ifndef USE_CFG_PASS3
+	sed -e 's/kernel_mem2/kernel_mem/g' cfg2_out.syms | diff - $(OBJNAME).syms
+else
+	sed -e 's/kernel_mem3/kernel_mem/g' cfg3_out.syms | diff - $(OBJNAME).syms
+endif
+#	$(OBJDUMP) -d $(OBJFILE) > $(OBJNAME).dump
+
+#
+#  ãã¤ããªãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).bin: $(OBJFILE)
+	$(OBJCOPY) -O binary -S $(OBJFILE) $(OBJNAME).bin
+
+#
+#  Sã¬ã³ã¼ããã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).srec: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
+
+#
+#  ã³ã³ãã¤ã«çµæã®æ¶å»
+#
+.PHONY: clean
+clean:
+	rm -f \#* *~ *.o $(CLEAN_FILES)
+	rm -f $(OBJFILE) $(OBJNAME).syms $(OBJNAME).srec $(OBJNAME).bin $(OBJNAME).map
+	rm -f kernel_mem.c kernel_mem.h $(CFG3_OUT) cfg3_out.tf cfg3_out.syms cfg3_out.srec
+	rm -f $(CFG2_OUT) cfg2_out.tf cfg2_out.syms cfg2_out.srec
+	rm -f Os_Lcfg.timestamp $(CFG2_OUT_SRCS) $(CFG3_OUT_SRCS)
+	rm -f cfg1_out.c $(CFG1_OUT) cfg1_out.syms cfg1_out.srec
+	rm -f $(OBJNAME).dump
+	rm -f kernel.res
+	rm -f $(LDSCRIPT) $(CFG2_OUT_LDSCRIPT) $(CFG3_OUT_LDSCRIPT)
+ifndef KERNEL_LIB
+	rm -f libkernel.a
+endif
+	rm -f offset.h
+
+.PHONY: cleankernel
+cleankernel:
+	rm -rf $(KERNEL_LIB_OBJS)
+	rm -f offset.h
+
+.PHONY: cleandep
+cleandep:
+	if ! [ -f Makefile.depend ]; then \
+		rm -f Os_Lcfg.timestamp $(CFG2_OUT_SRCS); \
+		rm -f cfg1_out.c cfg1_out.o $(CFG1_OUT) cfg1_out.syms cfg1_out.srec; \
+		rm -f offset.h; \
+	fi
+	rm -f Makefile.depend
+
+.PHONY: realclean
+realclean: cleandep clean
+	rm -f $(REALCLEAN_FILES)
+
+#
+#  ã¸ã§ãã¬ã¼ã¿ãçæãããã¡ã¤ã«ã®ã³ã³ãã¤ã«ã«ã¼ã«ã¨ä¾å­é¢ä¿ä½æã«ã¼ã«
+#  ã®å®ç¾©
+#
+#  ã¸ã§ãã¬ã¼ã¿ãçæãããã¡ã¤ã«ã¯ï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ç¨ï¼ã·ã¹
+#  ãã ãµã¼ãã¹ç¨ï¼ã«ã¼ãã«ç¨ã®ãã¹ã¦ã®ãªãã·ã§ã³ãä»ãã¦ã³ã³ãã¤ã«ããï¼
+#
+OS_LCFG_CFLAGS = $(APPL_CFLAGS) $(SYSMOD_CFLAGS) $(KERNEL_CFLAGS)
+
+$(ALL_CFG_OBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(OS_LCFG_CFLAGS) $<
+
+$(ALL_CFG_OBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(OS_LCFG_CFLAGS) $<
+
+$(ALL_CFG_OBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(OS_LCFG_CFLAGS)" $< >> Makefile.depend
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ã®çæ
+#
+.PHONY: gendepend
+gendepend:
+	@echo "Generating Makefile.depend."
+
+.PHONY: depend
+ifdef KERNEL_LIB
+depend: cleandep Os_Lcfg.timestamp gendepend \
+		cfg1_out.d \
+		$(ALL2_OBJS:.o=.d)
+else
+depend: cleandep $(OFFSET_H) Os_Lcfg.timestamp gendepend \
+		cfg1_out.d \
+		$(KERNEL_AUX_COBJS:.o=.d) $(KERNEL_ASMOBJS:.o=.d) \
+		$(KERNEL_COBJS:.o=.d) $(KERNEL_LCSRCS:.c=.d) $(ALL2_OBJS:.o=.d)
+endif
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ã
+#
+-include Makefile.depend
+
+#
+#  éçºãã¼ã«ã®ã³ãã³ãåã®å®ç¾©
+#
+ifeq ($(TOOL),gcc)
+  #
+  #  GNUéçºç°å¢ç¨
+  #
+  ifdef GCC_TARGET
+    GCC_TARGET_PREFIX = $(GCC_TARGET)-
+  else
+    GCC_TARGET_PREFIX =
+  endif
+  CC = $(GCC_TARGET_PREFIX)gcc
+  CXX = $(GCC_TARGET_PREFIX)g++
+  AS = $(GCC_TARGET_PREFIX)as
+  LD = $(GCC_TARGET_PREFIX)ld
+  AR = $(GCC_TARGET_PREFIX)ar
+  NM = $(GCC_TARGET_PREFIX)nm
+  RANLIB = $(GCC_TARGET_PREFIX)ranlib
+  OBJCOPY = $(GCC_TARGET_PREFIX)objcopy
+  OBJDUMP = $(GCC_TARGET_PREFIX)objdump
+endif
+
+ifdef USE_CXX
+  LINK = $(CXX)
+else
+  LINK = $(CC)
+endif
+
+#
+#  ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+KERNEL_ALL_COBJS = $(KERNEL_COBJS) $(KERNEL_AUX_COBJS)
+
+$(KERNEL_ALL_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ALL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS): %.o:
+	$(CC) -DTOPPERS_$(*F) -o $@ -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS:.o=.s): %.s:
+	$(CC) -DTOPPERS_$(*F) -o $@ -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(SYSMOD_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(SYSMOD_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(SYSMOD_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(APPL_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS): %.o: %.cpp
+	$(CXX) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS:.o=.s): %.s: %.cpp
+	$(CXX) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+#
+#  ä¾å­é¢ä¿ä½æã«ã¼ã«ã®å®ç¾©
+#
+$(KERNEL_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(KERNEL_LCSRCS:.c=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) -T "$($*)" \
+		-O "-DALLFUNC $(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(KERNEL_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(SYSMOD_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(SYSMOD_CFLAGS)" $< >> Makefile.depend
+
+$(SYSMOD_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(SYSMOD_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_CXXOBJS:.o=.d): %.d: %.cpp
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CXX) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+#
+#  ããã©ã«ãã³ã³ãã¤ã«ã«ã¼ã«ãä¸æ¸ã
+#
+%.o: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c $(CFLAGS) $<
+
+%.s: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -S $(CFLAGS) $<
+
+%.o: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -c $(CFLAGS) $<
+
+%.s: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -S $(CFLAGS) $<
+
+%.o: %.S
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c $(CFLAGS) $<
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Platform_Types.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Platform_Types.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/Platform_Types.h	(revision 172)
@@ -0,0 +1,148 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2013 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+ *  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Platform_Types.h 117 2014-12-10 03:58:03Z t_ishikawa $
+ */
+
+/*
+ *		AUTOSAR platform types header file
+ */
+
+#ifndef TOPPERS_PLATFORM_TYPES_H
+#define TOPPERS_PLATFORM_TYPES_H
+
+/*
+ *  Symbol definitions - general
+ */
+#define CPU_TYPE_8		UINT_C(8)
+#define CPU_TYPE_16		UINT_C(16)
+#define CPU_TYPE_32		UINT_C(32)
+
+#define MSB_FIRST		UINT_C(0)
+#define LSB_FIRST		UINT_C(1)
+
+#define HIGH_BYTE_FIRST	UINT_C(0)
+#define LOW_BYTE_FIRST	UINT_C(1)
+
+#ifndef TRUE
+#define TRUE			UINT_C(1)
+#endif /* TRUE */
+
+#ifndef FALSE
+#define FALSE			UINT_C(0)
+#endif /* FALSE */
+
+/*
+ *  Symbol definitions - platform
+ */
+#define CPU_TYPE		(CPU_TYPE_32)
+#define CPU_BIT_ORDER	(MSB_FIRST)
+#define CPU_BYTE_ORDER	(LOW_BYTE_FIRST)
+
+/*
+ *  Stack definitions - platform
+ */
+#define DEFINE_VAR_SEC_NOBITS(type, var, sec)	type __attribute__((section(sec))) var
+#define DEFINE_VAR_SSTACK(type, var)			type __attribute__((section(".prsv_kernel"), aligned(4))) var
+#define DEFINE_VAR_USTACK(type, var, sec)		type __attribute__((section(sec), aligned(16))) var
+
+/*
+ *  Type definitions
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+#include <stdint.h>
+
+typedef unsigned char boolean;
+
+typedef char				char8;
+typedef unsigned char		uint8;
+typedef signed char			sint8;
+typedef unsigned short		uint16;
+typedef signed short		sint16;
+typedef unsigned int		uint32;
+typedef signed int			sint32;
+typedef unsigned long long	uint64;
+typedef signed long long	sint64;
+
+typedef unsigned long	uint8_least;
+typedef unsigned long	uint16_least;
+typedef unsigned long	uint32_least;
+typedef signed long		sint8_least;
+typedef signed long		sint16_least;
+typedef signed long		sint32_least;
+
+typedef float	float32;
+typedef double	float64;
+
+typedef uint32	uintptr;                /* ãã¤ã³ã¿ãæ ¼ç´ã§ããç¬¦å·ç¡ãæ´æ° */
+typedef sint32	sintptr;                /* ãã¤ã³ã¿ãæ ¼ç´ã§ããç¬¦å·ä»ãæ´æ° */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PLATFORM_TYPES_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/ldscript.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/ldscript.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/ldscript.tf	(revision 172)
@@ -0,0 +1,375 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2007-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2013 by FUJISOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by FUJITSU VLSI LIMITED, JAPAN
+$  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2013 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2013 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2013 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2013 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  AUTOSARï¼AUTomotive Open System ARchitectureï¼ã¯ï¼AUTOSARä»æ§ã«åºã¥
+$  ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«
+$  ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: ldscript.tf 182 2015-06-24 07:14:37Z t_ishikawa $
+$
+
+$ =====================================================================
+$ ãªã³ã«ã¹ã¯ãªããã®çæ
+$ =====================================================================
+$FILE "cfg3_out.ld"$
+
+/* This file is generated by v850_ghs/ldscript.tf */$NL$
+
+$
+$  ã¿ã¼ã²ããä¾å­ã®OUTPUTè¨è¿°ã®çæ
+$
+$IF ISFUNCTION("GENERATE_OUTPUT")$
+	$GENERATE_OUTPUT()$
+$END$
+
+$
+$  MEMORYè¨è¿°ã®çæ
+$
+MEMORY {$NL$
+$FOREACH reg REG.ORDER_LIST$
+	$TAB$$FORMAT("%s : ORIGIN = 0x%x, LENGTH = 0x%x",
+				REG.REGNAME[reg], +REG.BASE[reg], +REG.SIZE[reg])$$NL$
+$END$
+$IF ISFUNCTION("GENERATE_MEMORY")$
+	$GENERATE_MEMORY()$
+$END$
+}$NL$
+$NL$
+
+$
+$  å¤æ°ã®åæå
+$
+$reset_lma = 0$
+$provide_gp = 0$
+
+$
+$  ãªã³ã¯æå®ã®çæ
+$
+SECTIONS {$NL$
+$
+$  ã¿ã¼ã²ããä¾å­ã®PROVIDEè¨è¿°ã®çæ
+$
+$IF ISFUNCTION("GENERATE_PROVIDE")$
+	$GENERATE_PROVIDE()$
+$END$
+
+$ ã¿ã¼ã²ããä¾å­ã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$IF ISFUNCTION("GENERATE_SECTION_FIRST")$
+	$GENERATE_SECTION_FIRST()$
+$END$
+
+$IF TOPPERS_LABEL_ASM$
+	$PREFIX_START = "___start_"$
+	$PREFIX_END   = "___end_"$
+	$PREFIX_LIMIT = "___limit_"$
+$ELSE$
+	$PREFIX_START = "__start_"$
+	$PREFIX_END   = "__end_"$
+	$PREFIX_LIMIT = "__limit_"$
+$END$
+
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid]$
+$		// ã»ã¯ã·ã§ã³ã®éå§è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+$           // small data section ã®å
+é ­ã«.rosdataã»ã¯ã·ã§ã³ãé
+ç½®ããããã®
+$           // ããã¼ã»ã¯ã·ã§ã³é
+ç½®
+            $IF (MO.SEFLAG[moid] & 0x400) != 0$
+$                $TAB$.rosdata : {$NL$
+                $TAB$.rosdata : {$NL$
+                $TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+                $NL$$NL$
+			$END$
+$           // .idataã»ã¯ã·ã§ã³ãé
+ç½®ããããã®è¨è¿°
+$           // ããã³ã¢ã©ã¤ã³è¨è¿°
+			$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+                $TAB$.ROM_NOCOPY.$MO.SLABEL[moid]$ ROM(.$MO.SLABEL[moid]$): {$NL$
+                $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+                $TAB$$PREFIX_START$$MO.ILABEL[moid]$ = ADDR(.ROM_NOCOPY.$MO.SLABEL[moid]$);$NL$
+			$END$
+			$TAB$.$MO.SLABEL[moid]$$SPC$
+			$IF (MO.SEFLAG[moid] & 0x40) == 0$
+                $IF LENGTH(MO.REALBASE[moid])$
+				    ($FORMAT("0x%x", MO.REALBASE[moid])$)$SPC$
+                $ELSE$
+				    ALIGN($TARGET_SEC_ALIGN_STR$)$SPC$
+                $END$
+			$ELIF LENGTH(MO.REALBASE[moid])$
+                ($FORMAT("0x%x", MO.REALBASE[moid])$)$SPC$
+			$END$
+			$IF (MO.MEMATR[moid] & TA_NOWRITE) == 0
+							&& (MO.MEMATR[moid] & TA_MEMINI) == 0$
+				(NOLOAD)$SPC$
+			$END$
+			:$SPC$
+			{
+            $IF LENGTH(MO.COMMENT[moid])$
+                $SPC$/* $MO.COMMENT[moid]$ */$SPC$
+            $END$
+            $NL$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®éå§ã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x400) != 0$
+			$IF ISFUNCTION("GENERATE_GP_LABEL")$
+				$GENERATE_GP_LABEL()$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x100) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$TAB$$PREFIX_START$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$TAB$$PREFIX_START$ssrpw_all = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x10) != 0$
+			$IF !EQ(MO.PLABEL[moid], "")$
+				$TAB$$TAB$$PREFIX_START$$MO.PLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+			$IF !EQ(MO.SLABEL[moid], ALT(omit_start_slabel,""))$
+				$TAB$$TAB$$PREFIX_START$$MO.SLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x04) != 0$
+			$IF (MO.SEFLAG[moid] & 0x01) == 0$
+				$NL$
+			$END$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])
+					&& !EQ(MO.MLABEL[moid], ALT(omit_start_mlabel,""))$
+				$TAB$$TAB$$PREFIX_START$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+			$TAB$$TAB$
+		$END$
+
+$		// ãªã³ã¯ãããã¡ã¤ã«è¨è¿°ã®çæ
+		$section_dscr = SECTION_DESCRIPTION(MO.SECTION[moid])$
+		$IF MO.TYPE[moid] == TOPPERS_ATTMOD$
+			$IF EQ(MO.MODULE[moid], "kernel_mem.o")$
+                $FOREACH sec section_dscr$
+                    kernel_mem3.o($sec$)$SPC$
+                $END$
+			$ELSE$
+				$module_name = REGEX_REPLACE(MO.MODULE[moid],"\.a$","\.a(\*")$
+                $FOREACH sec section_dscr$
+                    $module_name$($sec$)$SPC$
+                    $IF !EQ(MO.MODULE[moid], module_name)$
+                        )
+                    $END$
+                $END$
+                $SPC$
+			$END$
+		$ELIF MO.TYPE[moid] == TOPPERS_ATTSEC$
+            *($section_dscr$)$SPC$
+		$ELSE$
+$			// ã¦ã¼ã¶ã¹ã¿ãã¯é å
+			Os_Lcfg.o($section_dscr$)$SPC$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®çµäºã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x08) != 0$
+			$NL$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])$
+				$TAB$$TAB$$PREFIX_END$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$$TAB$$PREFIX_END$$MO.SLABEL[moid]$ = .;$NL$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$TAB$$PREFIX_END$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$TAB$$PREFIX_END$ssrpw_all = .;$NL$
+			$END$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã®çµäºè¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$} > $REG.REGNAME[MO.MEMREG[moid]]$
+			$IF !OMIT_IDATA$
+                $SPC$
+				$IF !EQ(MO.ILABEL[moid], "")$
+					$reset_lma = 1$
+				$ELIF reset_lma$
+					$reset_lma = 0$
+				$END$
+			$END$$NL$
+		$END$
+
+$		// ã¢ã©ã¤ã³è¨è¿°ã®çæ
+        $IF LENGTH(MO.REALALIGN[moid])$
+			$TAB$. = ALIGN($FORMAT("0x%x", +MO.REALALIGN[moid])$); /* sdata_shared_align */$NL$
+		$ELIF (MO.SEFLAG[moid] & 0x20) != 0$
+			$TAB$. = ALIGN($TARGET_PAGE_SIZE_STR$);$NL$
+		$ELIF (MO.SEFLAG[moid] & 0x08) != 0$
+$			// ã»ã¯ã·ã§ã³ãç¶ç¶ãã¦ããå ´åã«ã¯ï¼TABã1ã¤åºå
+			$IF (MO.SEFLAG[moid] & 0x02) == 0$$TAB$$END$
+			$TAB$. = ALIGN($TARGET_SEC_ALIGN_STR$);$NL$
+		$END$
+
+$		// ã»ã¯ã·ã§ã³ã¨ã¡ã¢ãªãªãã¸ã§ã¯ãã®ä¸éã©ãã«ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x08) != 0$
+			$IF !EQ(MO.MLABEL[moid], MO.SLABEL[moid])$
+$				// ã»ã¯ã·ã§ã³ãç¶ç¶ãã¦ããå ´åã«ã¯ï¼TABã1ã¤åºå
+				$IF (MO.SEFLAG[moid] & 0x02) == 0$$TAB$$END$
+				$TAB$$PREFIX_LIMIT$$MO.MLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$TAB$$PREFIX_LIMIT$$MO.SLABEL[moid]$ = .;$NL$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x20) != 0$
+			$IF !EQ(MO.PLABEL[moid], "")$
+				$TAB$$PREFIX_LIMIT$$MO.PLABEL[moid]$ = .;$NL$
+			$END$
+		$END$
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) == 0$
+				$TAB$$PREFIX_LIMIT$srpw_all = .;$NL$
+			$ELSE$
+				$TAB$$PREFIX_LIMIT$ssrpw_all = .;$NL$
+			$END$
+		$END$
+
+		$IF (MO.SEFLAG[moid] & 0x02) != 0$
+			$NL$
+		$END$
+
+$		// ã¡ã¢ãªãªã¼ã¸ã§ã³æ«ã§ã¢ã©ã¤ã³ãããããã®ããã¼ã»ã¯ã·ã§ã³ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x80) != 0$
+			$TAB$.$REG.REGNAME[MO.MEMREG[moid]]$_align$SPC$
+            $IF LENGTH(REG.LIMIT_ALIGN[MO.MEMREG[moid]])$
+                ($FORMAT("0x%x", REG.LIMIT_ALIGN[MO.MEMREG[moid]])$)$SPC$
+            $ELSE$
+                ALIGN($TARGET_SEC_ALIGN_STR$)$SPC$
+            $END$
+            : {$NL$
+			$TAB$$TAB$__$REG.REGNAME[MO.MEMREG[moid]]$_align = .;$NL$
+$           // ä¸­èº«ãç©ºã®åºåã»ã¯ã·ã§ã³ã¯ãªã³ã«ã«ãã£ã¦ç¡è¦ãããããï¼
+$           // ããã¼ã®ãã¼ã¿ãå
+¥ãã¦ãã
+            $TAB$$TAB$. += 1; /*dummy*/$NL$
+			$TAB$} > $REG.REGNAME[MO.MEMREG[moid]]$ $NL$
+			$TAB$. = ALIGN($TARGET_SEC_ALIGN_STR$);$NL$
+			$TAB$___$REG.REGNAME[MO.MEMREG[moid]]$_align = .;$NL$
+			$NL$
+		$END$
+
+        $preid = moid$
+	$END$
+$END$
+
+$FOREACH lsid RANGE(1, numls)$
+	$TAB$$LNKSEC.SECTION[lsid]$ ALIGN(16) : {$NL$
+	$TAB$$TAB$*($LNKSEC.SECTION[lsid]$)$NL$
+	$TAB$} > $REG.REGNAME[LNKSEC.MEMREG[lsid]]$$NL$
+	$NL$
+$END$
+
+$	// C++testã§å¿
+è¦ãªæ¨æºã©ã¤ãã©ãªã§ä½¿ç¨ããã»ã¯ã·ã§ã³
+$TAB$.dummy_rom_for_cpptest : {$NL$
+$TAB$$TAB$*(.ctors.65535) *(.eh_frame)$NL$
+$TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+$TAB$. = ALIGN(64);$NL$$NL$
+$TAB$.dummy_ram_for_cpptest : {$NL$
+$TAB$$TAB$_end = .;$NL$
+$TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+$TAB$. = ALIGN(64);$NL$$NL$
+
+$TAB$.sdabase  : {$NL$
+$TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+$TAB$.tdata ALIGN (4) :$NL$
+$TAB${$NL$
+$TAB$	PROVIDE(__ep = .);$NL$
+$TAB$	*(.tbyte)$NL$
+$TAB$	*(.tcommon_byte)$NL$
+$TAB$	*(.tdata)$NL$
+$TAB$	*(.tbss)$NL$
+$TAB$	*(.tcommon)$NL$
+$TAB$} > $REG.REGNAME[STANDARD_RAM]$$NL$
+$NL$$NL$
+
+$TAB$/DISCARD/ : {$NL$
+$TAB$$TAB$*(.rel.dyn)$NL$
+$TAB$}$NL$
+$NL$
+
+$TAB$/* DWARF debug sections.$NL$
+$TAB$Symbols in the DWARF debugging sections are relative to $NL$
+$TAB$the beginning of the section so we begin them at 0.  */$NL$
+$NL$
+$TAB$/* DWARF 1 */$NL$
+$TAB$.debug          0 : { *(.debug) }$NL$
+$TAB$.line           0 : { *(.line) }$NL$
+$NL$
+$TAB$/* GNU DWARF 1 extensions */$NL$
+$TAB$.debug_srcinfo  0 : { *(.debug_srcinfo) }$NL$
+$TAB$.debug_sfnames  0 : { *(.debug_sfnames) }$NL$
+$NL$
+}$NL$
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc.tf	(revision 172)
@@ -0,0 +1,479 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2013 by FUJISOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by FUJITSU VLSI LIMITED, JAPAN
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2013 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2013 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2013 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2013 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2013 by Witz Corporation, JAPAN
+$  Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: prc.tf 189 2015-06-26 01:54:57Z t_ishikawa $
+$
+
+$
+$     ãã¹2ã®ã¢ã¼ã­ãã¯ãã£ä¾å­ãã³ãã¬ã¼ãï¼V850ç¨ï¼
+$
+
+$ 
+$  kernel/kernel.tf ã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  æ¨æºã®ã»ã¯ã·ã§ã³ã«é¢ããå®ç¾©
+$  DSEC.ORDER_LISTï¼IDã®ãªã¹ã
+$ 
+$DSEC.ORDER_LIST = RANGE(0,7)$
+
+$ 
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åãç¢ºä¿ããã³ã¼ããåºåãã
+$  ARGV[1]ï¼ã¿ã¹ã¯ID
+$  ARGV[2]ï¼ã¹ã¿ãã¯ãµã¤ãº
+$ 
+$FUNCTION ALLOC_USTACK$
+    StackType _kernel_ustack_$ARGV[1]$[COUNT_STK_T($ARGV[2]$)]
+    $SPC$__attribute__((section($FORMAT("\".user_stack.%s\"", ARGV[1])$)));$NL$
+
+    $TSK.TINIB_USTKSZ[ARGV[1]] = VALUE(FORMAT("ROUND_STK_T(%s)", ARGV[2]), +ARGV[2])$
+    $TSK.TINIB_USTK[ARGV[1]] = FORMAT("_kernel_ustack_%s", ARGV[1])$
+$END$
+
+$FUNCTION ALLOC_USTACK_ISR$
+    StackType _kernel_ustack_$ARGV[1]$[COUNT_STK_T($ARGV[2]$)]
+    $SPC$__attribute__((section($FORMAT("\".user_stack.%s\"", ARGV[1])$)));$NL$
+
+    $ISR.TINIB_USTKSZ[ARGV[1]] = VALUE(FORMAT("ROUND_STK_T(%s)", ARGV[2]), +ARGV[2])$
+    $ISR.TINIB_USTK[ARGV[1]] = FORMAT("_kernel_ustack_%s", ARGV[1])$
+$END$
+
+$ 
+$  ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã»ã¯ã·ã§ã³åãè¿ã
+$  ARGV[1]ï¼ã¿ã¹ã¯ID
+$ 
+$FUNCTION SECTION_USTACK$
+    $RESULT = FORMAT(".user_stack.%s", ARGV[1])$
+$END$
+
+$
+$  ã¦ã¼ã¶ã¹ã¿ãã¯ã®ã¢ã©ã¤ã¡ã³ãå¶ç´ã«åããããµã¤ãºãè¿ã
+$  ARGV[1]ï¼ã¹ã¿ãã¯ãµã¤ãºï¼ã¢ã©ã¤ã³åï¼
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION USTACK_ALIGN_SIZE$
+	$RESULT = (ARGV[1] + CHECK_USTKSZ_ALIGN - 1) & ~(CHECK_USTKSZ_ALIGN - 1)$
+$END$
+
+$
+$  åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ç¢ºä¿
+$  ARGV[1]ï¼å
+±æã¹ã¿ãã¯å
+$  ARGV[2]ï¼å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+$  ARGV[3]ï¼ã¹ã¿ãã¯ãµã¤ãº(ã¢ã©ã¤ã¡ã³ãèª¿æ´æ¸ã¿)
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION ALLOC_SHARED_USTACK$
+	StackType $ARGV[1]$[COUNT_STK_T(ROUND_STK_T($ARGV[3]$))]
+	$SPC$__attribute__((section($FORMAT("\".shared_user_stack.%s\"", ARGV[2])$)));$NL$
+$END$
+
+$
+$  åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ã»ã¯ã·ã§ã³å
+$  ARGV[1]ï¼å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+$  kernel.tfããå¼ã°ãã
+$
+$FUNCTION SECTION_SHARED_USTACK$
+	$RESULT = FORMAT(".shared_user_stack.%s", ARGV[1])$
+$END$
+
+$ 
+$  å®æ°é åãROMã«ç½®ãããã®å®æ°å®£è¨
+$  ãã¼ã¿ã»ã¯ã·ã§ã³ã®åæåãããåã«åç
+§ãããå®æ°ã¯
+$  ãã¹ã¦ROMã«é
+ç½®ããå¿
+è¦ããã
+$  ARGV[1]ï¼å®æ°ã®å
+$  ARGV[2]ï¼å®æ°ã®ã©ãã«å
+$  kernel.tfããå¼ã°ãã
+$ 
+$FUNCTION DEFINE_CONST_VAR$
+    $ARGV[1]$$SPC$__attribute__((section(".rodata_kernel"), aligned(4)))$SPC$$ARGV[2]$$SPC$
+$END$
+
+$ 
+$  ã¦ã¼ã¶ã¢ã¼ãã§å®è¡ãããå²è¾¼ã¿ãã³ãã©é åã
+$  ã¦ã¼ã¶ç©ºéã«ç½®ãããã®å®£è¨
+$  ARGV[1]ï¼ISR ID
+$  kernel.tfããå¼ã°ãã
+$ 
+$FUNCTION GENERATE_USER_INTHDR$
+	extern void $ISR.INT_ENTRY[ARGV[1]]$(void)$SPC$
+    __attribute__((section(".text_shared")));$NL$
+	void$NL$
+	$ISR.INT_ENTRY[ARGV[1]]$(void)$NL$
+	{$NL$
+	$TAB$i_begin_int($+ISR.INTNO[ARGV[1]]$U);$NL$
+	$TAB$LOG_ISR_ENTER($ARGV[1]$);$NL$
+	$TAB$ISRNAME($ARGV[1]$)();$NL$
+	$TAB$LOG_ISR_LEAVE($ARGV[1]$);$NL$
+	$TAB$i_end_int($+ISR.INTNO[ARGV[1]]$U);$NL$
+	}$NL$
+$END$
+
+$ 
+$  OSAPåæåã³ã³ãã­ã¹ããã­ãã¯ã®ããã®å®£è¨
+$ 
+$FUNCTION PREPARE_OSAPINICTXB$
+$   ãã¼ã¿ã»ã¯ã·ã§ã³åæåãã¼ãã«ãROMã«é
+ç½®ãã
+$   rosdataé åã¯RAMã«é
+ç½®ãããããï¼ãã¼ã¿ã»ã¯ã·ã§ã³åæåãã¼ãã«ãsdataåããã¨
+$   ãã¼ã¿ã»ã¯ã·ã§ã³ã®åæåã«å¤±æãã
+    extern const uint32 __attribute__((section(".rodata_kernel"), aligned(4))) tnum_datasec;$NL$
+    extern const DATASECINIB __attribute__((section(".rodata_kernel"), aligned(4))) datasecinib_table[];$NL$
+    extern const uint32 __attribute__((section(".rodata_kernel"), aligned(4))) tnum_bsssec;$NL$
+    extern const BSSSECINIB __attribute__((section(".rodata_kernel"), aligned(4))) bsssecinib_table[];$NL$
+$END$
+
+$FUNCTION ASM_MACRO$
+	.macro $ARGV[1]$ $ARGV[2]$
+$END$
+
+$INCLUDE "arch/v850_gcc/prc_common.tf"$
+
+$IF __v850e2v3__$
+
+$
+$ å²è¾¼ã¿ãã¯ã¿ã¨åå²è¾¼ã¿å
+¥å£å¦ç
+$
+
+$FILE "Os_Lcfg.c"$
+
+$
+$ ãã¯ã¿ãã¼ãã«(ä¾å¤è¦å å
+¨ã¦ãä½æï¼)
+$
+$E_OS_PROTECTION_MEMORY = 14$
+$E_OS_PROTECTION_EXCEPTION = 22$
+
+extern void _reset(void) __attribute__((section (".vector")));$NL$
+void$NL$
+_reset(void)$NL$
+{$NL$
+$
+$ ãã¯ã¿ãã¼ãã«(ãªã»ãã)
+$
+	$TAB$Asm(".extern ___start");$NL$
+	$TAB$Asm("jr __start");
+	$FORMAT(" /* Exception 0x%x */", 0)$$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+$
+$ ãã¯ã¿ãã¼ãã«(ä¾å¤ No1-7)
+$
+$ ä¾å¤ No1
+    $TAB$Asm("ldsr  r2, eiwr        /* 0x00: eiwr */");$NL$
+	$TAB$Asm("movea $E_OS_PROTECTION_EXCEPTION$, r0, r2");$NL$
+	$TAB$Asm("jr _fe_exception_entry");
+	$FORMAT(" /* Exception 0x%x */", 1)$$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+$ ä¾å¤ No2
+    $TAB$Asm("ldsr  r2, eiwr        /* 0x00: eiwr */");$NL$
+	$TAB$Asm("movea $E_OS_PROTECTION_EXCEPTION$, r0, r2");$NL$
+	$TAB$Asm("jr _fe_exception_entry");
+	$FORMAT(" /* Exception 0x%x */", 2)$$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+$ ä¾å¤ No3
+    $TAB$Asm("ldsr  r2, eiwr        /* 0x00: eiwr */");$NL$
+	$TAB$Asm("movea $E_OS_PROTECTION_MEMORY$, r0, r2");$NL$
+	$TAB$Asm("jr _fe_exception_entry");
+	$FORMAT(" /* Exception 0x%x */", 3)$$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+$ ä¾å¤ No4
+    $TAB$Asm("ldsr  r2, eiwr        /* 0x00: eiwr */");$NL$
+	$TAB$Asm("movea $E_OS_PROTECTION_EXCEPTION$, r0, r2");$NL$
+	$TAB$Asm("jr _ei_exception_entry");
+	$FORMAT(" /* Exception 0x%x */", 4)$$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+$ ä¾å¤ No5
+    $TAB$Asm("ldsr  r2, eiwr        /* 0x00: eiwr */");$NL$
+	$TAB$Asm("movea $E_OS_PROTECTION_EXCEPTION$, r0, r2");$NL$
+	$TAB$Asm("jr _fe_exception_entry");
+	$FORMAT(" /* Exception 0x%x */", 5)$$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+$ ä¾å¤ No6
+	$TAB$Asm("nop");
+	$FORMAT(" /* Exception 0x%x */", 6)$$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+$ ä¾å¤ No7
+    $TAB$Asm("ldsr  r2, eiwr        /* 0x00: eiwr */");$NL$
+	$TAB$Asm("movea $E_OS_PROTECTION_EXCEPTION$, r0, r2");$NL$
+	$TAB$Asm("jr _fe_exception_entry");
+	$FORMAT(" /* Exception 0x%x */", 7)$$NL$
+	$TAB$Asm("nop");$NL$
+	$TAB$Asm("nop");$NL$
+
+
+
+$
+$ ãã¯ã¿ãã¼ãã«(EIã¬ãã« ãã¹ã«ãã«å²è¾¼ã¿ç¨(8-255)
+$
+$FOREACH intno INTNO_VALID$
+$TAB$/* $FORMAT("0x%x",intno*16 + 0x80)$ */ $NL$
+	$isrid = INT.ISRID[intno]$
+	$IF LENGTH(isrid)$
+		$IF EQ(ISR.CATEGORY[isrid], "CATEGORY_2")$
+            $TAB$Asm("ldsr  r2, eiwr        /* 0x00: eiwr */");$NL$
+            $TAB$Asm("movea $intno$, r0, r2 /* 0x06: r2 = intno */");$NL$ 
+            $TAB$Asm("jr    _interrupt      /* 0x0A */");$NL$
+            $TAB$Asm("nop                   /* 0x0E */");$NL$
+            $TAB$Asm("nop                   /* 0x0E */");$NL$
+		$ELSE$
+			$TAB$Asm("jr _$ISR.INT_ENTRY[isrid]$");$NL$
+			$TAB$Asm("nop");$NL$
+			$TAB$Asm("nop");$NL$
+			$TAB$Asm("nop");$NL$
+			$TAB$Asm("nop");$NL$
+			$TAB$Asm("nop");$NL$
+			$TAB$Asm("nop");$NL$
+		$END$
+	$ELSE$
+$		// å²è¾¼ã¿ãã³ãã©ã®ç»é²ããªãå ´å
+		$TAB$Asm("jr _default_int_handler");$NL$
+ 		$TAB$Asm("nop");$NL$
+ 		$TAB$Asm("nop");$NL$
+		$TAB$Asm("nop");$NL$
+		$TAB$Asm("nop");$NL$
+		$TAB$Asm("nop");$NL$
+		$TAB$Asm("nop");$NL$
+	$END$
+$END$
+}$NL$
+$END$
+$ =end IF __v850e2v3__
+
+$IF __v850e3v5__$
+
+$
+$ ãã¼ãã«åç
+§æ¹å¼ç¨ãã¯ã¿ãã¼ãã«(v850e3v5)
+$
+
+extern void interrupt(void);$NL$
+const uint32 __attribute__((aligned(512))) intbp_tbl[TNUM_INT] = {$NL$
+$JOINEACH intno INTNO_VALID "\n"$
+	$isrid = INT.ISRID[intno]$
+	$IF LENGTH(isrid) && EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+		$TAB$(uint32)&$ISR.INT_ENTRY[isrid]$
+	$ELSE$
+		$TAB$(uint32)&interrupt
+	$END$
+$	//ã«ã³ãã®åºåï¼æå¾ã®è¦ç´ ã®å¾ãã«åºåããªãï¼
+	$IF intno != AT(INTNO_VALID,LENGTH(INTNO_VALID) - 1)$
+		,
+	$END$
+	$TAB$$FORMAT("/* %d */", intno)$
+$END$
+$NL$};$NL$
+
+$END$
+
+$ 
+$  arch/gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$FUNCTION GENERATE_MEMORY$
+    $NOOP()$
+$END$
+
+$FUNCTION GENERATE_OUTPUT$
+    $NL$
+$END$
+
+$FUNCTION GENERATE_PROVIDE$
+    provide(_hardware_init_hook = 0);$NL$
+    provide(_software_init_hook = 0);$NL$
+    provide(software_term_hook = 0);$NL$
+    provide(_bsssecinib_table = 0);$NL$
+    provide(_tnum_bsssec = 0);$NL$
+    provide(_datasecinib_table = 0);$NL$
+    provide(_tnum_datasec = 0);$NL$
+    $NL$
+
+    $IF LENGTH(OSAP.ID_LIST)$
+        $FOREACH domid OSAP.ID_LIST$
+            $IF !OSAP.TRUSTED[domid]$
+$   RXé åï¼å°ç¨ï¼
+                provide(___start_text_$OSAP.LABEL[domid]$ = $MPU_PAGE_MASK$);$NL$
+                provide(___limit_text_$OSAP.LABEL[domid]$ = $MPU_PAGE_MASK$);$NL$
+$   Ré åï¼å°ç¨ï¼
+                provide(___start_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = $MPU_PAGE_MASK$);$NL$
+                provide(___limit_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = $MPU_PAGE_MASK$);$NL$
+$   RWXé åï¼å°ç¨ï¼
+                provide(___start_ram_$OSAP.LABEL[domid]$ = $MPU_PAGE_MASK$);$NL$
+                provide(___limit_ram_$OSAP.LABEL[domid]$ = $MPU_PAGE_MASK$);$NL$
+                provide(___start_sram_$OSAP.LABEL[domid]$ = $MPU_PAGE_MASK$);$NL$
+                provide(___limit_sram_$OSAP.LABEL[domid]$ = $MPU_PAGE_MASK$);$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ã
+                provide($FORMAT("___start_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = $MPU_PAGE_MASK$);$NL$
+                provide($FORMAT("___limit_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = $MPU_PAGE_MASK$);$NL$
+                provide($FORMAT("___start_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = $MPU_PAGE_MASK$);$NL$
+                provide($FORMAT("___limit_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = $MPU_PAGE_MASK$);$NL$
+                provide($FORMAT("___start_sram_%s_%x_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +DEFAULT_ACPTN[domid], +MEMATR_ROSDATA)$ = $MPU_PAGE_MASK$);$NL$
+                provide($FORMAT("___limit_sram_%s_%x_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +DEFAULT_ACPTN[domid], +MEMATR_ROSDATA)$ = $MPU_PAGE_MASK$);$NL$
+            $END$
+        $END$
+        $NL$
+    $END$$NL$
+
+$  å
+±æé å
+    provide(___start_text_$OSAP.LABEL[TDOM_NONE]$ = $MPU_PAGE_MASK$);$NL$
+    provide(___limit_text_$OSAP.LABEL[TDOM_NONE]$ = $MPU_PAGE_MASK$);$NL$
+    provide(___start_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = $MPU_PAGE_MASK$);$NL$
+    provide(___limit_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = $MPU_PAGE_MASK$);$NL$
+    provide(___start_ram_$OSAP.LABEL[TDOM_NONE]$ = $MPU_PAGE_MASK$);$NL$
+    provide(___limit_ram_$OSAP.LABEL[TDOM_NONE]$ = $MPU_PAGE_MASK$);$NL$
+    provide(___start_sram_$OSAP.LABEL[TDOM_NONE]$ = $MPU_PAGE_MASK$);$NL$
+    provide(___limit_sram_$OSAP.LABEL[TDOM_NONE]$ = $MPU_PAGE_MASK$);$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ãé åå
+¨ä½
+    provide(___start_srpw_all = $MPU_PAGE_MASK$);$NL$
+    provide(___limit_srpw_all = $MPU_PAGE_MASK$);$NL$
+    provide(___start_ssrpw_all = $MPU_PAGE_MASK$);$NL$
+    provide(___limit_ssrpw_all = $MPU_PAGE_MASK$);$NL$
+    $NL$
+$END$
+
+$FUNCTION GENERATE_GP_LABEL$
+    $TAB$$TAB$__gp = . + 32K;$NL$
+$END$
+
+$FILE "kernel_mem2.c"$
+
+$IF TNUM_MPU_SHARED > 0$
+uint8 * const shared_meminib_table[$TNUM_MPU_SHARED * 3$] = {$NL$
+$FOREACH memid RANGE(0, TNUM_MPU_SHARED - 1)$
+    $TAB$((uint8 *)NULL),$TAB$/* MPUL $TNUM_MPU_REG - memid$ */$NL$
+    $TAB$((uint8 *)NULL),$TAB$/* MPUA $TNUM_MPU_REG - memid$ */$NL$
+    $TAB$((uint8 *)NULL),$TAB$/* MPAT $TNUM_MPU_REG - memid$ */$NL$
+$END$
+};$NL$
+$NL$
+$END$
+
+$ 
+$  GHSä¾å­é¨ã®ldscript.tfã®ã¤ã³ã¯ã«ã¼ã
+$ 
+$INCLUDE "ghs/ldscript.tf"$ 
+
+$FILE "cfg2_out.tf"$
+$ LNKSEC.*ã®åºå
+$$numls = $numls$$$$NL$
+$NL$
+$FOREACH lsid RANGE(1, numls)$
+	$$LNKSEC.MEMREG[$lsid$] = $LNKSEC.MEMREG[lsid]$$$$NL$
+	$$LNKSEC.SECTION[$lsid$] = $ESCSTR(LNKSEC.SECTION[lsid])$$$$NL$
+	$NL$
+$END$
+
+$JOINEACH tskid TSK.ID_LIST "\n"$
+	$$TSK.ID[$+tskid$] = $TSK.ID[tskid]$$$
+$END$
+$NL$
+
+$lma = 0$
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid] && ((MO.SEFLAG[moid] & 0x01) != 0)$
+		$IF !OMIT_IDATA && !EQ(MO.ILABEL[moid], "")$
+            $$LMA.START_IDATA[$lma$] = "$PREFIX_START$$MO.ILABEL[moid]$"$$$NL$
+			$$LMA.START_DATA[$lma$] = "$PREFIX_START$$MO.SLABEL[moid]$"$$$NL$
+			$$LMA.END_DATA[$lma$] = "$PREFIX_END$$MO.SLABEL[moid]$"$$$NL$
+            $lma = lma + 1$
+		$END$
+    $END$
+$END$
+$$LMA.ORDER_LIST = RANGE(0, $lma - 1$)$$$NL$
+$NL$
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_insn.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_insn.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_insn.h	(revision 172)
@@ -0,0 +1,378 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: prc_insn.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ãã­ã»ããµã®ç¹æ®å½ä»¤ã®ã¤ã³ã©ã¤ã³é¢æ°å®ç¾©ï¼V850ç¨ï¼
+ */
+#ifndef TOPPERS_PRC_INSN_H
+#define TOPPERS_PRC_INSN_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+#include <v800_ghs.h>
+
+/*
+ *  é¢æ°ã®ã¢ã©ã¤ã³åä½
+ *  GHSã§ã¯2ãã¤ãå¢çã«ãé
+ç½®ããï¼
+ */
+#define CHECK_FUNC_ALIGN	2
+
+/*
+ *  ã¡ã¢ãªåèª­è¾¼ãå¿
+è¦ãªãã¨ãã³ã³ãã¤ã©ã«ä¼ããããã®ããã¼é¢æ°
+ */
+extern void v850_memory_changed(void);
+extern void v850_sync_memory(void);
+
+/*
+ *  ã¡ã¢ãªã®åèª­ã¿è¾¼ã¿ãå¿
+è¦ãªãã¨ãã³ã³ãã¤ã©ã«ä¼ãã
+ */
+#define V850_MEMORY_CHANGED	v850_memory_changed();
+#define SYNCM	v850_sync_memory();
+
+LOCAL_INLINE void
+disable_int(void)
+{
+	__DI();
+}
+
+LOCAL_INLINE void
+enable_int(void)
+{
+	__EI();
+}
+
+#ifdef __v850e2v3__
+
+LOCAL_INLINE uint32
+current_psw(void)
+{
+	__LDSR(31, 0);     /* Select CPU function grp */
+	return(__GETSR());
+}
+
+LOCAL_INLINE void
+set_psw(uint32 psw)
+{
+	__LDSR(31, 0);     /* Select CPU function grp */
+	__SETSR(psw);
+}
+
+#define LDSR_REG(reg, val) {\
+    __LDSR(reg, val);\
+}
+
+#define STSR_REG(reg, val) {\
+    val = __STSR(reg); \
+}
+
+LOCAL_INLINE void
+ipa0_write(uint32 ipal_val, uint32 ipau_val)
+{
+    /*
+     * ldsr ipal_val, 6 ; ipa0l  6
+     */
+    __LDSR(6, ipal_val);
+    /* 
+     * ldsr ipau_val, 7 ; ipa0u  7
+     */
+    __LDSR(7, ipau_val);
+}
+
+LOCAL_INLINE void
+ipa1_write(uint32 ipal_val, uint32 ipau_val)
+{
+    /*
+     * ldsr ipal_val, 8 ; ipa1l  8
+     */
+    __LDSR(8, ipal_val);
+    /*
+     * ldsr ipau_val, 9 ; ipa1u  9
+     */
+    __LDSR(9, ipau_val);
+}
+
+LOCAL_INLINE void
+ipa2_write(uint32 ipal_val, uint32 ipau_val)
+{
+    /*
+     * ldsr ipal_val, 10 ; ipa2l  10
+     */
+    __LDSR(10, ipal_val);
+    /* 
+     * ldsr ipau_val, 11 ; ipa2u  11
+     */
+    __LDSR(11, ipau_val);
+}
+
+LOCAL_INLINE void
+ipa3_write(uint32 ipal_val, uint32 ipau_val)
+{
+    /*
+     * ldsr ipal_val, 12 ; ipa3l  12
+     */
+    __LDSR(12, ipal_val);
+    /*
+     * ldsr ipau_val, 13 ; ipa3u  13
+     */
+    __LDSR(13, ipau_val);
+}
+
+LOCAL_INLINE void
+ipa4_write(uint32 ipal_val, uint32 ipau_val)
+{
+    /*
+     * ldsr ipal_val, 14 ; ipa4l  14
+     */
+    __LDSR(14, ipal_val);
+    /* 
+     * ldsr ipau_val, 15 ; ipa4u  15
+     */
+    __LDSR(15, ipau_val);
+}
+
+LOCAL_INLINE void
+dpa0_write(uint32 dpal_val, uint32 dpau_val)
+{
+    /*
+     * ldsr dpal_val, 16 ; dpa0l  16
+     */
+    __LDSR(16, dpal_val);
+    /* 
+     * ldsr dpau_val, 17 ; dpa0u  17
+     */
+    __LDSR(17, dpau_val);
+}
+
+LOCAL_INLINE void
+dpa1_write(uint32 dpal_val, uint32 dpau_val)
+{
+    /*
+     * ldsr dpal_val, 18 ; dpa1l  18
+     */
+    __LDSR(18, dpal_val);
+    /*
+     * ldsr dpau_val, 19 ; dpa1u  19
+     */
+    __LDSR(19, dpau_val);
+}
+
+LOCAL_INLINE void
+dpa2_write(uint32 dpal_val, uint32 dpau_val)
+{
+    /*
+     * ldsr dpal_val, 20 ; dpa2l  20
+     */
+    __LDSR(20, dpal_val);
+    /* 
+     * ldsr dpau_val, 21 ; ipa2u  21
+     */
+    __LDSR(21, dpau_val);
+}
+
+LOCAL_INLINE void
+dpa3_write(uint32 dpal_val, uint32 dpau_val)
+{
+    /*
+     * ldsr dpal_val, 22 ; dpa3l  22
+     */
+    __LDSR(22, dpal_val);
+    /*
+     * ldsr dpau_val, 23 ; dpa3u  23
+     */
+    __LDSR(23, dpau_val);
+}
+
+LOCAL_INLINE void
+dpa4_write(uint32 dpal_val, uint32 dpau_val)
+{
+    /*
+     * ldsr dpal_val, 24 ; dpa4l  24
+     */
+    __LDSR(24, dpal_val);
+    /* 
+     * ldsr dpau_val, 25 ; dpa4u  25
+     */
+    __LDSR(25, dpau_val);
+}
+
+LOCAL_INLINE void
+dpa5_write(uint32 dpal_val, uint32 dpau_val)
+{
+    /*
+     * ldsr dpal_val, 26 ; dpa5l  26
+     */
+    __LDSR(26, dpal_val);
+    /* 
+     * ldsr dpau_val, 27 ; dpa5u  27
+     */
+    __LDSR(27, dpau_val);
+}
+
+#elif defined(__v850e3v5__)
+
+LOCAL_INLINE uint32
+current_psw(void)
+{
+	return(__STSR(5, 0));
+}
+
+LOCAL_INLINE void
+set_psw(uint32 psw)
+{
+	__LDSR(5, 0, psw);
+}
+
+/*
+ *  V850E3V5ç¨ã®å²è¾¼ã¿ã³ã³ãã­ã¼ã©æä½ã«ã¼ãã³
+ */
+LOCAL_INLINE void
+set_pmr(uint16 pmr)
+{
+	uint32 psw;
+
+	/* PMR must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	__LDSR(11, 2, pmr);
+
+	set_psw(psw);
+	Asm("syncp");
+}
+
+LOCAL_INLINE uint16
+get_ispr(void)
+{
+	return(__STSR(10, 2));
+}
+
+LOCAL_INLINE void
+clear_ispr(void)
+{
+	uint32 psw;
+
+	/* ISPR must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	__LDSR(13, 2, 1);   /* INTCFG = 1; ISPR ãæ¸ãæãå¯è½ã« */
+	__LDSR(10, 2, 0);   /* ISPR = 0 */
+	__LDSR(13, 2, 0);   /* INTCFG = 0; ISPR ãæ¸ãæãç¦æ­¢ã«(èªåæ´æ°ã«) */
+
+	set_psw(psw);
+	Asm("syncp");
+}
+
+LOCAL_INLINE uint32
+current_cpuid(void)
+{
+	uint32 htcfg0_val;
+	htcfg0_val = __STSR(0,2);
+	return(((htcfg0_val >> 16) & 0x03));
+}
+
+
+#define LDSR_REG(reg, sel, val) {\
+    __LDSR(reg, sel, val);\
+}
+
+#define STSR_REG(reg, sel, val) {\
+    val = __STSR(reg, sel); \
+}
+
+#define MPA_WRITE(mpuid, mpla, mpua, mpat) { \
+    __LDSR(mpuid*4, 6, mpla); \
+    __LDSR(mpuid*4+1, 6, mpua); \
+    __LDSR(mpuid*4+2, 6, mpat); \
+}
+
+LOCAL_INLINE void
+set_intbp(uint32 intbp)
+{
+	uint32 psw;
+
+	/* INTBP must be set in di sate(PSW.ID = 1) */
+	psw = current_psw();
+	disable_int();
+
+	__LDSR(4, 1, intbp);
+
+	set_psw(psw);
+}
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_INSN_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_mpu.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_mpu.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_mpu.h	(revision 172)
@@ -0,0 +1,114 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+/*
+ *	MPUãã©ã¤ãï¼V850E2ç¨ï¼
+ */
+
+#ifndef TOPPERS_PRC_MPU_H
+#define TOPPERS_PRC_MPU_H
+
+#ifndef TOPPERS_MACRO_ONLY
+/*
+ * ã·ã¹ãã ã¬ã¸ã¹ã¿ã¸ã®æ¸ãè¾¼ã¿
+ */
+#define IPA_WRITE(n, ipal, ipau) {\
+    ipa##n##_write((uint32)ipal, (uint32)ipau); \
+}
+#define DPA_WRITE(n, dpal, dpau) {\
+    dpa##n##_write((uint32)dpal, (uint32)dpau); \
+}
+
+extern void *p_ctxosap;
+/* åæåã«ã¼ãã³ */
+extern void target_mpu_initialize(void);
+/* ã¡ã¢ãªä¿è­·éåä¾å¤ãã³ãã© */
+extern void target_impu_exc_handler(void *p_excinf);
+extern void target_dmpu_exc_handler(void *p_excinf);
+/* ã¿ã¹ã¯ä¾å¤å®è¡éå§æã¹ã¿ãã¯ä¸æ­£ãã³ãã© */
+extern void target_emulate_texrtn_handler(void *p_excinf);
+/* ã¿ã¹ã¯ä¾å¤ãªã¿ã¼ã³æã¹ã¿ãã¯ä¸æ­£ãã³ãã© */
+extern void target_emulate_ret_tex_handler(void *p_excinf);
+
+/*
+ *  ä¿è­·éåFEã¬ãã«ä¾å¤ãã³ãã©
+ */
+#define EXCNO_PROTECTION 3
+extern void target_protection_handler(void *p_excinf);
+
+/*
+ *  TODO: probe_memãã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ã§ããï¼
+ */
+#if defined(__v850e2v3__)
+#define OMIT_PROBE_MEM_WRITE
+#if 0
+#define PROBE_MEM_WRITE(p_var, type) \
+	(probe_mem_write((MemoryStartAddressType) (p_var), sizeof(type)))
+#endif
+#define OMIT_PROBE_MEM_READ
+#define OMIT_PROBE_STACK
+#elif defined(__v850e3v5__)
+#define OMIT_PROBE_MEM_WRITE
+
+#else /* __v850e3v5__ */
+#error please define ether __v850e2v3__ or __v850e3v5__
+#endif /* __v850e2v3__ */
+
+extern AccessType probe_trusted_osap_mem(const MemoryStartAddressType sadr, const MemoryStartAddressType eadr);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_PRC_MPU_H */
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_opt.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_opt.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_opt.tf	(revision 172)
@@ -0,0 +1,1313 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+$ 
+$  V850E2Mç¨
+$  RH850ã§ã¯ä½¿ç¨ããªã
+$ 
+
+$DEBUG_OPT_TF = 1$
+
+$ 
+$  arch/v850_gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+$FUNCTION GENERATE_MEMORY$
+    $NOOP()$
+$END$
+
+$FUNCTION GENERATE_OUTPUT$
+    $NL$
+$END$
+
+$
+$  ä¿è­·ãã¡ã¤ã³ã®ã©ãã«ã®ä½æ
+$	OSAP.LABEL[domid]ï¼ä¿è­·ãã¡ã¤ã³ã®ã©ãã«
+$
+$OSAP.LABEL[TDOM_KERNEL] = "kernel"$
+$FOREACH domid OSAP.ID_LIST$
+	$OSAP.LABEL[domid] = domid$
+$END$
+$OSAP.LABEL[TDOM_NONE] = "shared"$
+
+$ 
+$  æ¨æºã®ã»ã¯ã·ã§ã³ã®ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ã®å®ç¾©
+$ 
+$MEMATR_TEXT = (TA_NOWRITE|TA_EXEC)$
+$MEMATR_RODATA = (TA_NOWRITE|TA_EXEC)$
+$MEMATR_DATA = TA_MEMINI$
+$MEMATR_BSS = TA_NULL$
+$MEMATR_PRSV = TA_MEMPRSV$
+$MEMATR_ROSDATA = (TA_SDATA|TA_MEMINI|TA_NOWRITE|TA_EXEC)$
+$MEMATR_SDATA = (TA_SDATA|TA_MEMINI)$
+$MEMATR_SBSS = TA_SDATA$
+
+
+$ 
+$  ä¿è­·ãã¡ã¤ã³æ¯ã®ããã©ã«ãã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ã®ä½æ
+$ 
+$DEFAULT_ACPTN[TDOM_KERNEL] = VALUE("TACP_KERNEL", TACP_KERNEL)$
+$FOREACH domid OSAP.ID_LIST$
+	$DEFAULT_ACPTN[domid] = VALUE(FORMAT("TACP(%1%)", domid), 1 << (domid - 1))$
+$END$
+$DEFAULT_ACPTN[TDOM_NONE] = VALUE("TACP_SHARED", TACP_SHARED)$
+
+$ 
+$  ã¡ã¢ãªä¿è­·åä½ã®å®éã®ãµã¤ãºãåãåãï¼åãåã£ããµã¤ãºä»¥ä¸ã§ï¼
+$  ARM MPUã®ãµã¤ãºå¶ç´ãæºããæå°å¤ãè¿ã
+$  ARM MPUã®ãµã¤ãºå¶ç´ã¯ï¼16B~4GBã®ç¯å²ã®2ã®ã¹ãä¹
+$  ARGV[1]ï¼å®éã®ãµã¤ãº
+$  RESULTï¼ARM MPUã®ãµã¤ãºå¶ç´ãæºããæå°å¤
+$FUNCTION SEARCH_ARM_MPU_SIZE$
+    $IF ARGV[1] <= 0$
+        $RESULT = 0$
+    $ELSE$
+        $search_state = 0$
+        $FOREACH bit_offset { 31,30,...,4 }$
+            $compare_bit = 1 << bit_offset$
+            $IF ((ARGV[1] & compare_bit) != 0)$
+                $IF (search_state == 0)$
+                    $result_size = compare_bit$
+                    $search_state = 1$
+                $ELIF (search_state == 1)$
+                    $result_size = (result_size << 1)$
+                    $search_state = 2$
+                $END$
+            $END$
+        $END$
+        $IF (search_state == 0)$
+            $result_size = (1 << 4)$
+        $ELIF (search_state == 1) && ((ARGV[1] & 0xf) != 0)$
+            $result_size = (result_size << 1)$
+        $END$
+        $RESULT = result_size$
+    $END$
+$END$
+
+$ 
+$  åãåã£ãçªå°ä»¥ä¸ã§ï¼ARM MPUã®ã¢ã©ã¤ã³å¶ç´ã®æå°å¤ãè¿ã
+$  ARGV[1]ï¼çªå°
+$  ARGV[2]ï¼ãµã¤ãº
+$  RESULTï¼ARM MPUã®ã¢ã©ã¤ã³å¶ç´ãæºããæå°å¤
+$ 
+$FUNCTION SEARCH_ARM_MPU_ALIGN$
+    $result_align = ARGV[1]$
+    $compare_mask = ARGV[2] - 1$
+    $IF ((ARGV[1] & compare_mask) != 0)$
+        $result_align = ARGV[1] & ~compare_mask$
+        $result_align = result_align + ARGV[2]$
+    $END$
+
+    $RESULT = result_align$
+$END$
+
+$ 
+$  tsize_meminibã®è£æ­£
+$  sdata_sharedã®å
+é ­ã¢ãã¬ã¹ããã¹ã¯ãã¼ã¹æ¹å¼ã§ã¢ã©ã¤ã³ããããï¼
+$  ãã®ç´åã®ã»ã¯ã·ã§ã³ã®limitã¨sdata_sharedã®startãç°ãªãå¯è½æ§ããã
+$  ãã£ã¦+1ãã¦ãã
+$  prsv_sharedã®çµç«¯ã¢ãã¬ã¹ããã¹ã¯ãã¼ã¹æ¹å¼ã§ã¢ã©ã¤ã³ããããï¼
+$  prsv_sharedã®ãµã¤ãºãç©ºã§ãï¼ãã¹4ã§ã¯startã¨limitãç°ãªãå¯è½æ§ããã
+$  ãã£ã¦+1ãã¦ãã
+$  
+$FUNCTION CALC_TSIZE_MEMINIB$
+    $tsize_meminib = tsize_meminib + 3$
+$END$
+
+$OPTIMIZE_MEMINIB = 1$
+$OPTIMIZE_DATASEC_LIST = 1$
+$OPTIMIZE_BSSSEC_LIST = 1$
+
+$ 
+$  OSAPåæåã³ã³ãã­ã¹ããã­ãã¯ã®ããã®å®£è¨
+$ 
+$FUNCTION PREPARE_OSAPINICTXB$
+    $IF LENGTH(TSK.ID_LIST)$
+        $FOREACH tskid TSK.ID_LIST$
+            $IF !OSAP.TRUSTED[TSK.OSAPID[tskid]]$
+                extern uint8 $FORMAT("__start_user_stack%s", tskid)$;$NL$
+                extern uint8 $FORMAT("__limit_user_stack%s", tskid)$;$NL$
+            $END$
+        $END$
+    $END$
+    $FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
+        $IF LENGTH(shared_ustack_size[tskpri])$
+            extern uint8 $FORMAT("__start_shared_user_stack%s", tskpri)$;$NL$
+            extern uint8 $FORMAT("__limit_shared_user_stack%s", tskpri)$;$NL$
+        $END$
+    $END$
+
+
+    $IF LENGTH(OSAP.ID_LIST)$
+        $FOREACH domid OSAP.ID_LIST$
+            $IF !OSAP.TRUSTED[domid]$
+$   RXé åï¼å°ç¨ï¼
+                extern uint8 __start_text_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_text_$OSAP.LABEL[domid]$;$NL$
+$   Ré åï¼å°ç¨ï¼
+                extern uint8 __start_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+                extern uint8 __limit_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+$   RWXé åï¼å°ç¨ï¼
+                extern uint8 __start_ram_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_ram_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __start_sram_$OSAP.LABEL[domid]$;$NL$
+                extern uint8 __limit_sram_$OSAP.LABEL[domid]$;$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ã
+                extern uint8 $FORMAT("__start_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                extern uint8 $FORMAT("__limit_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                extern uint8 $FORMAT("__start_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+                extern uint8 $FORMAT("__limit_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$;$NL$
+$                 extern uint8 $FORMAT("__start_ram_%s_srpw", OSAP.LABEL[domid])$;$NL$
+$                 extern uint8 $FORMAT("__limit_ram_%s_srpw", OSAP.LABEL[domid])$;$NL$
+$                 extern uint8 $FORMAT("__start_sram_%s_srpw", OSAP.LABEL[domid])$;$NL$
+$                 extern uint8 $FORMAT("__limit_sram_%s_srpw", OSAP.LABEL[domid])$;$NL$
+            $END$
+        $END$
+        $NL$
+    $END$$NL$
+
+$  å
+±æé å
+    extern uint8 __start_text_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __limit_text_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __start_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+    extern uint8 __limit_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$;$NL$
+    extern uint8 __start_ram_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __limit_ram_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __start_sram_$OSAP.LABEL[TDOM_NONE]$;$NL$
+    extern uint8 __limit_sram_$OSAP.LABEL[TDOM_NONE]$;$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ãé åå
+¨ä½
+    extern uint8 __start_srpw_all;$NL$
+    extern uint8 __limit_srpw_all;$NL$
+    extern uint8 __start_ssrpw_all;$NL$
+    extern uint8 __limit_ssrpw_all;$NL$
+    $NL$
+$	extern const OSAPMPUINFOB_INFO _kernel_osap_mpu_info_tbl[];$NL$
+$END$
+
+
+$FUNCTION GENERATE_TARGET_MPUINFOB$
+$ 
+$  ä¿è­·ãã¡ã¤ã³åæåãã­ãã¯ã®memä¾å­é¨ãçæ
+$ 
+    $FILE "kernel_mem3.c"$
+
+    $PREPARE_OSAPINICTXB()$
+
+$END$
+
+$ 
+$  TSKINICTXBã®åæåæ
+å ±ãçæ
+$ 
+$DOMINICTXB_KERNEL = "{ NULL }"$
+
+$FUNCTION GENERATE_OSAPINIB_MPUINFOB$
+    $TAB$$TAB${$NL$
+    $IF !OSAP.TRUSTED[ARGV[1]]$
+$   RXé åï¼å°ç¨ï¼
+        $TAB$$TAB$$TAB$( (uint8 *)&__start_text_$OSAP.LABEL[ARGV[1]]$ ), /* iregion 0 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)&__limit_text_$OSAP.LABEL[ARGV[1]]$ ), /* iregion 0 */$NL$
+$   RXé åï¼å°ç¨ã·ã§ã¼ããã¼ã¿ï¼
+        $TAB$$TAB$$TAB$( (uint8 *)&__start_sram_$OSAP.LABEL[ARGV[1]]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ ),/* iregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)&__limit_sram_$OSAP.LABEL[ARGV[1]]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ ),/* iregion 1 */$NL$
+$   RWXé åï¼å°ç¨ï¼
+        $TAB$$TAB$$TAB$( (uint8 *)&__start_ram_$OSAP.LABEL[ARGV[1]]$ ),/* dregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)&__limit_ram_$OSAP.LABEL[ARGV[1]]$ ),/* dregion 1 */$NL$
+$   RWXé åï¼å°ç¨ã·ã§ã¼ããã¼ã¿ï¼
+        $TAB$$TAB$$TAB$( (uint8 *)&__start_sram_$OSAP.LABEL[ARGV[1]]$ ),/* dregion 2 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)&__limit_sram_$OSAP.LABEL[ARGV[1]]$ ),/* dregion 2 */$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ã
+        $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__start_ram_%s_%x_%x )", OSAP.LABEL[ARGV[1]], +DEFAULT_ACPTN[ARGV[1]], +TACP_SHARED)$,/* dregion 3 */$NL$
+        $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__limit_ram_%s_%x_%x )", OSAP.LABEL[ARGV[1]], +DEFAULT_ACPTN[ARGV[1]], +TACP_SHARED)$,/* dregion 3 */$NL$
+$         $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__start_ram_%s_srpw )", OSAP.LABEL[ARGV[1]])$,/* dregion 3 */$NL$
+$         $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__limit_ram_%s_srpw )", OSAP.LABEL[ARGV[1]])$,/* dregion 3 */$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ãï¼ã·ã§ã¼ããã¼ã¿ï¼
+        $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__start_sram_%s_%x_%x )", OSAP.LABEL[ARGV[1]], +DEFAULT_ACPTN[ARGV[1]], +TACP_SHARED)$,/* dregion 4 */$NL$
+        $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__limit_sram_%s_%x_%x )", OSAP.LABEL[ARGV[1]], +DEFAULT_ACPTN[ARGV[1]], +TACP_SHARED)$,/* dregion 4 */$NL$
+$         $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__start_sram_%s_srpw )", OSAP.LABEL[ARGV[1]])$,/* dregion 4 */$NL$
+$         $TAB$$TAB$$TAB$$FORMAT("( (uint8 *)&__limit_sram_%s_srpw )", OSAP.LABEL[ARGV[1]])$,/* dregion 4 */$NL$
+    $ELSE$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* iregion 0 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* iregion 0 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* iregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* iregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 1 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 2 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 2 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 3 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 3 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 4 */$NL$
+        $TAB$$TAB$$TAB$( (uint8 *)NULL ),/* dregion 4 */$NL$
+    $END$
+    $TAB$$TAB$}$NL$
+    $NL$
+$END$
+
+$FUNCTION GENERATE_TSKINICTXB$
+	$TAB$$TAB${$NL$
+    $TAB$$TAB$$TAB$$TSK.TINIB_SSTKSZ[ARGV[1]]$,$NL$
+	$TAB$$TAB$$TAB$((void *)((uint8 *)($TSK.TINIB_SSTK[ARGV[1]]$)
+    $SPC$+ ($TSK.TINIB_SSTKSZ[ARGV[1]]$))),$NL$
+	$IF OSAP.TRUSTED[TSK.OSAPID[ARGV[1]]]$
+        $TAB$$TAB$$TAB$0,$NL$
+        $TAB$$TAB$$TAB$0,$NL$
+    $ELSE$
+        $TAB$$TAB$$TAB$$TSK.TINIB_USTKSZ[ARGV[1]]$,$NL$ 
+        $TAB$$TAB$$TAB$((void *)((uint8 *)($TSK.TINIB_USTK[ARGV[1]]$)
+        $SPC$+ ($TSK.TINIB_USTKSZ[ARGV[1]]$))),$NL$
+    $END$
+	$TAB$$TAB$},$NL$
+$END$
+
+$FUNCTION GENERATE_STKMPUINFOB$
+	$TAB$$TAB${$NL$
+	$IF OSAP.TRUSTED[TSK.OSAPID[ARGV[1]]]$
+        $TAB$$TAB$$TAB$0,$NL$
+        $TAB$$TAB$$TAB$0,$NL$
+    $ELSE$
+		$IF EQ(TSK.STK[tskid],"NULL")$
+$			// stkãNULLã®å ´åã®å¦ç
+            $IF LENGTH(TSK.SHARED_USTK_ID[tskid])$
+$               // å
+±æã¹ã¿ãã¯
+                $TAB$$TAB$$TAB$$FORMAT("&__start_shared_user_stack%s", TSK.PRIORITY[ARGV[1]])$,$NL$
+                $TAB$$TAB$$TAB$$FORMAT("(&__limit_shared_user_stack%s - 0x10)", TSK.PRIORITY[ARGV[1]])$,$NL$
+            $ELSE$
+$               // åºæã¹ã¿ãã¯
+                $TAB$$TAB$$TAB$$FORMAT("&__start_user_stack%s", ARGV[1])$,$NL$
+                $TAB$$TAB$$TAB$$FORMAT("(&__limit_user_stack%s - 0x10)", ARGV[1])$,$NL$
+            $END$
+        $ELSE$
+$			// stkãNULLã§ãªãå ´åã®å¦ç
+            $TAB$$TAB$$TAB$$FORMAT("(uint8 *)%s", TSK.TINIB_USTK[ARGV[1]])$,$NL$
+            $TAB$$TAB$$TAB$$FORMAT("(uint8 *)((uint32)%s + %d - 0x10)", TSK.TINIB_USTK[ARGV[1]], TSK.TINIB_USTKSZ[ARGV[1]])$,$NL$
+        $END$
+    $END$
+	$TAB$$TAB$},$NL$
+$END$
+
+$INCLUDE "kernel/kernel_opt.tf"$
+
+$ 
+$  å
+±æãªã¼ãã©ã¤ãé å / å
+±æãªã¼ãå°æã©ã¤ãé åï¼sdataï¼ / rosdata_sharedé å
+$  ã®æ
+å ±åå¾
+$  
+$ $check_shared_mo = 0x00$
+$ $check_srpw_mo = 0x00$
+$ $check_rosdata_mo = 0x00$
+$ $check_sdata_mo = 0x00$
+$ $LIST_SHARED_MO = {}$
+$ $LIST_SRPW_MO = {}$
+$ $LIST_ROSDATA_MO = {}$
+$ $preid = -1$
+$ $FOREACH moid MO_START_LIST$
+$ $   // ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ããã¹2æç¹ã§ã®é ã«ãã§ãã¯
+$     $IF LENGTH(FIND(MO_MPROTECT_LIST, moid))$
+$ $       // ã¡ã¢ãªä¿è­·åä½ã®å
+é ­ã®å ´å
+$         $IF !LENGTH(SDATA_BASE) && ((MO.MEMATR[moid] & TA_SDATA) == TA_SDATA)$
+$ $           // ã·ã§ã¼ããã¼ã¿ã»ã¯ã·ã§ã³ã®å
+é ­
+$             $SDATA_BASE = MO.BASEADDR[moid]$
+$             $check_sdata_mo = check_sdata_mo | 0x10$
+$         $ELIF ((MO.MEMATR[moid] & TA_SDATA) == 0)
+$ $           // ã·ã§ã¼ããã¼ã¿ã»ã¯ã·ã§ã³ã®çµç«¯
+$             && ((check_sdata_mo & 0x10) == 0x10)$
+$             $IF preid == -1$
+$                 $ERROR$
+$                     $FORMAT("unexpected preid.")$
+$                 $END$
+$             $END$
+$             $check_sdata_mo = check_sdata_mo & 0x0f$
+$             $SDATA_LIMIT = MO.LIMITADDR[preid]$
+$             $SDATA_LIMIT_MO = preid$
+$         $END$
+$ 
+$         $IF (MO.ACPTN1[moid] == TACP_SHARED) && (MO.ACPTN2[moid] == TACP_SHARED)$
+$             $IF ((check_shared_mo & 0x10) != 0x10)$
+$ $               // å
+±æãªã¼ãã©ã¤ãé åã®å
+é ­ã®å ´å
+$                 $SHARED_AREA_BASE[check_shared_mo] = MO.BASEADDR[moid]$
+$                 $SHARED_AREA_MO[check_shared_mo] = moid$
+$                 $LIST_SHARED_MO = APPEND(LIST_SHARED_MO, check_shared_mo)$
+$                 $check_shared_mo = check_shared_mo | 0x10$
+$             $END$
+$         $ELIF (check_shared_mo & 0x10) == 0x10$
+$ $           // å
+±æãªã¼ãã©ã¤ãé åã®çµç«¯ã®å ´å
+$             $IF preid == -1$
+$                 $ERROR$
+$                     $FORMAT("unexpected preid.")$
+$                 $END$
+$             $END$
+$             $check_shared_mo = check_shared_mo & 0x0f$
+$             $SHARED_AREA_LIMIT[check_shared_mo] = MO.LIMITADDR[preid]$
+$             $SHARED_AREA_SIZE[check_shared_mo] = SHARED_AREA_LIMIT[check_shared_mo] - SHARED_AREA_BASE[check_shared_mo]$
+$             $SHARED_AREA_LIMIT_MO[check_shared_mo] = preid$
+$             $check_shared_mo = check_shared_mo + 1$
+$         $END$
+$ 
+$         $IF LENGTH(MO.SRPW[moid]) && (MO.SRPW[moid])$
+$             $IF ((check_srpw_mo & 0x10) != 0x10)$
+$ $               // å
+±æãªã¼ãå°æã©ã¤ãé åã®å
+é ­ã®å ´å
+$                 $SRPW_AREA_BASE[check_srpw_mo] = MO.BASEADDR[moid]$
+$                 $SRPW_AREA_MO[check_srpw_mo] = moid$
+$                 $LIST_SRPW_MO = APPEND(LIST_SRPW_MO, check_srpw_mo)$
+$                 $check_srpw_mo = check_srpw_mo | 0x10$
+$             $END$
+$         $ELIF (check_srpw_mo & 0x10) == 0x10$
+$ $           // å
+±æãªã¼ãå°æã©ã¤ãé åã®çµç«¯ã®å ´å
+$             $IF preid == -1$
+$                 $ERROR$
+$                     $FORMAT("unexpected preid.")$
+$                 $END$
+$             $END$
+$             $check_srpw_mo = check_srpw_mo & 0x0f$
+$             $SRPW_AREA_LIMIT[check_srpw_mo] = MO.LIMITADDR[preid]$
+$             $SRPW_AREA_SIZE[check_srpw_mo] = SRPW_AREA_LIMIT[check_srpw_mo] - SRPW_AREA_BASE[check_srpw_mo]$
+$             $SRPW_AREA_LIMIT_MO[check_srpw_mo] = preid$
+$             $check_srpw_mo = check_srpw_mo + 1$
+$         $END$
+$ 
+$         $IF (MO.ACPTN1[moid] == 0) && (MO.ACPTN2[moid] == TACP_SHARED) 
+$             && (MO.MEMATR[moid] & TA_SDATA) && (MO.OSAPID[moid] == TDOM_NONE)$
+$             $IF ((check_rosdata_mo & 0x10) != 0x10)$
+$ $               // rosdata_sharedé åã®å
+é ­ã®å ´å
+$                 $ROSDATA_AREA_BASE[check_rosdata_mo] = MO.BASEADDR[moid]$
+$                 $ROSDATA_AREA_MO[check_rosdata_mo] = moid$
+$                 $LIST_ROSDATA_MO = APPEND(LIST_ROSDATA_MO, check_rosdata_mo)$
+$                 $check_rosdata_mo = check_rosdata_mo | 0x10$
+$             $END$
+$         $ELIF (check_rosdata_mo & 0x10) == 0x10$
+$ $           // rosdata_sharedé åã®çµç«¯ã®å ´å
+$             $IF preid == -1$
+$                 $ERROR$
+$                     $FORMAT("unexpected preid.")$
+$                 $END$
+$             $END$
+$             $check_rosdata_mo = check_rosdata_mo & 0x0f$
+$             $ROSDATA_AREA_LIMIT[check_rosdata_mo] = MO.LIMITADDR[preid]$
+$             $ROSDATA_AREA_SIZE[check_rosdata_mo] = ROSDATA_AREA_LIMIT[check_rosdata_mo] - ROSDATA_AREA_BASE[check_rosdata_mo]$
+$             $ROSDATA_AREA_LIMIT_MO[check_rosdata_mo] = preid$
+$             $check_rosdata_mo = check_rosdata_mo + 1$
+$         $END$
+$     $END$
+$ 
+$     $preid = moid$
+$ $END$
+$ $IF (check_shared_mo & 0x10) == 0x10$
+$     $IF preid == -1$
+$         $ERROR$
+$             $FORMAT("unexpected preid.")$
+$         $END$
+$     $END$
+$     $check_shared_mo = check_shared_mo & 0x0f$
+$     $SHARED_AREA_LIMIT[check_shared_mo] = MO.LIMITADDR[preid]$
+$     $SHARED_AREA_LIMIT_MO[check_shared_mo] = preid$
+$     $SHARED_AREA_SIZE[check_shared_mo] = SHARED_AREA_LIMIT[check_shared_mo] - SHARED_AREA_BASE[check_shared_mo]$
+$     $check_shared_mo = check_shared_mo + 1$
+$ $END$
+$ $IF (check_srpw_mo & 0x10) == 0x10$
+$     $IF preid == -1$
+$         $ERROR$
+$             $FORMAT("unexpected preid.")$
+$         $END$
+$     $END$
+$     $check_srpw_mo = check_srpw_mo & 0x0f$
+$     $SRPW_AREA_LIMIT[check_srpw_mo] = MO.LIMITADDR[preid]$
+$     $SRPW_AREA_SIZE[check_srpw_mo] = SRPW_AREA_LIMIT[check_srpw_mo] - SRPW_AREA_BASE[check_srpw_mo]$
+$     $SRPW_AREA_LIMIT_MO[check_srpw_mo] = preid$
+$     $check_srpw_mo = check_srpw_mo + 1$
+$ $END$
+$ $IF (check_rosdata_mo & 0x10) == 0x10$
+$     $IF preid == -1$
+$         $ERROR$
+$             $FORMAT("unexpected preid.")$
+$         $END$
+$     $END$
+$     $check_rosdata_mo = check_rosdata_mo & 0x0f$
+$     $ROSDATA_AREA_LIMIT[check_rosdata_mo] = MO.LIMITADDR[preid]$
+$     $ROSDATA_AREA_SIZE[check_rosdata_mo] = ROSDATA_AREA_LIMIT[check_rosdata_mo] - ROSDATA_AREA_BASE[check_rosdata_mo]$
+$     $ROSDATA_AREA_LIMIT_MO[check_rosdata_mo] = preid$
+$     $check_rosdata_mo = check_rosdata_mo + 1$
+$ $END$
+$  
+$ $ 
+$ $  ã¨ã©ã¼ãã§ãã¯
+$ $  
+$ $FOREACH id LIST_SHARED_MO$
+$     $IF DEBUG_OPT_TF$
+$         $WARNING$
+$             $id$$NL$
+$             $SHARED_AREA_MO[id]$$NL$
+$             $SHARED_AREA_LIMIT_MO[id]$$NL$
+$             $FORMAT("0x%x", SHARED_AREA_BASE[id])$$NL$
+$             $FORMAT("0x%x", SHARED_AREA_LIMIT[id])$$NL$
+$             $FORMAT("0x%x", SHARED_AREA_SIZE[id])$$NL$
+$         $END$
+$     $END$
+$     $IF ((MO.MEMATR[SHARED_AREA_MO[id]] & TA_SDATA) == TA_SDATA)$
+$         $IF LENGTH(SHARED_SDATA.BASE)$
+$             $ERROR$
+$                 $FORMAT("unexpected mematr: %d, %x", id, MO.MEMATR[SHARED_AREA_MO[id]])$
+$             $END$
+$         $ELSE$
+$             $SHARED_SDATA.BASE = SHARED_AREA_BASE[id]$
+$             $SHARED_SDATA.LIMIT = SHARED_AREA_LIMIT[id]$
+$             $SHARED_SDATA.SIZE = SHARED_AREA_SIZE[id]$
+$             $SHARED_SDATA.BASE_MO = SHARED_AREA_MO[id]$
+$             $SHARED_SDATA.LIMIT_MO = SHARED_AREA_LIMIT_MO[id]$
+$         $END$
+$     $ELSE$
+$         $IF LENGTH(SHARED_DATA.BASE)$
+$             $ERROR$
+$                 $FORMAT("unexpected mematr: %d, %x", id, MO.MEMATR[SHARED_AREA_MO[id]])$
+$             $END$
+$         $ELSE$
+$             $SHARED_DATA.BASE = SHARED_AREA_BASE[id]$
+$             $SHARED_DATA.LIMIT = SHARED_AREA_LIMIT[id]$
+$             $SHARED_DATA.SIZE = SHARED_AREA_SIZE[id]$
+$             $SHARED_DATA.BASE_MO = SHARED_AREA_MO[id]$
+$             $SHARED_DATA.LIMIT_MO = SHARED_AREA_LIMIT_MO[id]$
+$         $END$
+$     $END$
+$ $END$
+$ 
+$ $FOREACH id LIST_SRPW_MO$
+$     $IF DEBUG_OPT_TF$
+$         $WARNING$
+$             $id$$NL$
+$             $SRPW_AREA_MO[id]$$NL$
+$             $SRPW_AREA_LIMIT_MO[id]$$NL$
+$             $FORMAT("0x%x", SRPW_AREA_BASE[id])$$NL$
+$             $FORMAT("0x%x", SRPW_AREA_LIMIT[id])$$NL$
+$             $FORMAT("0x%x", SRPW_AREA_SIZE[id])$$NL$
+$         $END$
+$     $END$
+$     $IF ((MO.MEMATR[SRPW_AREA_MO[id]] & TA_SDATA) == TA_SDATA)$
+$         $IF LENGTH(SRPW_SDATA.BASE)$
+$             $ERROR$
+$                 $FORMAT("unexpected mematr: %d, %x", id, MO.MEMATR[SRPW_AREA_MO[id]])$
+$             $END$
+$         $ELSE$
+$             $SRPW_SDATA.BASE = SRPW_AREA_BASE[id]$
+$             $SRPW_SDATA.LIMIT = SRPW_AREA_LIMIT[id]$
+$             $SRPW_SDATA.SIZE = SRPW_AREA_SIZE[id]$
+$             $SRPW_SDATA.BASE_MO = SRPW_AREA_MO[id]$
+$             $SRPW_SDATA.LIMIT_MO = SRPW_AREA_LIMIT_MO[id]$
+$         $END$
+$     $ELSE$
+$         $IF LENGTH(SRPW_DATA.BASE)$
+$             $ERROR$
+$                 $FORMAT("unexpected mematr: %d, %x", SRPW_AREA_MO[0], MO.MEMATR[SRPW_AREA_MO[id]])$
+$                 $FORMAT("unexpected mematr: %d, %x", SRPW_AREA_MO[id], MO.MEMATR[SRPW_AREA_MO[id]])$
+$             $END$
+$         $ELSE$
+$             $SRPW_DATA.BASE = SRPW_AREA_BASE[id]$
+$             $SRPW_DATA.LIMIT = SRPW_AREA_LIMIT[id]$
+$             $SRPW_DATA.SIZE = SRPW_AREA_SIZE[id]$
+$             $SRPW_DATA.BASE_MO = SRPW_AREA_MO[id]$
+$             $SRPW_DATA.LIMIT_MO = SRPW_AREA_LIMIT_MO[id]$
+$         $END$
+$     $END$
+$ $END$
+$ 
+$ $FOREACH id LIST_ROSDATA_MO$
+$     $IF DEBUG_OPT_TF$
+$         $WARNING$
+$             $id$$NL$
+$             $ROSDATA_AREA_MO[id]$$NL$
+$             $ROSDATA_AREA_LIMIT_MO[id]$$NL$
+$             $FORMAT("0x%x", ROSDATA_AREA_BASE[id])$$NL$
+$             $FORMAT("0x%x", ROSDATA_AREA_LIMIT[id])$$NL$
+$             $FORMAT("0x%x", ROSDATA_AREA_SIZE[id])$$NL$
+$         $END$
+$     $END$
+$     $IF (id == 0)$
+$         $IF ((MO.MEMATR[ROSDATA_AREA_MO[id]] & TA_SDATA) != TA_SDATA)$
+$             $ERROR$
+$                 $FORMAT("unexpected mematr: %d, %x", id, MO.MEMATR[ROSDATA_AREA_MO[id]])$
+$             $END$
+$         $ELSE$
+$             $ROSDATA.BASE = ROSDATA_AREA_BASE[id]$
+$             $ROSDATA.LIMIT = ROSDATA_AREA_LIMIT[id]$
+$             $ROSDATA.SIZE = ROSDATA_AREA_SIZE[id]$
+$             $ROSDATA.BASE_MO = ROSDATA_AREA_MO[id]$
+$             $ROSDATA.LIMIT_MO = ROSDATA_AREA_LIMIT_MO[id]$
+$         $END$
+$     $ELSE$
+$         $ERROR$
+$             $FORMAT("unexpected id: %d", id)$
+$         $END$
+$     $END$
+$ $END$
+$ 
+$ $ 
+$ $  data_sharedã®é
+ç½®ã¢ãã¬ã¹ãæ±ãã
+$ $ 
+$ $SHARED_DATA.REALSIZE = SEARCH_ARM_MPU_SIZE(SHARED_DATA.SIZE + SHARED_SDATA.SIZE)$
+$ $SHARED_DATA.REALBASE = SEARCH_ARM_MPU_ALIGN(SDATA_BASE, SHARED_DATA.REALSIZE)$
+$ $IF DEBUG_OPT_TF$
+$     $WARNING$
+$         $FORMAT("data_shared: base[0x%x], size[0x%x]", SHARED_DATA.REALBASE, SHARED_DATA.REALSIZE)$$NL$
+$     $END$
+$ $END$
+$ 
+$ $  
+$ $  sdataã«é¢ãããµã¤ãºãæ±ãã
+$ $  
+$ $SDATA.SIZE = SDATA_LIMIT - SDATA_BASE$
+$ $SDATA.MISC_SIZE = SDATA.SIZE - (SHARED_SDATA.SIZE + ROSDATA.SIZE)$
+$ 
+$ $SDATA.SIZE_TO_ROSDATA = ROSDATA.BASE - SDATA_BASE$
+$ 
+$ $SDATA.SIZE_TO_SSHARED = SHARED_SDATA.BASE - SDATA_BASE$
+$ $SDATA.SIZE_TO_SSHARED = SDATA.SIZE_TO_SSHARED - ROSDATA.SIZE$
+$ 
+$ $IF LENGTH(SRPW_SDATA.SIZE)$
+$     $SDATA.MISC_SIZE = SDATA.MISC_SIZE - SRPW_SDATA.SIZE$
+$     $SDATA.SIZE_TO_SSRPW = SRPW_SDATA.BASE - SDATA_BASE$
+$     $SDATA.SIZE_TO_ROSDATA = SDATA.SIZE_TO_ROSDATA - SRPW_SDATA.SIZE$
+$     $SDATA.SIZE_TO_SSHARED = SDATA.SIZE_TO_SSHARED - SRPW_SDATA.SIZE$
+$ $END$
+$ $IF DEBUG_OPT_TF$
+$     $WARNING$
+$         $FORMAT("sdata_misc: size[0x%x]", SDATA.MISC_SIZE)$$NL$
+$     $END$
+$ $END$
+$ 
+$ $  
+$ $  dataã«é¢ãããµã¤ãºãæ±ãã
+$ $  
+$ $DATA.SIZE_TO_SHARED = SHARED_DATA.BASE - SDATA_LIMIT$
+$ 
+$ $IF LENGTH(SRPW_DATA.SIZE)$
+$     $DATA.SIZE_TO_SRPW = SRPW_DATA.BASE - SDATA_LIMIT$
+$     $DATA.SIZE_TO_SHARED = DATA.SIZE_TO_SHARED - SRPW_DATA.SIZE$
+$ $END$
+$ $IF DEBUG_OPT_TF$
+$     $WARNING$
+$         $FORMAT("sdata_misc: size[0x%x]", SDATA.MISC_SIZE)$$NL$
+$     $END$
+$ $END$
+$ 
+$ $ $ERROR$
+$ $     "implemented to here.\n"
+$ $ $END$
+$ $ $DIE()$
+$ 
+$ 
+$ $  
+$ $  é
+ç½®ã¢ãã¬ã¹ãæå®ããã»ã¯ã·ã§ã³ã«å¯¾ããå¦ç
+$ $  é
+ç½®æãå¯¾è±¡ã®ã»ã¯ã·ã§ã³: å¿
+ããããã©ãã
+$ $    srpw_data_all: 0
+$ $    srpw_sdata_all: 0
+$ $    rosdata_shared: 1
+$ $    sdata_shared: 1
+$ $    data_shared: 1
+$ $  
+$ $check_shared_mo = 0$
+$ $preid = -1$
+$ $limit_align_flag = 1$
+$ $FOREACH moid MO_START_LIST$
+$ $   // ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ããã¹2æç¹ã§ã®é ã«ãã§ãã¯
+$     $IF MO.LINKER[moid]$
+$         $IF DEBUG_OPT_TF$
+$             $WARNING$
+$                 $FORMAT("check mo %d: SEFLAG=0x%x", moid, MO.SEFLAG[moid])$$NL$
+$             $END$
+$         $END$
+$         $IF !LENGTH(SDATA.REALBASE) && ((MO.MEMATR[moid] & TA_SDATA) == TA_SDATA)$
+$ $       // ã·ã§ã¼ããã¼ã¿ã»ã¯ã·ã§ã³ã®å
+é ­
+$ $         $MO.REALBASE[moid] = SDATA_BASE + ROSDATA.SIZE$
+$             $MO.REALBASE[moid] = SHARED_DATA.REALBASE + SHARED_DATA.REALSIZE$
+$             $SDATA.REALBASE = MO.REALBASE[moid]$
+$ $         $IF LENGTH(SRPW_DATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_DATA.SIZE$
+$ $         $END$
+$ $         $IF LENGTH(SRPW_SDATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_SDATA.SIZE$
+$ $         $END$
+$             $MO.COMMENT[moid] = "sdata_top"$
+$             $SDATA.START_MO = moid$
+$             $MO.SEFLAG[moid] = MO.SEFLAG[moid] & ~0x400$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("sdata_top[%d]=0x%x", moid, SDATA.REALBASE)$$NL$
+$                 $END$
+$             $END$
+$         $END$
+$         $IF LENGTH(SRPW_SDATA.BASE) && (moid == SRPW_SDATA.BASE_MO)$
+$ $       // srpw_sdata_allã®å
+é ­
+$             $MO.REALBASE[moid] = SDATA.REALBASE + SDATA.MISC_SIZE + ROSDATA.SIZE$
+$ $         $MO.REALBASE[moid] = SDATA_BASE$
+$ $         $IF LENGTH(SRPW_DATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_DATA.SIZE$
+$ $         $END$
+$             $MO.COMMENT[moid] = "srpw_sdata_top"$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("srpw_sdata_top[%d]=0x%x", moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$         $END$
+$         $IF LENGTH(SRPW_SDATA.LIMIT_MO) && (preid == SRPW_SDATA.LIMIT_MO)
+$             && (moid != ROSDATA.BASE_MO)$
+$ $       // srpw_sdata_allã¨rosdataã®éã«ã¡ã¢ãªãªãã¸ã§ã¯ããããå ´å
+$             $MO.REALBASE[moid] = SDATA.REALBASE + SDATA.SIZE_TO_SSRPW$
+$ $         $IF LENGTH(SRPW_DATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_DATA.SIZE$
+$ $         $END$
+$             $MO.COMMENT[moid] = "srpw_sdata_limit"$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%s[%d]=0x%x", MO.COMMENT[moid], moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$         $END$
+$         $IF (moid == ROSDATA.BASE_MO)$
+$ $       // rosdataã®å
+é ­
+$             $MO.REALBASE[moid] = SDATA.REALBASE + SDATA.MISC_SIZE$
+$ $         $MO.REALBASE[moid] = SDATA_BASE$
+$ $         $IF LENGTH(SRPW_DATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_DATA.SIZE$
+$ $         $END$
+$ $         $IF LENGTH(SRPW_SDATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_SDATA.SIZE$
+$ $         $END$
+$             $MO.COMMENT[moid] = "rosdata_shared_top"$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%s[%d]=0x%x", MO.COMMENT[moid], moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$         $END$
+$ $     $IF (preid == ROSDATA.LIMIT_MO) && (preid != SDATA_LIMIT_MO)$
+$         $IF (preid == ROSDATA.LIMIT_MO) && (moid != SHARED_SDATA.BASE_MO)$
+$ $       // rosdataã¨sdata_sharedã®éã«sdataãããå ´å
+$             $MO.REALBASE[moid] = SDATA.REALBASE + SDATA.SIZE_TO_ROSDATA$
+$ $         $MO.REALBASE[moid] = MO.BASEADDR[moid]$
+$ $         $IF LENGTH(SRPW_DATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_DATA.SIZE$
+$ $         $END$
+$             $MO.COMMENT[moid] = "rosdata_shared_limit"$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%s[%d]=0x%x", MO.COMMENT[moid], moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$         $END$
+$         $IF (moid == SHARED_SDATA.BASE_MO)$
+$ $       // sdata_sharedã®å
+é ­
+$             $MO.REALBASE[moid] = SHARED_DATA.REALBASE + SHARED_DATA.SIZE$
+$             $MO.COMMENT[moid] = "sdata_shared_top"$
+$             $MO.SEFLAG[moid] = MO.SEFLAG[moid] | 0x400$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%s[%d]=0x%x", MO.COMMENT[moid], moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$         $END$
+$         $IF (preid == SHARED_SDATA.LIMIT_MO)$
+$ $       // sdata_sharedã®çµç«¯ã¯ãã¹ã¯ãã¼ã¹æ¹å¼ãªã®ã§ãµã¤ãºã®åæ°ã«ã¢ã©ã¤ã³
+$             $at_mo_order = FIND(MO_ORDER, preid)$
+$             $check_flag = 1$
+$             $WHILE check_flag$
+$                 $IF LENGTH(AT(MO_ORDER, at_mo_order))$
+$                     $IF DEBUG_OPT_TF$
+$                         $WARNING$
+$                             $FORMAT("check: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+$                         $END$
+$                     $END$
+$                     $IF (MO.SEFLAG[AT(MO_ORDER, at_mo_order)] & 0x20) == 0x20$
+$                         $IF DEBUG_OPT_TF$
+$                             $WARNING$
+$                                 $FORMAT("hit: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+$                             $END$
+$                         $END$
+$                         $MO.REALALIGN[AT(MO_ORDER, at_mo_order)] = SHARED_DATA.REALSIZE$
+$                         $check_flag = 0$
+$                     $END$
+$                 $ELSE$
+$                     $ERROR$
+$                         $FORMAT("shared sdata does not have limit label")$$NL$
+$                     $END$
+$                     $check_flag = 0$
+$                 $END$
+$                 $at_mo_order = at_mo_order + 1$
+$             $END$
+$             $IF (preid != SDATA_LIMIT_MO)$
+$ $           // sdata_sharedã®ä¸ã«sdataãããå ´å
+$                 $MO.REALBASE[moid] = SDATA.REALBASE + SDATA.SIZE_TO_SSHARED$
+$                 $MO.COMMENT[moid] = "sdata_shared_limit"$
+$             $END$
+$         $END$
+$         $IF (preid == SDATA_LIMIT_MO)$
+$ $       // sdataã®çµç«¯ã®å ´å
+$             $MO.REALBASE[moid] = SDATA.REALBASE + (SDATA.SIZE - SHARED_SDATA.SIZE)$
+$             $IF LENGTH(SRPW_DATA.SIZE)$
+$                 $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_DATA.SIZE$
+$             $END$
+$             $DATA.REALBASE = MO.REALBASE[moid]$
+$ $         $MO.REALBASE[moid] = SDATA_LIMIT + SHARED_DATA.SIZE$
+$ $         $IF LENGTH(SRPW_DATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_DATA.SIZE$
+$ $         $END$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%d: 0x%x, sdata_limit", moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$             $MO.COMMENT[moid] = "sdata_limit"$
+$             $DATA.START_MO = moid$
+$         $END$
+$         $IF LENGTH(SRPW_DATA.BASE_MO) && (moid == SRPW_DATA.BASE_MO)$
+$ $       // srpwã®å
+é ­ã®å ´å
+$             $MO.REALBASE[moid] = SDATA.REALBASE + (SDATA.SIZE - SHARED_SDATA.SIZE)$
+$ $         $MO.REALBASE[moid] = SDATA_BASE$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%d: 0x%x", moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$             $MO.COMMENT[moid] = "srpw_data_top"$
+$         $END$
+$         $IF LENGTH(SRPW_DATA.LIMIT_MO) && (preid == SRPW_DATA.LIMIT_MO)
+$             && (moid != SHARED_DATA.BASE_MO)$
+$ $       // srpw_data_allã¨data_sharedã®éã«dataãããå ´å
+$ $         $MO.REALBASE[moid] = MO.BASEADDR[moid] + SHARED_DATA.SIZE$
+$             $MO.REALBASE[moid] = DATA.REALBASE + DATA.SIZE_TO_SRPW$
+$             $MO.COMMENT[moid] = "srpw_data_limit"$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%s[%d]=0x%x", MO.COMMENT[moid], moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$         $END$
+$         $IF (moid == SHARED_DATA.BASE_MO)$
+$             $MO.REALBASE[moid] = SHARED_DATA.REALBASE$
+$ $         $MO.REALBASE[moid] = SDATA_LIMIT$
+$ $         $IF LENGTH(SRPW_DATA.SIZE)$
+$ $             $MO.REALBASE[moid] = MO.REALBASE[moid] + SRPW_DATA.SIZE$
+$ $         $END$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%d: 0x%x", moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$             $MO.COMMENT[moid] = "data_shared_top"$
+$         $END$
+$         $IF (preid == SHARED_DATA.LIMIT_MO)$
+$ $       // data_sharedã®ä¸ã«dataãããå ´å
+$             $MO.REALBASE[moid] = DATA.REALBASE + DATA.SIZE_TO_SHARED$
+$ $         $MO.REALBASE[moid] = MO.BASEADDR[moid]$
+$             $limit_align_flag = 0$
+$             $MO.COMMENT[moid] = "data_shared_limit"$
+$             $IF DEBUG_OPT_TF$
+$                 $WARNING$
+$                     $FORMAT("%d: 0x%x, not required dummy section", moid, MO.REALBASE[moid])$$NL$
+$                 $END$
+$             $END$
+$         $END$
+$     $END$
+$ 
+$     $preid = moid$
+$ $END$
+$ $IF limit_align_flag$
+$ $     $IF LENGTH(SRPW_DATA.LIMIT)$
+$ $         $REG.LIMIT_ALIGN[MO.MEMREG[moid]] = SRPW_DATA.LIMIT$
+$ $     $ELSE$
+$ $         $REG.LIMIT_ALIGN[MO.MEMREG[moid]] = SHARED_DATA.LIMIT$
+$ $     $END$
+$     $REG.LIMIT_ALIGN[STANDARD_RAM] = DATA.REALBASE + DATA.SIZE_TO_SHARED$
+$     $IF DEBUG_OPT_TF$
+$         $WARNING$
+$             $FORMAT("%s: 0x%x, required dummy section", REG.REGNAME[STANDARD_RAM], REG.LIMIT_ALIGN[STANDARD_RAM])$$NL$
+$         $END$
+$     $END$
+$ $END$
+
+$ 
+$  å
+±æãªã¼ãã©ã¤ãé å / å
+±æãªã¼ãå°æã©ã¤ãé åï¼sdataï¼ / rosdata_sharedé å
+$  ã®æ
+å ±åå¾
+$  
+$check_shared_mo = 0x00$
+$check_srpw_mo = 0x00$
+$check_rosdata_mo = 0x00$
+$check_sdata_mo = 0x00$
+$LIST_SHARED_MO = {}$
+$LIST_SRPW_MO = {}$
+$LIST_ROSDATA_MO = {}$
+$preid = -1$
+$FOREACH moid MO_START_LIST$
+$   // ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ããã¹2æç¹ã§ã®é ã«ãã§ãã¯
+    $IF LENGTH(FIND(MO_MPROTECT_LIST, moid))$
+$       // ã¡ã¢ãªä¿è­·åä½ã®å
+é ­ã®å ´å
+        $IF (MO.ACPTN1[moid] == TACP_SHARED) && (MO.ACPTN2[moid] == TACP_SHARED)$
+            $IF ((check_shared_mo & 0x10) != 0x10)$
+$               // å
+±æãªã¼ãã©ã¤ãé åã®å
+é ­ã®å ´å
+                $SHARED_AREA_BASE[check_shared_mo] = MO.BASEADDR[moid]$
+                $SHARED_AREA_MO[check_shared_mo] = moid$
+                $LIST_SHARED_MO = APPEND(LIST_SHARED_MO, check_shared_mo)$
+                $check_shared_mo = check_shared_mo | 0x10$
+            $END$
+        $ELIF (check_shared_mo & 0x10) == 0x10$
+$           // å
+±æãªã¼ãã©ã¤ãé åã®çµç«¯ã®å ´å
+            $IF preid == -1$
+                $ERROR$
+                    $FORMAT("unexpected preid.")$
+                $END$
+            $END$
+            $check_shared_mo = check_shared_mo & 0x0f$
+            $SHARED_AREA_LIMIT[check_shared_mo] = MO.LIMITADDR[preid]$
+            $SHARED_AREA_SIZE[check_shared_mo] = SHARED_AREA_LIMIT[check_shared_mo] - SHARED_AREA_BASE[check_shared_mo]$
+            $SHARED_AREA_LIMIT_MO[check_shared_mo] = preid$
+            $check_shared_mo = check_shared_mo + 1$
+        $END$
+
+    $END$
+
+    $preid = moid$
+$END$
+$IF (check_shared_mo & 0x10) == 0x10$
+    $IF preid == -1$
+        $ERROR$
+            $FORMAT("unexpected preid.")$
+        $END$
+    $END$
+    $check_shared_mo = check_shared_mo & 0x0f$
+    $SHARED_AREA_LIMIT[check_shared_mo] = MO.LIMITADDR[preid]$
+    $SHARED_AREA_LIMIT_MO[check_shared_mo] = preid$
+    $SHARED_AREA_SIZE[check_shared_mo] = SHARED_AREA_LIMIT[check_shared_mo] - SHARED_AREA_BASE[check_shared_mo]$
+    $check_shared_mo = check_shared_mo + 1$
+$END$
+$ 
+$  ã¨ã©ã¼ãã§ãã¯
+$  
+$FOREACH id LIST_SHARED_MO$
+    $IF DEBUG_OPT_TF$
+        $WARNING$
+            $id$$NL$
+            $SHARED_AREA_MO[id]$$NL$
+            $SHARED_AREA_LIMIT_MO[id]$$NL$
+            $FORMAT("0x%x", SHARED_AREA_BASE[id])$$NL$
+            $FORMAT("0x%x", SHARED_AREA_LIMIT[id])$$NL$
+            $FORMAT("0x%x", SHARED_AREA_SIZE[id])$$NL$
+        $END$
+    $END$
+    $IF ((MO.MEMATR[SHARED_AREA_MO[id]] & TA_SDATA) == TA_SDATA)$
+        $IF LENGTH(SHARED_DATA.BASE)$
+            $ERROR$
+                $FORMAT("unexpected mematr: %d, %x", id, MO.MEMATR[SHARED_AREA_MO[id]])$
+            $END$
+        $ELSE$
+            $SHARED_DATA.BASE = SHARED_AREA_BASE[id]$
+            $SHARED_DATA.LIMIT = SHARED_AREA_LIMIT[id]$
+            $SHARED_DATA.SIZE = SHARED_AREA_SIZE[id]$
+            $SHARED_DATA.BASE_MO = SHARED_AREA_MO[id]$
+            $SHARED_DATA.LIMIT_MO = SHARED_AREA_LIMIT_MO[id]$
+        $END$
+    $ELSE$
+        $ERROR$
+            $FORMAT("unexpected mematr: %d, %x", id, MO.MEMATR[SHARED_AREA_MO[id]])$
+        $END$
+    $END$
+$END$
+
+$ 
+$  data_sharedã®é
+ç½®ã¢ãã¬ã¹ãæ±ãã
+$ 
+$SHARED_DATA.REALSIZE = SEARCH_ARM_MPU_SIZE(SHARED_DATA.SIZE)$
+$SHARED_DATA.REALBASE = SEARCH_ARM_MPU_ALIGN(SHARED_DATA.BASE, SHARED_DATA.REALSIZE)$
+$IF DEBUG_OPT_TF$
+    $WARNING$
+        $FORMAT("data_shared: base[0x%x], size[0x%x]", SHARED_DATA.REALBASE, SHARED_DATA.REALSIZE)$$NL$
+    $END$
+$END$
+
+$  
+$  é
+ç½®ã¢ãã¬ã¹ãæå®ããã»ã¯ã·ã§ã³ã«å¯¾ããå¦ç
+$  é
+ç½®æãå¯¾è±¡ã®ã»ã¯ã·ã§ã³: å¿
+ããããã©ãã
+$    srpw_data_all: 0
+$    srpw_sdata_all: 0
+$    rosdata_shared: 1
+$    sdata_shared: 1
+$    data_shared: 1
+$  
+$check_shared_mo = 0$
+$preid = -1$
+$limit_align_flag = 1$
+$FOREACH moid MO_START_LIST$
+$   // ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ããã¹2æç¹ã§ã®é ã«ãã§ãã¯
+    $IF MO.LINKER[moid]$
+        $IF DEBUG_OPT_TF$
+            $WARNING$
+                $FORMAT("check mo %d: SEFLAG=0x%x", moid, MO.SEFLAG[moid])$$NL$
+            $END$
+        $END$
+        $IF (moid == SHARED_DATA.BASE_MO)$
+$           // data_sharedã®å
+é ­
+            $MO.REALBASE[moid] = SHARED_DATA.REALBASE$
+            $MO.COMMENT[moid] = "data_shared_top"$
+            $IF DEBUG_OPT_TF$
+                $WARNING$
+                    $FORMAT("%s[%d]=0x%x", MO.COMMENT[moid], moid, MO.REALBASE[moid])$$NL$
+                $END$
+            $END$
+        $END$
+        $IF (preid == SHARED_DATA.LIMIT_MO)$
+$           // data_sharedã®çµç«¯ã¯ãã¹ã¯ãã¼ã¹æ¹å¼ãªã®ã§ãµã¤ãºã®åæ°ã«ã¢ã©ã¤ã³
+            $at_mo_order = FIND(MO_ORDER, preid)$
+            $check_flag = 1$
+            $WHILE check_flag$
+                $IF LENGTH(AT(MO_ORDER, at_mo_order))$
+                    $IF DEBUG_OPT_TF$
+                        $WARNING$
+                            $FORMAT("check: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+                        $END$
+                    $END$
+                    $IF (MO.SEFLAG[AT(MO_ORDER, at_mo_order)] & 0x20) == 0x20$
+                        $IF DEBUG_OPT_TF$
+                            $WARNING$
+                                $FORMAT("hit: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+                            $END$
+                        $END$
+                        $MO.REALALIGN[AT(MO_ORDER, at_mo_order)] = SHARED_DATA.REALSIZE$
+                        $check_flag = 0$
+                    $END$
+                $ELSE$
+                    $ERROR$
+                        $FORMAT("shared data does not have limit label")$$NL$
+                    $END$
+                    $check_flag = 0$
+                $END$
+                $at_mo_order = at_mo_order + 1$
+            $END$
+        $END$
+    $END$
+
+    $preid = moid$
+$END$
+$IF (preid == SHARED_DATA.LIMIT_MO)$
+$   // data_sharedã®çµç«¯ã¯ãã¹ã¯ãã¼ã¹æ¹å¼ãªã®ã§ãµã¤ãºã®åæ°ã«ã¢ã©ã¤ã³
+    $at_mo_order = FIND(MO_ORDER, preid)$
+    $check_flag = 1$
+    $WHILE check_flag$
+        $IF LENGTH(AT(MO_ORDER, at_mo_order))$
+            $IF DEBUG_OPT_TF$
+                $WARNING$
+                    $FORMAT("check: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+                $END$
+            $END$
+            $IF (MO.SEFLAG[AT(MO_ORDER, at_mo_order)] & 0x20) == 0x20$
+                $IF DEBUG_OPT_TF$
+                    $WARNING$
+                        $FORMAT("hit: %d, 0x%x", AT(MO_ORDER, at_mo_order), +MO.SEFLAG[AT(MO_ORDER, at_mo_order)])$$NL$
+                    $END$
+                $END$
+                $MO.REALALIGN[AT(MO_ORDER, at_mo_order)] = SHARED_DATA.REALSIZE$
+                $check_flag = 0$
+            $END$
+        $ELSE$
+            $ERROR$
+                $FORMAT("shared data does not have limit label")$$NL$
+            $END$
+            $check_flag = 0$
+        $END$
+        $at_mo_order = at_mo_order + 1$
+    $END$
+$END$
+
+
+
+$ 
+$  arch/v850_ghs/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$FUNCTION GENERATE_PROVIDE$
+    provide(_hardware_init_hook = 0);$NL$
+    provide(_software_init_hook = 0);$NL$
+    provide(_software_term_hook = 0);$NL$
+    provide(_bsssecinib_table = 0);$NL$
+    provide(_tnum_bsssec = 0);$NL$
+    provide(_datasecinib_table = 0);$NL$
+    provide(_tnum_datasec = 0);$NL$
+    $NL$
+
+    $IF LENGTH(OSAP.ID_LIST)$
+        $FOREACH domid OSAP.ID_LIST$
+            $IF !OSAP.TRUSTED[domid]$
+$   RXé åï¼å°ç¨ï¼
+                provide(___start_text_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                provide(___limit_text_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+$   Ré åï¼å°ç¨ï¼
+                provide(___start_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+                provide(___limit_sram_$OSAP.LABEL[domid]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+$   RWXé åï¼å°ç¨ï¼
+                provide(___start_ram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                provide(___limit_ram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                provide(___start_sram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+                provide(___limit_sram_$OSAP.LABEL[domid]$ = 0xfffffff0);$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ã
+                provide($FORMAT("___start_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                provide($FORMAT("___limit_ram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                provide($FORMAT("___start_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+                provide($FORMAT("___limit_sram_%s_%x_%x", OSAP.LABEL[domid], +DEFAULT_ACPTN[domid], +TACP_SHARED)$ = 0xfffffff0);$NL$
+$                 provide($FORMAT("___start_ram_%s_srpw", OSAP.LABEL[domid])$ = 0xfffffff0);$NL$
+$                 provide($FORMAT("___limit_ram_%s_srpw", OSAP.LABEL[domid])$ = 0xfffffff0);$NL$
+$                 provide($FORMAT("___start_sram_%s_srpw", OSAP.LABEL[domid])$ = 0xfffffff0);$NL$
+$                 provide($FORMAT("___limit_sram_%s_srpw", OSAP.LABEL[domid])$ = 0xfffffff0);$NL$
+            $END$
+        $END$
+        $NL$
+    $END$$NL$
+
+$  å
+±æé å
+    provide(___start_text_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    provide(___limit_text_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    provide(___start_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+    provide(___limit_sram_$OSAP.LABEL[TDOM_NONE]$_$FORMAT("%x", MEMATR_ROSDATA & ~TA_MEMINI)$ = 0xfffffff0);$NL$
+    provide(___start_ram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    provide(___limit_ram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    provide(___start_sram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+    provide(___limit_sram_$OSAP.LABEL[TDOM_NONE]$ = 0xfffffff0);$NL$
+$   å
+±æãªã¼ãå°ç¨ã©ã¤ãé åå
+¨ä½
+    provide(___start_srpw_all = 0xfffffff0);$NL$
+    provide(___limit_srpw_all = 0xfffffff0);$NL$
+    provide(___start_ssrpw_all = 0xfffffff0);$NL$
+    provide(___limit_ssrpw_all = 0xfffffff0);$NL$
+    $NL$
+$END$
+
+
+$ $FUNCTION TARGET_PROVIDE_GP$
+$FUNCTION GENERATE_GP_LABEL$
+    $TAB$$TAB$__gp = . + 32K;$NL$
+$END$
+
+$TOPPERS_ATTMOD = TOPPERS_ATTSEC + 1$
+$TOPPERS_MPFAREA = TOPPERS_ATTSEC + 2$
+
+$INCLUDE "v850_ghs/ldscript.tf"$
+
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid]$
+$		// ã»ã¯ã·ã§ã³ã®éå§è¨è¿°ã®çæ
+		$IF (MO.SEFLAG[moid] & 0x01) != 0$
+$			// å
+±æãªã¼ãå°æã©ã¤ãé åã®å
+¨ä½ã®éå§çªå°
+            $IF (MO.SEFLAG[moid] & 0x100) != 0$
+$               // æåã«æ´æ°ãããå¤ãæå¹ã¨ãªã
+                $IF !LENGTH(SRPW.BASE)$
+                    $SRPW.BASE = MO.BASEADDR[moid]$
+                    $IF DEBUG_OPT_TF$
+                        $WARNING$
+                            $FORMAT("hit: %d, 0x%x", moid, +MO.SEFLAG[moid])$$NL$
+                        $END$
+                    $END$
+                $END$
+            $ELIF MO.ACPTN1[moid] == 0 && MO.ACPTN2[moid] == TACP_SHARED
+                && (MO.MEMATR[moid] & TA_SDATA) != 0$
+$               // æåã«æ´æ°ãããå¤ãæå¹ã¨ãªã
+                $IF !LENGTH(SRPW.BASE)$
+                    $SRPW.BASE = MO.BASEADDR[moid]$
+                $END$
+            $END$
+		$END$
+
+$	    // å
+±æãªã¼ãå°æã©ã¤ãé åã®å
+¨ä½ã®çµäºçªå°
+		$IF (MO.SEFLAG[moid] & 0x200) != 0$
+            $IF !LENGTH(SRPW.BASE)$
+                $ERROR$
+                    "start_srpw label is not found"
+                $END$
+            $END$
+$           // æå¾ã«æ´æ°ãããå¤ãæå¹ã¨ãªã
+$             $SRPW.LIMIT = MO.LIMITADDR[moid]$
+            $SRPW.LIMIT = LIMIT_SYMBOL(MO.MLABEL[moid])$
+            $IF DEBUG_OPT_TF$
+                $WARNING$
+                    $FORMAT("hit end: %d, 0x%x", moid, SRPW.LIMIT)$$NL$
+                $END$
+            $END$
+        $ELIF MO.ACPTN1[moid] == 0 && MO.ACPTN2[moid] == TACP_SHARED
+            && (MO.MEMATR[moid] & TA_SDATA) != 0$
+$           // æå¾ã«æ´æ°ãããå¤ãæå¹ã¨ãªã
+$            $SRPW.LIMIT = MO.LIMITADDR[moid]$
+            $SRPW.LIMIT = LIMIT_SYMBOL(MO.MLABEL[moid])$
+            $IF DEBUG_OPT_TF$
+                $WARNING$
+                    $FORMAT("hit end: %d, 0x%x", moid, SRPW.LIMIT)$$NL$
+                $END$
+            $END$
+		$END$
+
+	$END$
+$END$
+
+$IF DEBUG_OPT_TF$
+    $WARNING$
+        $FORMAT("srpw area: 0x%x, 0x%x", SRPW.BASE, SRPW.LIMIT)$$NL$
+    $END$
+$END$
+
+$ 
+$  å
+±æé åã®åæåãã­ãã¯ãçæ
+$ 
+$FILE "kernel_mem3.c"$
+
+$TNUM_SHARED_REGION = 3$
+const uint32 tnum_shared_mem = $TNUM_SHARED_REGION * 2$;$NL$
+uint8 * const shared_meminib_table[$TNUM_SHARED_REGION * 2$] = {$NL$
+$shared_info = SYMBOL("shared_meminib_table")$
+$   RXé åï¼å
+±æï¼
+$start_label = PEEK(shared_info, 4)$
+$limit_label = PEEK(shared_info + 4, 4)$
+$TAB$((uint8 *)&__start_text_$OSAP.LABEL[TDOM_NONE]$),$TAB$/* iregion 2 */$NL$
+$TAB$((uint8 *)&__limit_text_$OSAP.LABEL[TDOM_NONE]$),$TAB$/* iregion 2 */$NL$
+$     $TAB$$FORMAT("( (uint8 *)0x%x )", start_label)$,$TAB$/* iregion 2 : $FORMAT("0x%x", start_label)$ */$NL$
+$     $TAB$$FORMAT("( (uint8 *)0x%x )", limit_label)$,$TAB$/* iregion 2 : $FORMAT("0x%x", limit_label)$ */$NL$
+
+$   RXé åï¼å
+±æã·ã§ã¼ããã¼ã¿ï¼å
+±æãªã¼ãå°æã©ã¤ãã®å
+¨ä½ï¼
+$   rosdata_shared
+$   srpw_data_all
+$start_label = PEEK(shared_info + 8, 4)$
+$limit_label = PEEK(shared_info + 12, 4)$
+$IF LENGTH(SRPW.BASE) && LENGTH(SRPW.LIMIT)$
+    $TAB$((uint8 *)$FORMAT("0x%x", SRPW.BASE)$),$TAB$/* iregion 3 */$NL$
+    $TAB$((uint8 *)$FORMAT("0x%x", SRPW.LIMIT)$),$TAB$/* iregion 3 */$NL$
+$ELSE$
+    $TAB$((uint8 *)NULL),$TAB$/* iregion 3 */$NL$
+    $TAB$((uint8 *)NULL),$TAB$/* iregion 3 */$NL$
+$END$
+
+$   RWXé åï¼å
+±æã·ã§ã¼ããã¼ã¿ï¼å
+±æãã¼ã¿ï¼
+$   //sdata_sharedã®å
+é ­ããdata_sharedã®çµç«¯ï¼dataã®å
+é ­ï¼ã¾ã§
+$   data_sharedã®å
+é ­ããsdata_sharedã®çµç«¯ï¼dataã®å
+é ­ï¼ã¾ã§
+$start_label = PEEK(shared_info + 16, 4)$
+$limit_label = PEEK(shared_info + 20, 4)$
+$     $start_label = SHARED_SDATA.BASE$
+$     $IF LENGTH(SRPW_DATA.SIZE)$
+$         $start_label = start_label + SRPW_DATA.SIZE$
+$     $END$
+$     $limit_label = MO.REALBASE[DATA.START_MO]$
+$start_label = SHARED_DATA.REALBASE$
+$limit_label = (SHARED_DATA.REALSIZE - 1) & ~0x0f$
+$TAB$$FORMAT("( (uint8 *)0x%x )", start_label)$,$TAB$/* dregion 5 : $FORMAT("0x%x", start_label)$ */$NL$
+$TAB$$FORMAT("( (uint8 *)0x%x )", limit_label)$,$TAB$/* dregion 5 : $FORMAT("0x%x", limit_label)$ */$NL$
+
+};$NL$
+$NL$
+
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_svc.h	(revision 172)
@@ -0,0 +1,106 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+
+#ifndef TOPPERS_PRC_SVC_H
+#define TOPPERS_PRC_SVC_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef sint32 FunctionCodeType;                  /* æ©è½ã³ã¼ãã®å */
+
+extern int cal_svc_0m(int fncd) __attribute__((section(".text_shared")));
+extern int cal_svc_1m(int par1, int fncd) __attribute__((section(".text_shared")));
+extern int cal_svc_2m(int par1, int par2, int fncd) __attribute__((section(".text_shared")));
+extern int cal_svc_3m(int par1, int par2, int par3, int fncd) __attribute__((section(".text_shared")));
+
+extern void cal_svc_0n(int fncd) __attribute__((section(".text_shared")));
+extern void cal_svc_1n(int par1, int fncd) __attribute__((section(".text_shared")));
+extern void cal_svc_2n(int par1, int par2, int fncd) __attribute__((section(".text_shared")));
+extern void cal_svc_3n(int par1, int par2, int par3, int fncd) __attribute__((section(".text_shared")));
+
+#define CAL_SVC_0M(TYPE, FNCD) cal_svc_0m((int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_1M(TYPE, FNCD, TYPE1, PAR1) \
+cal_svc_1m((int)((TYPE1)PAR1), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_2M(TYPE, FNCD, TYPE1, PAR1, TYPE2, PAR2) \
+cal_svc_2m((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_3M(TYPE, FNCD, TYPE1, PAR1, \
+							TYPE2, PAR2, TYPE3, PAR3) \
+cal_svc_3m((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((TYPE3)PAR3), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_0N(TYPE, FNCD) cal_svc_0n((int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_1N(TYPE, FNCD, TYPE1, PAR1) \
+cal_svc_1n((int)((TYPE1)PAR1), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_2N(TYPE, FNCD, TYPE1, PAR1, TYPE2, PAR2) \
+cal_svc_2n((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((FunctionCodeType)FNCD))
+
+#define CAL_SVC_3N(TYPE, FNCD, TYPE1, PAR1, \
+							TYPE2, PAR2, TYPE3, PAR3) \
+cal_svc_3n((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((TYPE3)PAR3), (int)((FunctionCodeType)FNCD))
+
+#ifndef TOPPERS_SVC_CALL
+#include "ghs/tool_svc.h"
+#endif /* TOPPERS_SVC_CALL */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_TARGET_SVC_H */
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_tool.S
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_tool.S	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_tool.S	(revision 172)
@@ -0,0 +1,215 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼  
+ *
+ *  $Id: prc_tool.S 183 2015-06-24 08:19:10Z t_ishikawa $  
+ */
+
+/*
+ *  V850ç¨cal_svcå®è£
+
+ *  GHSã«ãããã¤ã³ã©ã¤ã³ã¢ã»ã³ãã©ã§ã¯ï¼ç ´å£ã¬ã¸ã¹ã¿ã®æå®ã
+ *  ä¿è¨¼ãããªãããï¼ç´æ¥ã¢ã»ã³ããªã§è¨è¿°ãã
+ */
+#include <v850asm.inc>
+#include "offset.h"
+
+#ifdef USE_ASMCONFIG_INC
+#include "asm_config.inc"
+#endif /* USE_ASMCONFIG_INC */
+
+    .section .text_kernel
+    .align 4
+/*
+ *  ã¡ã¢ãªåèª­è¾¼ãå¿
+è¦ãªãã¨ãã³ã³ãã¤ã©ã«ä¼ããããã®ããã¼é¢æ°
+ */
+    .globl _v850_memory_changed
+    /* 
+     *  void v850_memory_changed(void)
+     */
+FLABEL(_v850_memory_changed)
+    jmp lp
+    nop
+
+    .globl _v850_sync_memory
+    /* 
+     *  void v850_sync_memory(void)
+     */
+FLABEL(_v850_sync_memory)
+    syncm
+    jmp lp
+    nop
+
+/*
+ *  ãµã¼ãã¹ã³ã¼ã«ã®åºå
+¥å£
+ *    r10 : è¿ãå¤
+ *    r11ï¼é¢æ°ã³ã¼ã
+ *    r6 - r9 : å¼æ°ï¼4ã¤ã¾ã§ï¼
+ *    ã¹ã¯ã©ããã¬ã¸ã¹ã¿ä¿å­ï¼é¢æ°å¼åºãã«ããããã§ã¯ä¿å­æ¸ã¿ï¼
+ *    lpä¿å­
+ */
+    .section .text_shared
+    .align 4
+    .globl _cal_svc_0m
+    /* 
+     * extern int cal_svc_0m(int fncd)
+     *   __attribute__((section(".text_shared")));
+     */
+FLABEL(_cal_svc_0m)
+    mov r6, r11
+    pushsp ep-lp
+    syscall 1
+    nop
+    popsp ep-lp
+    jmp [lp]
+    nop
+
+    .globl _cal_svc_1m
+    /* 
+     * extern int cal_svc_1m(int par1, int fncd)
+     *   __attribute__((section(".text_shared")));
+     */
+FLABEL(_cal_svc_1m)
+    mov r7, r11
+    pushsp ep-lp
+    syscall 1
+    nop
+    popsp ep-lp
+    jmp [lp]
+    nop
+
+    .globl _cal_svc_2m
+    /* 
+     * extern int cal_svc_2m(int par1, int par2, int fncd)
+     *   __attribute__((section(".text_shared")));
+     */
+FLABEL(_cal_svc_2m)
+    mov r8, r11
+    pushsp ep-lp
+    syscall 1
+    nop
+    popsp ep-lp
+    jmp [lp]
+    nop
+
+    .globl _cal_svc_3m
+    /* 
+     * extern int cal_svc_3m(int par1, int par2, int par3, int fncd)
+     *   __attribute__((section(".text_shared")));
+     */
+FLABEL(_cal_svc_3m)
+    mov r9, r11
+    pushsp ep-lp
+    syscall 1
+    nop
+    popsp ep-lp
+    jmp [lp]
+    nop
+
+    .globl _cal_svc_0n
+    /* 
+     * extern void cal_svc_0n(int fncd)
+     *   __attribute__((section(".text_shared")));
+     */
+FLABEL(_cal_svc_0n)
+    mov r6, r11
+    pushsp ep-lp
+    syscall 1
+    nop
+    popsp ep-lp
+    jmp [lp]
+    nop
+
+    .globl _cal_svc_1n
+    /* 
+     * extern void cal_svc_1n(int par1, int fncd)
+     *   __attribute__((section(".text_shared")));
+     */
+FLABEL(_cal_svc_1n)
+    mov r7, r11
+    pushsp ep-lp
+    syscall 1
+    nop
+    popsp ep-lp
+    jmp [lp]
+    nop
+
+    .globl _cal_svc_2n
+    /* 
+     * extern void cal_svc_2n(int par1, int par2, int fncd)
+     *   __attribute__((section(".text_shared")));
+     */
+FLABEL(_cal_svc_2n)
+    mov r8, r11
+    pushsp ep-lp
+    syscall 1
+    nop
+    popsp ep-lp
+    jmp [lp]
+    nop
+
+    .globl _cal_svc_3n
+    /* 
+     * extern void cal_svc_3n(int par1, int par2, int par3, int fncd)
+     *   __attribute__((section(".text_shared")));
+     */
+FLABEL(_cal_svc_3n)
+    mov r9, r11
+    pushsp ep-lp
+    syscall 1
+    nop
+    popsp ep-lp
+    jmp [lp]
+    nop
+
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/prc_user.txt	(revision 172)
@@ -0,0 +1,87 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼V850E2ãã­ã»ããµä¾å­é¨ããã¥ã¢ã«(GHSç)ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯V850E2ãã­ã»ããµä¾å­é¨ã®GHSçæ
+å ±ãè¨è¿°ãããã®ã§ã
+ãï¼GCCçã¨åæ§ã®ç®æã¯èª¬æãçãã¦ããï¼
+
+
+âæ¦è¦
+
+V850ãã­ã»ããµä¾å­é¨ï¼ä»¥ä¸ï¼V850ä¾å­é¨ï¼ã¯ï¼ã«ããµã¹ã¨ã¬ã¯ãã­ãã¯ã¹ã®
+V850E2M/V850E2Sã³ã¢(V850E2v3ã¢ã¼ã­ãã¯ãã£)ã¾ãã¯ï¼G3M/G3Kã³ã¢
+(V850E3V5ã¢ã¼ã­ãã¯ãã£)ãç¨ããLSIããµãã¼ããã¦ããï¼
+
+ç¾ç¶ãµãã¼ããã¦ããLSIã¯ï¼æ¬¡ã«2ç¨®é¡ã§ããï¼V850ãã­ã»ããµä¾å­é¨ã§ã¯ï¼
+ãã­ã»ããµã¨å²ãè¾¼ã¿ã³ã³ãã­ã¼ã©ã®ã¿ãä½¿ç¨ããããï¼ä»ã®
+V850E2M/V850E2Sã³ã¢ãããã¯G3M/G3Kã³ã¢ãç¨ããLSIã¸ã®ãã¼ãã£ã³ã°ã¯å®¹
+æã§ããï¼
+
+ ã»V850E2/Fx4
+ ã»RH850/F1L
+ ã»RH850/F1H
+
+
+âéçºç°å¢
+
+ã«ã¼ãã«ã®ã³ã³ãã¤ã«ã¯ï¼GHS ãç¨ãã¦ããï¼åä½ç¢ºèªãè¡ãªã£ããã¼ã¸ã§ã³
+ã¯ä»¥ä¸ã®ãã®ã§ããï¼
+
+ ã»2013.5.5
+
+ãããã¬ã¯ï¼CS+ãä½¿ç¨ãã¦åä½ç¢ºèªããã¦ããï¼åä½ç¢ºèªããããã¼ã¸ã§ã³
+ã¯æ¬¡ã®éãã§ããï¼
+
+ ã»CS+ V3.00.00
+ 
+âå¨è¾ºåè·¯
+
+GCCçã¨åæ§ï¼
+
+
+âTAUnå²è¾¼ã¿ãã³ãã©(in taua_timer.c)
+
+GCCçã¨åæ§ï¼
+
+
+âå²è¾¼ã¿åªå
+åº¦
+
+GCCçã¨åæ§ï¼
+
+
+âå²è¾¼ã¿å±æ§
+
+GCCçã¨åæ§ï¼
+
+
+âæªç»é²ã®å²è¾¼ã¿
+
+GCCçã¨åæ§ï¼
+
+
+âC1ISRã®æ±ã
+
+GCCçã¨åæ§ï¼
+
+                
+âCPUä¾å¤è¦å æ
+å ±åå¾
+
+GCCçã¨åæ§ï¼
+
+
+âå¶éäºé 
+
+
+GCCçã§ãã«ãã®æå¾ã«è¡ãã¢ãã¬ã¹ã®æ´åæ§ãã§ãã¯ã¯æ­£ããåä½ããªãã
+ãï¼å®æ½ããªãï¼
+
+epç¸å¯¾ã§ã¢ã¯ã»ã¹ããtinyãã¼ã¿ã»ã¯ã·ã§ã³ã¯ãµãã¼ãããªãï¼
+    
+âãã¼ã¸ã§ã³å±¥æ­´
+2015/06/26
+ã»SC3å¯¾å¿
+        
+ä»¥ä¸ï¼
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1h_6m_pe1only.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1h_6m_pe1only.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1h_6m_pe1only.ld	(revision 172)
@@ -0,0 +1,111 @@
+/*
+ *	RH850/F1L-2Mãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 4M
+	INTROMPE2    : org = 0x00800000, len = 2M
+	INTRAM(wax)  : org = 0xFEBD0000, len = 192k
+}
+
+SECTIONS
+{
+    provide(_hardware_init_hook = 0);
+    provide(_software_init_hook = 0);
+    provide(software_term_hook = 0);
+
+    /* =begin modified for SC3 */
+    provide(_bsssecinib_table = 0);
+    provide(_tnum_bsssec = 0);
+    provide(_datasecinib_table = 0);
+    provide(_tnum_datasec = 0);
+    /* =end modified for SC3 */
+
+    .CODEFLASH   0x00000000 :
+	.text :  AT(0)
+	{
+		__text = . ;
+		*(.reset.text)
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+
+	. = ALIGN(4);
+	.rosdata : { *(.rosdata) } > INTROM
+
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(8);
+	} > INTRAM
+
+	.sdabase  : AT(__idata_start + SIZEOF(.data))
+	.sdata    : AT(__idata_start + SIZEOF(.data))
+	{
+		*(.sdata)
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data) + SIZEOF(.sdata);
+
+	.sbss                  :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+		*(.sbss)
+	} > INTRAM
+
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+
+	.pe2_rom :
+	{
+	  *(.non_use_pe_rom)
+	} > INTROMPE2
+
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1h_6m_pe2only.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1h_6m_pe2only.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1h_6m_pe2only.ld	(revision 172)
@@ -0,0 +1,111 @@
+/*
+ *	RH850/F1L-2Mãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00800000, len = 2M
+	INTROMPE1    : org = 0x00000000, len = 4M
+	INTRAM(wax)  : org = 0xFE9D0000, len = 192k
+}
+
+SECTIONS
+{
+    provide(_hardware_init_hook = 0);
+    provide(_software_init_hook = 0);
+    provide(software_term_hook = 0);
+
+    /* =begin modified for SC3 */
+    provide(_bsssecinib_table = 0);
+    provide(_tnum_bsssec = 0);
+    provide(_datasecinib_table = 0);
+    provide(_tnum_datasec = 0);
+    /* =end modified for SC3 */
+
+    .CODEFLASH   0x00000000 :
+	.text :
+	{
+		__text = . ;
+		*(.reset.text)
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+
+	. = ALIGN(4);
+	.rosdata : { *(.rosdata) } > INTROM
+
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(8);
+	} > INTRAM
+
+	.sdabase  : AT(__idata_start + SIZEOF(.data))
+	.sdata    : AT(__idata_start + SIZEOF(.data))
+	{
+		*(.sdata)
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data) + SIZEOF(.sdata);
+
+	.sbss                  :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+		*(.sbss)
+	} > INTRAM
+
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+
+	.pe1_rom :
+	{
+	  *(.non_use_pe_rom)
+	} > INTROMPE1
+
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1l_1m.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1l_1m.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1l_1m.ld	(revision 172)
@@ -0,0 +1,104 @@
+/*
+ *	RH850/F1L-1Mãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 1M
+	INTRAM(wax)  : org = 0xFEDE8000, len = 96k
+}
+
+SECTIONS
+{
+    provide(_hardware_init_hook = 0);
+    provide(_software_init_hook = 0);
+    provide(_software_term_hook = 0);
+
+    provide(_bsssecinib_table = 0);
+    provide(_tnum_bsssec = 0);
+    provide(_datasecinib_table = 0);
+    provide(_tnum_datasec = 0);
+
+    .CODEFLASH   0x00000000 :
+	.text :  AT(0)
+	{
+		__text = . ;
+		*(.reset.text)
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+
+	. = ALIGN(4);
+	.rosdata : { *(.rosdata) } > INTROM
+
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(8);
+	} > INTRAM
+
+	.sdabase  : AT(__idata_start + SIZEOF(.data))
+	.sdata    : AT(__idata_start + SIZEOF(.data))
+	{
+		*(.sdata)
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data) + SIZEOF(.sdata);
+
+	.sbss                  :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+		*(.sbss)
+	} > INTRAM
+
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1l_2m.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1l_2m.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/rh850_f1l_2m.ld	(revision 172)
@@ -0,0 +1,104 @@
+/*
+ *	RH850/F1L-2Mãªã³ã«ã¹ã¯ãªãã
+ */
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 2M
+	INTRAM(wax)  : org = 0xFEDE0000, len = 128k
+}
+
+SECTIONS
+{
+    provide(_hardware_init_hook = 0);
+    provide(_software_init_hook = 0);
+    provide(_software_term_hook = 0);
+
+    provide(_bsssecinib_table = 0);
+    provide(_tnum_bsssec = 0);
+    provide(_datasecinib_table = 0);
+    provide(_tnum_datasec = 0);
+
+    .CODEFLASH   0x00000000 :
+	.text :  AT(0)
+	{
+		__text = . ;
+		*(.reset.text)
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+
+	. = ALIGN(4);
+	.rosdata : { *(.rosdata) } > INTROM
+
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(8);
+	} > INTRAM
+
+	.sdabase  : AT(__idata_start + SIZEOF(.data))
+	.sdata    : AT(__idata_start + SIZEOF(.data))
+	{
+		*(.sdata)
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data) + SIZEOF(.sdata);
+
+	.sbss                  :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+		*(.sbss)
+	} > INTRAM
+
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850asm.inc
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850asm.inc	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850asm.inc	(revision 172)
@@ -0,0 +1,189 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: v850asm.inc 151 2015-01-19 11:41:16Z t_ishikawa $  
+ */
+
+/*
+ *  V850ã¢ã»ã³ãã©ç¨å®ç¾©ãã¡ã¤ã«
+ */
+#define TOPPERS_MACRO_ONLY
+#define UINT_C(val)			(val)		/* ç¬¦å·ç¡ãæ´æ°åã®å®æ°ãä½ããã¯ã­ */
+#define CAST(type, val)		(val)		/* åã­ã£ã¹ããè¡ããã¯ã­ */
+
+#include "kernel_impl.h"
+
+/*
+ * ã¢ã»ã³ãã©ãã¯ã­å
+ã§ã®å¼æ°ã®åç
+§
+ */
+#define AMARG(name)  name
+
+	/*
+	 * ã©ãã«ã­ã¼ã Lea (Load Effective Address)
+	 */
+
+	.macro	Lea name, destination
+	mov	name, destination
+	.endm
+
+	/*
+	 * ã©ãã«å®£è¨ Flabel
+	 *
+	 *   é¢æ°åã¨ãã¦ä½¿ãã©ãã«å²ä»ãè¡ã
+	 */
+	.macro	Flabel name
+	.type	name,@function
+name:
+	.endm
+
+#define FLABEL(name) Flabel name
+
+	/*
+	 * ã¹ã¿ãã¯æä½ - ããã·ã¥
+	 */
+	
+	.macro	Push source
+	add	-4, sp
+	st.w	source, 0[sp]
+	.endm
+	
+	/*
+	 * ã¹ã¿ãã¯æä½ - ããã
+	 */
+	
+	.macro	Pop dest
+	ld.w	0[sp],dest
+	add	4, sp
+	.endm
+
+	/*
+	 * å²ãè¾¼ã¿ç¦æ­¢
+	 */
+	.macro	X_LOCK_ALL_INT reg1 reg2
+	ld.w	PMR, reg1
+	ld.w	0xffff, reg2
+	and		reg2,reg1
+	st.w	reg2
+	.endm
+
+/*
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢ãã¯ã­
+ */
+.macro LOCK_ALL_INT
+    di
+.endm
+
+/*
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ãã¯ã­
+ */
+.macro UNLOCK_ALL_INT
+    ei
+.endm
+
+/*
+ *  V850E2M ã·ã¹ãã ã¬ã¸ã¹ã¿
+ */
+ 
+#define scbp	12
+#define sccfg	11
+#define vmtid	 5
+#define vmadr	 6
+
+#define ipa0l	 6
+#define ipa0u	 7
+#define ipa1l	 8
+#define ipa1u	 9
+#define ipa2l	10
+#define ipa2u	11
+#define ipa3l	12
+#define ipa3u	13
+#define ipa4l	14
+#define ipa4u	15
+
+#define dpa0l	16
+#define dpa0u	17
+#define dpa1l	18
+#define dpa1u	19
+#define dpa2l	20
+#define dpa2u	21
+#define dpa3l	22
+#define dpa3u	23
+#define dpa4l	24
+#define dpa4u	25
+#define dpa5l	26
+#define dpa5u	27
+
+#define mca		24
+#define mcs		25
+#define mcc		26
+#define mcr		27
+
+#define mpm		 0
+
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850e2_fl4_2m.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850e2_fl4_2m.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850e2_fl4_2m.ld	(revision 172)
@@ -0,0 +1,125 @@
+/*
+
+ *	V850E2/FX4-4012ãªã³ã«ã¹ã¯ãªãã
+ */
+
+DEFAULTS {
+   heap_reserve = 8K
+}
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 2M
+	INTRAM(wax)  : org = 0xFEDDC000, len = 144k
+}
+
+SECTIONS
+{
+    provide(_hardware_init_hook = 0);
+    provide(_software_init_hook = 0);
+    provide(_software_term_hook = 0);
+    provide(_hardware_term_hook = 0);
+    provide(_bsssecinib_table = 0);
+    provide(_tnum_bsssec = 0);
+    provide(_datasecinib_table = 0);
+    provide(_tnum_datasec = 0);
+    provide(_StartupHook = 0);
+    provide(_ShutdownHook = 0);
+    provide(_PreTaskHook = 0);
+    provide(_PostTaskHook = 0);
+    provide(_ErrorHook = 0);
+    provide(_ProtectionHook = 0);
+
+    .CODEFLASH   0x00000000 :
+	.vector : AT(0)
+	{
+		*(.vector)
+	} > INTROM
+	.text :	
+	{
+		__text = . ;
+		__tp = . ;
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+
+	. = ALIGN(4);
+	.rosdata : { *(.rosdata) } > INTROM
+
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+    .syscall			                            : > INTROM
+    .secinfo						    : > INTROM
+    .fixaddr						    : > INTROM
+    .fixtype						    : > INTROM
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(8);
+	} > INTRAM
+
+	.sdabase  : AT(__idata_start + SIZEOF(.data))
+	.sdata    : AT(__idata_start + SIZEOF(.data))
+	{
+		*(.sdata)
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data) + SIZEOF(.sdata);
+
+	.sbss                  :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+		*(.sbss)
+	} > INTRAM
+
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+	
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+    .heap    ALIGN(8) PAD(heap_reserve)   : > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }	
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850e2_px4_3507.ld
===================================================================
--- /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850e2_px4_3507.ld	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/arch/v850_ghs/v850e2_px4_3507.ld	(revision 172)
@@ -0,0 +1,123 @@
+/*
+ *	V850E2/PX4-3507ãªã³ã«ã¹ã¯ãªãã
+ */
+
+DEFAULTS {
+   heap_reserve = 8K
+}
+
+MEMORY
+{
+	INTROM(raxi) : org = 0x00000000, len = 512K
+	INTRAM(wax)  : org = 0xFEDF6000, len = 40k
+}
+
+SECTIONS
+{
+    provide(_hardware_init_hook = 0);
+    provide(_software_init_hook = 0);
+    provide(_software_term_hook = 0);
+    provide(_hardware_term_hook = 0);
+    provide(_bsssecinib_table = 0);
+    provide(_tnum_bsssec = 0);
+    provide(_datasecinib_table = 0);
+    provide(_tnum_datasec = 0);
+    provide(_StartupHook = 0);
+    provide(_ShutdownHook = 0);
+    provide(_PreTaskHook = 0);
+    provide(_PostTaskHook = 0);
+    provide(_ErrorHook = 0);
+    provide(_ProtectionHook = 0);
+
+    .CODEFLASH   0x00000000 :
+	.vector : AT(0)
+	{
+		*(.vector)
+	} > INTROM
+	.text :	
+	{
+		__text = . ;
+		__tp = . ;
+		*(.text)
+		_etext = . ;
+	} > INTROM
+
+	.call_table_data ALIGN (4) :
+	{
+	PROVIDE(__ctbp = .);
+	*(.call_table_data)
+	} > INTROM
+	
+	.call_table_text :
+	{
+	*(.call_table_text)
+	} > INTROM
+
+	. = ALIGN(4);
+	.rosdata : { *(.rosdata) } > INTROM
+
+	. = ALIGN(4);
+	.rodata : { *(.rodata) } > INTROM
+
+	_textend = .;
+    .syscall						    : > INTROM
+    .secinfo						    : > INTROM
+    .fixaddr						    : > INTROM
+    .fixtype						    : > INTROM
+	. = ALIGN(4);
+	__idata_start = . ;
+
+	.data	:  AT(__idata_start) 
+	{
+		. = ALIGN(4);
+		__data_start = . ;
+		*(.data)
+		. = ALIGN(8);
+	} > INTRAM
+
+	.sdabase  : AT(__idata_start + SIZEOF(.data))
+	.sdata    : AT(__idata_start + SIZEOF(.data))
+	{
+		*(.sdata)
+		_edata	=  . ;
+	} > INTRAM
+
+	__idata_end = __idata_start + SIZEOF(.data) + SIZEOF(.sdata);
+
+	.sbss                  :
+	{
+	  . = ALIGN(4);
+	  __bss_start = .;
+		*(.sbss)
+	} > INTRAM
+
+	.bss	   :
+	{
+	  . = ALIGN(4);
+	  *(.bss)
+	  *(COMMON)
+	  . = ALIGN(4);
+	  __bss_end = .;
+	} > INTRAM
+	
+	.tdata ALIGN (4) :
+	{
+		PROVIDE (__ep = .);
+		*(.tbyte)
+		*(.tcommon_byte)
+		*(.tdata)
+		*(.tbss)
+		*(.tcommon)
+	} > INTRAM
+    .heap    ALIGN(8) PAD(heap_reserve)   : > INTRAM
+	
+	.comment 0 : { *(.comment) }	
+	.debug			0 : { *(.debug) }
+	.line			0 : { *(.line) }
+	.debug_srcinfo	0 : { *(.debug_srcinfo) }
+	.debug_sfnames	0 : { *(.debug_sfnames) }
+	.debug_aranges	0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }	
+}
+/* provide a pointer for the stack */
+ 
Index: /atk2-sc3-1.4.0-ntisr/configure
===================================================================
--- /atk2-sc3-1.4.0-ntisr/configure	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/configure	(revision 172)
@@ -0,0 +1,329 @@
+#! /usr/bin/perl
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2001-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2011-2013 by Spansion LLC, USA
+#  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2011-2015 by Witz Corporation
+#  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+#  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+#  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: configure 425 2015-12-07 08:06:19Z witz-itoyo $
+#
+
+use Getopt::Std;
+
+#  ãªãã·ã§ã³ã®å®ç¾©
+#
+#  -T <target>			ã¿ã¼ã²ããåï¼å¿
+é ï¼
+#  -A <applname>		ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã åï¼ããã©ã«ãã¯sample1ï¼
+#  -C <cfgname>			ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«åï¼ããã©ã«ãã¯sample1ï¼
+#						ï¼çç¥ããå ´åï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«åãã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã åã¨ãªãï¼
+#						ï¼æ¡å¼µå­ãé¤ãã¦æå®ï¼è¤æ°æå®å¯ï¼
+#  -h					ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãç¡å¹ã«ãããã©ããã®æå®ï¼ããã©ã«ãã¯æå¹ï¼
+#  -a <appldir>			ã¢ããªã±ã¼ã·ã§ã³ã®ãã£ã¬ã¯ããªå
+#  -U <applobjs>		ä»ã®ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ãã¡ã¤ã«
+#						ï¼.oãã¡ã¤ã«åã§æå®ï¼è¤æ°æå®å¯ï¼
+#  -L <kernel_lib>		ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#						ï¼çç¥ããå ´åï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeããï¼
+#  -f					ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®æå®
+#  -D <srcdir>			ã«ã¼ãã«ç­ã®ã½ã¼ã¹ã®ç½®ããã¦ãããã£ã¬ã¯ããª
+#  -l <srclang>			ãã­ã°ã©ãã³ã°è¨èªï¼ç¾æç¹ã§ã¯cã¨c++ã®ã¿ãµãã¼ãï¼
+#  -t <templatedir>		ãã³ãã¬ã¼ããã£ã¬ã¯ããªã®æå®ï¼ããã©ã«ãã¯sampleï¼
+#  -m <makefile>		ãã³ãã¬ã¼ãMakefileåã®æå®ï¼ããã©ã«ãã¯Makefileï¼
+#  -d <dbgenv>			å®è¡ç°å¢ã®åç§°
+#  -r					ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ããä½¿ç¨ãããã©ãã
+#						ã®æå®
+#  -s					ã·ã¹ãã ã¿ã¤ããä½¿ç¨ãããã©ããã®æå®
+#  -S					ã·ãªã¢ã«éä¿¡ãæå¹åãããã©ããã®æå®
+#  -p <perl>			perlã®ãã¹åï¼æç¤ºçã«æå®ããå ´åï¼
+#  -g <cfg>				ã¸ã§ãã¬ã¼ã¿ï¼cfgï¼ã®ãã¹å
+#  -o <options>			å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ï¼COPTSã«è¿½å ï¼
+#  -O <options>			å
+±éã·ã³ãã«å®ç¾©ãªãã·ã§ã³ï¼CDEFSã«è¿½å ï¼
+#  -k <options>			å
+±éãªã³ã«ãªãã·ã§ã³ï¼LDFLAGSã«è¿½å ï¼
+
+#  ä½¿ç¨ä¾(1)
+#
+#  % ../configure -T dve68k_gcc -D GDB_STUB -A perf1 -a ../test -U histogram.o
+#
+#  ä½¿ç¨ä¾(2)
+#
+#  % ../configure -T macosx_gcc -L .
+#	ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã¯ sample1 ã«ãªãï¼
+
+#
+#  ãªãã·ã§ã³ã®å¦ç
+#
+getopt("TACaULDltmdpgoOk");
+
+#
+#  å¤æ°ã®åæå
+#
+
+$target = $opt_T;
+$applname = $opt_A ? $opt_A : "sample1";
+$cfgname = $opt_C ? $opt_C : $applname;
+$omit_hw_counter = $opt_h ? "true" : "";
+$appldir = $opt_a ? $opt_a : "";
+$applobjs = $opt_U ? $opt_U : "";
+$kernel_lib = $opt_L ? $opt_L : "";
+$kernel_funcobjs = $opt_f ? "true" : "";
+$srclang = $opt_l ? $opt_l : "c";
+$makefile = $opt_m ? $opt_m : "Makefile";
+$dbgenv = $opt_d ? "TOPPERS_".$opt_d : "";
+$enable_trace = $opt_r ? "true" : "";
+$enable_sys_timer = $opt_s ? "true" : "";
+$copts = $opt_o ? $opt_o : "";
+$cdefs = $opt_O ? $opt_O : "";
+$ldflags = $opt_k ? $opt_k : "";
+$enable_serial = $opt_S ? $opt_S : !($opt_A || $opt_C);
+$cfg_serial = $enable_serial ? "CFGNAME := \$(CFGNAME) target_serial" : "";
+
+if ($applname eq "sample1") {
+	$applobjs .= " sample2.o"
+}
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ãè¿ã
+#
+sub get_objext {
+	if ($^O eq 'cygwin') {
+		return("exe");
+	}
+	else {
+		return("");
+	}
+}
+
+#
+#  ãã­ã°ã©ã ã®å ´æãæ¤ç´¢ãã
+#
+sub get_path {
+	my($progname, @pathlist) = @_;
+	my($path);
+
+	foreach $path (@pathlist) {
+		if (-x $path."/".$progname) {
+			return($path."/".$progname);
+		}
+	}
+	return("");
+}
+
+#
+#  ãã¡ã¤ã«ãå¤æãã
+#
+sub convert {
+	my($infile, $outfile) = @_;
+	my($line);
+
+	print STDERR "configure: Generating $outfile from $infile.\n";
+	if (-f $outfile) {
+		print STDERR "configure: $outfile exists.",
+						"  Save as $outfile.bak.\n";
+		rename($outfile, $outfile.".bak");
+	}
+	unless (open(INFILE, $infile)) {
+		print STDERR "configure: can't open $infile\n";
+		exit(1);
+	}
+	unless (open(OUTFILE, "> ".$outfile)) {
+		print STDERR "configure: can't open $outfile\n";
+		exit(1);
+	}
+
+	while ($line = <INFILE>) {
+		chop $line;
+		while ($line =~ /^(.*)\@\(([A-Za-z_]+)\)(.*)$/) {
+			$line = $1.$vartable{$2}.$3;
+		}
+		print OUTFILE $line,"\n";
+	}
+
+	close(INFILE);
+	close(OUTFILE);
+}
+
+#
+#  ãµã³ãã«ãè¦ã¤ãã¦ãã¡ã¤ã«ãçæãã
+#
+sub generate {
+	my($file, $mandatory) = @_;
+	my($path);
+
+	$path = $templatedir."/".$file.".".$target;
+	if (-f $path) {
+		convert($path, $file);
+		return;
+	}
+
+	$path = $templatedir."/".$file;
+	if ($mandatory || -f $path) {
+		convert($path, $file);
+	}
+}
+
+#
+#  ã½ã¼ã¹ãã£ã¬ã¯ããªåãåãåºã
+#
+$pwd = `pwd`; chop $pwd;
+if ($opt_D) {
+	$srcabsdir = $srcdir = $opt_D;
+}
+elsif ($0 =~ /(.*)\/configure/) {
+	$srcdir = $1;
+	if ($srcdir =~ /^\//) {
+		$srcabsdir = $srcdir;
+	}
+	else {
+		$srcabsdir = $pwd."/".$srcdir;
+	}
+}
+else {
+	$srcabsdir = $srcdir = $pwd;
+}
+
+$perl = $opt_p ? $opt_p : get_path("perl", ("/usr/local/bin", "/usr/bin"));
+$cfg_path = "/cfg/cfg/cfg";
+$cfg = $opt_g ? $opt_g : "\$(SRCDIR)".$cfg_path;
+$cfgfile = $opt_g ? $opt_g : $srcdir.$cfg_path;
+$templatedir = $opt_t ? $opt_t : $srcdir."/sample";
+
+#
+#  -Tãªãã·ã§ã³ã®ç¢ºèª
+#
+unless ($opt_T) {
+	print STDERR "configure: -T option is mandatory\n";
+	print STDERR "Installed targets are:\n";
+	foreach $targetname (<$srcdir/target/[a-zA-Z0-9]*>) {
+		$targetname =~ s|$srcdir/target/||;
+		print STDERR "\t$targetname\n";
+	}
+	exit(1);
+}
+
+#
+#  å¤æ°ãã¼ãã«ã®ä½æ
+#
+%vartable = ();
+$vartable{"TARGET"} = $target;
+$vartable{"APPLNAME"} = $applname;
+$vartable{"CFGNAME"} = $cfgname;
+$vartable{"OMIT_HW_COUNTER"} = $omit_hw_counter;
+$vartable{"APPLDIR"} = $appldir;
+$vartable{"APPLOBJS"} = $applobjs;
+$vartable{"KERNEL_LIB"} = $kernel_lib;
+$vartable{"KERNEL_FUNCOBJS"} = $kernel_funcobjs;
+$vartable{"SRCDIR"} = $srcdir;
+$vartable{"SRCABSDIR"} = $srcabsdir;
+$vartable{"SRCLANG"} = $srclang;
+$vartable{"DBGENV"} = $dbgenv;
+$vartable{"ENABLE_TRACE"} = $enable_trace;
+$vartable{"ENABLE_SYS_TIMER"} = $enable_sys_timer;
+$vartable{"CFG_SERIAL"} = $cfg_serial;
+$vartable{"PERL"} = $perl;
+$vartable{"CFG"} = $cfg;
+$objext = get_objext();
+$vartable{"OBJEXT"} = $objext;
+$vartable{"COPTS"} = $copts;
+$vartable{"CDEFS"} = $cdefs;
+$vartable{"LDFLAGS"} = $ldflags;
+
+#
+#  ã¿ã¼ã²ãããã£ã¬ã¯ããªã®ãã§ãã¯
+#
+
+if (! -d $srcdir."/target/".$target) {
+	print STDERR "configure: $srcdir/target/$target not exist\n";
+	exit(1);
+}
+
+#
+#  Makefile ã¨ã¢ããªã±ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+
+generate($makefile, 1);
+generate($applname.".c", 0);
+generate($applname.".cpp", 0);
+generate($applname.".h", 0);
+generate($cfgname.".arxml", 0);
+if ($applname eq "sample1") {
+	generate("sample.h", 0);
+	generate("sample2.h", 0);
+	generate("sample2.c", 0);
+	generate("Rte_Type.h", 0);
+}
+
+#
+#  cfg ãã§ãã¦ãããã®ãã§ãã¯
+#
+
+if (!(-x ($objext eq "" ? $cfgfile : $cfgfile.".".$objext))) {
+	print STDERR "Executable file of the configurator (cfg) is not found.\n";
+}
Index: /atk2-sc3-1.4.0-ntisr/doc/ntisr_design_memo.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/doc/ntisr_design_memo.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/doc/ntisr_design_memo.txt	(revision 172)
@@ -0,0 +1,832 @@
+
+        ATK2 éä¿¡é ¼ISRå¯¾å¿ è¨­è¨ã¡ã¢ =CONFIDENTIAL=
+		å¯¾å¿ãã¼ã¸ã§ã³: Release 1.4.1
+		æçµæ´æ°: 2016å¹´3æ4æ¥
+
+Copyright (C) 2016 by Center for Embedded Computing Systems
+          Graduate School of Information Science, Nagoya Univ\., JAPAN
+
+$Id: ntisr_design_memo.txt 250 2016-03-17 01:54:59Z t_ishikawa $
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ATK2ã«ããã¦ï¼éä¿¡é ¼ISRããµãã¼ãããããã®
+è¨­è¨ã¡ã¢ã§ããï¼ä½æéä¸­ã®ãã®ã§ããï¼ç¶²ç¾
+çã§ã¯ãªãï¼
+
+======================================================================
+â¯ ç¨èªã®å®ç¾©ããã³è¡¨è¨ã«ã¼ã«
+======================================================================
+
+ã»æ±ç¨ã¬ã¸ã¹ã¿ï¼ãã­ã»ããµã®æã¤ã¬ã¸ã¹ã¿ã§ï¼å®è¡ä¸­å¦çåä½ã®ã³ã³ãã­ã¹ãã
+ãç®¡çããããã«å¿
+è¦ãªãã®ãã¹ã¦
+ã»spï¼ãã­ã»ããµã®æã¤ã¹ã¿ãã¯ãã¤ã³ã¿ã¬ã¸ã¹ã¿
+ã»pcï¼ãã­ã»ããµã®æã¤ãã­ã°ã©ã ã«ã¦ã³ã¿ã¬ã¸ã¹ã¿
+ã»ã·ã¼ã±ã³ã¹ä¸­ã«ãã "xxx<label>:"ã¨ããè¨è¿°ã¯ï¼Cè¨èªãã¢ã»ã³ããªè¨èªã®
+ãã©ãã«ã«ç¸å½ãã
+ã»ã·ã¼ã±ã³ã¹ä¸­ã«ãã "xxx()"ã¨ããè¨è¿°ã¯ï¼Cè¨èªãã¢ã»ã³ããªè¨èªã®
+ãé¢æ°å¼åºãã«ç¸å½ãã
+ã»ã·ã¼ã±ã³ã¹ä¸­ã«ãã "<<xxx>>"ã¨ããè¨è¿°ã¯ï¼ç¹å®ã®SC/MC/TPã«ã®ã¿å­å¨ãã
+ããã¨ãè¡¨ã
+
+======================================================================
+â¯ å¤§åæ
+======================================================================
+
+ã»ç¹æ¨©ã¢ã¼ãå®è¡æã«ä¿è­·éåãçºçããã¨ï¼ç¡è¦ãOSã·ã£ãããã¦ã³ããã§ããªã
+ã»p_runtskã¯ï¼dispatcherã®ã¿ã§æ´æ°ããã
+
+======================================================================
+â¯ ã³ã³ãã­ã¹ããã¨ã«ä½¿ç¨ããã¹ã¿ãã¯
+======================================================================
+TASK<<MC/TPä»¥å¤>>	æ¡å¼µã¿ã¹ã¯ï¼åå¥ã®ã¦ã¼ã¶ã¹ã¿ãã¯&ã·ã¹ãã ã¹ã¿ãã¯
+                    åºæ¬ã¿ã¹ã¯ï¼åªå
+åº¦æ¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯&ã·ã¹ãã ã¹ã¿ãã¯
+TASK<<MC>>          æ¡å¼µã¿ã¹ã¯ï¼åå¥ã®ã¦ã¼ã¶ã¹ã¿ãã¯&ã·ã¹ãã ã¹ã¿ãã¯
+                    åºæ¬ã¿ã¹ã¯ï¼ã³ã¢æ¯ãã¤åªå
+åº¦æ¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯&ã·ã¹ãã 
+                                ã¹ã¿ãã¯
+TASK<<TP>>          æ¡å¼µã¿ã¹ã¯ï¼åå¥ã®ã¦ã¼ã¶ã¹ã¿ãã¯&ã·ã¹ãã ã¹ã¿ãã¯
+                    åºæ¬ã¿ã¹ã¯ï¼ã¦ã£ã³ãã¦æ¯ãã¤åªå
+åº¦æ¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯&
+                                ã·ã¹ãã ã¹ã¿ãã¯
+C2ISR<<MC/TPä»¥å¤>>		åªå
+åº¦æ¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯&ã·ã¹ãã ã¹ã¿ãã¯
+C2ISR<<MC>>		        ã³ã¢æ¯ãã¤åªå
+åº¦æ¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯&ã·ã¹ãã ã¹ã¿ãã¯
+C2ISR<<TP>>		        ã¦ã£ã³ãã¦æ¯ãã¤åªå
+åº¦æ¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯&ã·ã¹ãã ã¹ã¿ãã¯
+C1ISR           OSç®¡çå¤	
+ããã¯ã«ã¼ãã³	OSã¹ã¿ãã¯
+ã¢ã¤ãã«ã«ã¼ã	OSã¹ã¿ãã¯	â»ã¿ã¹ã¯ãå­å¨ããªãconfigãèæ
+®
+OSå²è¾¼ã¿        OSã¹ã¿ãã¯
+mainé¢æ°        OSã¹ã¿ãã¯
+
+â ããã¯ã«ã¼ãã³(1)âC1ISRâããã¯ã«ã¼ãã³(2)ã¨ãã¹ãããå ´åï¼ãã¤ï¼
+   C1ISRãç¬èªã®ã¹ã¿ãã¯ãä½¿ç¨ãã¦ããå ´åï¼ããã¯ã«ã¼ãã³(1)ã®ä½¿ç¨ãã
+   ç¶ãããã¹ã¿ãã¯ãä½¿ç¨ããå¿
+è¦ããããï¼ããã¨ãC1ISRã§çºçãã
+   ããã¯ã«ã¼ãã³ã§ã¯ï¼ãã®ã¨ãã®ã¹ã¿ãã¯(C1ISRã®ã¹ã¿ãã¯)ããã®ã¾ã¾
+   ä½¿ç¨ããã°ãããï¼
+			
+======================================================================
+â¯ ã³ã³ãã­ã¹ãã¨ãã¦ä¿å­ãã¹ãæ
+å ±			
+======================================================================
+	æ±ç¨ã¬ã¸ã¹ã¿		
+	å²è¾¼ã¿åªå
+åº¦ãã¹ã¯	ISRã®å¼·å¶çµäºã«åãã	
+	callevel		
+	pc		
+	ã¦ã¼ã¶ã¹ã¿ãã¯sp		
+	ã·ã¹ãã ã¹ã¿ãã¯sp		
+
+======================================================================
+â¯ ã³ã³ãã­ã¹ãåæ¿å¦çã®è¨­è¨
+======================================================================
+
+======================================================================
+â start_dispatch
+ æ¦è¦: 
+    ã»StartOSçµäºå¾ã«å¦çåä½ãèµ·åãã
+ ã³ã³ãã­ã¹ãåæ¿: 
+    ã»mainé¢æ° â ã¿ã¹ã¯
+    ã»mainé¢æ° â ã¢ã¤ãã«ã«ã¼ã
+ åæ:
+    ã»å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+    ã»saved_ostkpt == NULL
+ ã·ã¼ã±ã³ã¹:
+    sp = _ostkpt
+    OSå²è¾¼ã¿ç¦æ­¢
+    å
+¨å²è¾¼ã¿ç¦æ­¢ãè§£é¤
+    dispatcher_0()
+    
+======================================================================
+â dispatch
+ æ¦è¦: 
+    ã»ã¿ã¹ã¯ã³ã³ãã­ã¹ãããAPIãå¼ã³åºãï¼ãã®ä¸­ã§ã¿ã¹ã¯åæ¿ã
+    ãçºçãã
+ ã³ã³ãã­ã¹ãåæ¿: 
+    ã»ã¿ã¹ã¯ â ã¿ã¹ã¯
+ åæ:
+    ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+    ã»sp == å¼åºãå
+ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯
+    ã»å¼åºãå
+ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã¯ï¼ã·ã¹ãã ãµã¼ãã¹
+    ãã®å
+¥ãå£ã§ä¿å­æ¸ã¿
+    ã»å¼åºãå
+ã¿ã¹ã¯ã®caller-savedã¬ã¸ã¹ã¿ã¯ï¼dispatchå¼åºãæã«
+    ãå¼åºãå
+ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ã«ä¿å­æ¸ã¿
+    ã»callevel == TCL_TASK | TSYS_NULL
+    ã»å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+
+    ã»ãã£ã¹ãããä¿çç¶æ
+ã§ãªãï¼TPã§ã®OSAPéãªã½ã¼ã¹åå¾ç¶æ
+ã§ãªãï¼
+ ã·ã¼ã±ã³ã¹:
+    callee-savedã¬ã¸ã¹ã¿ãå¼åºãå
+ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ã«ä¿å­
+    spãå¼åºãå
+ã¿ã¹ã¯ã®TCB.spã«ä¿å­
+    dispatch_rãå¼åºãå
+ã¿ã¹ã¯ã®TCB.pcã«ä¿å­
+    å®è¡ä¸­ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ã®ã¢ãã¿ãªã³ã°
+     4-1. ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯
+     4-2. ãã¸ãã¯ãã³ãã¼ãã§ãã¯
+    dispatcher()
+ 
+======================================================================
+â dispatch_r
+ æ¦è¦: 
+    ã»APIå¼åºã(dispatchå¼åºã)ã§ããªã¨ã³ãããããã¿ã¹ã¯ã³ã³ãã­ã¹ã
+    ãã®å¾©å¸°
+ ã³ã³ãã­ã¹ãåæ¿: 
+    ã»ã¿ã¹ã¯ â ã¿ã¹ã¯
+ åæ:
+    ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+    ã»sp == å¼åºãå
+ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯
+    ã»å¼åºãå
+ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã¯ï¼ã·ã¹ãã ãµã¼ãã¹
+    ãã®åºå£ã§å¾©å¸°ããã
+    ã»å¼åºãå
+ã¿ã¹ã¯ã®caller-savedã¬ã¸ã¹ã¿ã¯ï¼dispatch_rããã®ãªã¿ã¼ã³
+      æã«å¼åºãå
+ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ããå¾©å¸°ããã
+    ã»callevel == TCL_TASK | TSYS_NULL
+    ã»å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+
+    ã»ãã£ã¹ãããä¿çç¶æ
+ã§ãªãï¼TPã§ã®OSAPéãªã½ã¼ã¹åå¾ç¶æ
+ã§ãªãï¼
+ ã·ã¼ã±ã³ã¹:
+    callee-savedã¬ã¸ã¹ã¿ãå¼åºãå
+ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ããå¾©å¸°
+    return;
+
+======================================================================
+â C2ISRåºå
+¥ãå£
+ æ¦è¦(a): 
+    ã»å²è¾¼ã¿çºçã«ä¼´ãã³ã³ãã­ã¹ãåæ¿ããã³C2ISRã®èµ·å
+ æ¦è¦(b): 
+    ã»ISRçµäºã«ä¼´ãã³ã³ãã­ã¹ãåæ¿
+    ã»ãã®æç¹ã§ã¯å®è¡ä¸­ã¿ã¹ã¯ã®åæ¿ã¯ã¾ã çºçããªã
+ æ¦è¦(c): 
+    ã»ISRä¸­ã«çããã¿ã¹ã¯åæ¿è¦æ±ã«ä¼´ãé
+å»¶ã¿ã¹ã¯ãã£ã¹ããã
+ æ¦è¦(d): 
+    ã»é
+å»¶ã¿ã¹ã¯ãã£ã¹ãããããã¿ã¹ã¯ã³ã³ãã­ã¹ãã®å¾©å¸°
+ ã³ã³ãã­ã¹ãåæ¿(a): 
+    ã»ã¿ã¹ã¯ â C2ISR
+    ã»C2ISR â C2ISR
+    ã»ã¢ã¤ãã« â C2ISR
+ ã³ã³ãã­ã¹ãåæ¿(b): 
+    ã»C2ISR â ã¿ã¹ã¯ï¼éå¸¸çµäºï¼
+    ã»C2ISR â C2ISRï¼éå¸¸çµäºï¼
+    ã»C2ISR â ã¢ã¤ãã«ï¼éå¸¸çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â C2ISRï¼C2ISRå¼·å¶çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â ã¿ã¹ã¯ï¼C2ISRå¼·å¶çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â ã¢ã¤ãã«ï¼C2ISRå¼·å¶çµäºï¼
+ ã³ã³ãã­ã¹ãåæ¿(c): 
+    ã»ã¿ã¹ã¯ â ã¿ã¹ã¯
+ ã³ã³ãã­ã¹ãåæ¿(d): 
+    ã»ã¿ã¹ã¯ â ã¿ã¹ã¯
+ åæ:
+    ã»callevel == TCL_NULL || TCL_TASK || TCL_ISR2 | TSYS_NULL
+ ã·ã¼ã±ã³ã¹:
+    ------------------------------ ãããã(a) ------------------------------
+    å°ãªãã¨ãOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+    if (å²è¾¼ã¿çºçæã«ã¦ã¼ã¶ã¢ã¼ã) :
+        if (p_runisr != NULL) : // C2ISRã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+            p_runisr->usp = sp;       // ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­
+            sp = p_runisr->p_isrinib->sstk_bottom; // ã·ã¹ãã ã¹ã¿ãã¯ã«åæ¿ã
+        else :  // ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+            p_runtsk->usp = sp;       // ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­
+            sp = p_runtsk->p_tinib->sstk_bottom; // ã·ã¹ãã ã¹ã¿ãã¯ã«åæ¿ã
+    /*
+     *  ãã®æç¹ã§ï¼spã¯ä»¥ä¸ã®ãããããæãã¦ãã
+     *  - ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯
+     *  - ISRã®ã·ã¹ãã ã¹ã¿ãã¯
+     *  - OSã¹ã¿ãã¯ï¼ã¢ã¤ãã«ã«ã¼ãã®ã³ã³ãã­ã¹ãï¼
+     */
+    ãã¹ã¦ã®æ±ç¨ã¬ã¸ã¹ã¿ãspã«ä¿å­
+    å²è¾¼ã¿çºçæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãspã«ä¿å­
+    å²è¾¼ã¿çºçæã®callevelãspã«ä¿å­
+    /* ãã®æç¹ã§ã®spãæãã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+    /* å²è¾¼ã¿çºçæã®å¦çåä½ã®ããªã¨ã³ãã */
+    if (p_runisr != NULL) : // ISRã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+        p_runisr->ssp = sp
+        queue_insert_next(&isr_ready_queue, p_runisr)
+    else if (p_runtsk != NULL) : // ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+        p_runtsk->ssp = sp
+    else : // ã¢ã¤ãã«ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+        saved_ostkpt = sp
+    /* çºçããå²è¾¼ã¿ã®ISRãèµ·å */
+    callevel |= TCL_ISR2
+    p_runisr = &isrcb_table[çºçããå²è¾¼ã¿ã«å¯¾å¿ããISR ID]
+    p_runosap = p_runisr->p_isrinib->p_osapcb
+    run_trusted = p_runosap->p_osapinib->osap_trusted
+    if (run_trusted) : // èµ·åããISRãä¿¡é ¼
+        sp = p_runisr->p_isrinib->sstk_bottom
+        OSå²è¾¼ã¿ç¦æ­¢ãè§£é¤ãã
+        å²è¾¼ã¿ãã³ãã©ã¸ã¸ã£ã³ã
+    else : // èµ·åããISRãéä¿¡é ¼
+        p_runisrã«å¯¾å¿ããMPUè¨­å®ã¨ãªãããã«æºå
+        sp = p_runisr->p_isrinib->ustk_bottomã¨ãªãããã«æºå
+        æ»ãçªå°ãexit_uisrã¨ãªãããã«æºå
+        OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã¨ãªãããã«æºåãã
+        éç¹æ¨©ã¢ã¼ãã¨ãªãããã«æºå
+        å²è¾¼ã¿ãã³ãã©ã¸ã¸ã£ã³ããï¼MPUï¼spï¼æ»ãçªå°ï¼éç¹æ¨©ã¢ã¼ãè¨­å®ãåæ 
+    ------------------------------ ããã¾ã§(a) ------------------------------
+    ------------------------------ ãããã(b) ------------------------------
+    /* å²è¾¼ã¿ãã³ãã©çµäºå¾ã«ï¼ç¹æ¨©ã¢ã¼ãã§ããã«æ¥ã */
+    âTODO syscallãéä¿¡é ¼ã¿ã¹ã¯ãå¼ãã å ´åãèæ
+®ãã¹ãï¼p_runisrãNULLã§ãªã
+    ãã¨ããã§ãã¯ããã°ããï¼ï¼[protection_hookãå¼ã¶ï¼]
+    end_int_handler<label>:
+    å°ãªãã¨ãOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+    /* å²è¾¼ã¿ãã³ãã©çµäºæã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã° */
+    exit_isr2() // ISRã®ä¸æ­£çµäºãã§ãã¯
+    /* å®è¡ä¸­ã®å²è¾¼ã¿ãã³ãã©ãå¼·å¶çµäºãããå ´åã«ï¼ç¹æ¨©ã¢ã¼ãã§ããã«æ¥ã */
+    exit_and_dispatch_isr<label>:
+    p_runisr = NULL
+    if (!queue_empty(&isr_ready_queue)) : // ããªã¨ã³ãããããISRããã
+        p_runisr = queue_delete_next(&isr_ready_queue)
+        p_runosap = p_runisr->p_isrinib->p_osapcb
+        run_trusted = p_runosap->p_osapinib->osap_trusted
+        p_runisrã«å¯¾å¿ããMPUè¨­å®ã¨ãªãããã«æºå
+        sp = p_runisr->ssp
+    else if (p_runtsk != NULL) : // ããªã¨ã³ãããããã¿ã¹ã¯ããã
+        p_runosap = p_runtsk->p_tskinib->p_osapcb
+        run_trusted = p_runosap->p_osapinib->osap_trusted
+        p_runtskã«å¯¾å¿ããMPUè¨­å®ã¨ãªãããã«æºå
+        sp = p_runtsk->ssp
+    else : // ããªã¨ã³ãããããå¦çåä½ããªãï¼ã¢ã¤ãã«ã«æ»ãï¼
+        sp = saved_ostkpt
+    å²è¾¼ã¿çºçæã®callevelãspããå¾©å¸°
+    å²è¾¼ã¿çºçæã®å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãspããå¾©å¸°
+    OSå²è¾¼ã¿ç¦æ­¢ãã©ã°ããªã»ãã
+    if (ã¿ã¹ã¯ã³ã³ãã­ã¹ãã«æ»ãå ´å) :
+        /* 
+         * ã¢ã¤ãã«âISRâã¿ã¹ã¯ã®å ´åã¯ï¼ä¸æ¦ã¢ã¤ãã«ã«æ»ã£ã¦ãã
+         * ãã£ã¹ãããããã®ã§ããã«ã¯ããªã
+         */
+        ret_int_task()
+    ãã¹ã¦ã®æ±ç¨ã¬ã¸ã¹ã¿ãspããå¾©å¸°
+    if (å²è¾¼ã¿çºçæã«ã¦ã¼ã¶ã¢ã¼ã) :
+        if (p_runisr != NULL) : // C2ISRã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+            sp = p_runisr->usp;       // ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®å¾©å¸°
+        else :  // ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+            sp = p_runtsk->usp;       // ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®å¾©å¸°
+     å²è¾¼ã¿ãããªã¿ã¼ã³
+    ------------------------------ ããã¾ã§(b) ------------------------------
+    ------------------------------ ãããã(c) ------------------------------
+    ret_int_task<label>:
+    if ((p_runtsk != p_schedtsk) && ãã£ã¹ãããä¿çç¶æ
+ã§ãªã<<TP>>):
+        OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+
+        å
+¨å²è¾¼ã¿ç¦æ­¢ãè§£é¤
+        /* æ±ç¨ã¬ã¸ã¹ã¿ã¯(a)ã§ä¿å­æ¸ã¿ */
+        p_runtsk->ssp = sp
+        p_runtsk->pc = ret_int_r
+        dispatcher()
+    ------------------------------ ããã¾ã§(c) ------------------------------
+    ------------------------------ ãããã(d) ------------------------------
+    ret_int_r<label>:
+        å²è¾¼ã¿ã®åºå£å¦çã¨åãå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+    return;
+    /* returnå¾ã¯ï¼(b)ã¨åæ§ã®ã·ã¼ã±ã³ã¹ã§æ±ç¨ã¬ã¸ã¹ã¿ãå¾©å¸°ãã */
+    ------------------------------ ããã¾ã§(d) ------------------------------
+
+======================================================================
+â dispatcher
+ æ¦è¦: 
+    ã»ã¿ã¹ã¯åæ¿ãå®è¡ãã
+ ã³ã³ãã­ã¹ãåæ¿: 
+    ã»ã¿ã¹ã¯ â ã¿ã¹ã¯
+ åæ:
+    ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+    ã»sp == å¼åºãå
+ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯
+    ã»å¼åºãå
+ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã¯ï¼ã·ã¹ãã ãµã¼ãã¹
+    ãã®å
+¥ãå£ or å²è¾¼ã¿çºçæã«ä¿å­æ¸ã¿
+    ã»å¼åºãå
+ã¿ã¹ã¯ã®ã¬ã¸ã¹ã¿ã¯ï¼dispatch or å²è¾¼ã¿çºçæã«ä¿å­æ¸ã¿
+    ã»callevel == TCL_TASK | TSYS_NULL || TSYS_DISALLINT
+    ã»å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+
+    ã»ãã£ã¹ãããä¿çç¶æ
+ã§ãªãï¼TPã§ã®OSAPéãªã½ã¼ã¹åå¾ç¶æ
+ã§ãªãï¼
+ ã·ã¼ã±ã³ã¹:
+    stack_change_and_call_func(call_posttaskhook)
+    exit_and_dispatch_nohook<label>:
+    dispatcher_0<label>:
+    /*å
+¨å²è¾¼ã¿ç¦æ­¢(TSYS_DISALLINT)è§£é¤*/
+    callevel ~= TSYS_DISALLINT â callevel = TCL_TASKã§ããã®ã§ã¯ï¼â
+    å
+¨å²è¾¼ã¿ç¦æ­¢ãè§£é¤
+    dispatcher_1<label>:
+    p_runtsk = p_schedtsk
+    if (p_runtsk == NULL) :
+        /*ã¢ã¤ãã«*/
+        sp = _ostkpt
+        OSå²è¾¼ã¿ç¦æ­¢ãè§£é¤
+        /* ããã§å²è¾¼ã¿ãåãä»ãã */
+        /* ã¹ãªã¼ãã¢ã¼ãã«ãããªã© */
+        OSå²è¾¼ã¿ç¦æ­¢
+        dispatcher_1()
+    p_runosap = p_runtsk->p_tskinib->p_osapcb
+    run_trusted = p_runosap->p_osapinib->osap_trusted
+    p_runtskã«å¯¾å¿ããMPUè¨­å®ã¨ãªãããã«æºå
+    sp = p_runtsk->sp
+    stack_change_and_call_func(call_pretaskhook)
+    pc = p_runtsk->pc
+
+======================================================================
+â stack_change_and_call_func(func, arg1, arg2, ...)
+ æ¦è¦: 
+    ã»ããã¯ã«ã¼ãã³å¼åºãã®åºå
+¥å£
+        ã»call_pretaskhook
+        ã»call_posttaskhook
+        ã»call_errorhook
+        ã»call_protectionhk_main
+ ã³ã³ãã­ã¹ãåæ¿(a): 
+    ã»ã¿ã¹ã¯ â ããã¯ã«ã¼ãã³
+    ã»ISR â ããã¯ã«ã¼ãã³
+    ã»ããã¯ã«ã¼ãã³ â ããã¯ã«ã¼ãã³
+ ã³ã³ãã­ã¹ãåæ¿(b): 
+    ã»ããã¯ã«ã¼ãã³ â ã¿ã¹ã¯ï¼éå¸¸çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â ISRï¼éå¸¸çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â ããã¯ã«ã¼ãã³ï¼éå¸¸çµäºï¼
+ ã³ã³ãã­ã¹ãåæ¿(c): 
+    ã»ããã¯ã«ã¼ãã³ â ã¿ã¹ã¯ï¼ã¿ã¹ã¯/C2ISRå¼·å¶çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â C2ISRï¼C2ISRå¼·å¶çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â ã¢ã¤ãã«ï¼ã¿ã¹ã¯/C2ISRå¼·å¶çµäºï¼
+ åæ:
+    ã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+    ã»sp == å¼åºãå
+ã¿ã¹ã¯/ISRã®ã·ã¹ãã ã¹ã¿ãã¯
+    ã»å¼åºãå
+ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã¯ï¼ã·ã¹ãã ãµã¼ãã¹
+    ãã®å
+¥ãå£ or å²è¾¼ã¿çºçæã«ä¿å­æ¸ã¿
+    ã»å¼åºãå
+ã¿ã¹ã¯ã®ã¬ã¸ã¹ã¿ã¯ï¼dispatch or å²è¾¼ã¿çºçæã«ä¿å­æ¸ã¿
+    ããããã¯ï¼callee-savedã§ããã°ï¼å¼ã³åºãå
+ã³ã³ãã­ã¹ãã§ä¿å­ï¼å¾©å¸°
+    ãããã
+ ã·ã¼ã±ã³ã¹:
+    ------------------------------ ãããã(a) ------------------------------
+    caller-savedã¬ã¸ã¹ã¿ãä¿å­
+    if (callevel & ~(TCL_TASK | TCL_ISR2 | TSYSMASK) == 0U): /*TASK or ISR2*/
+        if (saved_ostkpt != NULL): /*ã¢ã¤ãã«ã«ã¼ãã§ã¹ã¿ãã¯ä½¿ç¨ä¸­*/
+            *(saved_ostkpt - 1) = sp
+            sp = saved_ostkpt - 1
+        else:
+            *(_ostkpt - 1) = sp
+            sp = _ostkpt - 1
+    func(arg1, arg2, ...)
+    ------------------------------ ããã¾ã§(a) ------------------------------
+    ------------------------------ ãããã(b) ------------------------------
+    if (callevel & ~(TCL_TASK | TCL_ISR2 | TSYSMASK) == 0U): /*TASK or ISR2*/
+        sp = *(sp+1)
+    caller-savedã¬ã¸ã¹ã¿ãå¾©å¸°
+    return;
+    ------------------------------ ããã¾ã§(b) ------------------------------
+    ------------------------------ ãããã(c) ------------------------------
+    /*
+     *  OSAP/ã¿ã¹ã¯/ISRã®å¼·å¶çµäºãã§ããã®ã¯ï¼åæ®µã®ããã¯ã«ã¼ãã³ã®ã¿ï¼å®è¡
+     *  ä¸­ã®OSAP/ã¿ã¹ã¯/ISRãå¼·å¶çµäºããã¨ãã ãã§ãã
+     *  - ãã­ãã¯ã·ã§ã³ããã¯ããã®å¼·å¶çµäºï¼ããã¯ã«ã¼ãã³ã®å¼åºãå
+ãã¦ã¼ã¶
+     *    ã¢ã¼ãã®ã¿OSAP/ã¿ã¹ã¯/ISRã®å¼·å¶çµäºãå¯è½ã§ãããã
+     *  - ã¨ã©ã¼ããã¯ããã®å¼·å¶çµäºï¼ããã¯ã«ã¼ãã³ããã¹ããã¦ããå ´åï¼
+     *    ãã¹ãå
+ã®å¼åºãå¶éã«ããï¼TerminateApplicationãå¼ã¹ãªã
+     *    ï¼ã¨ã©ã¼ããã¯ãå¤éã«å¼ã°ãããã¨ã¯ãªãï¼
+     *  ä»¥ä¸ã®çç±ããï¼force_term_osapã§ï¼
+     *  - exit_and_dispatch_nohook
+     *  - isr_dispatcher
+     *  ã«ã¸ã£ã³ãããã°ãã
+     */
+    ------------------------------ ããã¾ã§(c) ------------------------------
+   
+======================================================================
+â ä¾å¤ã®åºå
+¥å£
+ æ¦è¦: 
+    ã»ãã­ãã¯ã·ã§ã³ããã¯å¼åºãã®åºå
+¥å£
+ ã³ã³ãã­ã¹ãåæ¿(a): 
+    ã»ã¿ã¹ã¯ â ããã¯ã«ã¼ãã³
+    ã»ISR â ããã¯ã«ã¼ãã³
+    ã»ããã¯ã«ã¼ãã³ â ããã¯ã«ã¼ãã³
+    ã»ã¢ã¤ãã« â ããã¯ã«ã¼ãã³
+ ã³ã³ãã­ã¹ãåæ¿(b): 
+    ã»ããã¯ã«ã¼ãã³ â ã¿ã¹ã¯ï¼éå¸¸çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â ISRï¼éå¸¸çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â ããã¯ã«ã¼ãã³ï¼éå¸¸çµäºï¼
+ ã³ã³ãã­ã¹ãåæ¿(c): 
+    ã»ããã¯ã«ã¼ãã³ â ã¿ã¹ã¯ï¼ã¿ã¹ã¯/C2ISRå¼·å¶çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â C2ISRï¼C2ISRå¼·å¶çµäºï¼
+    ã»ããã¯ã«ã¼ãã³ â ã¢ã¤ãã«ï¼ã¿ã¹ã¯/C2ISRå¼·å¶çµäºï¼
+ åæ:
+ ã·ã¼ã±ã³ã¹:
+    ------------------------------ ãããã(a) ------------------------------
+    å°ãªãã¨ãOSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¨ãã
+    if (å²è¾¼ã¿çºçæã«ã¦ã¼ã¶ã¢ã¼ã) :
+        if (p_runisr != NULL) : // C2ISRã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+            p_runisr->usp = sp;       // ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­
+            sp = p_runisr->p_isrinib->sstk_bottom; // ã·ã¹ãã ã¹ã¿ãã¯ã«åæ¿ã
+        else :  // ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+            p_runtsk->usp = sp;       // ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®ä¿å­
+            sp = p_runtsk->p_tinib->sstk_bottom; // ã·ã¹ãã ã¹ã¿ãã¯ã«åæ¿ã
+    /*
+     *  ãã®æç¹ã§ï¼spã¯ä»¥ä¸ã®ãããããæãã¦ãã
+     *  - ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯
+     *  - ISRã®ã·ã¹ãã ã¹ã¿ãã¯
+     *  - OSã¹ã¿ãã¯ï¼ã¢ã¤ãã«ã«ã¼ãã®ã³ã³ãã­ã¹ãï¼
+     */
+    caller-savedã¬ã¸ã¹ã¿ãä¿å­
+    if (callevel & ~(TCL_TASK | TCL_ISR2 | TSYSMASK) == 0U): /*TASK or ISR2*/
+        if (saved_ostkpt != NULL): /*ã¢ã¤ãã«ã«ã¼ãã§ã¹ã¿ãã¯ä½¿ç¨ä¸­*/
+            *(saved_ostkpt - 1) = sp
+            sp = saved_ostkpt - 1
+        else:
+            *(_ostkpt - 1) = sp
+            sp = _ostkpt - 1
+    if (C1ISRå®è¡ä¸­ã§ãªã):
+        OSå²è¾¼ã¿ç¦æ­¢
+    if (ä¾å¤çºçæã«å
+¨å²è¾¼ã¿ç¦æ­¢ã§ãªã):
+        å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤
+    call_protectionhk_main(ã¨ã©ã¼ã³ã¼ã)
+    ------------------------------ ããã¾ã§(a) ------------------------------
+    ------------------------------ ãããã(b) ------------------------------
+    if (callevel & ~(TCL_TASK | TCL_ISR2 | TSYSMASK) == 0U): /*TASK or ISR2*/
+        sp = *(sp++)
+    caller-savedã¬ã¸ã¹ã¿ãå¾©å¸°
+    if (å²è¾¼ã¿çºçæã«ã¦ã¼ã¶ã¢ã¼ã) :
+        if (p_runisr != NULL) : // C2ISRã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+            sp = p_runisr->usp;       // ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®å¾©å¸°
+        else :  // ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç
+            sp = p_runtsk->usp;       // ã¦ã¼ã¶ã¹ã¿ãã¯ãã¤ã³ã¿ã®å¾©å¸°
+     return;
+    ------------------------------ ããã¾ã§(b) ------------------------------
+    ------------------------------ ãããã(c) ------------------------------
+    /*
+     *  OSAP/ã¿ã¹ã¯/ISRã®å¼·å¶çµäºãã§ããã®ã¯ï¼åæ®µã®ããã¯ã«ã¼ãã³ã®ã¿ï¼å®è¡
+     *  ä¸­ã®OSAP/ã¿ã¹ã¯/ISRãå¼·å¶çµäºããã¨ãã ãã§ãã
+     *  - ãã­ãã¯ã·ã§ã³ããã¯ããã®å¼·å¶çµäºï¼ããã¯ã«ã¼ãã³ã®å¼åºãå
+ãã¦ã¼ã¶
+     *    ã¢ã¼ãã®ã¿OSAP/ã¿ã¹ã¯/ISRã®å¼·å¶çµäºãå¯è½ã§ãããã
+     *  - ã¨ã©ã¼ããã¯ããã®å¼·å¶çµäºï¼ããã¯ã«ã¼ãã³ããã¹ããã¦ããå ´åï¼
+     *    ãã¹ãå
+ã®å¼åºãå¶éã«ããï¼TerminateApplicationãå¼ã¹ãªã
+     *    ï¼ã¨ã©ã¼ããã¯ãå¤éã«å¼ã°ãããã¨ã¯ãªãï¼
+     *  ä»¥ä¸ã®çç±ããï¼force_term_osapã§ï¼
+     *  - exit_and_dispatch_nohook
+     *  - isr_dispatcher
+     *  ã«ã¸ã£ã³ãããã°ãã
+     */
+    ------------------------------ ããã¾ã§(c) ------------------------------
+   
+======================================================================
+â¯ OSAPå¼·å¶çµäºå¦çã®è¨­è¨ï¼ã·ã³ã°ã«ã³ã¢ã®å ´åï¼
+======================================================================
+
+/*
+ * ãã­ãã¯ã·ã§ã³ããã¯ã®åºå£ï¼TerminateApplicationï¼ã¨ãã«
+ * ããã¸æ¥ã
+ * ããã«æ¥ããã¹ã¯ä»¥ä¸ã®ã¨ãã
+ * - ã¿ã¹ã¯ â ãã­ãã¯ã·ã§ã³ããã¯ â PRO_TERMINATE_APPL
+ * - ISR â ãã­ãã¯ã·ã§ã³ããã¯ â PRO_TERMINATE_APPL
+ * - ã¿ã¹ã¯ â ã¨ã©ã¼ããã¯ â TerminateApplication
+ * - ISR â ã¨ã©ã¼ããã¯ â TerminateApplication
+ * - ã¿ã¹ã¯ â TerminateApplication
+ * - ISR â TerminateApplication
+ */
+void
+force_term_osap(OSAPCB *p_osapcb, RestartType RestartOption)
+{
+	TCB				*p_tcb;
+	PriorityType	remove_task_pri;
+
+	/* osap_statã®æ´æ° */
+	if (RestartOption == RESTART) {
+		p_osapcb->osap_stat = APPLICATION_RESTARTING;
+		if (p_osapcb->p_osapinib->p_restart_tcb->p_tinib->task == NULL) {
+			/* ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®è¨­å®ããªãã«ããããããï¼*/
+			/* RESTARTãªãã·ã§ã³ãè¨­å®ããå ´åã¯ã·ã£ãããã¦ã³ãå®æ½ãã */
+			/* TerminateApplicationã®å ´åã¯ããã«æ¥ãåã«ã¯ããã¦ãã */
+			internal_shutdownos(E_OS_PROTECTION_FATAL);
+		}
+	}
+	else {
+		p_osapcb->osap_stat = APPLICATION_TERMINATED;
+	}
+
+    /*ã¢ã©ã¼ã ã¨ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãåæ­¢*/
+	force_term_osap_alarm(p_osapcb);
+	force_term_osap_schtbl(p_osapcb);
+    /*ISRãåæ­¢*/
+	force_term_osap_isr(p_osapcb);
+
+	p_tcb = p_osapcb->p_osapinib->p_restart_tcb;
+
+	/* ãªã¹ã¿ã¼ãã¿ã¹ã¯ãæ¢ã«READYç¶æ
+ã®å ´åã¯ã¬ãã£ã­ã¥ã¼ããåé¤ãã */
+	if (p_tcb->tstat == READY) {
+		/* ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®çµäº */
+		p_tcb->actcnt = 0U;
+#ifdef CFG_USE_PROTECTIONHOOK
+		p_tcb->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+		/* curpriã¨inipriãç°ãªãå¤ã§ã¬ãã£ã­ã¥ã¼ã«ç¹ããã¦ããå ´åã¸ã®å¯¾å¿ */
+		remove_task_pri = p_tcb->curpri;
+
+		/* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+		release_taskresources(p_tcb);
+
+		/* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+		cancel_taskcounters(p_tcb);
+
+		/* å¯¾è±¡ã¿ã¹ã¯ãSUSPENDç¶æ
+ã¨ãï¼ã¬ãã£ã­ã¥ã¼ããåé¤ãã */
+		p_tcb->tstat = SUSPENDED;
+		if (p_tcb != p_schedtsk) {
+			remove_task_from_queue(p_tcb, remove_task_pri);
+			/* p_schedtskãã­ã¥ã¼ã®å
+é ­ã«éé¿ */
+			move_schedtsk();
+		}
+	}
+	else if (p_schedtsk != NULL) {
+		/* p_schedtskãNULLã§ãªããã°ï¼ã­ã¥ã¼ã®å
+é ­ã«éé¿ */
+		move_schedtsk();
+	}
+	else {
+		/* p_schedtskãNULLã®å ´åã¯ä½ãããªã */
+	}
+
+	/* ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®pcã«force_term_osap_mainã®ã¢ãã¬ã¹ãæ ¼ç´ */
+	activate_force_term_osap_main(p_tcb);
+
+	/* curpriãæé«åªå
+åº¦ã«å¤æ´ */
+	p_tcb->curpri = TPRI_MAXTASK;
+
+	/* p_schedtskã«p_restart_tcbãæ ¼ç´ */
+	p_schedtsk = p_tcb;
+
+	if (p_osapcb != p_runosap) {
+		/* ä»ã®OSAPãçµäº/åèµ·åããå ´å */
+        if ((callevel_stat & TCL_ISR2) != TCL_NULL) {
+            /* C2ISRããå¼ã³åºãããå ´åã¯,C2ISRã®åºå£å¦çã§ */
+            /* ãã£ã¹ããããè¡ãããï¼ããã§ã¯å®æ½ããªã    */
+        }
+        else {
+            /*ã¿ã¹ã¯ããå¼ã³åºãããå ´åã¯ãªã¹ã¿ã¼ãã¿ã¹ã¯ã«ãã£ã¹ããã*/
+            dispatch();
+        }
+    }
+	else {
+		/* èªOSAPãçµäº/åèµ·åããå ´åã¯,å¼ã³åºãå
+ã«æ»ããªã */
+        if (p_runisr != NULL) {
+            /* ISRã®å²è¾¼ã¿ç¦æ­¢ãè§£é¤ */
+            /* OSå²è¾¼ã¿ç¦æ­¢ãã©ã°ã¯ï¼å²è¾¼ã¿åºå£ã§å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã
+            ã åæ ãããããã«ï¼å²è¾¼ã¿åºå£ã§ä¸å¾è§£é¤ããã */
+            if (sus_os_cnt > 0U) {
+                sus_os_cnt = 0U;
+            }
+		    exit_and_dispatch_isr();
+        }
+        else {    
+            /* ã¿ã¹ã¯ã®å²è¾¼ã¿ç¦æ­¢ï¼ãã©ã°ããã³ã«ã¦ã³ã¿ï¼ã¯
+               ãªã¹ã¿ã¼ãã¿ã¹ã¯ã§è§£é¤ */
+            /* TODO: ã¿ã¹ã¯ã®å²è¾¼ã¿ç¦æ­¢ã«ã¦ã³ã¿ãããã§è§£é¤ãã¦ãããã */
+		    exit_and_dispatch_nohook();
+        }
+	}
+}
+
+void
+force_term_osap_isr(OSAPCB *p_osapcb)
+{
+	ISRType				i;
+    ISRCB *p_isrcb
+	const INTINIB		*p_intinib;
+
+    /* ã¬ãã£ã­ã¥ã¼ã«ç¹ããã¦ããISRãå¼·å¶çµäº */
+    for (p_isrcb = (&isr_ready_queue)->p_next; 
+         p_isrcb != &isr_ready_queue; 
+         p_isrcb = p_isrcb->isr_queue.p_next) {
+         if (p_isrcb->p_isrinib->p_osapcb == p_osapcb) {
+#ifdef CFG_USE_PROTECTIONHOOK
+			p_isrcb->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+            /* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+            release_isrresources(p_isrcb);
+            /* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+            cancel_isrcounters(p_isrcb);
+            /*ã¬ãã£ã­ã¥ã¼ããé¤å¤*/
+            queue_delete(p_isrcb);
+         }
+    }
+
+    if (p_runisr != NULL && p_runisr->p_isrinib->p_osapcb == p_osapcb) {
+#ifdef CFG_USE_PROTECTIONHOOK
+        p_isrcb->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+        /* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+        release_isrresources(p_isrcb);
+        /* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+        cancel_isrcounters(p_isrcb);
+    }
+
+	for (i = 0U; i < tnum_isr2; i++) {
+		p_isrcb = &(isrcb_table[i]);
+		if (p_isrcb->p_isrinib->p_osapcb == p_osapcb) {
+            p_intinib = &(intinib_table[i]);
+            x_disable_int(p_intinib->intno);
+        }
+	}
+}
+
+======================================================================
+â¯ ISRå¼·å¶çµäºå¦çã®è¨­è¨ï¼ã·ã³ã°ã«ã³ã¢ã®å ´åï¼
+======================================================================
+
+/*
+ * ãã­ãã¯ã·ã§ã³ããã¯ã®åºå£ããããã¸æ¥ã
+ * ããã«æ¥ããã¹ã¯ä»¥ä¸ã®ã¨ãã
+ * - ISR â ãã­ãã¯ã·ã§ã³ããã¯ â PRO_TERMINATE_TASKISR
+ */
+void
+force_terminate_isr(ISRCB *p_isrcb)
+{
+	/*
+	 *  å²è¾¼ã¿ç¦æ­¢ãè§£é¤ãã
+	 *  ã¨ã©ã¼ããã¯ãå¼ã°ãªãããï¼å¼æ°ã«OSServiceId_Invalidããã
+	 */
+	release_interrupts(OSServiceId_Invalid);
+
+	/* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+	release_isrresources(p_isrcb);
+	/* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+	cancel_isrcounters(p_isrcb);
+
+	exit_and_dispatch_isr();
+}
+
+void
+call_protectionhk_main(StatusType protection_error)
+{
+    ...
+ 	pret = ProtectionHook(protection_error);
+	LOG_PROHOOK_LEAVE(pret);
+	run_trusted = saved_run_trusted;
+
+	LEAVE_CALLEVEL(TCL_PROTECT);
+
+	/* ä»¥ä¸ ProtectionHook å®è¡å¾ã®å¦ç */
+	switch (pret) {
+	case PRO_SHUTDOWN:
+		internal_shutdownos(protection_error);
+		break;
+	case PRO_TERMINATETASKISR:
+		if ((p_runisr != NULL) || (pre_protection_supervised == FALSE)) {
+			/* éä¿¡é ¼ISRã®å ´å */
+			force_terminate_isr(p_runisr);
+		}
+		else if ((p_runtsk != NULL) || (pre_protection_supervised == FALSE)) {
+			/* éä¿¡é ¼ã¿ã¹ã¯ã®å ´å */
+			force_terminate_task(p_runtsk);
+		}
+		else {
+			/* ä¿¡é ¼é åããã®ããã¯æã¯ã·ã£ãããã¦ã³ */
+			internal_shutdownos(E_OS_PROTECTION_FATAL);
+		}
+		break;
+    ...
+    }
+    ...
+}
+
+======================================================================
+â¯ ISRåèµ·åã®è¨­è¨ï¼ã·ã³ã°ã«ã³ã¢ã®å ´åï¼
+======================================================================
+
+ã»EnableInterruptSourceã§åèµ·åæã«å²è¾¼ã¿ãå¾©å¸°ãã
+ã»å²è¾¼ã¿ã®å¾©å¸°ã¯ãªã¹ã¿ã¼ãã¿ã¹ã¯ï¼ã¦ã¼ã¶å®ç¾©ï¼ã«å®æ½ããã
+ã»EnableInterruptSource/DisableInterruptSourceã¯ï¼ã¿ã¹ã¯ãªã©ã¨åæ§ã«ï¼
+ããªã¹ã¿ã¼ãç¶æ
+ã§ã¯èªèº«ã®OSAPã®ã¿ãæä½ã§ããããã«ãã
+ã»ä¸è¨ã®æä½ãEnableInterruptSource/DisableInterruptSourceã«å
+¥ãã
+{
+	x_nested_lock_os_int();
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+    ...
+    x_nested_unlock_os_int();
+}
+
+======================================================================
+â¯ ISRãã¼ã¿æ§é ã®è¨­è¨ï¼ã·ã³ã°ã«ã³ã¢ã®å ´åï¼
+======================================================================
+/* ISRã¬ãã£ã­ã¥ã¼ */
+QUEUE	isr_ready_queue;
+ã»interrupt_initializeå
+ã§ï¼queue_initializeã«ããåæå
+ã»ç¡å¹å¤ã¯queue_emptyã«ããå¤å®
+
+/* ISRåæåã³ã³ãã­ã¹ããã­ãã¯ãè¿½å  */
+typedef struct isr_initialization_block {
+	const INTINIB	*p_intinib;     /* å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	OSAPCB			*p_osapcb;      /* æå±ããOSã¢ããªã±ã¼ã·ã§ã³ã®ç®¡çãã­ãã¯ */
+	uint32			acsbtmp;        /* ã¢ã¯ã»ã¹è¨±å¯OSã¢ããªã±ã¼ã·ã§ã³ ãããããã */
+#ifdef NTC2ISR
+	TSKINICTXB tskinictxb;           /* ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ */
+	STKMPUINFOB	stkmpu;             /* ã¹ã¿ãã¯ã®MPUæ
+å ± */
+#endif /* NTC2ISR */
+} ISRINIB;
+
+/* ISRç®¡çã³ã³ãã­ã¹ããã­ãã¯ï¼ã«ã¦ã³ã¿ãã§ã¼ã³ï¼å¼·å¶çµäºç¨ï¼ãè¿½å  */
+typedef struct isr_control_block {
+#ifdef NTC2ISR
+    QUEUE           isr_queue;
+#endif /* NTC2ISR */
+	const ISRINIB	*p_isrinib;
+	RESCB			*p_lastrescb;   /* æå¾ã«ç²å¾ãããªã½ã¼ã¹ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+#ifdef NTC2ISR
+	CNTCB			*p_lastcntcb;   /* æå¾ã«æä½ããã«ã¦ã³ã¿ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	TSKCTXB			tskctxb;        /* ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ */
+#endif /* NTC2ISR */
+#ifdef CFG_USE_PROTECTIONHOOK
+	boolean	calltfn;                /* ä¿¡é ¼é¢æ°å¼ã³åºãä¸­ãã©ã° */
+#endif /* CFG_USE_PROTECTIONHOOK */
+} ISRCB;
+
+
+======================================================================
+â¯ tfã®è¦ä¿®æ­£ç®æï¼ã·ã³ã°ã«ã³ã¢ã®å ´åï¼
+======================================================================
+
+ã»OsIsrãéä¿¡é ¼ã«configã§ããããã«ãã
+ - $IF !OSAP.TRUSTED[ISR.OSAPID[isrid]]$ ã§ãã§ãã¯ãã¦
+ ãããç®æãï¼$IF !OSAP.TRUSTED[ISR.OSAPID[isrid]] 
+ ã&& EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$ã¨ãã
+ã»å²è¾¼ã¿ãã³ãã©é¢æ°ãæå±ããOSAPããã¢ã¯ã»ã¹ã§ããé åã«é
+ç½®ããã
+ - GENERATE_USER_INTHDRãã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ãã
+ã»ISRå°ç¨ã¹ã¿ãã¯ãçæãã
+ãã»ã¦ã¼ã¶ã¹ã¿ãã¯ï¼ã·ã¹ãã ã¹ã¿ãã¯
+ãã»åºæ¬ã¿ã¹ã¯ã¨åæ§ã®ã­ã¸ãã¯ã§çæãã/*TODO*/
+    - ã¹ã¿ãã¯å
+±æ
+  ã»ã¦ã¼ã¶ã¹ã¿ãã¯ãã¡ã¢ãªãªãã¸ã§ã¯ãã¨ãã¦ç»é²ãã
+
+ä»¥ä¸
+
Index: /atk2-sc3-1.4.0-ntisr/doc/porting.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/doc/porting.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/doc/porting.txt	(revision 172)
@@ -0,0 +1,2407 @@
+
+		TOPPERS/ATK2-SC3
+		ã¿ã¼ã²ããä¾å­é¨ ãã¼ãã£ã³ã°ã¬ã¤ã
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ATK2-SC3ãï¼æªãµãã¼ãã®ã¿ã¼ã²ããã·ã¹ãã 
+ã«ãã¼ãã£ã³ã°ããããã«å¿
+è¦ã¨ãªãã¿ã¼ã²ããä¾å­é¨ã®å®è£
+æ¹æ³ãèª¬æãã
+ãã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2011-2013 by Spansion LLC, USA
+Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2011-2015 by Witz Corporation
+Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: porting.txt 517 2015-12-24 10:41:42Z witz-itoyo $
+----------------------------------------------------------------------
+
+âç®æ¬¡
+
+âï¼ï¼æ¬ããã¥ã¢ã«ã®ä½ç½®ã¥ã
+ï¼ï¼å
+±éäºé 
+
+	1.1 ã¿ã¼ã²ããä¾å­é¨ã®æ§æ
+	1.2 å¤éã¤ã³ã¯ã«ã¼ãã®é²æ­¢
+	1.3 ã¢ã»ã³ããªè¨èªã¨ã®ããããã¡ã¤ã«ã®å
+±ç¨ 
+	1.4 ã¤ã³ã¯ã«ã¼ãè¨è¿°ã®æ¹æ³
+	1.5 ã¯ãªãã£ã«ã«ã»ã¯ã·ã§ã³ã®åºå
+¥å¦çã®å®ç¾ã«é¢ããå¶ç´
+ï¼ï¼ã·ã¹ãã æ§ç¯ç°å¢ã®ã¿ã¼ã²ããä¾å­é¨
+	2.1 ã¿ã¼ã²ããç¥ç§°ã¨ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããª
+	2.2 Makefileã®ã¿ã¼ã²ããä¾å­é¨
+	2.3 éçºç°å¢åã¨ã³ãã³ãåã®è¨­å®
+	2.4 ã³ã³ãã¤ã«ãªãã·ã§ã³ã¨ãªãã¸ã§ã¯ããã¡ã¤ã«ã®è¨­å®
+	2.5 ãªãã»ãããã¡ã¤ã«ã®çææ¹æ³
+		2.5.1 ã¸ã§ãã¬ã¼ã¿ãç¨ããæ¹æ³
+	â2.6 ãªã³ã¯æ¹æ³ã®è¨­å®
+	â2.7 ä¾å­é¢ä¿ã®å®ç¾©
+	2.8 ãã®ä»ã®è¨­å®
+ï¼ï¼AUTOSARå
+±éå®ç¾©ã®ã¿ã¼ã²ããä¾å­é¨
+	3.1 æ´æ°åã®æå¤§å¤ã»æå°å¤ã»ãããæ°
+	3.2 æ´æ°å
+	3.3 è«çåï¼è«çåã®å¤
+	3.4 ãã®ä»ã®å
+	3.5 ã³ã³ãã¤ã©ã®æ¡å¼µæ©è½ã®ããã®ãã¯ã­å®ç¾©
+	3.6 æ¨æºçãªå®ç¾©ã®ä¸æ¸ã
+ï¼ï¼ã·ã¹ãã ã¤ã³ã¿ãã§ã¼ã¹ã¬ã¤ã¤ï¼SILï¼ã®ã¿ã¼ã²ããä¾å­é¨
+	4.1 å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®ç®¡ç
+	4.2 ãã­ã»ããµã®ã¨ã³ãã£ã¢ã³
+	4.3 I/Oç©ºéã¢ã¯ã»ã¹é¢æ°
+ï¼ï¼ã«ã¼ãã«APIã®ã¿ã¼ã²ããä¾å­é¨
+	5.1 ã¡ã¢ãªé åç¢ºä¿ã®ããã®åå®ç¾©
+	5.2 ã¡ã¢ãªé åç¢ºä¿ã®ããã®ãã¯ã­
+	â5.3 ãªãã¸ã§ã¯ãåã®ä¸æ¸ã
+ï¼ï¼ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨
+	6.1 ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨ã®å
+±éäºé 
+
+		â6.1.1 ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨ã®æ§æè¦ç´ 
+		6.1.2 ã¿ã¼ã²ããä¾å­é¨ã®é¢æ°ã®å½åè¦å
+	6.2 ãã¬ã¼ã¹ã­ã°æ©è½ã¸ã®å¯¾å¿
+	6.3 ã·ã¹ãã ç¶æ
+ã®ç®¡ç
+		6.3.1 å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®ç®¡ç
+		6.3.2 ã³ã³ãã­ã¹ãã®ç®¡ç
+		6.3.3 OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®ç®¡ç
+	6.4 å²è¾¼ã¿ã«é¢é£ããã·ã¹ãã ç¶æ
+ã®ç®¡ç
+		6.4.1 å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®ç®¡ç
+		6.4.2 å²è¾¼ã¿ãã³ãã©ã®å
+é ­å¦çã¨æ«å°¾å¦ç
+		6.4.3 åå¥å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®ç®¡ç
+	6.5 ã¿ã¹ã¯ãã£ã¹ãããã£
+		â6.5.1 ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ã¨ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯
+		6.5.2 ãã£ã¹ãããã£æ¬ä½
+		6.5.3 ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®ãã£ã¹ããã
+		6.5.4 ãã£ã¹ãããã£ã®åä½éå§
+		â6.5.5 ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ããã
+		â6.5.6 ã¿ã¹ã¯ã®èµ·åå¦ç
+	6.6 å²è¾¼ã¿ãã³ãã©
+		â6.6.1 å²è¾¼ã¿ãã³ãã©ã®åºå
+¥å£å¦ç
+		6.6.2 å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®
+		â6.6.3 å²è¾¼ã¿ç®¡çæ©è½ã®åæåå¦çã®å¤æ´
+		6.6.4 ããã©ã«ãã®C2ISR
+		6.6.5 ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿
+		6.6.6 DisableAllInterrupts/EnableAllInterruptsã®å¦çå
+å®¹ã®å¤æ´
+		â6.6.7 å²è¾¼ã¿ç¦æ­¢è§£é¤
+	6.7 ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°
+		â6.7.1 ãã£ã¹ãããã£ã¨C2ISRã®åºå
+¥å£å¦çã§ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°
+		â6.7.2 ä¿¡é ¼é¢æ°å®è¡ã®åºå£å¦çã§ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°
+	â6.8 CPUä¾å¤ãã³ãã©
+	â6.9 ã½ããã¦ã§ã¢å²è¾¼ã¿ãã³ãã©
+	â6.10 ä¿¡é ¼OSAPã¨éä¿¡é ¼OSAPããã®ã·ã¹ãã ãµã¼ãã¹å¼åºã
+		â6.10.1 ã·ã¹ãã ãµã¼ãã¹å¼åºãã®å®ç¾©
+		â6.10.2 ä¿¡é ¼OSAPããã®ã·ã¹ãã ãµã¼ãã¹å¼åºã
+		â6.10.3 éä¿¡é ¼OSAPããã®ã·ã¹ãã ãµã¼ãã¹å¼åºã
+		â6.10.4 ã¿ã¼ã²ããä¾å­ã·ã¹ãã ãµã¼ãã¹ã®è¿½å 
+	â6.11 ã¡ã¢ãªä¿è­·æ©æ§ï¼MPUï¼å¶å¾¡
+		â6.11.1 ã¹ã¿ãã¯ã®MPUè¨­å®æ
+å ±ãã­ãã¯ï¼STKMPUINFOBï¼
+		â6.11.2 OSAPåºæMPUè¨­å®æ
+å ±ãã­ãã¯ï¼OSAPMPUINFOBï¼
+		â6.11.3 MPUåæåå¦ç
+		â6.11.4 OSAPåºæMPUæ
+å ±è¨­å®å¦ç
+		â6.11.5 MPUä¾å­ã®ããã¯ã°ã©ã¦ã³ãé åãã§ãã¯
+	â6.12 ã¡ã¢ãªç®¡çã®ãã¥ã¼ãã³ã°
+		â6.12.1 ã¡ã¢ãªãªãã¸ã§ã¯ãã®ç®¡ç
+		â6.12.2 ã¡ã¢ãªã¢ã¯ã»ã¹æ¨©ãã§ãã¯ã®ããã®ãã¯ã­
+	6.13 ã¨ã©ã¼ããã¯ï¼ã·ã£ãããã¦ã³ããã¯å¼ã³åºã
+	â6.14 ã«ã¼ãã«ã®èµ·åã»çµäºã¨ã¹ã¿ãã¯é åãªã©
+	6.15 ã«ã¼ãã«å
+é¨ã®ãã¥ã¼ãã³ã°
+		6.15.1 ãããããããµã¼ã
+	6.16 ã«ã¼ãã«å®è£
+ã«é¢ãããã®ä»ã®å®ç¾©
+		6.16.1 ã¨ã©ã¼ãã§ãã¯æ¹æ³ã®æå®
+		6.16.2 éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+		6.16.3 ç©ºã©ãã«ã®å®ç¾©
+		â6.16.4 åã¹ã¿ãã¯ã®ããã©ã«ãå¤
+		â6.16.5 ã¹ã¿ãã¯ãã¸ãã¯ãã³ãã¼é åæä½ãã¯ã­ã®å®ç¾©
+		â6.16.6 æ¨æºä»¥å¤ã¡ã¢ãªãªã¼ã¸ã§ã³å±æ§ã®å®ç¾©
+	6.17 ãã¬ã¼ã¹ã­ã°æ©è½ã«é¢ããè¨­å®
+		6.17.1 åå¾ã§ãããã¬ã¼ã¹ã­ã°ã®ç¨®é¡ã¨ãã¯ã­
+		6.17.2 ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ã
+	â6.18 ä¿¡é ¼ããã¯ï¼ã·ã£ãããã¦ã³ããã¯ã®å¼·å¶çµäº
+	â6.19 ã³ã¢èµ·å
+	â6.20 ããã¯ã®ç¢ºèª
+	â6.21 ã¹ã¿ãã¯åãæ¿ã
+	â6.22 éä¿¡é ¼ããã¯ã«ã¼ãã³ã¹ã¿ãã¯é å
+	6.23 ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿
+		6.23.1 ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ãã¡ã¤ã«æ§æ
+		6.23.2 ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®æ
+å ±æä¾
+	â6.24 OSAPå¼·å¶çµäº
+ï¼ï¼ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+	7.1 è¨­å®ãã¡ã¤ã«ã¨ã¿ã¼ã²ããä¾å­é¨ã®ä½ç½®ä»ã
+	7.2 ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+		â7.2.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
+		â7.2.2 ã¿ã¼ã²ããéä¾å­é¨ã§å®ç¾©ãããå¤æ°
+	7.3 ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+		â7.3.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
+	â7.4 ãã¹4ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+		â7.4.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
+	â7.5 cfg1_out.cã®ãªã³ã¯ã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©ãã¡ã¤ã«
+	â7.6 data/bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+ï¼ï¼ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ç­ã®ã¿ã¼ã²ããä¾å­é¨
+	8.1 ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã®ã¿ã¼ã²ããä¾å­é¨
+	â8.2 ã·ã¹ãã ã­ã°æ©è½ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+	8.3 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨
+		8.3.1 å¤æ°ï¼ãã¼ã¿åï¼ç®¡çé¢æ°
+		8.3.2 ããã¤ã¹ãµã¼ãã¹ã«ã¼ãã³
+		8.3.3 ã³ã¼ã«ããã¯ã«ã¼ãã³
+	8.4 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã®ã¿ã¼ã²ããä¾å­å®ç¾©
+	8.5 ãµã³ãã«ãã­ã°ã©ã ã¨ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+	8.6 å®è¡æéåå¸éè¨ã¢ã¸ã¥ã¼ã«ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+	8.7 ã¿ã¤ããã©ã¤ã
+		8.7.1 ã¿ã¤ããã©ã¤ãã®ãã¡ã¤ã«æ§æ
+		8.7.2 ã½ããã¦ã§ã¢ã«ã¦ã³ã¿ã®å®ç¾©
+		8.7.3 æéåã®å®ç¾©
+		8.7.4 ã¿ã¤ãã®åæåã»çµäºå¦çã»å²è¾¼ã¿å¦ç
+		8.7.5 ç¾å¨ã®æå»ã®åå¾
+ï¼ï¼ãã®ä»
+	9.1 ãã­ã¥ã¡ã³ã
+ï¼ï¼ï¼ãªãã¡ã¬ã³ã¹
+	â10.1 ã¿ã¼ã²ããä¾å­é¨ã®ãã¡ã¤ã«ä¸è¦§
+
+âãã¤ãã¦ããé 
+ç®ã¯ATK2-SC1ããå¤æ´ããã£ãç®æãï¼âã¯ATK2-SC3ã§
+æ°è¦ã«è¿½å ãããç®æãç¤ºãï¼ããããå·®åã®ã¿ãè¨è¿°ãã¦ããï¼
+
+
+ï¼ï¼æ¬ããã¥ã¢ã«ã®ä½ç½®ã¥ã
+TOPPERS/ATK2-SC3ã¯ï¼TOPPERS/ATK2-SC1ããã¼ã¹ã¨ãã¦ããããï¼å¤ãã®ãã¼
+ãã£ã³ã°é 
+ç®ã¯TOPPERS/ATK2-SC1ã¨åä¸ã§ããï¼æ¬ãã­ã¥ã¡ã³ãã§ã¯ï¼TOPPER
+S/ATK2-SC1ã¨ç°ãªãç¹ã«ã¤ãã¦èª¬æããï¼ãã®ããï¼ã¾ãTOPPERS/ATK2-SC1ã®
+ãã¼ãã£ã³ã°ã¬ã¤ããåç
+§ã®å¾ï¼æ¬ãã­ã¥ã¡ã³ããåç
+§ãããã¨ï¼
+
+
+ï¼ï¼å
+±éäºé 
+
+
+1.1 ã¿ã¼ã²ããä¾å­é¨ã®æ§æ
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+1.2 å¤éã¤ã³ã¯ã«ã¼ãã®é²æ­¢
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+1.3 ã¢ã»ã³ããªè¨èªã¨ã®ããããã¡ã¤ã«ã®å
+±ç¨ 
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+1.4 ã¤ã³ã¯ã«ã¼ãè¨è¿°ã®æ¹æ³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+1.5 ã¯ãªãã£ã«ã«ã»ã¯ã·ã§ã³ã®åºå
+¥å¦çã®å®ç¾ã«é¢ããå¶ç´
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ï¼ï¼ã·ã¹ãã æ§ç¯ç°å¢ã®ã¿ã¼ã²ããä¾å­é¨
+
+2.1 ã¿ã¼ã²ããç¥ç§°ã¨ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããª
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+2.2 Makefileã®ã¿ã¼ã²ããä¾å­é¨
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+2.3 éçºç°å¢åã¨ã³ãã³ãåã®è¨­å®
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+2.4 ã³ã³ãã¤ã«ãªãã·ã§ã³ã¨ãªãã¸ã§ã¯ããã¡ã¤ã«ã®è¨­å®
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+2.5 ãªãã»ãããã¡ã¤ã«ã®çææ¹æ³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+2.6 ãªã³ã¯æ¹æ³ã®è¨­å®
+
+ATK2-SC3ã«ã¼ãã«ã¯ï¼ã¡ã¢ãªã®æé©åãè¡ãããï¼ä»¥ä¸ã®ãã¯ã­ã¯ï¼ä½¿ç¨ã§ã
+ãªãï¼
+
+(2-6-2) TEXT_START_ADDRESS		ãã­ã¹ãã»ã¯ã·ã§ã³ã®å
+é ­çªå°
+(2-6-3) DATA_START_ADDRESS		ãã¼ã¿ã»ã¯ã·ã§ã³ã®å
+é ­çªå°
+
+2.7 ä¾å­é¢ä¿ã®å®ç¾©
+
+ã¸ã§ãã¬ã¼ã¿ã®åãã¹ã«å¯¾ãã¦ï¼ã¿ã¼ã²ããä¾å­ã®ãã¡ã¤ã«ã¸ã®ä¾å­é¢ä¿ãå®
+ç¾©ããï¼å
+·ä½çã«ã¯ï¼ãã¹1ï¼ãã¹2ï¼ãã¹3ï¼ãã¹4ãä¾å­ãããã¡ã¤ã«ãï¼ã
+ãããcfg1_out.cï¼Os_Lcfg.timestampï¼kernel_mem3.cï¼kernel_mem.cï¼
+$(OBJFILE)ã«å¯¾ããä¾å­é¢ä¿ã®å½¢ã§è¨è¿°ããï¼
+
+ã»ã¨ãã©ã®å ´åã«ï¼ã¿ã¼ã²ããä¾å­é¨ãã£ã¬ã¯ããªã®Makefile.targetã«ã¯ï¼
+ä»¥ä¸ã®è¨è¿°ãå«ããå¿
+è¦ãããï¼
+
+----------------------------------------
+kernel_mem3.c: $(TARGETDIR)/target_mem.tf
+kernel_mem.c: $(TARGETDIR)/target_mem2.tf $(TARGETDIR)/target_check.tf
+----------------------------------------
+
+2.8 ãã®ä»ã®è¨­å®
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ï¼ï¼AUTOSARå
+±éå®ç¾©ã®ã¿ã¼ã²ããä¾å­é¨
+
+3.1 æ´æ°åã®æå¤§å¤ã»æå°å¤ã»ãããæ°
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.2 æ´æ°å
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.3 è«çåï¼è«çåã®å¤
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.4 ãã®ä»ã®å
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.5 ã³ã³ãã¤ã©ã®æ¡å¼µæ©è½ã®ããã®ãã¯ã­å®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.6 æ¨æºçãªå®ç¾©ã®ä¸æ¸ã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ï¼ï¼ã·ã¹ãã ã¤ã³ã¿ãã§ã¼ã¹ã¬ã¤ã¤ï¼SILï¼ã®ã¿ã¼ã²ããä¾å­é¨
+
+4.1 å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®ç®¡ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+4.2 ãã­ã»ããµã®ã¨ã³ãã£ã¢ã³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ï¼ï¼ã«ã¼ãã«APIã®ã¿ã¼ã²ããä¾å­é¨
+
+5.1 ã¡ã¢ãªé åç¢ºä¿ã®ããã®åå®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+5.2 ã¡ã¢ãªé åç¢ºä¿ã®ããã®ãã¯ã­
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+5.3 ãªãã¸ã§ã¯ãåã®ä¸æ¸ã
+
+(5-3-1) OMIT_DATA_TYPE (ãªãã·ã§ã³)
+
+OMIT_DATA_TYPEãã¯ã­ãã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ããå ´åã¯ï¼ä¸é¨ã®ãªãã¸ã§
+ã¯ãã®åãã¿ã¼ã²ããä¾å­é¨ã§å®ç¾©ãããã¨ãã§ããï¼
+
+(5-3-15) TrustedFunctionIndexType (ãªãã·ã§ã³ï¼ããã©ã«ãã¯uint32)
+(5-3-16) IocType              (ãªãã·ã§ã³ï¼ããã©ã«ãã¯uint32)
+(5-3-17) SenderIdType         (ãªãã·ã§ã³ï¼ããã©ã«ãã¯uint8)
+
+
+ï¼ï¼ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨
+
+6.1 ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨ã®å
+±éäºé 
+
+
+6.1.1 ã«ã¼ãã«å®è£
+ã®ã¿ã¼ã²ããä¾å­é¨ã®æ§æè¦ç´ 
+
+(c) ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«
+
+ã¸ã§ãã¬ã¼ã¿ã®è¨­å®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ãï¼target_def.csvï¼
+target.tfï¼target_mem.tfï¼target_mem2.tfï¼target_check.tfã«ç¨æããï¼
+ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ã®è¨è¿°æ¹æ³ã«ã¤ãã¦ã¯ï¼ï¼ç« ã§èª¬æããï¼
+
+6.1.2 ã¿ã¼ã²ããä¾å­é¨ã®é¢æ°ã®å½åè¦å
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.2 ãã¬ã¼ã¹ã­ã°æ©è½ã¸ã®å¯¾å¿
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.3 ã·ã¹ãã ç¶æ
+ã®ç®¡ç
+
+6.3.1 å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®ç®¡ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.3.2 ã³ã³ãã­ã¹ãã®ç®¡ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.3.3 OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®ç®¡ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.4 å²è¾¼ã¿ã«é¢é£ããã·ã¹ãã ç¶æ
+ã®ç®¡ç
+
+6.4.1 å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã®ç®¡ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.4.2 å²è¾¼ã¿ãã³ãã©ã®å
+é ­å¦çã¨æ«å°¾å¦ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.4.3 åå¥å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®ç®¡ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.5 ã¿ã¹ã¯ãã£ã¹ãããã£
+
+6.5.1 ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ã¨ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯
+
+(6-5-1-4) OMIT_STKMPUINFOBï¼ãªãã·ã§ã³ï¼
+(6-5-1-5) STKMPUINFOBï¼ãªãã·ã§ã³ï¼
+
+MPUæ
+å ±ã¯ã¿ã¼ã²ããä¾å­ãªã®ã§ï¼ã¿ã¹ã¯åæåãã­ãã¯ï¼TINIBï¼ã«å
+¥ããã
+ãªãå ´åã¯ï¼OMIT_STKMPUINFOBããã¯ã­å®ç¾©ãï¼TINIBä¸­ããSTKMPUINFOBãå¤
+ããã¨ãã§ããï¼
+
+OMIT_STKMPUINFOBããã¯ã­å®ç¾©ããã¨ï¼TINIBä¸­ã«MPUè¨­å®æ
+å ±ãå«ã¾ããªããª
+ãããï¼ããã«ä»£ããæ
+å ±ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ç®¡çããå¿
+è¦ãããï¼
+
+ã¾ãï¼OMIT_STKMPUINFOBãå®ç¾©ããå ´åï¼ã¸ã§ãã¬ã¼ã¿ãã³ãã¬ã¼ããã¡ã¤ã«
+ããåç
+§ããtarget_def.csvï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼ããTINIB
+é¢é£ã®STKMPUINFOBçææ
+å ±ãåé¤ãããã¨ããå§ãï¼åé¤ããªãå ´åã¯ï¼
+TINIBé¢é£ã®STKMPUINFOBæ
+å ±å®ç¾©ã¯ï¼ç¡æå³å¤ã¨ãªãããï¼ä½¿ç¨ãã¦ã¯ãããª
+ãï¼
+
+STKMPUINFOBç®¡çããæ
+å ±ã«é¢ãã¦ã¯ï¼ã6.11.1 ã¹ã¿ãã¯ã®MPUè¨­å®æ
+å ±ãã­
+ãã¯ï¼STKMPUINFOBï¼ããåç
+§ï¼
+
+(6-5-1-6) OMIT_OSAPMPUINFOBï¼ãªãã·ã§ã³ï¼
+(6-5-1-7) OSAPMPUINFOBï¼ãªãã·ã§ã³ï¼
+
+MPUæ
+å ±ã¯ã¿ã¼ã²ããä¾å­ãªã®ã§ï¼OSã¢ããªã±ã¼ã·ã§ã³åæåãã­ãã¯ï¼OSAPINIBï¼
+ã«å
+¥ããããªãå ´åã¯ï¼OMIT_OSAPMPUINFOBããã¯ã­å®ç¾©ãï¼OSAPINIBä¸­ãã
+OSAPMPUINFOBãå¤ããã¨ãã§ããï¼
+
+OMIT_OSAPMPUINFOBããã¯ã­å®ç¾©ããã¨ï¼OSAPINIBä¸­ã«MPUè¨­å®æ
+å ±ãå«ã¾ããª
+ããªãããï¼ããã«ä»£ããæ
+å ±ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ç®¡çããå¿
+è¦ãããï¼
+
+ã¾ãï¼OMIT_OSAPMPUINFOBãå®ç¾©ããå ´åï¼ã¸ã§ãã¬ã¼ã¿ãã³ãã¬ã¼ããã¡ã¤ã«
+ããåç
+§ããtarget_def.csvï¼ã¾ãã¯ï¼åç­ã®å½¹å²ãæã¤ãã¡ã¤ã«ï¼ãã
+OSAPINIBé¢é£ã®OSAPMPUINFOBçææ
+å ±ãåé¤ããå¿
+è¦ãããï¼
+
+OSAPMPUINFOBç®¡çããæ
+å ±ã«é¢ãã¦ã¯ï¼ã6.11.2 OSAPåºæMPUè¨­å®æ
+å ±ãã­ãã¯
+ï¼OSAPMPUINFOBï¼ããåç
+§ï¼
+
+6.5.2 ãã£ã¹ãããã£æ¬ä½
+
+ãã£ã¹ãããã£æ¬ä½ï¼dispatcherï¼ã¯ï¼ã¿ã¼ã²ããéä¾å­é¨ããç´æ¥å¼ã³åºã
+ãããã¨ã¯ãªãï¼ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã®å
+é¨ããã®ã¿å¼ã³åºãããï¼
+dispatcherã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã»å²è¾¼ã¿åªå
+åº¦ãã¹ã¯
+å
+¨è§£é¤ç¶æ
+ããå¼ã³åºãããï¼
+
+dispatcherã®å¦çå
+å®¹ã¯æ¬¡ã®éãï¼
+
+----------------------------------------
+void
+dispatcher(void)
+{
+#ifdef CFG_USE_STACKMONITORING
+	ã¹ã¿ãã¯ãã¤ã³ã¿æ¹å¼ã«ããã¹ã¿ãã¯ã¢ãã¿ãªã³ã°
+	ãã¸ãã¯ãã³ãã¼æ¹å¼ã«ããã¹ã¿ãã¯ã¢ãã¿ãªã³ã°
+#endif /* CFG_USE_STACKMONITORING */
+
+#ifdef CFG_USE_POSTTASKHOOK
+	if (PostTaskHook != 0) {
+		éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæ¿ãã
+		call_posttaskhook();
+		ã³ã³ãã­ã¹ããæ»ã
+	}
+#endif /* CFG_USE_POSTTASKHOOK */
+
+  dispatcher_0:
+#ifdef LOG_DSP_ENTER
+	log_dsp_enter(p_runtsk);
+#endif /* LOG_DSP_ENTER */
+
+	if (callevel_stat & TSYS_DISALLINT) {
+		callevel_stat &= ~TSYS_DISALLINT;
+		å
+¨å²è¾¼ã¿ç¦æ­¢ãè§£é¤ãã
+	}
+
+  dispatcher_1:
+	while ((p_runtsk = p_schedtsk) == NULL) {
+		å²è¾¼ã¿ãè¨±å¯ãããOSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã«ãªãããæºåãã
+		éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæãã
+		OSå²è¾¼ã¿ç¦æ­¢ãè§£é¤ãï¼å²è¾¼ã¿çºçãå¾
+ã¤ â¦ (*1)
+		OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«æ»ã â¦ (*2)
+		ã¿ã¹ã¯ã³ã³ãã­ã¹ãã«æ»ã
+	}
+	p_runosap = p_runtsk->p_osapinib â¦ (*3)
+	èªã¿ã¹ã¯ï¼p_runtskï¼ã®TCBããã¹ã¿ãã¯ãã¤ã³ã¿ãå¾©å¸°ãã
+
+	/* ã¿ã¹ã¯ãã£ã¹ãããæã«MPUæ
+å ±ãåæ¿ãã */
+	if(ã¿ã¹ã¯ãã£ã¹ããããã && p_runosapã¯éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³){
+		ã¹ã¿ãã¯æ
+å ±ã®MPUè¨­å®           â¦ (*4)
+		if(p_runosapãåæ¿ãã){
+			OSã¢ããªã±ã¼ã·ã§ã³æ
+å ±ã®MPUè¨­å® â¦ (*5)
+		}
+	}
+
+#ifdef LOG_DSP_LEAVE
+	log_dsp_leave(p_runtsk);
+#endif /* LOG_DSP_LEAVE */
+
+#ifdef CFG_USE_PRETASKHOOK
+	if (PreTaskHook != 0) {
+		éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæ¿ãã
+		call_pretaskhook();
+		ã¿ã¹ã¯ã³ã³ãã­ã¹ãã«æ»ã
+	}
+#endif /* CFG_USE_PRETASKHOOK */
+
+	èªã¿ã¹ã¯ã®TCBããå®è¡åéçªå°ãå¾©å¸°ãï¼ããã¸åå²ãã
+}
+----------------------------------------
+
+å²è¾¼ã¿çºçãå¾
+ã¤éã«éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæããã®ã¯ï¼ãã®éã«å®è¡
+ãããå²è¾¼ã¿ãã³ãã©å
+ã§ï¼ã¿ã¹ã¯ãã£ã¹ããããããªãããã«ããããã§ã
+ãï¼ãã®æï¼å²è¾¼ã¿ãã³ãã©ãï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ãä½¿ãã
+ãã«ããªããã°ãªããªãï¼éå¸¸ã¯ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæããéã«é
+ã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæãï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã«æ»ãéã«
+å
+ã®ã¹ã¿ãã¯ã«åãæããï¼
+
+ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼ç¹ã«ï¼ã·ãã¥ã¬ã¼ã·ã§ã³ç°å¢ã®å ´åï¼ï¼å¼·å¶çã«éã¿
+ã¹ã¯ã³ã³ãã­ã¹ãã«åãæãããã¨ãé£ããå ´åãããï¼ãã®å ´åã«ã¯ï¼ãã®
+éã«å®è¡ãããå²è¾¼ã¿ãã³ãã©å
+ã§ã¿ã¹ã¯ãã£ã¹ããããããªããããªä»çµã¿
+ãå®è£
+ãããã¨ã§ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãã¸ã®åæããçç¥ãããã¨ãã§ããï¼
+
+(*1)ã«ããã¦ï¼å²è¾¼ã¿ãè¨±å¯ããå¦çã¨ï¼å²è¾¼ã¿çºçãå¾
+ã¤å¦çã¨ã¯ï¼ä¸å¯å
+ã«è¡ãªãå¿
+è¦ãããï¼ãããä¸å¯åã«è¡ãªããªãå ´åï¼å²è¾¼ã¿ãè¨±å¯ããç´å¾
+ã«å²è¾¼ã¿ãå
+¥ãï¼ãã®ä¸­ã§ã¿ã¹ã¯ãå®è¡å¯è½ç¶æ
+ã«ãªãã¨ï¼å®è¡ãã¹ãã¿ã¹ã¯
+ãããã«ãããããããã­ã»ããµãå²è¾¼ã¿å¾
+ã¡ã«ãªã£ã¦ãã¾ãï¼
+
+ã¾ãï¼(*1)ã«ããã¦ï¼å²è¾¼ã¿çºçãå¾
+ã¤å½ä»¤ãç¨æããã¦ããªãå ´åãï¼ãã
+ãçºè¡ããã®ãä¸é½åãªå ´åã«ã¯ï¼å²è¾¼ã¿ããã¹ã¦è¨±å¯ãã¦å²è¾¼ã¿ãåãä»ã
+ãããç¶æ
+ã«ãªã£ãå¾ã«ï¼å²è¾¼ã¿çºçãå¾
+ããã«æ¬¡ã«é²ãã§ãããï¼ãã®å ´åï¼
+whileã«ã¼ãã«ãã£ã¦ï¼å²è¾¼ã¿çºçãå¾
+ã¤ãã¨ã«ãªãï¼
+
+OSå²è¾¼ã¿ç¦æ­¢ãè§£é¤ããããã®æ
+å ±ï¼ä¾ãã°ï¼OSå²è¾¼ã¿ç¦æ­¢åã®å²è¾¼ã¿åªå
+åº¦
+ãã¹ã¯ï¼ãå¤æ°ã«ä¿æãã¦ããå ´åã«ã¯ï¼(*2)ã§OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«æ»ãéã«ï¼
+ãã®å¤æ°ã®å¤ãå
+ã«æ»ã£ã¦ããå¿
+è¦ãããï¼ç¹ã«ï¼ãã®å¤æ°ãï¼å²è¾¼ã¿å¾
+ã¡ã®
+éã«å®è¡ããå²è¾¼ã¿ãã³ãã©å
+ã§æ¸ãæããããå ´åã¯ï¼å
+ã®å¤ã«æ»ããã¨ã
+å¿
+è¦ã§ããï¼
+
+å²è¾¼ã¿å¾
+ã¡ã®éã¯ï¼p_runtskãNULLï¼ï¼0ï¼ã«è¨­å®ããªããã°ãªããªãï¼ä¸ã®
+å¦çå
+å®¹ããã®ã¾ã¾å®è£
+ããã°ãããªãï¼ï¼ãã®ããã«è¨­å®ããªãã¨ï¼å²è¾¼ã¿
+ãã³ãã©ããGetTaskIDãå¼ã³åºããéã®åä½ãä»æ§ã«åè´ããªããªãï¼
+
+(*3)ã®p_runosapã¯ï¼ï¼p_runtskã«ç¸å½ï¼ ç¾å¨ RUNNING ã®ã¿ã¹ã¯ãæå±ããOS
+ã¢ããªã±ã¼ã·ã§ã³ãç¤ºãã°ã­ã¼ãã«å¤æ°ã§ããï¼
+
+ã¡ã¢ãªä¿è­·æ©è½ã«ããã¦ï¼ãã£ã¹ãããããæã«ï¼(*4)(*5)ã§ã¯ï¼MPUã«æ
+å ±ã
+è¨­å®ããï¼ã¾ãï¼(*5)ã®OSã¢ããªã±ã¼ã·ã§ã³æ
+å ±ã®MPUè¨­å®ã«ããã¦ï¼OSã¢ããª
+ã±ã¼ã·ã§ã³ã®ãã©ã¤ãã¼ãé åã¯ï¼ç¾å¨ã®OSã¢ããªã±ã¼ã·ã§ã³ã¨åæ¿ãå
+ã®OS
+ã¢ããªã±ã¼ã·ã§ã³ãåãã§ããå ´åï¼æ
+å ±ãåããªã®ã§åè¨­å®ããªãï¼
+
+ã¿ã¹ã¯ãã£ã¹ãããã«ããã¿ã¹ã¯åãæ¿ãåã«ï¼CFG_USE_POSTTASKHOOKå®ç¾©ã
+ãï¼ã¦ã¼ã¶ããã¹ãã¿ã¹ã¯ããã¯ãå®ç¾©ããå ´åï¼PostTaskHook != NULLï¼ï¼
+ãã¹ãã¿ã¹ã¯ããã¯å¼ã³åºãã¤ã³ã¿ã¼ãã§ã¼ã¹ï¼call_posttaskhookï¼ãå¼åº
+ãå¿
+è¦ãããï¼
+ãã®ä¸æ¹ï¼ã¿ã¹ã¯ãã£ã¹ãããã«ããã¿ã¹ã¯åãæ¿ãå¾ã«ï¼
+CFG_USE_PRETASKHOOKå®ç¾©ããï¼ã¦ã¼ã¶ããã¬ã¿ã¹ã¯ããã¯ãå®ç¾©ããå ´å
+ï¼PreTaskHook != NULLï¼ï¼ãã¬ã¿ã¹ã¯ããã¯å¼ã³åºãã¤ã³ã¿ã¼ãã§ã¼ã¹
+ï¼call_pretaskhookï¼ãå¼åºãå¿
+è¦ãããï¼
+ããã§ï¼ã¢ã»ã³ããªè¨èªã§è¨è¿°ããã¦ãããã£ã¹ãããã£å¦çä¸­ã«ãã¬/ãã¹
+ãã¿ã¹ã¯ããã¯ã®å¼ã³åºããåãè¾¼ãï¼æ¨æºçãªãã¬/ãã¹ãã¿ã¹ã¯ããã¯ã
+Cè¨èªã§è¨è¿°ããã¦ããã¨æ³å®ãã¦ï¼ãããå¼ã³åºãããã«ã³ã¼ãã£ã³ã°ããï¼
+
+dispatcherãã¢ã»ã³ããªè¨èªã§è¨è¿°ããå ´åã«ã¯ï¼ãã¬ã¼ã¹ã­ã°åå¾å¦çã¯ï¼
+ã6.2 ãã¬ã¼ã¹ã­ã°æ©è½ã¸ã®å¯¾å¿ãã®ç¯ã§è¨è¿°ããæ¹æ³ã§ã³ã¼ãã£ã³ã°ããã
+ã¨ï¼ãªãï¼log_dsp_enterã¯åæãåã®ã¿ã¹ã¯ã®ã¹ã¿ãã¯ã§ï¼log_dsp_leave 
+ã¯åæãå¾ã®ã¿ã¹ã¯ã®ã¹ã¿ãã¯ã§å®è¡ããï¼
+
+6.5.3 ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®ãã£ã¹ããã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.5.4 ãã£ã¹ãããã£ã®åä½éå§
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.5.5 ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ãã£ã¹ããã
+
+(6-5-5-2) void exit_and_dispatch_nohook(void)
+
+ç¾å¨ã®ã³ã³ãã­ã¹ããæ¨ã¦ã¦ï¼ãã¹ãããã¯å¼åºããªããã£ã¹ããã
+ï¼exit_and_dispatch_nohookï¼ã¯ï¼èªã¿ã¹ã¯ãå¼·å¶çµäºãããå¦çé¢æ°ããå¼
+ã³åºãããï¼exit_and_dispatch_nohookã¯ï¼ãªã¿ã¼ã³ãããã¨ã®ãªãé¢æ°ã§ã
+ãï¼
+
+exit_and_dispatch_nohookã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã»å²è¾¼
+ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§å¼ã³åºãããï¼
+
+exit_and_dispatch_nohookã¨exit_and_dispatchã¯ï¼ãã¹ãã¿ã¹ã¯ããã¯å¼ã¶
+ãã©ããä»¥å¤ï¼åãã§ããï¼ã¿ã¹ã¯å¼·å¶çµäºãªã®ã§ï¼p_runtsk=NULLã¨ãã¦å®
+è¡ï¼ï¼
+
+exit_and_dispatch_nohookã®å¦çå
+å®¹ã¯æ¬¡ã®éãï¼
+
+----------------------------------------
+void
+exit_and_dispatch_nohook(void)
+{
+	dispatcher_0ã«åå²ãã
+}
+----------------------------------------
+
+6.5.6 ã¿ã¹ã¯ã®èµ·åå¦ç
+
+(6-5-6-1) void activate_context(TCB *p_tcb)
+
+ã¿ã¹ã¯ã®èµ·åå¦çï¼activate_contextï¼ã¯ï¼ã¿ã¹ã¯ãä¼æ­¢ç¶æ
+ããå®è¡ã§ãã
+ç¶æ
+ã«ããæã«å¼ã°ãï¼p_tcbã§æå®ãããã¿ã¹ã¯ï¼å¯¾è±¡ã¿ã¹ã¯ï¼ã®TCBä¸­ã®ã¹
+ã¿ãã¯ãã¤ã³ã¿ãã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ã«åæåããï¼ã¾ãï¼p_tcbãä¿¡
+é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ããå ´åã¯ï¼å®è¡åéçªå°ãä¿¡é ¼ã¿ã¹ã¯éå§æå¦
+çï¼start_stask_rï¼ã«è¨­å®ãï¼p_tcbãéä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ãã
+å ´åã¯ï¼å®è¡åéçªå°ãéä¿¡é ¼ã¿ã¹ã¯éå§æå¦çï¼start_utask_rï¼ã«è¨­å®ã
+ãï¼ãã®æç¹ã§ã¯ï¼å¾è¿°ããçç±ã§ï¼å¯¾è±¡ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åãä½¿ã£ã¦ã¯ãª
+ããªãï¼
+
+å¯¾è±¡ã¿ã¹ã¯ãæåã«å®è¡ãããæã«ã¯ï¼å¯¾è±¡ã¿ã¹ã¯ãèªã¿ã¹ã¯ã¨ãã¦ï¼å®è¡å
+éçªå°ã¨ãã¦ç»é²ããstart_utask_rï¼ä¿¡é ¼ã¿ã¹ã¯ã®å ´åã¯start_stask_rï¼ã«
+åå²ãã¦ããï¼start_utask_rï¼ä¿¡é ¼ã¿ã¹ã¯ã®å ´åã¯start_stask_rï¼ã«ã¯ï¼
+dispatcherã®ã¿ããåå²ãï¼ãã®æã®ç¶æ
+ã¯ï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã»OSå²è¾¼ã¿
+ç¦æ­¢ç¶æ
+ã»å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ç¶æ
+ã§ããï¼
+
+start_stask_rã¯ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ãè§£é¤ããå¾ï¼ã¿ã¹ã¯ã®èµ·åçªå°ãå¼ã³
+åºãï¼
+ããã«ï¼ã¿ã¹ã¯ã®èµ·åçªå°ããæ»ã£ã¦ããå ´åã«ã¯ï¼exit_taskãå¼ã³åºãï¼
+
+start_utask_rã¯ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ãè§£é¤ããå¾ï¼CPUãéç¹æ¨©ã¢ã¼ãã¸è¨­å®
+ããåæã«ã¿ã¹ã¯ã®èµ·åçªå°ãå¼ã³åºãï¼ããã«ï¼ã¿ã¹ã¯ã®èµ·åçªå°ããæ»ã£
+ã¦ããå ´åã«ã¯ï¼exit_utaskãå¼ã³åºãï¼
+
+activate_contextã¨start_rã®å¦çå
+å®¹ã¯æ¬¡ã®éãï¼
+
+----------------------------------------
+void
+activate_context(TCB *p_tcb)
+{
+	æå®ãããã¿ã¹ã¯ï¼p_tcbï¼ã®TCBä¸­ã®ã¹ã¿ãã¯ãã¤ã³ã¿ãåæåãã
+	if (æå®ãããã¿ã¹ã¯ãéä¿¡é ¼ã¿ã¹ã¯) {
+		start_utask_rãï¼å®è¡åéçªå°ã¨ãã¦èªã¿ã¹ã¯ã®TCBã«ä¿å­ãã â¦ (*a)
+	}
+	else {
+		start_stask_rãï¼å®è¡åéçªå°ã¨ãã¦èªã¿ã¹ã¯ã®TCBã«ä¿å­ãã â¦ (*a)
+	}
+	return;
+
+  start_stask_r:
+	å¼åºãé¢æ°ãexit_taskã¨ãã¦è¨­å®ãã  â¦ (*c)
+	ç¹æ¨©ã¢ã¼ãã§åä½ããããæºå
+	start_rã«åå²ãã
+
+  start_utask_r:
+	å¼åºãé¢æ°ãexit_utaskã¨ãã¦è¨­å®ãã  â¦ (*c)
+	éç¹æ¨©ã¢ã¼ãã§åä½ããããæºå
+	ã¹ã¿ãã¯ãã·ã¹ãã ã¹ã¿ãã¯ããã¦ã¼ã¶ã¹ã¿ãã¯ã«åãæ¿ãã
+	start_rã«åå²ãã
+
+  start_r:
+#ifdef CFG_USE_STACKMONITORING
+	ã¿ã¹ã¯èµ·åæ¯ã«ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ã®ãã¸ãã¯ãã³ãã¼ãåæåãã â¦ (*d)
+#endif /* CFG_USE_STACKMONITORING */
+    p_runtsk->curpri = p_runtsk->p_tinib->exepri;
+	èªã¿ã¹ã¯ã®èµ·åçªå°ã¸åå²ããããã«æºåãã
+	OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã«ãã
+	åä½ã¢ã¼ãè¨­å®ããåæã«ï¼
+			èªã¿ã¹ã¯ï¼p_runtskï¼ã®èµ·åçªå°ãå¼ã³åºã â¦ (*e)
+}
+----------------------------------------
+
+(*c)ã§èªã¿ã¹ã¯ã®èµ·åçªå°ãå¼ã³åºãæã®è¿ãçªå°ãexit_utask(ä¿¡é ¼ã¿ã¹ã¯
+ã®å ´åexit_task)ã®çªå°ã¨ãã¦ããï¼ã¿ã¹ã¯ãä¸æ­£çµäºããå ´åï¼ä¿è­·å¦çã
+è¡ãï¼
+
+ããã§ï¼ã¿ã¹ã¯ã®èµ·åå¦çã«ããã¦å¯¾è±¡ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åãä½¿ã£ã¦ã¯ãªã
+ãªãçç±ã¯ï¼æ¬¡ã®éãï¼è¤æ°ã®åºæ¬ã¿ã¹ã¯ãã¹ã¿ãã¯é åãå
+±æãã¦ããå ´å
+ã«ï¼ã¿ã¹ã¯ã®èµ·åæç¹ã§ã¯ï¼ãã®ã¿ã¹ã¯ã¨ã¹ã¿ãã¯é åãå
+±æãã¦ããã¿ã¹ã¯
+ãï¼ã¹ã¿ãã¯é åãä½¿ç¨ãã¦ããå¯è½æ§ãããããã§ããï¼
+
+ãã®ãã¼ãã£ã³ã°ã¬ã¤ãã§ã¯ï¼ã¿ã¹ã¯ã®å®è¡åéçªå°ãTCBã«ä¿å­ãã¦ãã
+(*a)ï¼ãããã¹ã¿ãã¯ã«ä¿å­ããæ¹æ³ãèãããããï¼ã¿ã¹ã¯ã®èµ·åå¦çã§ã¹
+ã¿ãã¯é åãä½¿ããªããã¨ããï¼ã¿ã¹ã¯ã®èµ·åå¦çã ãã¯ä¾å¤æ±ãããªããã°
+ãªããªãï¼ä¾ãã°ï¼ã¿ã¹ã¯ã®èµ·åå¦çã«ããã¦ã¯TCBä¸­ã®ã¹ã¿ãã¯ãã¤ã³ã¿ã
+ç¹æ®ãªå¤ï¼ä¾ãã°0ï¼ã«è¨­å®ãã¦ããï¼ãã£ã¹ãããã£æ¬ä½ã§TCBä¸­ã®ã¹ã¿ãã¯
+ãã¤ã³ã¿ããã®å¤ã®å ´åã«ã¯start_utask_rï¼ä¿¡é ¼ã®å ´åã¯ï¼start_stask_rï¼
+ã«åå²ããï¼start_utask_rï¼ä¿¡é ¼ã®å ´åã¯ï¼start_stask_rï¼ã«ããã¦ã¹ã¿ã
+ã¯ãã¤ã³ã¿ãåæåããæ¹æ³ãèããããï¼
+
+(*d)ã«ããã¦ï¼SC3ã§ã¯ã¿ã¹ã¯å¼·å¶çµäºãããã®ã§ï¼ã¿ã¹ã¯èµ·åæ¯ã«ãã¸ãã¯
+ãã³ãã¼ãåæåããï¼
+
+(*e)ã«ããã¦ï¼CPUåä½ã¢ã¼ãã¨ã¿ã¹ã¯ã®å¼åºãã¯ï¼åæã«è¡ãå¿
+è¦ãããï¼
+start_utask_rï¼ä¿¡é ¼ã®å ´åã¯ï¼start_stask_rï¼ã¯ï¼ç¹æ¨©ã¢ã¼ãã§å¼åºããã
+ãï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ããã¿ã¹ã¯ã®å ´åï¼ç¹æ¨©ã¢ã¼ãã§ï¼éä¿¡é ¼
+OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ããã¿ã¹ã¯ã¯ï¼éç¹æ¨©ã¢ã¼ãã§å®è¡ããå¿
+è¦ããã
+ï¼ä¾å¤/å²è¾¼ã¿ããã®ãªã¿ã¼ã³å½ä»¤ãä½¿ç¨ããã®ã1ã¤ã®æ¹æ³ã§ããï¼
+
+6.6 å²è¾¼ã¿ãã³ãã©
+
+6.6.1 å²è¾¼ã¿ãã³ãã©ã®åºå
+¥å£å¦ç
+
+C2ISRã®å²è¾¼ã¿ã®åºå
+¥å£å¦çã®æ¹æ³ã¯ï¼ãã­ã»ããµã«ãã£ã¦å¤§ããç°ãªããï¼
+ATK2-SC3ã«ããã¦ã¯ï¼ããããã®å¦çå
+å®¹ã¯æ¬¡ã®éãï¼
+
+----------------------------------------
+void
+<å²è¾¼ã¿ã®åºå
+¥å£å¦ç>(void)
+{
+	if (éç¹æ¨©ã¢ã¼ãã§å²è¾¼ã¿çºç) {
+		ã¹ã¿ãã¯ãå®è¡ç¶æ
+ã®ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ã«åãæãã
+	}
+	å°ãªãã¨ãOSå²è¾¼ã¿ãç¦æ­¢ããç¶æ
+ã«ãã â¦ (*f)
+	ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ã«ä¿å­ãã
+	if (ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç) {
+		ã¹ã¿ãã¯ãéã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæãï¼
+								éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæãã
+	}
+	å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãï¼åãä»ããå²è¾¼ã¿è¦æ±ã®å²è¾¼åªå
+åº¦ã«è¨­å®ãï¼
+				OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã«ããï¼åãä»ããå²è¾¼ã¿ããã
+				åªå
+åº¦ã®é«ãå²è¾¼ã¿ãåãä»ããããã«ããï¼â¦ (*i)
+
+#ifdef CFG_USE_STACKMONITORING
+	if (ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç) {
+		ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼ã§ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ã®
+											ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ãè¡ã
+		ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼ã§ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ã®
+											ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ãè¡ã
+	}
+	else {
+		ã¹ã¿ãã¯æ®éãã§ãã¯æ¹å¼ã§C2ISRç¨ã¹ã¿ãã¯ã®ã¹ã¿ãã¯ã¢ãã¿
+		ãªã³ã°ãè¡ã
+		ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼ã§C2ISRç¨ã¹ã¿ãã¯ã®ã¹ã¿ãã¯ã¢ãã¿
+		ãªã³ã°ãè¡ã
+	}
+#endif /* CFG_USE_STACKMONITORING */
+
+	callevel_statãä¿å­
+	callevel_statã«å²è¾¼ã¿ããããç«ã¦ã
+	run_trustedãä¿å­
+	p_runosapãä¿å­
+	p_runisrãä¿å­
+	p_runisrãå®è¡ããC2ISRã«å¯¾å¿ããisrcb_tableã®è¦ç´ ã«è¨­å®ãã
+	p_runosapãå®è¡ããC2ISRãæå±ããOSã¢ããªã±ã¼ã·ã§ã³ã«è¨­å®ãã
+
+	C2ISRãå¼ã³åºã
+
+#ifdef CFG_USE_STACKMONITORING
+	ãã¸ãã¯ãã³ãã¼ãã§ãã¯æ¹å¼ã§C2ISRç¨ã¹ã¿ãã¯ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³
+	ã°ãè¡ã
+#endif /* CFG_USE_STACKMONITORING */
+
+	exit_isr2();			/* C2ISRã®ä¸æ­£çµäºãã§ãã¯ */
+
+	p_runisrãå¾©å¸°
+	p_runosapãå¾©å¸°
+	run_trustedãå¾©å¸°
+	callevel_statãå¾©å¸°
+
+  ret_int:
+	if (ã¿ã¹ã¯ã³ã³ãã­ã¹ãã§å²è¾¼ã¿çºç) {
+		ï¼å°ãªãã¨ãï¼OSå²è¾¼ã¿ãç¦æ­¢ããç¶æ
+ã«ãã
+		ã¹ã¿ãã¯ãã¿ã¹ã¯ç¨ã®ã¹ã¿ãã¯ã«æ»ãï¼ã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæãã
+		ã¹ã¿ãã¯ãã¤ã³ã¿ãå¾©å¸°
+		if (p_runtsk == NULL) {
+			OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã â¦ (*e)
+			å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãï¼å
+¨è§£é¤ç¶æ
+ï¼TIPM_ENAALLï¼ã«è¨­å®ãã
+								 â¦ (*h)
+			dispatcherã«åå²ãã
+		}
+		else if (p_runtsk != p_schedtsk) {
+			OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã							â¦ (*e)
+			å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ãï¼å
+¨è§£é¤ç¶æ
+ï¼TIPM_ENAALLï¼ã«è¨­å®ãã
+															â¦ (*h)
+			ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãé¤ããã¹ã¦ã®ã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ã«ä¿å­ã
+			ã
+			ã¹ã¿ãã¯ãã¤ã³ã¿ãèªã¿ã¹ã¯ï¼p_runtskï¼ã®TCBã«ä¿å­ãã
+			ret_int_rãï¼å®è¡åéçªå°ã¨ãã¦èªã¿ã¹ã¯ã®TCBã«ä¿å­ãã
+
+			dispatcherã«åå²ãã
+
+		  ret_int_r:
+			ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãé¤ããã¹ã¦ã®ã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ããå¾©å¸°
+			ãã
+		}
+	}
+	å²è¾¼ã¿å¦çããã®ãªã¿ã¼ã³å¾ã«ï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã
+								å²è¾¼ã¿å¦çåã®å¤ã«æ»ãããã«æºåãã
+	å²è¾¼ã¿å¦çããã®ãªã¿ã¼ã³å¾ã«ï¼OSå²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã«æ»ãããã«æºå
+	ãã
+	ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ããå¾©å¸°ãã
+	å²è¾¼ã¿å¦çããã®ãªã¿ã¼ã³
+}
+----------------------------------------
+
+6.6.2 å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®å±æ§ã®è¨­å®
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.6.3 å²è¾¼ã¿ç®¡çæ©è½ã®åæåå¦çã®å¤æ´
+
+(6-6-3-9) intatrï¼å²è¾¼ã¿å±æ§
+
+6.6.4 ããã©ã«ãã®C2ISR
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.6.5 ã«ã¼ãã«ç®¡çå¤ã®å²è¾¼ã¿
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.6.6 DisableAllInterrupts/EnableAllInterruptsã®å¦çå
+å®¹ã®å¤æ´
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.6.7 å²è¾¼ã¿ç¦æ­¢è§£é¤
+
+(6-6-7-1) LOCAL_INLINE void x_clear_nested_os_int(void)
+
+6.7 ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°
+
+SC3ã§ãã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ©è½ãå®è£
+ããï¼éä¿¡é ¼ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ã
+ã¯ã¹ã¿ãã¯ã¯ï¼ã¡ã¢ãªä¿è­·ã¦ãããï¼MPUï¼ããä¿è­·ããããï¼ä»¥ä¸ã®ã¹ã¿ã
+ã¯ãã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ©è½ã§ä¿è­·ããï¼
+(1)éä¿¡é ¼ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯
+(2)ä¿¡é ¼ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯
+(3)ã·ã¹ãã ã¹ã¿ãã¯
+(4)ä¿¡é ¼é¢æ°å®è¡æã®ã¹ã¿ãã¯
+
+6.7.1 ãã£ã¹ãããã£ã¨C2ISRã®åºå
+¥å£å¦çã§ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°
+
+ãã£ã¹ãããã£ã¨C2ISRã®åºå
+¥å£å¦çã§ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ã§ã¹ã¿ãã¯ãª
+ã¼ãã¼ãã­ã¼ãæ¤åºãããå ´åã®å¦çã¯ä»¥ä¸ã®éãï¼ATK2-SC3ã§ã¯ã¹ã¿ãã¯ãª
+ã¼ãã¼ãã­ã¼æ¤åºæã®call_protectionhook_mainããã¯ãªã¿ã¼ã³ããå¯è½æ§ã
+ããï¼
+
+----------------------------------------
+#ifdef CFG_USE_STACKMONITORING
+void
+ã¹ã¿ãã¯ãªã¼ãã¼ãã­ã¼æ¤åºå¦ç(void)
+{
+	uint32 ret;
+
+	if (C2ISRã®åºå
+¥å£å¦çã§ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°) {
+		OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+		ret = E_OS_STACKFAULT;
+	}
+	if (ã¿ã¹ã¯ã³ã³ãã­ã¹ã) {
+		éã¿ã¹ã¯ã³ã³ãã­ã¹ãã«åãæ¿ãã
+		ret = E_OS_STACKFAULT;
+	}
+	pre_protection_supervised = TRUE;
+	call_protectionhook_main(ret);
+	/* ããã«ã¯æ»ã£ã¦ããªã */
+}
+#endif /* CFG_USE_STACKMONITORING */
+----------------------------------------
+
+6.7.2 ä¿¡é ¼é¢æ°å®è¡ã®åºå£å¦çã§ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°
+
+ä¸æ¹ï¼ä¿¡é ¼é¢æ°å®è¡ã®åºå£å¦çã§ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ã§ã¹ã¿ãã¯ãªã¼ãã¼
+ãã­ã¼ãæ¤åºãããå ´åã®å¦çã¯ä»¥ä¸ã®éãï¼ATK2-SC3ã§ã¯ã¹ã¿ãã¯ãªã¼ãã¼
+ãã­ã¼æ¤åºæã®call_protectionhook_mainããã¯ãªã¿ã¼ã³ããªãï¼
+
+----------------------------------------
+StatusType
+CallTrustedFunction(...)
+{
+	...
+
+	ä¿¡é ¼é¢æ°å®è¡
+
+#ifdef CFG_USE_STACKMONITORING
+	if (C2ISRå¦çã¬ãã«) {
+		if (ã·ã¹ãã ã¹ã¿ãã¯ãã¸ãã¯ãã³ãã¼ãã§ãã¯NG) {
+			OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+			pre_protection_supervised = TRUE;
+			call_protectionhk_main(E_OS_STACKFAULT);
+			/* ããã«ã¯æ»ã£ã¦ããªã */
+		}
+	}
+	else {
+		if (å®è¡ä¸­ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ãã¸ãã¯ãã³ãã¼ãã§ãã¯NG) {
+			OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+			pre_protection_supervised = TRUE;
+			call_protectionhk_main(E_OS_STACKFAULT);
+			/* ããã«ã¯æ»ã£ã¦ããªã */
+		}
+	}
+#endif /* CFG_USE_STACKMONITORING */
+
+	...
+}
+----------------------------------------
+
+ä¿¡é ¼é¢æ°å®è¡åã«ï¼ä¿¡é ¼é¢æ°ä½¿ç¨ããã¹ã¿ãã¯ã®éã¨ï¼ä½¿ç¨ããã¹ã¿ãã¯ã®ç©º
+ãéãç
+§åãã¦ããï¼
+
+ä¿¡é ¼é¢æ°å®è¡å¾ä½¿ç¨ããã¹ã¿ãã¯ã«å¯¾ãã¦ãã¸ãã¯ãã³ãã¼æ¹å¼ã®ã¿ï¼ãã§ã
+ã¯ãã¦ããçç±ã¯ï¼ãã§ãã¯ããæç¹ã§ï¼ã¹ã¿ãã¯ãã¤ã³ã¿ã¯ï¼ä¿¡é ¼é¢æ°å®è¡
+ããåã®ç¶æ
+ã«æ»ã£ããã¨ã§ããï¼
+
+
+6.8 CPUä¾å¤ãã³ãã©
+
+CPUä¾å¤ã®åºå
+¥å£å¦çã®æ¹æ³ã¯ãã­ã»ããµã«ãã£ã¦å¤§ããç°ãªããï¼ãããã
+ã®å¦çå
+å®¹ã¯æ¬¡ã®éãï¼
+
+----------------------------------------
+void
+<CPUä¾å¤ã®åºå
+¥å£å¦ç>(void)
+{
+	if (éç¹æ¨©ã¢ã¼ãã§çºç && ããã¯å¦çä¸­ã§çºç) {
+		if (CPUä¾å¤çºçãæªãã¹ã && C1ISRå¦çä¸­ä»¥å¤ã§CPUä¾å¤çºç) {
+			ã¹ã¿ãã¯ãéã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯ã«åãæãæºå
+		}
+	}
+
+	ã¹ã¯ã©ããã¬ã¸ã¹ã¿åã³ã¹ã¿ãã¯ãã¤ã³ã¿ãéã¿ã¹ã¯ã³ã³ãã­ã¹ãã¹ã¿ã
+	ã¯ã«ä¿å­ãã
+
+	if (OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ãªã &&
+		C1ISRå®è¡ä¸­ã®CPUä¾å¤ã§ãªã && å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ãªã){
+		OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+	}
+
+	ã¿ã¼ã²ããä¾å­ã®CPUä¾å¤æ
+å ±ãåå¾ãã                   â¦ (*h)
+
+	if (å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤ç¶æ
+ã§CPUä¾å¤çºç) {
+		å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ãè§£é¤ãã                          â¦ (*i)
+	}
+
+	ã¿ã¼ã²ããä¾å­ã®CPUä¾å¤æ
+å ±ãéé¿ãã                   â¦ (*j)
+	ã¿ã¼ã²ããä¾å­ã®CPUä¾å¤æ
+å ±ãä¿å­ãã
+
+	if (ä¾å¤è¦å çªå· > TNUM_EXCH) {
+		ã¨ã©ã¼ã³ã¼ã = E_OS_PROTECTION_EXCEPTIONã¨ãã
+	}
+	else {
+		ä¾å¤ã³ã¼ãå¤æãã¼ãã«ããã¨ã©ã¼ã³ã¼ããåå¾ãã
+	}
+
+	if (ä¾å¤çºçæãéç¹æ¨©ã¢ã¼ã) {
+		pre_protection_supervised = FALSE;
+	}
+	else {
+		pre_protection_supervised = TRUE;
+	}
+
+	call_protectionhook_main(ã¨ã©ã¼ã³ã¼ã);
+
+	ã¿ã¼ã²ããä¾å­ã®CPUä¾å¤æ
+å ±ãå¾©å¸°ãã
+
+  ret_exc:
+	å²è¾¼ã¿ã»ä¾å¤ã®ãã¹ãåæ°ï¼except_nest_cntï¼ããã£ã¯ãªã¡ã³ããã
+
+	CPUä¾å¤å¦çããã®ãªã¿ã¼ã³å¾ã«ï¼CPUä¾å¤çºçåã®å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«æ»ã
+	ããã«æºåãã                                          â¦ (*k)
+
+	CPUä¾å¤å¦çä¸­ã«å¤æ´ããå
+¨å²è¾¼ã¿ç¶æ
+ããªã¿ã¼ã³å¾ã«ãåæ 
+	ããããï¼æºåãã                                      â¦ (*l)
+
+	å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+
+  ret_int_1:
+	ã¹ã¯ã©ããã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ããå¾©å¸°ãã
+	éé¿ããã¹ã¿ãã¯ãã¤ã³ã¿ãå¾©å¸°ãã
+	CPUä¾å¤å¦çããã®ãªã¿ã¼ã³
+}
+----------------------------------------
+
+å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§CPUä¾å¤ãçºçããå ´åã¯ï¼å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ãã­ãã¯
+ã·ã§ã³ããã¯ãå¼ã³åºãï¼
+
+å²è¾¼ã¿å¿ç­æ§åä¸ããã«ã¯ï¼å
+¨å²è¾¼ã¿ç¦æ­¢ãã¦ããç¶æ
+ã®å¦çããªãã¹ãå°ãª
+ãããå¿
+è¦ãããã®ã§ï¼ä¾å¤çºçè¦å æ
+å ±ã®ä¿å­ã¯ï¼(*h)ã§ã¯ãªãï¼(*i)å¦ç
+ã®å¾ã«ãã¹ãã§ããï¼ä¸è¨ã®ä¾ã§ã¯ï¼(*j)ã§ä¿å­ãã¦ããï¼
+
+ãã­ãã¯ã·ã§ã³ããã¯ãå®è¡ããéã«çµç±ããé¨åã§ã¯ï¼CPUä¾å¤ãèµ·ããå¯
+è½æ§ãæ¥µåæ¸ããã¨ã¨ãã«ï¼CPUä¾å¤ãèµ·ããå¯è½æ§ãããå ´åï¼ä¾ãã°ï¼ã¹
+ã¯ã©ããã¬ã¸ã¹ã¿ãã¹ã¿ãã¯ã«ä¿å­ããæã«ï¼ãã¹ã¨ã©ã¼ãªã©ã®CPUä¾å¤ãçº
+çããå¯è½æ§ãèããããï¼ã«ã¯ï¼ãã®å¯è½æ§ãã¿ã¼ã²ããä¾å­é¨ã®ã¦ã¼ã¶ã¼
+ãºããã¥ã¢ã«ã«è¨è¼ããªããã°ãªããªãï¼
+
+ret_excä»¥éã®å¦çã¯ï¼å²è¾¼ã¿ã®åºå
+¥å£å¦çã®ret_intä»¥éã®å¦çã¨ã»ã¼åãã§
+ããããï¼ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼å
+±éã®ã«ã¼ãã³ãç¨ãããã¨ãã§ããå¯è½
+æ§ãããï¼
+
+CPUä¾å¤å¦çä¸­ã«ï¼å
+¨å²è¾¼ã¿ç¦æ­¢ããå ´åï¼CPUä¾å¤æ»ã£ãå´ã«åæ ããªããã°
+ãªããªãã®ã§ï¼(*l)ã§å¤æ´ããå
+¨å²è¾¼ã¿ç¶æ
+ããªã¿ã¼ã³å¾ã«ãåæ ããããï¼
+å·¥å¤«ããï¼
+
+6.9 ã½ããã¦ã§ã¢å²è¾¼ã¿ãã³ãã©
+
+ã½ããã¦ã§ã¢å²è¾¼ã¿ãã³ãã©ã¯ï¼SC3ããã·ã¹ãã ãµã¼ãã¹ã®ã¨ã³ããªã«ã¼ã
+ã³ã¨ãã¦æ©è½ããï¼
+ã½ããã¦ã§ã¢å²è¾¼ã¿ãã³ãã©ã«ã¯ï¼ã·ã¹ãã ãµã¼ãã¹ã®æ©è½ã³ã¼ãï¼ã·ã¹ãã 
+ãµã¼ãã¹ã®ãã©ã¡ã¼ã¿ãå
+¥åå¤ã¨ãã¦ï¼æ¸¡ãï¼ã·ã¹ãã ãµã¼ãã¹å®è¡ã®æ»ãå¤
+ãå¼åºãå´ã«è¿ãï¼
+
+ã½ããã¦ã§ã¢å²è¾¼ã¿æ¬ä½ã¯ï¼ä»¥ä¸ã®å¦çãè¡ãï¼
+(a) å¼åºãå
+ã®ã³ã³ãã­ã¹ãã®ä¿å­ï¼ãªã¿ã¼ã³æã®å¾©å¸°ã«ä½¿ç¨ï¼
+
+(b) ã¹ã¿ãã¯ã®åæ¿ãï¼ã¦ã¼ã¶ã¹ã¿ãã¯ããã·ã¹ãã ã¹ã¿ãã¯ã¸åæ¿ãï¼
+å¼åºå
+ãç¹æ¨©ã¢ã¼ãã®å ´åã¯åæ¿ããªãï¼ãã§ã«ã·ã¹ãã ã¹ã¿ãã¯ãå²è¾¼ã¿ã¹
+ã¿ãã¯ãä½¿ç¨ãã¦ããããåæ¿ãä¸è¦ï¼ï¼
+
+(c) ã«ã¼ãã«ãµã¼ãã¹ã®ç¹å®
+å¼åºãå
+ããæ¸¡ãããã·ã¹ãã ãµã¼ãã¹ã®æ©è½ã³ã¼ããå©ç¨ãã¦ï¼ã·ã¹ãã ãµ
+ã¼ãã¹ã®å
+é ­ã¢ãã¬ã¹ãç¹å®ããï¼
+
+(d)ã·ã¹ãã ãµã¼ãã¹æ¬ä½ã®å¼åºã
+ä¸è¨(c)ããåå¾ããã·ã¹ãã ãµã¼ãã¹ãå¼åºãï¼ ã·ã¹ãã ãµã¼ãã¹ã®æ»ãå¤
+ãå¼åºãå
+ã«è¿ãæºåãè¡ãï¼
+
+(e) ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ã¼ãã³ã®çµäºå¦ç
+ä¸è¨(a)ã§ä¿å­ããå¼åºãå
+ã®ã³ã³ãã­ã¹ããå¾©å¸°ãï¼å¼åºãå
+ã¸ãªã¿ã¼ã³ã
+ãï¼
+
+ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããã·ã¹ãã ãµã¼ãã¹å¼åºãã®ããããã®å¦çå
+å®¹ã¯æ¬¡
+ã®éãï¼
+
+----------------------------------------
+uint32
+trap_handler(FunctionCodeType fncd, ã·ã¹ãã ãµã¼ãã¹ãã©ã¡ã¼ã¿ãªã¹ã)
+{
+	uint32		retval;
+
+	if (éç¹æ¨©ã¢ã¼ãããã®å¼ã³åºã) {
+		if (éä¿¡é ¼ããã¯å®è¡ä¸­ããã®å¼ã³åºã) {
+			ã¹ã¿ãã¯ãéä¿¡é ¼ããã¯å®è¡åã®ã¹ã¿ãã¯ã«åæãã  â¦ (*a)
+		}
+		else {
+			ã¹ã¿ãã¯ãå®è¡ç¶æ
+ã®ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯ã«åæãã
+		}
+	}
+	å¼åºãå
+ã³ã³ãã­ã¹ãã®ä¿å­
+
+	if (fncd > TMAX_SVCID) {
+		/*
+		 *  ã·ã¹ãã ãµã¼ãã¹ä¸æ­£å¼åºãã®å ´å
+		 */
+		no_support_service();
+	}
+	else {
+		ã«ã¼ãã«ãµã¼ãã¹ã®å
+é ­ã¢ãã¬ã¹ã®ç¹å®ï¼svc_table[fncd]ï¼
+		ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããã·ã¹ãã ç¶æ
+ãå¤åããå ´åã«ã¯ï¼
+					ã½ããã¦ã§ã¢å²è¾¼ã¿åã®ã·ã¹ãã ç¶æ
+ã«æ»ã â¦ (*b)
+		ã·ã¹ãã ãµã¼ãã¹å®è¡å¾ã®æ»ãçªå°ï¼trp_SVC_retï¼æå®
+		ã·ã¹ãã ãµã¼ãã¹ã®å®è¡ï¼
+		retval = (*(svc_table[fncd]))(ã·ã¹ãã ãµã¼ãã¹ãã©ã¡ã¼ã¿ãªã¹ã);
+	}
+
+
+  trp_SVC_ret:
+	ã½ããã¦ã§ã¢å²è¾¼ã¿ãããªã¿ã¼ã³å¾ã®ã·ã¹ãã ç¶æ
+ãï¼
+					ãã®æç¹ã§ã®ã·ã¹ãã ç¶æ
+ã«ãªãããæºåãã â¦ (*c)
+	å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãã
+
+	/* æ§è½æ¸¬å®ç¨ ã­ã£ãã·ã¥ãã¼ã¸å¦ç */
+#ifdef PERF_TEST
+	if (ã­ã£ãã·ã¥ãã¼ã¸ãã©ã° != 0) {
+		å½ä»¤ã­ã£ãã·ã¥é åã¯ãªã¢
+	}
+#endif /* PERF_TEST */
+
+	å¼åºãå
+ã³ã³ãã­ã¹ãã®å¾©å¸°
+	return(retval);
+}
+----------------------------------------
+
+(*a)ã«ããã¦ï¼éä¿¡é ¼ã®ããã¯ã«ã¼ãã³å®è¡ä¸­ã¯ï¼ã¹ã¿ãã¯ãã¤ã³ã¿ä¿æå¤æ°
+ï¼hook_savedspï¼ãéä¿¡é ¼ã®ããã¯ã«ã¼ãã³ãå®è¡åã®ã¹ã¿ãã¯ã«ãªã£ã¦ãã
+ã®ã§ï¼ãã®ç¶ãããã¹ã¿ãã¯ãä½¿ãï¼
+
+(*b)ã«ããã¦ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ããï¼ã·ã¹ãã ç¶æ
+ãå¤åããå ´åï¼ã½ã
+ãã¦ã§ã¢çºçåã®ç¶æ
+ã«æ»ãã¦ï¼ã·ã¹ãã ãµã¼ãã¹ãå¼åºãï¼è¦ã¯ï¼ã·ã¹ãã 
+ãµã¼ãã¹ã¯ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ä½¿ç¨ãã©ããã«é¢ãããã·ã¹ãã å¼åºãæç¹
+ã®ç¶æ
+ã§å®è¡ããï¼
+
+(*c)ã«ããã¦ï¼ã·ã¹ãã ãµã¼ãã¹å¦çä¸­ã«ï¼å¤æ´ããã·ã¹ãã ç¶æ
+(ä¾ãã°ï¼
+å
+¨å²è¾¼ã¿ç¦æ­¢ãªã©ï¼ã¯ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ãªã¿ã¼ã³å¾ã«ãåæ ããï¼
+
+svc_tableã¯ï¼ã·ã¹ãã ãµã¼ãã¹ãã¼ãã«ã¨å¼ã³ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ãã
+å®è¡ãããã·ã¹ãã ãµã¼ãã¹ã®å
+é ­ã¢ãã¬ã¹ãç»é²ãããï¼ã½ããã¦ã§ã¢å²è¾¼
+ã¿ã«ããã·ã¹ãã ãµã¼ãã¹æå®ããå ´åã¯ï¼ã·ã¹ãã ãµã¼ãã¹ã³ã¼ããç¨ã
+ãï¼
+
+no_support_service()é¢æ°ã¯ï¼ä¸æ­£ãªæ©è½ã³ã¼ããæå®ãã¦ï¼ã·ã¹ãã ãµã¼ã
+ã¹çºè¡æã®å¦çã§ããï¼ã¨ã©ã¼ã³ã¼ãã«E_OS_SERVICEIDãè¨­å®ãï¼ãµã¼ãã¹ID
+ã«OSServiceId_INVALIDãè¨­å®ãã¦ï¼ã¨ã©ã¼ããã¯ãå¼åºãï¼
+
+6.10 ä¿¡é ¼OSAPã¨éä¿¡é ¼OSAPããã®ã·ã¹ãã ãµã¼ãã¹å¼åºã
+
+SC3ã®ã¡ã¢ãªä¿è­·æ©è½ãå®ç¾ããããï¼ãã­ã»ããµã¯å°ãªãã¨ãç¹æ¨©ã¢ã¼ãã¨
+éç¹æ¨©ã¢ã¼ãããµãã¼ãããå¿
+è¦ãããï¼ã«ã¼ãã«åã³ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§
+ã³ã«æå±ããå¦çåä½ã¯ç¹æ¨©ã¢ã¼ãã§å®è¡ãï¼ã¡ã¢ãªä¿è­·æ©æ§ï¼MPUï¼ãåã
+ãªãï¼â»1ï¼ï¼éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ããå¦çåä½ã¯éç¹æ¨©ã¢ã¼ã
+ã§å®è¡ãï¼ã¡ã¢ãªä¿è­·æ©æ§ï¼MPUï¼ãåãï¼ã¾ãï¼ãã­ã»ããµã¯ï¼ã½ããã¦ã§
+ã¢å²è¾¼ã¿ãªã©éç¹æ¨©ã¢ã¼ãããç¹æ¨©ã¢ã¼ãã¸é·ç§»ã§ããæ©è½ï¼å½ä»¤ï¼ãæããï¼
+
+ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã¯ï¼ã·ã¹ãã ãµã¼ãã¹ãç´æ¥é¢æ°å¼ã³åºãã§ãããï¼
+éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããï¼ã·ã¹ãã ãµã¼ãã¹ãå¼åºãããï¼ã½ããã¦ã§
+ã¢å²è¾¼ã¿ã«ããå¼åºãæ©è½ãã¿ã¼ã²ããä¾å­é¨ã§ã«ã¼ãã«ã®ãµã¼ãã¹ã³ã¼ã«ã®
+ã¤ã³ã¿ãã§ã¼ã¹ãå®è£
+ããï¼
+
+6.10.1 ã·ã¹ãã ãµã¼ãã¹å¼åºãã®å®ç¾©
+
+(1) ã·ã¹ãã ãµã¼ãã¹ã®é¢æ°å¼åºãã®å®ç¾©(svc_funcall.h)ï¼
+
+----------------------------------------
+#define SVC_CALL(system_service) _kernel_ ## system_service
+
+#ifdef TOPPERS_SVC_FUNCCALL
+#define StartOS _kernel_StartOS
+#define ActivateTask _kernel_ActivateTask
+...
+#endif
+----------------------------------------
+
+(2) ã·ã¹ãã ãµã¼ãã¹ã®ã½ããã¦ã§ã¢å²è¾¼ã¿å¼åºãã®å®ç¾©(tool_svc.h)ï¼
+
+----------------------------------------
+#define SVC_TRAP(system_service) _trap_ ## system_service
+
+#ifndef TOPPERS_SVC_FUNCCALL
+#define StartOS _trap_StartOS
+#define ActivateTask _trap_ActivateTask
+...
+#endif
+
+void
+_trap_StartOS(AppModeType Mode)
+{
+	CAL_SVC_1N(void, TFN_STARTOS, AppModeType, Mode);
+}
+
+StatusType
+_trap_ActivateTask(TaskType TaskID)
+{
+	CAL_SVC_1M(StatusType, TFN_ACTIVATETASK, TaskType, TaskID);
+}
+----------------------------------------
+
+DisableAllInterruptsã«é¢ãã¦ã¯ï¼éä¿¡é ¼OSAPããå¼ã³åºããªãä»æ§ã§ããï¼
+ãã£ã¦ï¼ãªã¼ããããç­ç¸®ãå
+¼ã­ã¦ï¼ã·ã¹ãã ãµã¼ãã¹ãç´æ¥å¼ã³åºãããã«å®è£
+ããï¼
+----------------------------------------
+#define DisableAllInterrupts		_kernel_DisableAllInterrupts
+----------------------------------------
+
+TFN_STARTOSãªã©ã¯ï¼å¼ã³åºãããã·ã¹ãã ãµã¼ãã¹ã³ã¼ãã§ããï¼ã·ã¹ãã 
+ãµã¼ãã¹ãã¼ãã«(svc_table)ã«ç»é²ããã·ã¹ãã ãµã¼ãã¹ã®æ·»å­ã§ããï¼
+
+(3) ã½ããã¦ã§ã¢å²è¾¼ã¿(ä¾ï¼trap)ã«ããã·ã¹ãã ãµã¼ãã¹å¼åºãå®ç¾©
+    (prc_svc.h)ï¼
+
+----------------------------------------
+#define CAL_SVC_1N(TYPE, FNCD, TYPE1, PAR1)						\
+	register FunctionCodeType input_fncd_r	= (FNCD);			\
+	register TYPE1 input_param_r			= (TYPE1) (PAR1);	\
+	register FunctionCodeType output_r;							\
+	Asm (														\
+		"trap \n\t"												\
+		: input_fncd_r, input_param_r							\
+		: output_r												\
+		:  "...", "memory"										\
+		);														\
+----------------------------------------
+
+----------------------------------------
+#define CAL_SVC_1M(TYPE, FNCD, TYPE1, PAR1)						\
+	register FunctionCodeType input_fncd_r	= (FNCD);			\
+	register TYPE1 input_param_r			= (TYPE1) (PAR1);	\
+	register FunctionCodeType ret_r;							\
+	register FunctionCodeType output_r;							\
+	Asm (														\
+		"trap \n\t"												\
+		: input_fncd_r, input_param_r							\
+		: ret_r, output_r										\
+		:  "...","memory"										\
+		);														\
+	return ((TYPE) output_r);
+----------------------------------------
+
+â»GCCã®æ¡å¼µã¢ã»ã³ããªæ§æï¼
+ asm(ã¢ã»ã³ããªãã³ãã¬ã¼ã
+     : åºåãªãã©ã³ã
+     : å
+¥åãªãã©ã³ã
+     : ç ´å£ãããã¬ã¸ã¹ã¿ã®ãªã¹ã
+    )
+
+ä¸è¨ãã¯ã­é¢æ°å®ç¾©æï¼ä»¥ä¸ã®ã«ã¼ã«ãå¾ãï¼
+ãã¯ã­åã¯ï¼CAL_SVC_nxã¨ãï¼nxã¯ï¼æå³ãæã¤ï¼
+nï¼ãã©ã¡ã¼ã¿æ°
+	ç¯å²ï¼0ã3ï¼ã·ã¹ãã ãµã¼ãã¹ã®ãã©ã¡ã¼ã¿æ°ï¼
+	â»ã¿ã¼ã²ããå®ç¾©ã®ã·ã¹ãã ãµã¼ãã¹è¿½å ããå ´åï¼ãã®æå¤§æ°ã«åãã
+	ã
+xï¼æ»ãå¤
+	ç¯å²ï¼Nï¼æ»ãå¤ãªãï¼ï¼Mï¼æ»ãå¤ããï¼
+
+6.10.2 ä¿¡é ¼OSAPããã®ã·ã¹ãã ãµã¼ãã¹å¼åºã
+
+åºæ¬çã«ã·ã¹ãã ãµã¼ãã¹ã®å¼åºãã¯ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿çµç±ã§å¼åºããåº
+æ¬ã§ãããï¼ã·ã¹ãã ãµã¼ãã¹å¼åºãã®ãªã¼ãããããåæ¸ããããï¼ä¿¡é ¼OS
+ã¢ããªã±ã¼ã·ã§ã³ã«æå±ããå¦çåä½ããã·ã¹ãã ãµã¼ãã¹ãå¼åºãå ´åï¼ã·
+ã¹ãã ãµã¼ãã¹ã®å¼åºãã¯ï¼(ç´æ¥)é¢æ°å¼åºããåºæ¥ãï¼
+
+é¢æ°å¼åºããæå®ããããï¼é¢æ°å¼åºãããããã½ã¼ã¹ã®å
+é ­ã«ï¼ä»¥ä¸ã®ãã¯
+ã­ãå®ç¾©ãããï¼SVC_CALL(system_service)ããæç¤ºçã«é¢æ°å¼ã³åºãã®ã·ã¹
+ãã ãµã¼ãã¹å®è¡ãããããåºæ¥ãï¼
+
+(6.10.2.1) TOPPERS_SVC_FUNCCALL
+
+ãã®ãã¯ã­ãã½ã¼ã¹å
+é ­å®ç¾©ãããã¨ã§ï¼ã½ã¼ã¹ãã¡ã¤ã«å
+ã®ã·ã¹ãã ãµã¼ã
+ã¹ã®å¼åºãã¯ï¼_kernel_<system_service>ã«ç½®æããï¼é¢æ°å¼åºãã¨ãªãï¼
+
+6.10.3 éä¿¡é ¼OSAPããã®ã·ã¹ãã ãµã¼ãã¹å¼åºã
+
+ã½ã¼ã¹ã®å
+é ­ã«ï¼TOPPERS_SVC_FUNCCALLãã¯ã­ãå®ç¾©ãã¦ããªãå ´åï¼ã·ã¹ã
+ã ãµã¼ãã¹ã®å®è¡ã¯ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ããã·ã¹ãã ãµã¼ãã¹å®è¡ã¨ãªãï¼
+ã¾ãï¼SVC_TRAP(system_service)ããæç¤ºçã«ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããã·ã¹
+ãã ãµã¼ãã¹å®è¡ãåºæ¥ãï¼
+
+6.10.4 ã¿ã¼ã²ããä¾å­ã·ã¹ãã ãµã¼ãã¹ã®è¿½å 
+
+ã¿ã¼ã²ããä¾å­ã®ã·ã¹ãã ãµã¼ãã¹ãè¿½å ãããå ´åï¼ã¿ã¼ã²ããä¾å­ã·ã¹ã
+ã ãµã¼ãã¹ãã¼ãã«ãã¼ãã«ã¯ï¼ä»¥ä¸ã®ãã¯ã­ãç¨ãã¦å®ç¾©ããï¼
+
+(6.10.4.1) PRC_SVC_TABLE
+(6.10.4.2) PRC_SVC_NUM
+
+ã¿ã¼ã²ããä¾å­ã§ï¼è¿½å ãããã·ã¹ãã ãµã¼ãã¹ã®å
+é ­ã¢ãã¬ã¹ã
+PRC_SVC_TABLEãã¯ã­ã®å®ç¾©ã«è¿½å ãï¼ã·ã¹ãã ãµã¼ãã¹å®ç¾©ã®æ°ã
+PRC_SVC_NUMãã¯ã­ã«å®ç¾©ãããã¨ã§ï¼ã·ã¹ãã ãµã¼ãã¹ãã¼ãã«(svc_table)
+ã«åæ ãããï¼
+
+(6.10.4.3) OTHER_PRC_SVC_TABLE
+
+ã¿ã¼ã²ããä¾å­ã§ï¼è¿½å ãããã·ã¹ãã ãµã¼ãã¹é¢é£ãã¯ã­ï¼PRC_SVC_TABLE
+ã¨PRC_SVC_NUMï¼ã¯ï¼å¥ã®ããããã¡ã¤ã«(*.h)ã«å®ç¾©ããã¦ããå ´åï¼ä¸è¨ã
+ã¯ã­OTHER_PRC_SVC_TABLEãã¤ã³ã¯ã«ã¼ããã¡ã¤ã«åã«å®ç¾©ãããã¨ãåºæ¥ãï¼
+
+ä¾ï¼#define OTHER_PRC_SVC_TABLE target_svc_table_test.hãå®ç¾©ãããã¨
+ã§ï¼prc_config.hã«#include "target_svc_table_test.h"ã¨ãã¦å±éããï¼
+target_svc_table_test.hãã¡ã¤ã«å®ç¾©ãã¦ããPRC_SVC_TABLEã¨PRC_SVC_NUM
+ãæå¹ã¨ãªãï¼
+
+ä¸è¨ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããã·ã¹ãã ãµã¼ãã¹å¼ã³åºãé¢ä¿ã®ãã¡ã¤ã«ã®ç
+æã¯ï¼utils/gensvc_atkï¼ãµã¼ãã¹ã³ã¼ã«ã¤ã³ã¿ãã§ã¼ã¹çæãã­ã°ã©ã ï¼ã«
+ããèªåçæãåºæ¥ãï¼
+
+6.11 ã¡ã¢ãªä¿è­·æ©æ§ï¼MPUï¼å¶å¾¡
+
+6.11.1 ã¹ã¿ãã¯ã®MPUè¨­å®æ
+å ±ãã­ãã¯ï¼STKMPUINFOBï¼
+
+MPUã«ããã¹ã¿ãã¯é åä¿è­·ããããï¼MPUã«è¨­å®ããæ
+å ±ãä¿æãããã­ãã¯
+ãã¿ã¼ã²ããä¾å­é¨ã«å®ç¾©ããï¼MPUè¨­å®æ
+å ±ã¯ï¼ã¿ã¼ã²ããä¾å­ã§ãããï¼
+ä¿æããæ
+å ±ã¯ï¼ä»¥ä¸ã§ããï¼
+
+(6.11.1.1) é åã®å
+é ­çªå°
+(6.11.1.2) é åã®çµç«¯çªå°(è¥ããã¯é åã®ãµã¤ãº)
+
+6.11.2 OSAPåºæMPUè¨­å®æ
+å ±ãã­ãã¯ï¼OSAPMPUINFOBï¼
+
+MPUã«ããOSAPåºæé åä¿è­·ããããï¼MPUã«è¨­å®ããæ
+å ±ãä¿æãããã­ãã¯
+ãã¿ã¼ã²ããä¾å­é¨ã«å®ç¾©ããï¼MPUè¨­å®æ
+å ±ã¯ï¼ã¿ã¼ã²ããä¾å­ã§ãããï¼
+ä¿æããæ
+å ±ã¯ï¼ä»¥ä¸ã§ããï¼
+
+(6.11.2.1) é åã®å
+é ­çªå°ï¼è¤æ°ã®å½ä»¤é åã»ãã¼ã¿é åï¼
+(6.11.2.2) é åã®çµç«¯çªå°ï¼è¤æ°ã®å½ä»¤é åã»ãã¼ã¿é åï¼
+(6.11.2.3) ã¢ã¯ã»ã¹ãã¿ã¼ã³ï¼èª­ã¿ã»æ¸ãã»å®è¡ï¼ï¼è¤æ°ã®å½ä»¤é åã»ãã¼
+           ã¿é åï¼
+(6.11.2.4) å½ä»¤é åæ°
+(6.11.2.5) ãã¼ã¿é åæ°
+
+6.11.3 MPUåæåå¦ç
+
+MPUæ©è½ãæå¹ããããï¼MPUã®åæåãè¡ãå¦çã¯ï¼ä»¥ä¸ã®éãã§ããï¼
+
+----------------------------------------
+void
+prc_init_mpu(void)
+{
+	
+	ç¾å¨MPUã«è¨­å®ãã¦ããæ
+å ±ã®ç®¡çå¤æ°ã®åæå
+
+	/* MPUåææ
+å ±ãè¨­å®ãããã */
+	MPUæ©è½ãç¡å¹ã«ãã
+	
+	/*  å
+¨å½ä»¤ã»ãã¼ã¿MPUã®0ãµã¤ãºé åå
+¨ã¢ã¯ã»ã¹æ¨©ãªãã§åæå
+	 *  å¿
+è¦ã®å ´åï¼ããã¯ã°ã©ã¦ã³ãé åMPUè¨­å®
+	 *  å
+±æé åã®MPUè¨­å®
+	 */
+	MPUåææ
+å ±ãè¨­å®ãã
+
+	MPUæ©è½ãæå¹ã«ãã
+}
+----------------------------------------
+
+
+6.11.4 OSAPåºæMPUæ
+å ±è¨­å®å¦ç
+
+åOSAPåºæMPUæ
+å ±ãMPUã«è¨­å®ããæ©è½ã¯ï¼ä»¥ä¸ã®éãã§ããï¼
+
+----------------------------------------
+void
+prc_set_osap_mpu(const OSAPINIB *p_osapinib)
+{
+	
+	if (æ¢ã«è¨­å®ä¸­ã®OSAP != è¨­å®ããOSAP) {
+		æ¢ã«è¨­å®ä¸­ã®OSAP = è¨­å®ããOSAP;
+
+		è¨­å®ããOSAPã®MPUæ
+å ±ãåå¾ãã¦ï¼MPUã«è¨­å®ãã â¦ (*a)
+	}
+}
+----------------------------------------
+
+(*a)ã§ã¯ï¼OSAPåºæã«å½ä»¤é åã¨ãã¼ã¿é åã¯ï¼è¤æ°å­å¨ããå ´åï¼å
+¨ã¦ã®å½
+ä»¤é åã»ãã¼ã¿é åã«å¯¾ãã¦ï¼ã¢ã¯ã»ã¹æ¨©éãè¨­å®ããï¼
+
+6.11.5 MPUä¾å­ã®ããã¯ã°ã©ã¦ã³ãé åãã§ãã¯
+
+å
+é ­çªå°åã³çµç«¯çªå°ã«ããï¼å¼æ°ã§æå®ãããé åã¯ï¼å½ä»¤ããã¯ã°ã©ã¦ã³
+ãé åã«å
+¥ã£ã¦ããå ´åï¼AP_Executableæ¨©ããï¼ãã¼ã¿ããã¯ã°ã©ã¦ã³ãé 
+åã«å
+¥ã£ã¦ããå ´åï¼AP_Writable | AP_Readableæ¨©ããï¼ããä»¥å¤ã®å ´åï¼
+NO_ACCESSæ¨©ãè¿ãï¼
+
+----------------------------------------
+AccessType
+probe_trusted_osap_mem(const MemoryStartAddressType sadr, 
+		   const MemoryStartAddressType eadr)
+{
+	AccessType ret;
+
+	ret |= (é å[sadr1,eadr1] â å½ä»¤ããã¯ã°ã©ã¦ã³ãé å)? 
+			AP_Executable : NO_ACCESS;                     â¦ (*a)
+	ret |= (é å[sadr1,eadr1] â ãã¼ã¿ããã¯ã°ã©ã¦ã³ãé å) ? 
+			(AP_Writable | AP_Readable) : NO_ACCESS;       â¦ (*b)
+
+	return(ret);
+}
+----------------------------------------
+
+(*a)(*b)ã¾ãï¼ç¹æ¨©ã¢ã¼ãå®è¡æï¼MPUã®æ©è½åæ­¢ããè¨­è¨ã«ããã¦ï¼ããã¯
+ã°ã©ã¦ã³ãé åæããªãããï¼AP_Executable | AP_Writable | AP_Readable
+ã®ããã«å
+¨ã¦ã®ã¢ã¯ã»ã¹æ¨©ããã§è¿ãã¦ãè¯ãï¼
+
+6.11.6 OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã«å¯¾ããMPUè¨­å®
+OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®MPUè¨­å®ã¯ä¿¡é ¼ã¿ã¹ã¯ã¨åãã¨ãªãããã¿ã¼ã²ããä¾å­é¨ã§è¨­å®ããï¼
+å¯¾è±¡ã®ã¿ã¹ã¯ãOSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ãã©ããã¯ä»¥ä¸ã®å¤æ°ãç¨ãã¦å¤æ­ããï¼
+tmin_os_restarttask ã»ã»ã» OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®ãã¡ï¼æå°ã®IDãæã
+tskidã®ä¸¦ã³ã¯(ã¦ã¼ã¶ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ããã¿ã¹ã¯) < (OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯)ã¨ãªã£ã¦ããã®ã§ï¼tmin_os_restarttask <= tskid ãTRUEã§ããã¨ãï¼OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã§ããï¼
+
+6.12 ã¡ã¢ãªç®¡çã®ãã¥ã¼ãã³ã°
+
+6.12.1 ã¡ã¢ãªãªãã¸ã§ã¯ãã®ç®¡ç
+
+(6.12.1.1ï¼ OMIT_STANDARD_MEMINIBï¼ãªãã·ã§ã³ï¼
+
+ã¿ã¼ã²ããéä¾å­é¨ã«å«ã¾ããæ¨æºã®ã¡ã¢ãªãªãã¸ã§ã¯ãç®¡çæ©è½ãç¨ããªã
+å ´åãï¼ã¡ã¢ãªãªãã¸ã§ã¯ãç®¡çæ©è½ã®æ§é ä½ï¼å¤æ°ï¼é¢æ°ãã¿ã¼ã²ããä¾å­
+é¨ã§ç¨æãï¼æ¨æºã®ã¡ã¢ãªãªãã¸ã§ã¯ãç®¡çã¨åç­ã®æ
+å ±ãã¿ã¼ã²ããä¾å­ã®
+ãã¼ã¿æ§é ã§ç®¡çããå ´åã«ã¯ï¼ãã®ã·ã³ãã«ããã¯ã­å®ç¾©ããï¼
+
+ãã®ã·ã³ãã«ããã¯ã­å®ç¾©ããå ´åï¼ã¿ã¼ã²ããä¾å­é¨ã«ã¡ã¢ãªã¢ã¯ã»ã¹ãã§
+ãã¯ç¨é¢æ°ï¼check_osap_memoryï¼ï¼C2ISRã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯é¢æ°
+ï¼check_isr_memoryï¼ï¼ã¿ã¹ã¯ã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯ï¼check_task_memoryï¼
+ãç¨æããå¿
+è¦ãããï¼
+
+check_osap_memoryé¢æ°ã¯ï¼å¼æ°ã§æå®ããOSã¢ããªã±ã¼ã·ã§ã³ã«å¯¾ãã¦ï¼å¼
+æ°ã§æå®ããã¡ã¢ãªé åã®ã¢ã¯ã»ã¹æ¨©ã®ãã§ãã¯ãè¡ãï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·
+ã§ã³ã®å ´åã¯ï¼ããã¯ã°ã©ã¦ã³ãããã§ãã¯ããï¼ç¾å®è£
+ã§ã¯å
+¨é åã¢ã¯ã»ã¹
+å¯è½ï¼ï¼éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã®å ´åã¯ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ã¢ã¯ã»ã¹
+å±æ§ï¼ãªã¼ãï¼ã©ã¤ãï¼å®è¡ï¼ãè¿å´ããï¼
+
+check_isr_memoryé¢æ°ã¯ï¼å¼æ°ã§æå®ããå²è¾¼ã¿ã«ããã¦ï¼å¼æ°ã§æå®ããã¡
+ã¢ãªéå§ã¢ãã¬ã¹ã¨ãµã¤ãºã®ã¡ã¢ãªé åã«å¯¾ãã¦ï¼ã¢ã¯ã»ã¹å±æ§ï¼ãªã¼ãï¼ã©
+ã¤ãï¼å®è¡ï¼ã¹ã¿ãã¯ï¼ãè¿ãï¼ã¾ãï¼å¼æ°ã§æå®ããã¡ã¢ãªé åã¯ï¼ã¡ã¢ãª
+ãªãã¸ã§ã¯ããè·¨ãã å ´åï¼ãã®æ
+å ±ãå¼æ°ããè¿ãå¿
+è¦ãããï¼
+
+check_task_memoryé¢æ°ã¯ï¼å¼æ°ã§æå®ããã¿ã¹ã¯ã«ããã¦ï¼å¼æ°ã§æå®ããã¡
+ã¢ãªéå§ã¢ãã¬ã¹ã¨ãµã¤ãºã®ã¡ã¢ãªé åã«å¯¾ãã¦ï¼ã¢ã¯ã»ã¹å±æ§ï¼ãªã¼ãï¼ã©
+ã¤ãï¼å®è¡ï¼ã¹ã¿ãã¯ï¼ãè¿ãï¼ã¾ãï¼å¼æ°ã§æå®ããã¡ã¢ãªé åã¯ï¼ã¡ã¢ãª
+ãªãã¸ã§ã¯ããè·¨ãã å ´åï¼ãã®æ
+å ±ãå¼æ°ããè¿ãå¿
+è¦ãããï¼
+
+----------------------------------------
+
+AccessType
+check_osap_memory(const OSAPINIB *p_osapinib, 
+                  const MemoryStartAddressType adr,
+                  MemorySizeType size)
+{
+	AccessType ret;
+	
+	if (p_osapinib == ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³) {
+		ret |= (é å[adr,adr + size] â ããã¯ã°ã©ã¦ã³ãé å)? 
+				(AP_Executable | AP_Writable | AP_Readable) :
+				 NO_ACCESS;
+	}
+	else {
+		ret |= (é å[adr,adr + size] ã¡ã¢ãªãªãã¸ã§ã¯ãè·¨ã)? 
+				(NO_ACCESS, *over_region = true)ï¼
+				(é å[adr,adr + size]ã®ã¢ã¯ã»ã¹æ¨©) ;
+	}
+	return (ret);
+}
+
+AccessType
+check_isr_memory(ISRCB *p_isrcb, const MemoryStartAddressType adr,
+				 MemorySizeType size, boolean *over_region)
+{
+	AccessType ret;
+
+	*over_region = false;
+	if (é å[adr,adr + size] ã¡ã¢ãªãªãã¸ã§ã¯ãè·¨ã) {
+		*over_region = true;
+	}
+	else {
+		ret = (é å[adr,adr + size]  â å²è¾¼ã¿ã¹ã¿ãã¯é å)? 
+				(AP_Readable | AP_Writable | AP_StackSpace)ï¼
+				NO_ACCESS;
+	}
+
+	/* FL2ã§ã¯å²è¾¼ã¿ã¯ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«ããå±ããªã */
+	ret |= AP_Readable | AP_Writable | AP_Executable;
+
+	return (ret);
+}
+
+AccessType
+check_task_memory(const TCB *p_tcb, const MemoryStartAddressType adr,
+					MemorySizeType size, boolean *over_region)
+{
+	AccessType ret;
+
+	*over_region = false;
+	if (é å[adr,adr + size] ã¡ã¢ãªãªãã¸ã§ã¯ãè·¨ã) {
+		*over_region = true;
+	}
+
+	if (p_tcbã¯ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±) {
+		ret = (é å[adr,adr + size]  â ã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯é å)? 
+				(AP_Readable | AP_Writable | AP_StackSpace)ï¼
+				NO_ACCESS;
+
+		/* ä¿¡é ¼ã¿ã¹ã¯ã®å ´åã¯å
+¨ã¢ã¯ã»ã¹å¯è½ */
+		ret |= (AP_Readable | AP_Writable | AP_Executable);
+	}
+	else if (*over_region == false) {
+		ret = (é å[adr,adr + size] â ã¿ã¹ã¯ã¦ã¼ã¶ã¹ã¿ãã¯é å)? 
+				(AP_Writable | AP_Readable | AP_StackSpace)ï¼ 
+				(é å[adr,adr + size]ã®ã¢ã¯ã»ã¹æ¨©);
+	}
+
+	return (ret);
+}
+
+----------------------------------------
+
+6.12.2 ã¡ã¢ãªã¢ã¯ã»ã¹æ¨©ãã§ãã¯ã®ããã®ãã¯ã­
+
+ã«ã¼ãã«å
+æ¨æºã§ï¼å®è¡ä¸­OSã¢ããªã±ã¼ã·ã§ã³ã«å¯¾ãã¦ï¼å¼æ°ã§æå®ããå¤
+æ°ã¢ãã¬ã¹ã¨å¤æ°ã¿ã¤ãã®ã¢ã¯ã»ã¹ï¼ãªã¼ãï¼ã©ã¤ãï¼æ¨©éã®ãã§ãã¯ãã¯
+ã­ãç¨æããã¦ããï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ä¾å­é¨ç®¡çãªã©ã«ããï¼ä¾å­é¨
+ã§PROBE_MEM_WRITEã¨PROBE_MEM_RWãå®ç¾©ãããã¨ã§ï¼æ¨æºã®ãã§ãã¯ãã¯ã­
+ãç¡å¹ã«ãããã¨ãã§ããï¼
+
+(6.12.2.1ï¼ PROBE_MEM_WRITEï¼ãªãã·ã§ã³ï¼
+(6.12.2.2ï¼ PROBE_MEM_RWï¼ãªãã·ã§ã³ï¼
+
+----------------------------------------
+
+#define PROBE_MEM_WRITE(p_var, type) \
+	 (é å[p_var,adr + sizeof(type)] & AP_Writable)
+
+#define PROBE_MEM_RW(p_var, type) \
+	 (é å[p_var,adr + sizeof(type)] & (AP_Readable | AP_Writable))
+
+----------------------------------------
+
+
+6.13 ã¨ã©ã¼ããã¯ï¼ã·ã£ãããã¦ã³ããã¯å¼ã³åºã
+
+ç¯çªå·ä»¥å¤ï¼ATK2-SC1ããå¤æ´ãªãï¼
+
+6.14 ã«ã¼ãã«ã®èµ·åã»çµäºã¨ã¹ã¿ãã¯é åãªã©
+
+(6-14-1) ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«
+
+(c) void initialize_sections(void)ã§bssã»ã¯ã·ã§ã³ã¨dataã»ã¯ã·ã§ã³ã®å
+    æå
+
+ådataã»ã¯ã·ã§ã³ã«åæå¤ãè¨­å®ãï¼åbssã»ã¯ã·ã§ã³ãã¯ãªã¢ããï¼
+
+ã¾ãï¼åæå¤ãããã¼ã¿ã»ã¯ã·ã§ã³ã®åæå(dataã»ã¯ã·ã§ã³)ã®åæåãè¡
+ãï¼åæå¤ãããã¼ã¿ã»ã¯ã·ã§ã³ãåæåããæã«ï¼dataã»ã¯ã·ã§ã³åæåã
+ã¼ãã«ã«ããåæåãã¼ã¿é åã®å
+é ­çªå°ããï¼dataã»ã¯ã·ã§ã³ã«å¤ãåå¾ã
+ã¦ï¼ã»ããããï¼dataã»ã¯ã·ã§ã³åæåãã¼ãã«ã¯ï¼dataã»ã¯ã·ã§ã³ã®åæå
+ã«ä¾å­ãã¦ã¯ãããªãã®ã§ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã®ã¡ã¢ãªé
+ç½®æã«ï¼èª­ã¿
+å°ç¨ãã¼ã¿é åï¼rodataã»ã¯ã·ã§ã³ï¼ã«é
+ç½®ããã°ããï¼
+
+dataã»ã¯ã·ã§ã³åæåå¾ã«ï¼bssã»ã¯ã·ã§ã³ãåæåããã°ï¼bssã»ã¯ã·ã§ã³å
+æåãã­ãã¯ã¯ï¼ããæï¼dataã»ã¯ã·ã§ã³ã¯ï¼èª­ã¿å°ç¨ãã¼ã¿é åã«é
+ç½®ãã
+å¿
+è¦ããªãï¼
+
+ã¾ãï¼OMIT_INITIALIZE_SECTIONSãã¯ã­ãå®ç¾©ãããã¨ã§ï¼éä¾å­é¨å®ç¾©ãã
+bssã»ã¯ã·ã§ã³ã¨dataã»ã¯ã·ã§ã³ã®åæåå¦çãç¡å¹åãã¦ï¼
+initialize_sectionsãä¾å­é¨ã§å®è£
+ãããã¨ãã§ããï¼
+
+ã«ã¼ãã«æ¬ä½ã¯ï¼kerflgãfalseï¼ï¼0ï¼ã«åæåãããä»¥å¤ã«ï¼bssã»ã¯ã·ã§
+ã³ãåæåããããã¨ã«ä¾å­ãã¦ããªãããï¼initialize_sectionsãä¾å­é¨
+ã§ç¨æããå ´åï¼bssã»ã¯ã·ã§ã³åæååã®ã·ã¹ãã ã®èµ·åæéãç­ç¸®ããã
+ãã«ï¼kerflgãfalseã«åæåããã ãã§ååã§ããï¼
+
+6.15 ã«ã¼ãã«å
+é¨ã®ãã¥ã¼ãã³ã°
+
+6.15.1 ãããããããµã¼ã
+
+ç¯çªå·ä»¥å¤ï¼ATK2-SC1ããå¤æ´ãªãï¼
+
+6.16 ã«ã¼ãã«å®è£
+ã«é¢ãããã®ä»ã®å®ç¾©
+
+6.16.1 ã¨ã©ã¼ãã§ãã¯æ¹æ³ã®æå®
+
+ç¯çªå·ä»¥å¤ï¼ATK2-SC1ããå¤æ´ãªãï¼
+
+6.16.2 éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+
+ç¯çªå·ä»¥å¤ï¼ATK2-SC1ããå¤æ´ãªãï¼
+
+6.16.3 ç©ºã©ãã«ã®å®ç¾©
+
+ç¯çªå·ä»¥å¤ï¼ATK2-SC1ããå¤æ´ãªãï¼
+
+6.16.4 åã¹ã¿ãã¯ã®ããã©ã«ãå¤
+
+(6-16-4-3) DEFAULT_TASKSYSTEMSTKSZï¼ãªãã·ã§ã³ï¼
+(6-16-4-4) DEFAULT_ISRSYSTEMSTKSZï¼ãªãã·ã§ã³ï¼
+(6-16-4-5) DEFAULT_HOOKSTKSZï¼ãªãã·ã§ã³ï¼
+(6-16-4-6) DEFAULT_NONTRUSTEDHOOKSTKSZï¼ãªãã·ã§ã³ï¼
+(6-16-4-7) DEFAULT_TRUSTEDFUNCTIONSTKSZï¼ãªãã·ã§ã³ï¼
+(6-16-4-8) DEFAULT_OSSTKSZï¼ãªãã·ã§ã³ï¼
+
+6.16.5 ã¹ã¿ãã¯ãã¸ãã¯ãã³ãã¼é åæä½ãã¯ã­ã®å®ç¾©
+
+(6-16-5-2) TOPPERS_SSTK_MAGIC_REGIONï¼ãªãã·ã§ã³ï¼
+
+ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ã§ä½¿ç¨ããã¿ã¹ã¯ã·ã¹ãã ã¹ã¿ãã¯ç¨ãã¸ãã¯ãã³ãã¼
+ã®æ ¼ç´ä½ç½®ãè¿ããã¯ã­ã§ããï¼ã¹ã¿ãã¯ã®æé·æ¹åãã¢ãã¬ã¹ã®å¤§ããæ¹ã
+ãå°ããæ¹ã¸æé·ãããã¨ãããã©ã«ãå®è£
+ã¨ãã¦ããï¼ã¹ã¿ãã¯æé·æ¹åã«
+ããã¿ã¼ã²ããã§åå®ç¾©ãããã¨ãã§ããï¼p_tinibã§æå®ãããã¿ã¹ã¯åæ
+åãã­ãã¯ãåºã¥ãã¦ï¼ã¹ã¿ãã¯æé·æ¹åã«ããã¿ã¼ã²ããã§åå®ç¾©ãããã¨
+ãã§ããï¼
+
+6.16.6 æ¨æºä»¥å¤ã¡ã¢ãªãªã¼ã¸ã§ã³å±æ§ã®å®ç¾©
+
+ãã¼ãã¦ã§ã¢ã«ã©ã®ãããªæ§è³ªã®ã¡ã¢ãªãªã¼ã¸ã§ã³ãå­å¨ãããã¯ï¼ã¿ã¼ã²ã
+ãã«ä¾å­ããã®ã§ï¼æ¨æºROMï¼æ¨æºRAMä»¥å¤ã®ã¡ã¢ãªãªã¼ã¸ã§ã³ãå­å¨ããå ´åï¼
+ã¿ã¼ã²ããä¾å­é¨ã§ï¼å±æ§ãè­å¥ããããä»¥ä¸ã®ãã¯ã­ãå®ç¾©ããï¼
+
+(6-16-6-1)TARGET_REGATR
+
+ãã ãï¼éä¾å­é¨ã§ä»¥ä¸ã®å®ç¾©å¤ã¯ï¼æ¢ã«ãããåä½ã§äºç´ããã¦ããã®ã§ï¼
+å®ç¾©å¤ãæ³¨æããï¼
+    0x00    /* ãªãã¸ã§ã¯ãå±æ§ãæå®ããªã */
+    0x01    /* æ¸è¾¼ã¿ã¢ã¯ã»ã¹ç¦æ­¢ */
+    0x02    /* æ¨æºROMãªã¼ã¸ã§ã³ */
+    0x04    /* æ¨æºRAMãªã¼ã¸ã§ã³ */
+
+ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³æï¼éä¾å­é¨ã®ã§TARGET_REGATRãç¨ãã¦ï¼å®ç¾©ãã
+ã¡ã¢ãªãªã¼ã¸ã§ã³ã®æå¹æ§ããã§ãã¯ãã¦ããï¼
+
+6.17 ãã¬ã¼ã¹ã­ã°æ©è½ã«é¢ããè¨­å®
+
+6.17.1 åå¾ã§ãããã¬ã¼ã¹ã­ã°ã®ç¨®é¡ã¨ãã¯ã­
+
+ç¯çªå·ä»¥å¤ï¼ATK2-SC1ããå¤æ´ãªãï¼
+
+6.17.2 ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ã
+
+ç¯çªå·ä»¥å¤ï¼ATK2-SC1ããå¤æ´ãªãï¼
+
+6.18 ããã¯ï¼ã·ã£ãããã¦ã³ããã¯ã®å¼·å¶çµäº
+
+Release 1.4.0ä»¥éã§ã¯å¿
+è¦ãªãï¼
+
+6.19 ã³ã¢èµ·å
+
+(6-19-1) LOCAL_INLINE boolean x_start_core(CoreIdType coreid)
+
+æå®ãããã³ã¢ã®èµ·åå¦çãè¡ãï¼
+
+----------------------------------------
+LOCAL_INLINE boolean x_start_core(CoreIdType coreid)
+{
+	if (æå®ãããã³ã¢IDï¼ãµãã¼ããã¦ããã³ã¢æ°) {
+		(SYSVER_REG5 + 4 * coreid )ã«ï¼MAGIC_STARTãæ¸ãè¾¼ã
+		TRUEãè¿ã
+	} else {
+		FALSEãè¿ã
+	}
+	è¿ãå¤ããªã¿ã¼ã³
+}
+----------------------------------------
+
+(6-19-2) LOCAL_INLINE boolean is_halt(CoreIdType coreid)
+
+æå®ãããã³ã¢ãèµ·åããããã®ç¢ºèªãè¡ãï¼
+
+----------------------------------------
+LOCAL_INLINE boolean is_halt(CoreIdType coreid)
+{
+	if (SYSVER_REG5 + 4 * coreid )ã«MAGIC_STARTãæ¸ãè¾¼ã¾ãã¦ããªã {
+		TRUEãè¿ã
+	} else {
+		FALSEãè¿ã
+	}
+}
+----------------------------------------
+
+6.20 ããã¯ã®ç¢ºèª
+
+Release 1.4.0ä»¥éã§ã¯å¿
+è¦ãªãï¼
+
+6.21 ã¹ã¿ãã¯åãæ¿ã
+
+call_protectionhk_main_stkchg (ercd)
+
+ããã¯ç¨ã¹ã¿ãã¯ã¸ã®åãæ¿ããå®æ½ããä¸ã§ããã¯ã«ã¼ãã³ã®å®è¡ãè¡ãï¼
+
+6.22 éä¿¡é ¼ããã¯ã«ã¼ãã³ã¹ã¿ãã¯é å
+
+Release 1.4.0ä»¥éã§ã¯å¿
+è¦ãªãï¼
+
+6.23 ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.23.1 ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ãã¡ã¤ã«æ§æ
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.23.2 ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®æ
+å ±æä¾
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.24 OSAPå¼·å¶çµäº
+
+(6-24-1) void activate_force_term_osap_main(TCB *p_tcb)
+
+OSAPå¼·å¶çµäºæã«å¼ã°ãï¼å½è©²OSAPã®çµäºå¦çãå®æ½ãããªã¹ã¿ã¼ãã¿ã¹ã¯ã
+èµ·åããé¢æ°ã§ããï¼
+ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®èµ·åçªå°ã¯ï¼force_term_osap_mainã©ãã«ã®çªå°ã¨ããï¼
+force_term_osap_mainã¯ï¼ã«ã¼ãã«éä¾å­é¨ã§æä¾ããã©ãã«ã§ããããï¼
+ã¿ã¼ã²ããä¾å­é¨ã§ã¯æä¾ããªãï¼
+
+activate_force_term_osap_mainã®å¦çå
+å®¹ã¯æ¬¡ã®ã¨ããï¼
+
+----------------------------------------
+void
+activate_force_term_osap_main(TCB *p_tcb)
+{
+	æå®ãããTCBï¼*p_tcbï¼ä¸­ã®ã¹ã¿ãã¯ãã¤ã³ã¿ãåæåãã
+	force_term_osap_mainãï¼å®è¡åéçªå°ã¨ãã¦æå®ãããTCBã«ä¿å­ãã
+	return;
+}
+----------------------------------------
+
+
+ï¼ï¼ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+
+7.1 è¨­å®ãã¡ã¤ã«ã¨ã¿ã¼ã²ããä¾å­é¨ã®ä½ç½®ä»ã
+
+ATK2-SC3ã®ã¸ã§ãã¬ã¼ã¿ã¯ï¼è¨­å®ãã¡ã¤ã«ã®è¨è¿°ã«å¾ã£ã¦ãã¡ã¤ã«ã®çæãã
+ã³ã¨ã©ã¼ãã§ãã¯ãè¡ãï¼ã¸ã§ãã¬ã¼ã¿ã®è¨­å®ãã¡ã¤ã«ã«ã¯ï¼ä»¥ä¸ã®5ã¤ãã
+ãï¼
+
+(a) XMLã³ã³ãããã¼ãã«
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+(b) å¤åå¾ã·ã³ãã«ãã¼ãã«
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+(c) ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
+
+ã¸ã§ãã¬ã¼ã¿ã®ãã¹2ã¯ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã«å¾ã£ã¦ï¼ã«ã¼ãã«ã®æ§æã»
+åæåãã¡ã¤ã«ï¼Os_Lcfg.cï¼ï¼æ§æã»åæåããããã¡ã¤ã«ï¼Os_Lcfg.hï¼ï¼
+ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ï¼kernel_mem2.cï¼ï¼ãªã³ã«ã¹ã¯ãªãããã¡ã¤ã«
+ï¼ldscript.ldï¼ï¼ãã¹3, ãã¹4ã«æ¸¡ããã³ãã¬ã¼ãæ
+å ±ãã¡ã¤ã«
+(cfg2_out.tf)ãªã©ãçæããï¼ãã®ãã³ãã¬ã¼ããã¡ã¤ã«ã¯ï¼ã¿ã¼ã²ããé
+ä¾å­é¨ã¨ã¿ã¼ã²ããä¾å­é¨ã«åãåãã¦ãããï¼ä»ã®ãã¡ã¤ã«ã®ã¿ã¼ã²ããä¾
+å­é¨ã¨ã¯éã«ï¼ã¿ã¼ã²ããä¾å­é¨ããã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ããã
+å½¢ã«ãªã£ã¦ããï¼
+
+å
+·ä½çã«ã¯ï¼targetãã£ã¬ã¯ããªã«ç½®ãããtarget.tfã§ï¼å¿
+è¦ãªå¤æ°ãå®ç¾©
+ããå¾ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨ï¼kernel/kernel.tfï¼ã
+ã¤ã³ã¯ã«ã¼ãããï¼kernel.tfã§ã¯ï¼ã«ã¼ãã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§ä½¿ç¨ã
+ãå¤æ°å®ç¾©ç­ãçæããï¼kernel.tfãã¤ã³ã¯ã«ã¼ãããå¾ï¼target.tfã§ã¯ï¼
+ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã§ä½¿ç¨ããå¤æ°å®ç¾©ç­ãçæããï¼target.tfã
+ãï¼ãã­ã»ããµä¾å­é¨ï¼ãããä¾å­é¨ãï¼éçºç°å¢ä¾å­é¨ãåãåãã¦ãããï¼
+
+ãã¹2ã§ã¯ï¼ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ã«ï¼meminib_table, memtop_table, 
+datasecinib_table, bsssecinib_table, mpuinfo_shared(å
+±æé åã«å¯¾ãã
+MPUINFOB)ï¼OSAPå°æé åã«å¯¾ããMPUINFOBã®æ
+å ±ãåºåããï¼
+
+(d) ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«
+
+ã¸ã§ãã¬ã¼ã¿ã®ãã¹3ã¯ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã«å¾ã£ã¦ï¼ãã¹2ã§çæããï¼
+meminib_table, memtop_table, datasecinib_table, bsssecinib_table,
+mpuinfo_shared(å
+±æé åã«å¯¾ããMPUINFOB), OSAPå°æé åã«å¯¾ããMPUINFOB
+ã®æé©åãè¡ãï¼ãã®ãã³ãã¬ã¼ããã¡ã¤ã«ãï¼ã¿ã¼ã²ããéä¾å­é¨ã¨ã¿ã¼ã²
+ããä¾å­é¨ã«åãåãã¦ããï¼ã¿ã¼ã²ããä¾å­é¨ããã¿ã¼ã²ããéä¾å­é¨ãã¤
+ã³ã¯ã«ã¼ãããå½¢ã«ãªã£ã¦ããï¼
+
+å
+·ä½çã«ã¯ï¼targetãã£ã¬ã¯ããªã«ç½®ãããtarget_mem.tfã§ï¼å¿
+è¦ãªå¤æ°ã
+å®ç¾©ããå¾ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨
+ï¼kernel/kernel_mem.tfï¼ãã¤ã³ã¯ã«ã¼ãããï¼kernel_mem.tfã§ã¯ï¼ã«ã¼ã
+ã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§ï¼ãã¹2ã§çæããåãã¡ã¤ã«ããæ
+å ±ãèª­è¾¼ã¿ï¼
+ã¡ã¢ãªæ§æã»åæåãã¼ã¿æ§é ã®æé©åï¼é£æ¥é åã®çµ±åã»0ãµã¤ãºé åã®å
+é¤ãªã©ï¼ãè¡ãï¼æé©åããã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ï¼kernel_mem3.cï¼
+ãåºåããï¼target_mem.tfããï¼ãã­ã»ããµä¾å­é¨ï¼ãããä¾å­é¨ãï¼éçº
+ç°å¢ä¾å­é¨ãåãåãã¦ãããï¼
+
+(e) ãã¹4ã®ãã³ãã¬ã¼ããã¡ã¤ã«
+
+ã¸ã§ãã¬ã¼ã¿ã®ãã¹4ã¯ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã«å¾ã£ã¦ï¼ãã¹3ã§çæããï¼
+meminib_table, memtop_table, datasecinib_table, bsssecinib_table,
+mpuinfo_shared(å
+±æé åã«å¯¾ããMPUINFOB), OSAPå°æé åã«å¯¾ããMPUINFOB
+ãæ´ã«æé©åãè¡ãï¼æçµã®ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ï¼kernel_mem.cï¼ã
+åºåããï¼ãã®ãã³ãã¬ã¼ããã¡ã¤ã«ãï¼ã¿ã¼ã²ããéä¾å­é¨ã¨ã¿ã¼ã²ããä¾
+å­é¨ã«åãåãã¦ããï¼ã¿ã¼ã²ããä¾å­é¨ããã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«
+ã¼ãããå½¢ã«ãªã£ã¦ããï¼
+
+å
+·ä½çã«ã¯ï¼targetãã£ã¬ã¯ããªã«ç½®ãããtarget_mem2.tfã§ï¼å¿
+è¦ãªå¤æ°ã
+å®ç¾©ããå¾ï¼ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããéä¾å­é¨
+ï¼kernel/kernel_mem2.tfï¼ãã¤ã³ã¯ã«ã¼ãããï¼kernel_mem2.tfã§ã¯ï¼ã«ã¼
+ãã«ã®ã¿ã¼ã²ããéä¾å­é¨ã§ï¼ãã¹3ã§çæããåãã¡ã¤ã«ããæ
+å ±ãèª­è¾¼ã¿ï¼
+ã¡ã¢ãªæ§æã»åæåãã¼ã¿æ§é ååº¦æé©åãè¡ãï¼ãã¹3ã¨å¤ãããªãæçµã®
+ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ï¼kernel_mem.cï¼ãåºåããï¼target_mem.tfã
+ãï¼ãã­ã»ããµä¾å­é¨ï¼ãããä¾å­é¨ãï¼éçºç°å¢ä¾å­é¨ãåãåãã¦ãã
+ãï¼
+
+ã¸ã§ãã¬ã¼ã¿ã®ãã¹4ã¯ï¼åºæ¬çã«ã¯ãã¹3ã¨åãå¦çãè¡ããï¼ãã¹3ã¨éãï¼
+åã¡ã¢ãªãªãã¸ã§ã¯ãã®éå§ã¨çµç«¯ã¢ãã¬ã¹ãæçµã®ã¢ãã¬ã¹ã«ãªãããï¼é
+ãã¡ã¢ãªãªã¼ã¸ã§ã³ã«é
+ç½®ãããã¡ã¢ãªãªãã¸ã§ã¯ãã®çµ±åãï¼ãªã³ã«ã§é
+ç½®
+ããªãã¡ã¢ãªãªãã¸ã§ã¯ãã®çµ±åãå¯è½ã«ãªãï¼ãã¹3ã¨ãã¹4ã§ã¯ã¡ã¢ãªãã
+ããå¤ãããªãããã«ããããï¼ãã¹4ã§ã®æé©åã«ããï¼é
+åã®ãµã¤ãºãå°
+ããã§ããå ´åã§ããµã¤ãºãå¤ããªãããã«ããï¼
+ã¸ã§ãã¬ã¼ã¿ã®ãã¹4ã§ã¯ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®éãªãã®ãã§ãã¯ç­ã®ã¨ã©ã¼
+ãã§ãã¯ãè¡ãï¼
+
+ãªãï¼ã¸ã§ãã¬ã¼ã¿ã®è©³ç´°ä»æ§ã¨è¨­å®ãã¡ã¤ã«ã®è¨è¿°æ¹æ³ã«ã¤ãã¦ã¯ï¼å¥é
+PDFãã¡ã¤ã«ã®å½¢ã§é
+å¸ãã¦ãããTOPPERSæ°ä¸ä»£ã«ã¼ãã«ç¨ã¸ã§ãã¬ã¼ã¿ä»æ§ã
+ããã³ãTOPPERSæ°ä¸ä»£ã«ã¼ãã«ç¨ã¸ã§ãã¬ã¼ã¿å
+èµãã¯ã­ãã­ã»ããµä»æ§ã
+ãåç
+§ãããã¨ï¼
+
+7.2 ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+
+
+7.2.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
+
+
+(7-2-1-5) TARGET_SEC_ALIGN_STR	ã»ã¯ã·ã§ã³ã®ã¢ã©ã¤ã³ãµã¤ãºã®å®ç¾©
+(7-2-1-6) TARGET_PAGE_SIZE_STR	ãã¼ã¸ã®ã¢ã©ã¤ã³ãµã¤ãºã®å®ç¾©
+
+(7-2-1-7) TARGET_MEMATR_USTACK	ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã¡ã¢ãªãªãã¸ã§ã¯ã
+                                å±æ§
+
+ä»¥ä¸ã®æ¨æºã»ã¯ã·ã§ã³ã®ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ãå®ç¾©ãã
+(7-2-1-8) MEMATR_TEXT		ã³ã¼ãé åã®å±æ§
+(7-2-1-9) MEMATR_RODATA		èª­è¾¼ã¿å°ç¨é åã®å±æ§
+(7-2-1-10) MEMATR_DATA		ãã¼ã¿é åã®å±æ§
+(7-2-1-11) MEMATR_BSS		0åæåé åã®å±æ§
+(7-2-1-12) MEMATR_PRSV		ãã¬ã¶ã¼ããé åã®å±æ§
+(7-2-1-13) MEMATR_SDATA		åæå¤ããã·ã§ã¼ãé åã®å±æ§
+(7-2-1-14) MEMATR_SBSS		åæå¤ãªãã·ã§ã¼ãé åã®å±æ§
+
+(7-2-1-15) START_OBJS		ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ã®å®ç¾©
+
+(7-2-1-16) SECTION_USTACK	ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ã»ã¯ã·ã§ã³åçæé¢æ°
+
+(7-2-1-17) ALLOC_USTACK(taskid, ustksz)	ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+
+(7-2-1-18) USTACK_ALIGN_SIZE(ustksz)	ã¦ã¼ã¶ã¹ã¿ãã¯ã®ã¢ã©ã¤ã¡ã³ãå¶
+                                        ç´ã«åããããµã¤ãºãè¿ãé¢æ°
+
+(7-2-1-19) SECTION_SHARED_USTACK(å
+±æã¹ã¿ãã¯ID)	åºæ¬ã¿ã¹ã¯ã®å
+±æã¹
+                                        ã¿ãã¯ã®ã»ã¯ã·ã§ã³åãè¿ãé¢æ°
+
+(7-2-1-20) ALLOC_SHARED_USTACK(...)	åºæ¬ã¿ã¹ã¯ã®å
+±æã¹ã¿ãã¯ã®ç¢ºä¿é¢æ°
+  ç¬¬1å¼æ° å
+±æã¹ã¿ãã¯å
+  ç¬¬2å¼æ° å
+±æã¹ã¿ãã¯ID(ã¿ã¹ã¯åªå
+åº¦)
+  ç¬¬3å¼æ° ã¹ã¿ãã¯ãµã¤ãº(ã¢ã©ã¤ã¡ã³ãèª¿æ´æ¸ã¿)
+
+(7-2-1-21) ALLOC_SSTACK(...)	ã·ã¹ãã ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+  ç¬¬1å¼æ° ã¹ã¿ãã¯å
+  ç¬¬2å¼æ° ã¹ã¿ãã¯ãµã¤ãº
+  ç¬¬3å¼æ° å¤æ°å®ç¾©ã«ä»ä¸ããæå®å­
+
+(7-2-1-22) ALLOC_HSTACK(...)	éä¿¡é ¼ããã¯ã¹ã¿ãã¯ã®ç¢ºä¿é¢æ°
+  ç¬¬1å¼æ° ã¹ã¿ãã¯å
+  ç¬¬2å¼æ° ã¹ã¿ãã¯ãµã¤ãº
+
+  Release 1.4.0ä»¥éã§ã¯å¿
+è¦ãªãï¼
+
+(7-2-1-23) HSTACK_SIZE_STR(stksz)	éä¿¡é ¼ããã¯ã¹ã¿ãã¯ãµã¤ãºã®ã¢ã©ã¤
+                                    ã¡ã³ãå¶ç´ãæºããããã«æ¡å¼µãããµ
+                                    ã¤ãºã®æå­åãè¿ãé¢æ°
+  Release 1.4.0ä»¥éã§ã¯å¿
+è¦ãªãï¼
+
+(7-2-1-24) DEFINE_DSEC(void)	æ¨æºã®ã»ã¯ã·ã§ã³ã®å®ç¾©é¢æ°
+  ä¸è¨(7-2-1-9)ã(7-2-1-15)ã®æ¨æºã®ã»ã¯ã·ã§ã³(ååï¼å±æ§ï¼é
+ç½®ãªã¼ã¸ã§
+  ã³å)ã®å®ç¾©
+
+(7-2-1-25) SECTION_DESCRIPTION(secname)	ãªã³ã¯ããã»ã¯ã·ã§ã³åè¨è¿°ã®ç
+                                        æé¢æ°
+
+
+(7-2-1-26) HOOK_ERRORCHECK_SEC(secid)ï¼ãªãã·ã§ã³ï¼	ATT_SECã«é¢ããã¿
+                                     ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯é¢æ°
+
+
+
+(7-2-1-27) HOOK_ERRORCHECK_MEM(secid)ï¼ãªãã·ã§ã³ï¼	ATT_MEMã«é¢ããã¿
+                                     ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯é¢æ°
+
+(7-2-1-28) TARGET_PROVIDE_GP(void)	gpã¬ã¸ã¹ã¿ã®è¨­å®é¢æ°
+
+(7-2-1-29) TARGET_CODE_FILLER(moid)ï¼ãªãã·ã§ã³ï¼	texté åãNOPå½ä»¤
+                                                    ã§åããé¢æ°
+  texté åã®ã·ã³ãã«åãNOPå½ä»¤ã§åãã
+
+(7-2-1-30) GENERATE_OUTPUT(void)ï¼ãªãã·ã§ã³ï¼ã¿ã¼ã²ããä¾å­ã®OUTPUTè¨
+                                              è¿°ã®çæé¢æ°
+  åºåãããã¡ã¤ã«ã®å½¢å¼ï¼BFDï¼ï¼ã¿ã¼ã²ããã¢ã¼ã­ãã¯ãã£åã³ã¨ã³ããª
+  ãæå®ããï¼
+
+(7-2-1-31) GENERATE_PROVIDE(void)	ã¿ã¼ã²ããä¾å­ã®PROVIDEè¨è¿°ã®çæ
+                                    é¢æ°
+
+
+(7-2-1-32) GENERATE_SECTION_FIRST(void)	ã¿ã¼ã²ããä¾å­ã®ã»ã¯ã·ã§ã³è¨è¿°
+                                        ã®çæé¢æ°
+
+(7-2-1-33) GENERATE_STKMPUINFOB(taskid)	ã¿ã¹ã¯ã¹ã¿ãã¯ã®MPUã¬ã¸ã¹ã¿è¨­
+                                        å®å¤ãåºåããé¢æ°
+  ã¡ã¢ãªãµã¤ãºç¢ºå®ã®ããï¼ã³ã³ãã¤ã©ç¨ããã¼ã®MPUã¬ã¸ã¹ã¿è¨­å®å¤ãåºå
+  ããï¼
+
+(7-2-1-34) $CFG_PASS3 = 0$
+(7-2-1-35) $CFG_PASS4 = 0$
+
+ã¾ãï¼ãã¹2ï¼ãã¹3ï¼ãã¹4å
+±éå®ç¾©ãå
+±éå¦çãã¡ã¤ã«(prc_common.tf)ã«å®
+ç¾©ãï¼åãã¹å¦çãã³ãã¬ã¼ããã¡ã¤ã«ãå¦çåã«ã¤ã³ã¯ã«ã¼ãããï¼
+
+(7-2-1-36) MEMORY_ALIGN		ã¡ã¢ãªã®ã¢ã©ã¤ã¡ã³ã
+
+(7-2-1-37) CHECK_MP_ALIGN	ç¬¬1å¼æ°ã¨ï¼ç¬¬2å¼æ°ãã¡ã¢ãªä¿è­·ã®ã¢ã©ã¤ã¡ã³
+                            ãå¶ç´ãæºããã¦ããããã§ãã¯ããé¢æ°
+
+(7-2-1-38) GENERATE_OSAPINIB_MPUINFOB(osapid)	OSAPINIBã®MPUINFOBãåº
+                                            åããé¢æ°
+
+(7-2-1-39) DEFINE_CONST_VAR(...)		rodataé åã«é
+ç½®ãããå¤æ°ãå®
+                                        ç¾©ããé¢æ°
+  ç¬¬1å¼æ° å¤æ°åå
+  ç¬¬2å¼æ° å¤æ°å
+
+DEFINE_CONST_VARã¯ï¼éä¾å­é¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã§ã¯ï¼ãã¼ã¿ã»ã¯ã·ã§ã³
+ã®åæååã«ä½¿ç¨ããããã¼ã¿ï¼å
+·ä½çã«ã¯ï¼ostkptï¼tnum_datasecï¼
+datasecinib_tableï¼ãç¢ºå®ã«å®æ°é åï¼åæåãå¿
+è¦ãªãï¼ãªã»ããå¾ã«ã
+å¤ãä¿æãããä¸æ®çºæ§é åï¼ã«é
+ç½®ããããã«ç¨ããããï¼
+
+(7-2-1-40) GENERATE_STKMPUINFOB(taskid)	ã¿ã¹ã¯ã¹ã¿ãã¯ã®MPUã¬ã¸ã¹ã¿è¨­
+                                        å®å¤ãåºåé¢æ°
+  ãã®é¢æ°ã¯ï¼ãã¹3, ãã¹4ã®ã¿æå¹ãªå®ç¾©ã¨ããï¼
+  ä¸è¨(7-2-1-33)ã®å®ç¾©ã¯ï¼ãã¹2ã®ã¿æå¹
+
+(7-2-1-41) DEFINE_VAR_SEC(...)		å¤æ°ãæå®ãããã»ã¯ã·ã§ã³ã«å®ç¾©ã
+                                    ãé¢æ°
+  ç¬¬1å¼æ° ã»ã¯ã·ã§ã³å
+  ç¬¬2å¼æ° å
+  ç¬¬3å¼æ° å¤æ°å
+  ç¬¬4å¼æ° å¤æ°ã®å¤
+
+(7-2-1-42) GENERATE_TARGET_MPUINFOB(void)	MPUã¬ã¸ã¹ã¿è¨­å®å¤ã®çæé¢æ°
+  MPU_REGIONãä½æï¼çµ±åãï¼å
+±æé ååã³OSAPå°æé åã®MPUã¬ã¸ã¹ã¿è¨­å®
+  å¤ãçæããï¼
+
+(7-2-1-27) HOOK_ERRORCHECK_REG(regid)ï¼ãªãã·ã§ã³ï¼	ATT_REGã«é¢ããã¿
+                                     ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯é¢æ°
+
+7.2.2 ã¿ã¼ã²ããéä¾å­é¨ã§å®ç¾©ãããå¤æ°
+
+(7-2-2-3) REG.xxxx[regid]		ã¡ã¢ãªãªã¼ã¸ã§ã³ã®é£æ³é
+å
+
+(7-2-2-4) MO.xxxx[moid]			ã¡ã¢ãªãªãã¸ã§ã¯ãã®é£æ³é
+å
+
+(7-2-2-5) LNKSEC.xxxx[lsid]		LNK_SECã§é
+ç½®ããã»ã¯ã·ã§ã³ã®é£æ³é
+å
+
+(7-2-2-6) OSAP.xxxx[osapid]		OSAPæ
+å ±ã®é£æ³é
+å
+
+7.3 ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+
+7.3.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
+
+target_mem.tfããkernel_mem.tfãã¤ã³ã¯ã«ã¼ãããåã«ï¼å¿
+è¦ã«å¿ãã¦ï¼æ¬¡
+ã®å¤æ°ãå®ç¾©ãã¦ãããªããã°ãªããªãï¼
+
+(7-3-1-2) $CFG_PASS3 = 1$
+(7-3-1-3) $CFG_PASS4 = 0$
+
+7.4 ãã¹4ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨
+
+
+ä»¥ä¸ã§ã¯ï¼ãã¹4ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼ã²ããä¾å­é¨ãè¨è¿°ããä¸ã§
+å¿
+è¦ãªäºé 
+ã«ã¤ãã¦èª¬æããï¼
+
+7.4.1 ã¿ã¼ã²ããéä¾å­é¨ãã¤ã³ã¯ã«ã¼ãããåã«å®ç¾©ãã¹ãå¤æ°
+
+target_mem2.tfããkernel_mem2.tfãã¤ã³ã¯ã«ã¼ãããåã«ï¼å¿
+è¦ã«å¿ãã¦ï¼
+æ¬¡ã®å¤æ°ãå®ç¾©ãã¦ãããªããã°ãªããªãï¼
+
+(7-4-1-1) $CFG_PASS3 = 0$
+(7-4-1-2) $CFG_PASS4 = 1$
+
+(7-4-1-3) HOOK_ERRORCHECK_MEM_PASS4(moid)ï¼ãªãã·ã§ã³ï¼
+ - OsMemoryAreaã«é¢ããã¿ã¼ã²ããå®ç¾©ã®ã¨ã©ã¼ãã§ãã¯é¢æ°
+ - å¼æ° moidï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ID
+ - OsMemoryAreaStartAddress ã§æå®ãããå¤ãï¼MO.BASEADDR[moid]ã«
+   å
+¥ã£ã¦ããããï¼ãã®å¤ãã¿ã¼ã²ããå®ç¾©ã®ã¢ã©ã¤ã¡ã³ãå¶ç´ãæºããã¦
+   ãããã©ãããã§ãã¯ãï¼ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ãæºããã¦ããªãå ´åï¼
+   ã¨ã©ã¼ãæ¤åºããï¼âªNOS0813â«
+ - OMIT_STANDARD_MEMINIBãå®ç¾©ããã¦ããå ´åï¼æ¬é¢æ°ã¯å¼ã°ããªã
+   ããï¼ã¿ã¼ã²ããä¾å­é¨ã®tfã§ï¼NOS0813ã®ãã§ãã¯ãããå¿
+è¦ãããï¼
+
+ã¾ãï¼åã¡ã¢ãªãªãã¸ã§ã¯ãã®é åã®ãµã¤ãºãã§ãã¯ã»ãªãã¸ã§ã¯ãã®éãªã
+ãã§ãã¯ãå¿
+è¦ã«å¿ãã¦ï¼ãã¹4ã§è¡ãï¼
+
+ãã¹3ã¨ãã¹4ã§ã¯ã¡ã¢ãªããããå¤ãããªãããã«ããããï¼ãã¹4ã§ã®æé©
+åã«ããï¼é
+åã®ãµã¤ãºãå°ããã§ããå ´åã§ããµã¤ãºãå¤ããªãããã«ã
+ãï¼
+
+
+7.5 cfg1_out.cã®ãªã³ã¯ã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©ãã¡ã¤ã«
+
+----------------------------------------
+...
+void
+initialize_sections(void)
+{
+}
+const MPUINFOB		_background_code_region;
+const MPUINFOB		_background_data_region;
+----------------------------------------
+
+7.6 data/bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+
+ã¿ã¼ã²ããä¾å­é¨ã«ããã¦ï¼OMIT_STANDARD_DATASECINIBãã¯ã­ãå®ç¾©ããã¨ï¼
+ã¿ã¼ã²ããéä¾å­é¨ã§ï¼dataã»ã¯ã·ã§ã³åæåãã­ãã¯ãçæããªãï¼
+
+ã¿ã¼ã²ããä¾å­é¨ã«ããã¦ï¼OMIT_STANDARD_BSSSECINIBãã¯ã­ãå®ç¾©ããã¨ï¼
+ã¿ã¼ã²ããéä¾å­é¨ã§ï¼bssã»ã¯ã·ã§ã³åæåãã­ãã¯ãçæããªãï¼
+
+dataã»ã¯ã·ã§ã³ãªã©ã®å
+é ­çªå°ã®ã©ãã«ã¯ï¼ä½¿ç¨ããã³ã³ãã¤ã©ã«ãã£ã¦ã¯ï¼
+éä¾å­é¨ã§çæãããåæåãã­ãã¯ããåç
+§ãããã©ãã«ã¨ç°ãªãå ´åã
+ããï¼
+ãã®ãããªå ´åã«ï¼ãããã®ãã¯ã­ãå®ç¾©ãããã¨ã§ï¼ã¿ã¼ã²ããä¾å­ã§
+ç¬èªã®data/bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæå¦çãï¼ãã³ãã¬ã¼ããã¡ã¤ã«
+ã«ãã£ã¦å®ç¾©ãããã¨ãã§ããï¼
+
+ï¼ï¼ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ç­ã®ã¿ã¼ã²ããä¾å­é¨
+
+8.1 ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã®ã¿ã¼ã²ããä¾å­é¨
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.2 ã·ã¹ãã ã­ã°æ©è½ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+
+(8-2-3) ã¿ã¼ã²ããå®ç¾©ã®ã·ã¹ãã ãµã¼ãã¹ã®è¿½å 
+ã·ã¹ãã ã­ã°æ©è½ã¯ï¼ã¿ã¼ã²ããè¿½å ã®ã·ã¹ãã ãµã¼ãã¹ã¨ãã¦ä½ç½®ä»ãï¼ã·
+ã¹ãã ã­ã°æ©è½ä½¿ç¨ãã/ä½¿ç¨ããªãå ´åï¼ã·ã¹ãã ãµã¼ãã¹ãã¼ãã«ã«è¿½å /
+è¿½å ããªããªãã·ã§ã³ï¼USE_KERNEL_LIBRARY_SYSLOGï¼ããµãã¼ãããï¼
+
+USE_KERNEL_LIBRARY_SYSLOGãã¯ã­ãå®ç¾©ããã¦ããå ´åï¼ã·ã¹ãã ã¢ã¸ã¥ã¼
+ã«ã«ç¨æãã¦ãã_kernel_KernelLibrarySyslogé¢æ°ãã¿ã¼ã²ããã§è¿½å ãã
+ã·ã¹ãã ãµã¼ãã¹ãã¼ãã«å®ç¾©ï¼PRC_SVC_TABLEï¼ã«è¿½å ããï¼
+USE_KERNEL_LIBRARY_SYSLOGãã¯ã­ãå®ç¾©ãããªãå ´åï¼
+_kernel_KernelLibrarySyslogé¢æ°ãã¿ã¼ã²ããã§è¿½å ããã·ã¹ãã ãµã¼ãã¹
+ãã¼ãã«å®ç¾©ï¼PRC_SVC_TABLEï¼ã«è¿½å ããªãï¼
+
+8.3 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ã¿ã¼ã²ããä¾å­é¨
+
+8.3.1 å¤æ°ï¼ãã¼ã¿åï¼ç®¡çé¢æ°
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.3.2 ããã¤ã¹ãµã¼ãã¹ã«ã¼ãã³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.3.3 ã³ã¼ã«ããã¯ã«ã¼ãã³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.4 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºåã®ã¿ã¼ã²ããä¾å­å®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.5 ãµã³ãã«ãã­ã°ã©ã ã¨ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.6 å®è¡æéåå¸éè¨ã¢ã¸ã¥ã¼ã«ã®ã¿ã¼ã²ããä¾å­å®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.7 ã¿ã¤ããã©ã¤ã
+
+8.7.1 ã¿ã¤ããã©ã¤ãã®ãã¡ã¤ã«æ§æ
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.7.2 ã½ããã¦ã§ã¢ã«ã¦ã³ã¿ã®å®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.7.3 æéåã®å®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.7.4 ã¿ã¤ãã®åæåã»çµäºå¦çã»å²è¾¼ã¿å¦ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.7.5 ç¾å¨ã®æå»ã®åå¾
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ï¼ï¼ãã®ä»
+
+9.1 ãã­ã¥ã¡ã³ã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ï¼ï¼ï¼ãªãã¡ã¬ã³ã¹
+
+10.1 ã¿ã¼ã²ããä¾å­é¨ã®ãã¡ã¤ã«ä¸è¦§
+
+target_mem.tf			ã¸ã§ãã¬ã¼ã¿ã®ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼
+						ã²ããä¾å­é¨ï¼7.3 ç¯ï¼ï¼
+target_mem2.tf			ã¸ã§ãã¬ã¼ã¿ã®ãã¹4ã®ãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¿ã¼
+						ã²ããä¾å­é¨ï¼7.4 ç¯ï¼ï¼
+target_mem.arxml		ã¿ã¼ã²ããä¾å­ã®æ¨æºROM/RAMãªã©ã¡ã¢ãªãªã¼ã¸ã§
+						ã³å®ç¾©ã®XMLã³ã³ããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+						ãã¡ã¤ã«ï¼
+target_svc.h			ã¿ã¼ã²ããä¾å­ã®ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ãããµã¼ã
+						ã¹ã³ã¼ã«ã¤ã³ã¿ãã§ã¼ã¹ãããã¼ãã¡ã¤ã«ï¼
+target_serial_obj.arxml	ã·ãªã¢ã«ãã©ã¤ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
+						ã³ãã¡ã¤ã«ï¼
+target_serial_osap.arxmlã·ãªã¢ã«ãã©ã¤ãã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§
+						ã³ãã¡ã¤ã«ï¼
+target_test_obj.arxml	ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ã®ã³ã³ãã£
+						ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼
+target_test_osap.arxml	ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ã®ã³ã³ãã£
+						ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼
+target_timer_obj.arxml	ã¿ã¤ããã©ã¤ãã®XMLã³ã³ããç¨ã·ã¹ãã ã³ã³ãã£
+						ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼
+target_timer_osap.arxml	ã¿ã¤ããã©ã¤ãã®XMLã³ã³ããç¨ã·ã¹ãã ã³ã³ãã£
+						ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼
+
+
+ä»¥ä¸
Index: /atk2-sc3-1.4.0-ntisr/doc/tuning_memo.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/doc/tuning_memo.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/doc/tuning_memo.txt	(revision 172)
@@ -0,0 +1,87 @@
+
+		TOPPERS/ATK2-SC3ã«ã¼ãã«
+		æ©è½æ¡å¼µã»ãã¥ã¼ãã³ã°ã¬ã¤ã
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼ATK2-SC3ãï¼æ©è½æ¡å¼µã»ãã¥ã¼ãã³ã°ããããã®æ¹æ³
+ï¼ã¾ãã¯ãã³ãï¼ãèª¬æãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2011-2013 by Spansion LLC, USA
+Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2011-2015 by Witz Corporation
+Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: tuning_memo.txt 425 2015-12-07 08:06:19Z witz-itoyo $
+----------------------------------------------------------------------
+
+âç®æ¬¡
+
+ã»ããããµã¼ãå½ä»¤ã®ä½¿ç¨
+ã»ã¿ã¹ã¯ç¨®å¥æ¯ã®TCBçæ
+ã»âæé©åããããã«åã®ä¾å­é¨å®ç¾©
+
+âãã¤ãã¦ããé 
+ç®ã¯ATK2-SC1ããå¤æ´ããã£ãç®æãï¼âã¯ATK2-SC3ã§æ°è¦
+ã«è¿½å ãããç®æãç¤ºãï¼
+
+ã»ããããµã¼ãå½ä»¤ã®ä½¿ç¨
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ã»ã¿ã¹ã¯ç¨®å¥æ¯ã«TCBãçæãã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ã»æé©åããããã«åã®ä¾å­é¨å®ç¾©
+
+ATK2-SC3ã®å ´åï¼ä»¥ä¸ã®åãå«ãï¼
+  typedef uint32	TrustedFunctionIndexType;  /* Trusted Function Index */
+
Index: /atk2-sc3-1.4.0-ntisr/doc/user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/doc/user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/doc/user.txt	(revision 172)
@@ -0,0 +1,611 @@
+
+		TOPPERS/ATK2-SC3
+		ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼TOPPERS/ATK2-SC3ãä½¿ç¨ããããã«å¿
+è¦ãªäºé 
+ãèª¬æ
+ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2011-2013 by Spansion LLC, USA
+Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2011-2015 by Witz Corporation
+Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: user.txt 425 2015-12-07 08:06:19Z witz-itoyo $
+----------------------------------------------------------------------
+
+âç®æ¬¡
+
+âï¼ï¼æ¬ããã¥ã¢ã«ã®ä½ç½®ã¥ã
+ï¼ï¼TOPPERS/ATK2-SC3ã®æ¦è¦
+	â1.1 TOPPERS/ATK2-SC3ã®ä½ç½®ä»ã
+	1.2 TOPPERS/ATK2-SC3ã®ä»æ§
+	1.3 æ¢ç¥ã®åé¡
+	1.4 Cygwinç°å¢ã«ãããæ³¨æäºé 
+
+ï¼ï¼ã¿ã¼ã²ããä¾å­é¨
+	2.1 ã¿ã¼ã²ããä¾å­é¨ã®æ¦è¦
+ï¼ï¼ã¯ã¤ãã¯ã¹ã¿ã¼ãã¬ã¤ã
+	3.1 éçºç°å¢ã®æºå
+	3.2 ã¸ã§ãã¬ã¼ã¿ã®æ§ç¯
+	3.3 XMLã¹ã­ã¼ãã®å
+¥æ
+	3.4 ãµã³ãã«ãã­ã°ã©ã ã®æ§ç¯ã¨å®è¡
+	3.5 ã«ã¼ãã«ãé¢æ°åä½ã§ã©ã¤ãã©ãªåããæ¹æ³
+	3.6 ã¢ããªã±ã¼ã·ã§ã³ã¨ã«ã¼ãã«ãå¥ã
+ã«æ§ç¯ããæ¹æ³
+	3.7 ã«ã¦ã³ã¿ã®å¾ªç°ãã§ãã¯ã®çç¥
+	3.8 Rte_Type.hã®ç¨æ
+ï¼ï¼ãã£ã¬ã¯ããªæ§æã»ãã¡ã¤ã«æ§æ
+	4.1 é
+å¸ããã±ã¼ã¸ã®ãã£ã¬ã¯ããªæ§æ
+	â4.2 ã¿ã¼ã²ããéä¾å­é¨ã®ãã¡ã¤ã«æ§æ
+ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®ä½¿ãæ¹
+ï¼ï¼Makefileã®ä¿®æ­£æ¹æ³
+	6.1 Makefileã®å¤æ°å®ç¾©
+	6.2 ã³ã³ãã¤ã«ãªãã·ã§ã³
+âï¼ï¼ã¸ã§ãã¬ã¼ã¿ã®ä½¿ãæ¹
+7.1 ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«(arxml)
+ï¼ï¼ã·ã¹ãã ã¢ã¸ã¥ã¼ã«
+	8.1 ã·ã¹ãã ã­ã°æ©è½
+		8.1.1 ä½ã¬ãã«åºå
+		8.1.2 ã­ã°æ
+å ±ã®ç¨®å¥
+		8.1.3 ã­ã°æ
+å ±ã®éè¦åº¦
+		8.1.4 ã­ã°æ
+å ±ã®ãã¼ã¿æ§é 
+		8.1.5 ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«
+		8.1.6 ã·ã¹ãã ã­ã°æ©è½ã®ããã®ã©ã¤ãã©ãªé¢æ°ã¨ãã¯ã­
+		â8.1.7 ã·ã¹ãã ã­ã°æ©è½ã®ãã®ä»ã®ãµã¼ãã¹
+	8.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+		8.2.1 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«
+	8.3 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºå
+ï¼ï¼ãµãã¼ãã©ã¤ãã©ãª
+	9.1 åºæ¬çãªã©ã¤ãã©ãªé¢æ°
+	9.2 ã­ã¥ã¼æä½ã©ã¤ãã©ãªé¢æ°
+	9.3 ã·ã¹ãã ã­ã°åºåç¨ã©ã¤ãã©ãªé¢æ°
+	9.4 å®è¡æéåå¸éè¨ã¢ã¸ã¥ã¼ã«
+ï¼ï¼ï¼ä½¿ç¨ä¸ã®æ³¨æã¨ãã³ã
+	10.1 ã¿ã¤ããã©ã¤ãã®çµè¾¼ã¿
+	10.2 ASSERTãã¯ã­ã®å¦ç
+	10.3 ã·ã¹ãã ã­ã°æ©è½ã®æ±ã
+	10.4 ãªãã¸ã§ã¯ãIDã®ç®¡ç
+	10.5 ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ãã®ä½¿ç¨æ¹æ³
+	10.6 ã·ã¹ãã ã®èµ·åæã®åæåå¦ç
+	10.7 æ³å®ãããã­ã°ã©ãã³ã°è¨èª
+	10.8 ã¦ã¼ã¶ã¹ã¿ãã¯é åå®ç¾©
+	â10.9 ã¹ã¿ãã¯ãµã¤ãºãè¦ç©ããæ³¨æç¹
+	10.10 ã¹ã¿ã¼ãã¢ãã/ã·ã£ãããã¦ã³ããã¯ç¡å¹æã®æ³¨æç¹
+	â10.11 ã¡ã¢ãªä¿è­·æ©è½
+	â10.12 ã·ã¹ãã ãµã¼ãã¹ã®å¼åºãæ¹æ³
+	â10.13 ã¹ã¿ãã¯ã«ã¤ãã¦
+		â10.13.1 ã¿ã¹ã¯
+		â10.13.2 C2ISR
+		â10.13.3 ä¿¡é ¼ããã¯
+		â10.13.4 éä¿¡é ¼ããã¯
+	â10.14 æ¬ã«ã¼ãã«å®è£
+ã®æ©è½ã¬ãã«
+	â10.15 ã¿ã¹ã¯éã§ã®ã¹ã¿ãã¯é åã®å
+±æ
+	10.16 ã·ã¹ãã ã¿ã¤ãã®ä½¿ç¨æ¹æ³
+ï¼ï¼ï¼åèæ
+å ±
+	11.1 å©ç¨æ¡ä»¶ã¨å©ç¨å ±å
+	11.2 ä¿è¨¼ã»é©ç¨æ§ã»ãµãã¼ã
+	11.3 ãã°ã¬ãã¼ã
+	11.4 ã¦ã§ããµã¤ã
+	11.5 TOPPERSã¦ã¼ã¶ã¼ãºã¡ã¼ãªã³ã°ãªã¹ã
+	11.6 TOPPERSãã­ã¸ã§ã¯ãã®ã¡ã³ãåãã®ãµã¼ãã¹
+	11.7 TOPPERSãã­ã¸ã§ã¯ãã¸ã®åå 
+
+âãã¤ãã¦ããé 
+ç®ã¯ATK2-SC1ããå¤æ´ããã£ãç®æãï¼âã¯ATK2-SC3ã§æ°è¦
+ã«è¿½å ãããç®æãç¤ºãï¼
+
+
+ï¼ï¼æ¬ããã¥ã¢ã«ã®ä½ç½®ã¥ã
+TOPPERS/ATK2-SC3ã¯ï¼TOPPERS/ATK2-SC1ããã¼ã¹ã¨ãã¦ããããï¼å¤ãã®é 
+ç®
+ã¯TOPPERS/ATK2-SC1ã¨åä¸ã§ããï¼æ¬ãã­ã¥ã¡ã³ãã§ã¯ï¼TOPPERS/ATK2-SC1ã¨
+ç°ãªãç¹ã«ã¤ãã¦èª¬æããï¼ãã®ããï¼ã¾ãTOPPERS/ATK2-SC1ã®ã¦ã¼ã¶ã¼ãºã
+ãã¥ã¢ã«ãåç
+§ã®å¾ï¼æ¬ãã­ã¥ã¡ã³ããåç
+§ãããã¨ï¼
+
+
+ï¼ï¼TOPPERS/ATK2-SC3ã®æ¦è¦
+
+1.1 TOPPERS/ATK2-SC3ã®ä½ç½®ä»ã
+
+TOPPERS/ATK2-SC3ã¯ï¼TOPPERS/ATK2-SC1ã«å¯¾ãã¦ï¼AUTOSAR OSä»æ§ã®SC3ãã
+ã¼ã¹ã¨ãã¦ã¡ã¢ãªä¿è­·ãªã©ã®ã¢ã¯ã»ã¹ä¿è­·æ©è½ãè¿½å ãããªã¢ã«ã¿ã¤ã ã«ã¼ã
+ã«ã§ããï¼
+
+1.2 TOPPERS/ATK2-SC3ã®ä»æ§
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+1.3 æ¢ç¥ã®åé¡
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+1.4 Cygwinç°å¢ã«ãããæ³¨æäºé 
+
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼ã¿ã¼ã²ããä¾å­é¨
+
+2.1 ã¿ã¼ã²ããä¾å­é¨ã®æ¦è¦
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼ã¯ã¤ãã¯ã¹ã¿ã¼ãã¬ã¤ã
+
+3.1 éçºç°å¢ã®æºå
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.2 ã¸ã§ãã¬ã¼ã¿ã®æ§ç¯
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.3 XMLã¹ã­ã¼ãã®å
+¥æ
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.4 ãµã³ãã«ãã­ã°ã©ã ã®æ§ç¯ã¨å®è¡
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.5 ã«ã¼ãã«ãé¢æ°åä½ã§ã©ã¤ãã©ãªåããæ¹æ³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.6 ã¢ããªã±ã¼ã·ã§ã³ã¨ã«ã¼ãã«ãå¥ã
+ã«æ§ç¯ããæ¹æ³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.7 ã«ã¦ã³ã¿ã®å¾ªç°ãã§ãã¯ã®çç¥
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+3.8 Rte_Type.hã®ç¨æ
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼ãã£ã¬ã¯ããªæ§æã»ãã¡ã¤ã«æ§æ
+
+4.1 é
+å¸ããã±ã¼ã¸ã®ãã£ã¬ã¯ããªæ§æ
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+4.2 ã¿ã¼ã²ããéä¾å­é¨ã®ãã¡ã¤ã«æ§æ
+
+	include/
+		svc_funccall.h			ã·ã¹ãã ãµã¼ãã¹ç´æ¥å¼ã³åºãï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããå¼åºãã¨åºå¥ï¼ããã®å®ç¾©
+
+	kernel/
+		kernel_common.tf		ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³åãã¹å
+±éå®ç¾©ã®éä¾å­é¨ãã³ãã¬ã¼ããã¡ã¤ã«
+		kernel_mem.tf			ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¹2ç¨ã®éä¾å­é¨ãã³ãã¬ã¼ããã¡ã¤ã«
+		kernel_mem2.tf			ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¹3ï¼ãã¹4ç¨ã®éä¾å­é¨ãã³ãã¬ã¼ããã¡ã¤ã«
+		memory.h				ã¡ã¢ãªãªãã¸ã§ã¯ãç®¡çæ©è½é¢é£ã®å®ç¾©
+		memory.c				ã¡ã¢ãªãªãã¸ã§ã¯ãç®¡çæ©è½ã®å
+é¨é¢æ°
+		osap.h					OSã¢ããªã±ã¼ã·ã§ã³æ©è½é¢é£ã®å®ç¾©
+		osap.c					OSã¢ããªã±ã¼ã·ã§ã³æ©è½ã®å
+é¨é¢æ°
+		svc.def					ãµã¼ãã¹ã³ã¼ã«å®ç¾©ãã¡ã¤ã«ï¼ãµã¼ãã¹ã³ã¼ã«ã¤ã³ã¿ãã§ã¼ã¹çæãã¼ã«ç¨ï¼
+		svc_table.c				ã·ã¹ãã ãµã¼ãã¹ã®ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããå¼åºãããã®èµ·åçªå°ãã¼ãã«
+		ioc.tf					IOCåãã¸ã§ãã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
+		ioc_impl.h				IOCå®è£
+ç¨æ¨æºããããã¡ã¤ã«
+		ioc_manage.c			IOCæ©è½
+
+	sysmod/
+		chkobj.c		éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã®ãªãã¸ã§ã¯ãã¢ã¯ã»ã¹å¯å¦ããã§ãã¯ããããã®ã·ã¹ãã ãµã¼ãã¹å®ç¾©
+
+	library/
+		ATK2-SC1ããå¤æ´ãªãï¼
+
+	arch/gcc/
+		ldscript.tf		ãªã³ã«ã¹ã¯ãªããã®çæã®ãã³ãã¬ã¼ããã¡ã¤ã«
+		tool_svc.h		ã·ã¹ãã ãµã¼ãã¹ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããå¼åºãï¼ç´æ¥å¼ã³åºãã¨åºå¥ï¼ããã®å®ç¾©
+
+	arch/logtrace/
+		ATK2-SC1ããå¤æ´ãªãï¼
+
+	utils/
+		gensvc_atk		ãµã¼ãã¹ã³ã¼ã«ã¤ã³ã¿ãã§ã¼ã¹çæãã¼ã«
+
+	sample/
+		sample1.h		ãµã³ãã«ãã­ã°ã©ã (1)ã«é¢ããå®ç¾©ï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ï¼
+		sample1.c		ãµã³ãã«ãã­ã°ã©ã (1)ï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ï¼
+		sample2.h		ãµã³ãã«ãã­ã°ã©ã (2)ã«é¢ããå®ç¾©ï¼éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ï¼	
+		sample2.c		ãµã³ãã«ãã­ã°ã©ã (2)ï¼éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ï¼
+		sample1.arxml	ãµã³ãã«ãã­ã°ã©ã (1)(2)ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ï¼ä¿¡é ¼/éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ï¼
+
+	doc/
+		ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¹ã¯ãªããã®ä½¿ãæ¹
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼Makefileã®ä¿®æ­£æ¹æ³
+
+6.1 Makefileã®å¤æ°å®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+6.2 ã³ã³ãã¤ã«ãªãã·ã§ã³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼ã¸ã§ãã¬ã¼ã¿ã®ä½¿ãæ¹
+
+ã¸ã§ãã¬ã¼ã¿ï¼cfgï¼ã¯ï¼4ã¤ã®ãã¹ã§æ§æãããï¼
+
+	-pï¼»--passï¼½<ãã¹çªå·>
+		ãã¹çªå·ãæå®ããï¼1ã4ã®ããããï¼
+
+	-rï¼»--rom-imageï¼½<ã­ã¼ãã¢ã¸ã¥ã¼ã«å>
+		ã­ã¼ãã¢ã¸ã¥ã¼ã«ãSã¬ã³ã¼ããã©ã¼ãããã®å½¢ã«å¤æãããã¡ã¤ã«ã®
+		åç§°ãæå®ããï¼ãã¹3ï¼ãã¹4ã§ã®ã¿æå¹ï¼
+
+7.1 ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«(arxml)
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼ã·ã¹ãã ã¢ã¸ã¥ã¼ã«
+
+8.1 ã·ã¹ãã ã­ã°æ©è½
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.1.1 ä½ã¬ãã«åºå
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.1.2 ã­ã°æ
+å ±ã®ç¨®å¥
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.1.3 ã­ã°æ
+å ±ã®éè¦åº¦
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.1.4 ã­ã°æ
+å ±ã®ãã¼ã¿æ§é 
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.1.5 ã·ã¹ãã ã­ã°æ©è½ã®ãµã¼ãã¹ã³ã¼ã«
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.1.6 ã·ã¹ãã ã­ã°æ©è½ã®ããã®ã©ã¤ãã©ãªé¢æ°ã¨ãã¯ã­
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.1.7 ã·ã¹ãã ã­ã°æ©è½ã®ãã®ä»ã®ãµã¼ãã¹
+
+(3)ã·ã¹ãã ã­ã°æ©è½ä½¿ç¨ãã/ããªãå ´åã®è¨­å®
+ã·ã¹ãã ã­ã°æ©è½ã¯ï¼ã¿ã¼ã²ããè¿½å ã·ã¹ãã ãµã¼ãã¹ã¨ãã¦ä½ç½®ä»ãï¼ä½¿ç¨
+ããå ´åï¼Makefileã«ä»¥ä¸ã®ã³ã³ãã¤ã«ãªãã·ã§ã³ã§è¨è¿°ããï¼
+
+CDEFS := $(CDEFS)  -DUSE_KERNEL_LIBRARY_SYSLOG
+
+ã³ã³ãã¤ã«ãªãã·ã§ã³ã§ãã-DUSE_KERNEL_LIBRARY_SYSLOGã¯ï¼ã«ã¼ãã«ã¬ã
+ã«ã§ã®ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ãã/ããªãè¨­å®ã§ããï¼
+-DUSE_KERNEL_LIBRARY_SYSLOGãæå®ãããå ´åï¼ã«ã¼ãã«ã«ã·ã¹ãã ã­ã°æ©
+è½ãè¿½å ããï¼åã¢ããªã«ä½¿ç¨ã§ããï¼-DUSE_KERNEL_LIBRARY_SYSLOGãæå®ã
+ããªãå ´åï¼ã«ã¼ãã«ã«ã·ã¹ãã ã­ã°æ©è½ãç¡ããªãï¼åã¢ããªã«ä½¿ç¨ã§ããª
+ãï¼
+
+ã¾ãï¼åã¢ããª(ã½ã¼ã¹ãã¡ã¤ã«)ã«ã·ã¹ãã ã­ã°æ©è½ãä½¿ç¨ãã/ããªãè¨­å®ã
+åå¥ã«ãããå ´åã¯ï¼ææ­¢ãããã½ã¼ã¹ãã¡ã¤ã«ã«ããã¦ï¼"t_syslog.h"ãã¤ã³
+ã¯ã«ã¼ãããåã«ï¼TOPPERS_OMIT_SYSLOGãã¯ã­ãå®ç¾©ããï¼
+
+8.2 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+
+8.2.1 ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ãã®ãµã¼ãã¹ã³ã¼ã«
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+8.3 ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºå
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+ï¼ï¼ãµãã¼ãã©ã¤ãã©ãª
+
+9.1 åºæ¬çãªã©ã¤ãã©ãªé¢æ°
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+9.2 ã­ã¥ã¼æä½ã©ã¤ãã©ãªé¢æ°
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+9.3 ã·ã¹ãã ã­ã°åºåç¨ã©ã¤ãã©ãªé¢æ°
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+9.4 å®è¡æéåå¸éè¨ã¢ã¸ã¥ã¼ã«
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼ï¼ä½¿ç¨ä¸ã®æ³¨æã¨ãã³ã
+
+10.1 ã¿ã¤ããã©ã¤ãã®çµè¾¼ã¿
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.2 ASSERTãã¯ã­ã®å¦ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.3 ã·ã¹ãã ã­ã°æ©è½ã®æ±ã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.4 ãªãã¸ã§ã¯ãIDã®ç®¡ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.5 ãã¬ã¼ã¹ã­ã°è¨é²ã®ãµã³ãã«ã³ã¼ãã®ä½¿ç¨æ¹æ³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.6 ã·ã¹ãã ã®èµ·åæã®åæåå¦ç
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.7 æ³å®ãããã­ã°ã©ãã³ã°è¨èª
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.8 ã¦ã¼ã¶ã¹ã¿ãã¯é åå®ç¾©
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.9 ã¹ã¿ãã¯ãµã¤ãºãè¦ç©ããæ³¨æç¹
+
+æ¬ã«ã¼ãã«ã¯ï¼C2ISR/ä¿¡é ¼ããã¯ç¨ã¹ã¿ãã¯ã¯ï¼åããã¦1ã¤ã®ã¹ã¿ãã¯ã§ç¢º
+ä¿ããï¼éä¿¡é ¼ããã¯ç¨ã¹ã¿ãã¯ã¯ï¼ã·ã¹ãã ã«1ã¤ç¢ºä¿ãããï¼
+
+10.10 ã¹ã¿ã¼ãã¢ãã/ã·ã£ãããã¦ã³ããã¯ç¡å¹æã®æ³¨æç¹
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+10.11 ã¡ã¢ãªä¿è­·æ©è½
+
+ã·ã¹ãã ã«ã¯ï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã¨éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ãå­å¨ã
+ãï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããå¦çåä½ã¯ï¼ãã­ã»ããµã®ç¹æ¨©ã¢ã¼ãã§
+å®è¡ããï¼å
+¨ã¦ã®OSãªãã¸ã§ã¯ãã«å¯¾ãã¦ï¼å
+¨ã¦ã®ç¨®å¥ã®ã¢ã¯ã»ã¹ãè¡ããã¨
+ãè¨±å¯ãããï¼éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããå¦çåä½ã¯ï¼ãã­ã»ããµã®
+éç¹æ¨©ã¢ã¼ãã§å®è¡ããï¼ã©ã®OSãªãã¸ã§ã¯ãã«å¯¾ãã¦ã©ã®ç¨®å¥ã®ã¢ã¯ã»ã¹ã
+è¡ããããå¶éãããã¨ãã§ããï¼ã«ã¼ãã«èªä½ã¯ï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³
+ã¨åæ§ãªæ¯ãèããããï¼
+
+ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã¯ï¼ãã¼ãã¦ã§ã¢ã¸ã®ã¢ã¯ã»ã¹ãã·ã¹ãã ãµã¼ãã¹ã®
+ä½¿ç¨ã«å¶éããªãï¼éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã¯ï¼ãã¼ãã¦ã§ã¢ã¸ã®ã¢ã¯ã»ã¹
+ãã·ã¹ãã ãµã¼ãã¹ã®ä½¿ç¨ãå¶éãããããï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ã
+ãå¦çåä½ã¯ï¼ãããªãã«ä¿¡é ¼ãããããã«ä½æããå¿
+è¦ãããï¼
+
+10.12 ã·ã¹ãã ãµã¼ãã¹ã®å¼åºãæ¹æ³
+
+æ¬ã«ã¼ãã«ã§ã¯ï¼ã·ã¹ãã ãµã¼ãã¹ã¯ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ãã£ã¦å¼åºãã®
+ãåºæ¬ã§ããï¼ã·ã¹ãã ãµã¼ãã¹å¼åºããéå¸¸ã®æ¹æ³ã§è¨è¿°ããå ´åï¼ã½ãã
+ã¦ã§ã¢å²è¾¼ã¿ã«ãã£ã¦å¼åºããã¨ãçæãããï¼
+
+ä¸è¬ã«ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããã·ã¹ãã ãµã¼ãã¹å¼åºãã¯ãªã¼ããããã
+å¤§ããï¼ãã®ããï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããå¦çåä½ããã¯ï¼é¢æ°å¼
+åºãã«ãã£ã¦ã·ã¹ãã ãµã¼ãã¹ãå¼åºããã¨ã§ï¼ãªã¼ãããããåæ¸ãããã¨
+ãã§ããï¼ããã§ï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããå¦çåä½ããé¢æ°å¼åºã
+ã«ãã£ã¦ã·ã¹ãã ãµã¼ãã¹ãå¼åºããããã«ï¼æ©è½ãç¨æããã¦ããï¼
+
+ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããå¦çåä½ãå®è¡ããé¢æ°ã®ã¿ãå«ãã ã½ã¼ã¹
+ãã¡ã¤ã«ã§ã¯ï¼ã«ã¼ãã«ããããã¡ã¤ã«ï¼Os.hï¼ãã¤ã³ã¯ã«ã¼ãããåã«ï¼ã
+ã¯ã­ãå®ç¾©ãããã¨ã§ï¼ã·ã¹ãã ãµã¼ãã¹å¼åºããéå¸¸ã®æ¹æ³ã§è¨è¿°ããå ´å
+ã«ï¼é¢æ°å¼åºãã«ãã£ã¦å¼åºãã³ã¼ããçæããã(ãæ¬¡ä¸ä»£è»è¼ã·ã¹ãã å
+ãRTOSå¤é¨ä»æ§æ¸ããåç
+§)ï¼
+
+gensvc_atkãã¼ã«ã®ä½¿ãæ¹ã®è£è¶³ï¼
+gensvc_atkãã¼ã«ã¯ï¼ãµã¼ãã¹ã³ã¼ã«ã¤ã³ã¿ãã§ã¼ã¹çæãã­ã°ã©ã ã§ããï¼
+ãµã¼ãã¹ã³ã¼ã«å®ç¾©ãã¡ã¤ã«ï¼svc.defï¼ãèª­ã¿è¾¼ãã§ï¼ã½ããã¦ã§ã¢å²è¾¼ã¿
+ã«ãããµã¼ãã¹ã³ã¼ã«å¼åºãããã®ä¸é¨ã½ã¼ã¹ãã¡ã¤ã«ãçæã§ããï¼ä»¥ä¸ã®
+ãã¡ã¤ã«ãã«ã¬ã³ããã£ã¬ã¯ããªã«çæããï¼ããããã®ãã£ã¬ã¯ããªã¸ã®ç§»
+åã¯æåã§è¡ããã¨ï¼
+
+å®è¡ä¾ï¼
+	gensvc_atk ../kernel/svc.def
+	ï¼svc.devã®è¨è¿°æ¹æ³ã¯ï¼svc.devåç
+§ï¼
+
+çæãã¡ã¤ã«ï¼
+	svc_table.c â kernel/ ã«ç½®ã
+	kernel_fncode.h â include/ ã«ç½®ã
+	svc_call.h â include/ ã«ç½®ã
+	tool_svc.hâ arch/gcc/ ã«ç½®ã
+
+10.13 ã¹ã¿ãã¯ã«ã¤ãã¦
+
+æ¬ã«ã¼ãã«ã®ã¹ã¿ãã¯ã«ã¯ï¼ä¿¡é ¼ã¿ã¹ã¯ï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããã¿
+ã¹ã¯ï¼ç¨ã¹ã¿ãã¯ï¼éä¿¡é ¼ã¿ã¹ã¯ï¼éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããã¿ã¹ã¯
+ï¼ç¨ã¹ã¿ãã¯ï¼éä¿¡é ¼ã¿ã¹ã¯ç¨ã·ã¹ãã ã¹ã¿ãã¯ï¼C2ISRç¨ã¹ã¿ãã¯ï¼ä¿¡é ¼ã
+ãã¯ï¼ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããããã¯ï¼ç¨ã¹ã¿ãã¯ã¨éä¿¡é ¼ããã¯
+ï¼éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããããã¯ï¼ç¨ã¹ã¿ãã¯ãããï¼
+
+10.13.1 ã¿ã¹ã¯
+
+æ¬ã«ã¼ãã«ã§ã¯ï¼éä¿¡é ¼ã¿ã¹ã¯ã«ããã¦ï¼éä¿¡é ¼ã¿ã¹ã¯ç¨ã¹ã¿ãã¯ã¨éä¿¡é ¼ã¿
+ã¹ã¯ç¨ã·ã¹ãã ã¹ã¿ãã¯ã®2æ¬ãç¢ºä¿ãããï¼åºæ¬çã«èªã¿ã¹ã¯ã®éä¿¡é ¼ã¿ã¹
+ã¯ç¨ã¹ã¿ãã¯ãä½¿ç¨ãããï¼ã·ã¹ãã ãµã¼ãã¹åã³ä¿¡é ¼é¢æ°ãå¼åºãéã«éä¿¡
+é ¼ã¿ã¹ã¯ç¨ã·ã¹ãã ã¹ã¿ãã¯ãä½¿ç¨ããï¼
+
+ä¸æ¹ï¼ä¿¡é ¼ã¿ã¹ã¯ã«ããã¦ï¼ã¿ã¹ã¯ç¨ã¹ã¿ãã¯ã¨ã·ã¹ãã ç¨ã¹ã¿ãã¯ãåãã¦
+1æ¬ã§ç¢ºä¿ãããï¼
+
+10.13.2 C2ISR
+
+æ¬ã«ã¼ãã«ã¯ï¼æ©è½ã¬ãã«2ããå¯¾å¿ãã¦ããªãããï¼ä¿¡é ¼C2ISRï¼ä¿¡é ¼OSã¢ã
+ãªã±ã¼ã·ã§ã³ã«å±ããC2ISRï¼ãããªãï¼C2ISRå®è¡æã«ä½¿ç¨ããã¹ã¿ãã¯ã¯ï¼
+C2ISRç¨ã¹ã¿ãã¯ãä½¿ç¨ããï¼
+
+æ¬ã«ã¼ãã«ã§ã¯ï¼C2ISRç¨ã¹ã¿ãã¯ã¨ã«ã¼ãã«èªèº«ç¨ã¹ã¿ãã¯ã¨å¾è¿°ä¿¡é ¼ãã
+ã¯ã«å¯¾ãã¦ï¼ã¡ã¢ãªä¿è­·ãè¡ããªãããï¼åãã¦1æ¬ã®ã¹ã¿ãã¯ãç¢ºä¿ãããï¼
+
+10.13.3 ä¿¡é ¼ããã¯
+
+æ¬ã«ã¼ãã«ã§ã¯ï¼ä¿¡é ¼ããã¯ï¼ã·ã¹ãã ããã¯ãå«ãï¼å®è¡æã«ï¼ä¿¡é ¼ããã¯
+ç¨ã¹ã¿ãã¯ãä½¿ç¨ããï¼åç¯ã®çç±ã§ï¼C2ISRç¨ã¹ã¿ãã¯ã¨ã«ã¼ãã«èªèº«ç¨ã¹
+ã¿ãã¯ã¨åãã¦1æ¬ã®ã¹ã¿ãã¯ãç¢ºä¿ãããï¼
+
+10.13.4 éä¿¡é ¼ããã¯
+
+æ¬ã«ã¼ãã«ã§ã¯ï¼éä¿¡é ¼ããã¯å®è¡æã«ï¼éä¿¡é ¼ããã¯ç¨ã¹ã¿ãã¯ãä½¿ç¨ã
+ãï¼
+
+ä¸è¨ã®èª¬æã®ããã«ï¼ã¹ã¿ãã¯ãè¦ç©ããæã«ï¼ã¹ã¿ãã¯ä½¿ç¨å¯¾è±¡ãç¢ºèªã
+ã¦ï¼è¦ç©ããã°ããï¼ã¾ãï¼åã¹ã¿ãã¯ã®ããã©ã«ãå¤ã¯ï¼ã¿ã¼ã²ããã«ãã£
+ã¦ï¼å®ç¾©ããã¦ããããï¼ã¿ã¼ã²ããä¾å­è¨­è¨æ¸ãåç
+§ããï¼
+
+10.14 æ¬ã«ã¼ãã«å®è£
+ã®æ©è½ã¬ãã«
+
+æ¬ã«ã¼ãã«ã¯ï¼ã¡ã¢ãªä¿è­·ã®æ©è½ã¬ãã«2åã³ä¿è­·éåæå¦çã®æ©è½ã¬ãã«2ã
+å®è£
+ãã¦ããï¼æ©è½ã¬ãã«ã«ã¤ãã¦ã¯ï¼ãæ¬¡ä¸ä»£è»è¼ã·ã¹ãã åãRTOSå¤é¨ä»
+æ§æ¸ã2.3.2æ©è½ã¬ãã«ãåç
+§ããï¼
+
+10.15 ã¿ã¹ã¯éã§ã®ã¹ã¿ãã¯é åã®å
+±æ
+
+æ¬ã«ã¼ãã«ã§ã¯ï¼ååªå
+åº¦åºæ¬ã¿ã¹ã¯ã®ã¹ã¿ãã¯èªåçã«å
+±æããµãã¼ããã¦
+ããï¼æ´ã«åãOSã¢ããªã±ã¼ã·ã§ã³ã«æå±ããã¦ã¼ã¶ã¹ã¿ãã¯ã1ã¤ã®ã¡ã¢ãª
+ãªãã¸ã§ã¯ãã¨ãã¦é
+ç½®ããï¼ãªã®ã§ï¼ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯é åãï¼åã
+OSã¢ããªã±ã¼ã·ã§ã³ã«å±ããä»ã®ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯é åã¨éãªã£ã¦ãã¦
+ãï¼ã¨ã©ã¼ã¨ãªããªãï¼
+
+ãã®æ©è½ãå®è£
+ããå¶éã¨ãã¦ï¼CheckTaskMemoryAccessãæ­£ããã¨ã©ã¼ãã
+ã¯ãä¸ãããªãå ´åãããï¼å
+·ä½çã«ã¯ï¼èªã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å¢çãã¾
+ããã¡ã¢ãªé åã«å¯¾ãã¦CheckTaskMemoryAccessãçºè¡ããå ´åã«ï¼å¼æ°ã®ã¨
+ã©ã¼ã³ã¼ãã«E_OS_ILLEGAL_ADDRESSãä¸ããã¹ãã¨ãããï¼ã¨ã©ã¼ããã¯ãä¸
+ãããªãå ´åãããï¼
+
+10.16 ã·ã¹ãã ã¿ã¤ãã®ä½¿ç¨æ¹æ³
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+ï¼ï¼ï¼åèæ
+å ±
+
+11.1 å©ç¨æ¡ä»¶ã¨å©ç¨å ±å
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+11.2 ä¿è¨¼ã»é©ç¨æ§ã»ãµãã¼ã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+11.3 ãã°ã¬ãã¼ã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+11.4 ã¦ã§ããµã¤ã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+11.5 TOPPERSã¦ã¼ã¶ã¼ãºã¡ã¼ãªã³ã°ãªã¹ã
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+11.6 TOPPERSãã­ã¸ã§ã¯ãã®ã¡ã³ãåãã®ãµã¼ãã¹
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+11.7 TOPPERSãã­ã¸ã§ã¯ãã¸ã®åå 
+
+ATK2-SC1ããå¤æ´ãªãï¼
+
+
+
+ä»¥ä¸
Index: /atk2-sc3-1.4.0-ntisr/doc/version.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/doc/version.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/doc/version.txt	(revision 172)
@@ -0,0 +1,603 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼å¤æ´å±¥æ­´ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯ï¼ATK2-SC3ã®Release 1.0.0ä»¥éã®å¤æ´å±¥æ­´ãï¼æ°ããæ¹
+ããé ã«è¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2011-2013 by Spansion LLC, USA
+Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2011-2015 by Witz Corporation
+Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: version.txt 512 2015-12-24 06:53:31Z nces-okajima $
+----------------------------------------------------------------------
+		ATK2-SC3
+		Release 1.3.2 ãã 1.4.0 ã¸ã®å¤æ´ç¹
+		ãªãªã¼ã¹æ¥ 2015-12-25
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»éä¿¡é ¼OSAPããDisableAllInterruptsãå¼ã³ã ããå ´åï¼
+ããã­ãã¯ã·ã§ã³ããã¯ãå¼ã°ããããã«ä¿®æ­£
+
+ã»éä¿¡é ¼OSAPããSuspendAllInterruptsãå¼ã³ã ããå ´åï¼
+ãã¨ã©ã¼ããã¯ãå¼ã°ããããã«ä¿®æ­£
+
+ã»DisableInterruptSourceï¼EnableInterruptSourceã«ããã¦ï¼ã¿ã¼ã²ããã
+ãç¹å®ã®å²è¾¼ã¿ã«ã¤ãã¦ï¼ç¦æ­¢/è¨±å¯ããæ©è½ãæã£ã¦ãããã®ãã§ãã¯æ©æ§è¿½å 
+
+ã»OSAPåºæããã¯ã®åé¤
+
+ã»OSAPå¼·å¶çµäºå¦çã®ä¿®æ­£
+ - OSAPå¼·å¶çµäºã¨ã¿ã¹ã¯å¼·å¶çµäºã®å¦çã«ããã¦ï¼æ¡ä»¶ãè¤éåãã¦ããããï¼å¦çãåé¢
+ - å¼·å¶çµäºå¦çãå¯¾è±¡ã¨ãªãOSAPã®ãªã¹ã¿ã¼ãã¿ã¹ã¯ã§å®æ½ããããã«ä¿®æ­£
+ - å¼·å¶çµäºå¯¾è±¡ã«ãªãããOSAPã«ãªã¹ã¿ã¼ãã¿ã¹ã¯ãå­å¨ããªãå ´åï¼
+ã OSã®ã¸ã§ãã¬ã¼ã¿ã§ãªã¹ã¿ã¼ãã¿ã¹ã¯(OSAPå¼·å¶çµäºå°ç¨)ãçæããããã«ä¿®æ­£
+
+ã»ä¿¡é ¼é åã§ä¿è­·éåãçºçããå ´åï¼OSã·ã£ãããã¦ã³ããããã«ä¿®æ­£
+
+ã»ããã¯ã«ã¼ãã³ã«å¯¾ãããµã¼ãã¹ä¿è­·æ©è½ã®åé¤
+
+ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³æã«ããã¯ã«ã¼ãã³ãä½¿ç¨ããè¨­å®ã«ããã«ãé¢ãããï¼
+ãããã¯ã«ã¼ãã³ãå®ç¾©ãã¦ããªãå ´åï¼ãªã³ã¯æã«ã¨ã©ã¼ã¨ãªãããã«ä¿®æ­£
+
+ã»æå­ã³ã¼ããEUC-JPããUTF-8ã«å¤æ´
+
+ã»å
+¨SCã§ã¨ã©ã¼ã³ã¼ãã®çµ±ä¸
+
+ã»ã¸ã§ãã¬ã¼ã¿ã§å
+é ­çªå°ã«ã¤ãã¦ãã§ãã¯ããå¯¾è±¡ãï¼
+ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã§æå®ãããã¹ã¿ãã¯ã®å
+é ­çªå°ã®ã¿ã«ä¿®æ­£
+
+ã»ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®æçµé
+å»¶ã«ã¤ãã¦ã¸ã§ãã¬ã¼ã¿ä¸å
+·åãä¿®æ­£
+
+ã»ãã®ä»ç´°ããä¿®æ­£
+ - MISRAã«ã¼ã«å¯¾å¿
+ - ã«ã¦ã³ã¿nspertickã®åºåãæ´æ°å
+ - ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°éåã®åå ãç¹å®ãããããã®åé¤
+ - ã³ã¡ã³ãã®ä¿®æ­£
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼1.3.2 â 1.4.0ï¼
+
+ã»DisableAllInterruptsã¯éä¿¡é ¼OSAPããå¼åºããã§ããªãããã«ããããï¼
+ãã½ããã¦ã§ã¢å²è¾¼ã¿çµç±ã§ã®å¼ã³åºãã§ã¯ãªãï¼
+ãã«ã¼ãã«é åã®ã½ã¼ã¹ã³ã¼ããç´æ¥å¼ã³åºãããã«ä¿®æ­£
+
+ã»Disable/EnableInterruptSourceã§ï¼ç¹å®ã®å²è¾¼ã¿è¦æ±ã©ã¤ã³ãæå¹/ç¡å¹ã«åºæ¥ãã
+  ã©ããã¯ã¿ã¼ã²ããã«ä¾å­ããããï¼ã¿ã¼ã²ããä¾å­é¨ã«ç¹å®ã®å²è¾¼ã¿è¦æ±ã©ã¤ã³ã
+  æå¹/ç¡å¹ã«åºæ¥ããã©ããï¼ãã§ãã¯ããé¢æ°ã¨ãã¦target_is_int_controllableãç¨æ
+
+ã»ããã¯ã«ã¼ãã³ãå®ç¾©ããã¦ããªãã£ãå ´åï¼å
+é ­ã¢ãã¬ã¹ã«å¯¾ãã¦0çªå°ãä¸ããå¦çã®åé¤
+
+ã»OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®MPUè¨­å®ã¯ä¿¡é ¼ã¿ã¹ã¯ã¨åãã¨ãªããã
+ãã¿ã¼ã²ããä¾å­é¨ã§è¨­å®ããããã«ä¿®æ­£
+
+ã»OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã«å¯¾ããèµ·åå¦çã¨ãã¦ï¼
+ãactivate_force_term_osap_mainãç¨æ
+
+ã»OsMemoryAreaã«ãã£ã¦æå®ãããã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ã¢ãã¬ã¹ã
+ãã¡ã¢ãªã¢ã©ã¤ã¡ã³ãå¶ç´ãæºããã¦ãããã©ããã®ãã§ãã¯é¢æ°ã¨ãã¦ï¼
+ãHOOK_ERRORCHECK_MEM_PASS4ãè¿½å ãã¦ãè¯ãï¼ãªãã·ã§ã³ï¼
+
+ã»OSAPåºæããã¯ã«é¢ããå¦çãåé¤
+
+ã»ä¿¡é ¼é åã§ã®ä¿è­·éåã¯OSã·ã£ãããã¦ã³ã¨ããããï¼ãã­ãã¯ã·ã§ã³ããã¯å¼ã³åºãæã«ï¼
+ãç¹æ¨©ã¢ã¼ãã§åä½ãã¦ããå ´åã¯TRUEï¼éç¹æ¨©ã¢ã¼ãã§åä½ãã¦ããå ´åã¯FALSEã
+ãpre_protection_supervisedã«æ ¼ç´ããï¼
+ããªãï¼ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°éåæã¯ï¼ä¿¡é ¼é åãæ¢ã«ç ´å£ããã¦ããããï¼
+ãpre_protection_supervisedãTRUEã«ãã¦ï¼ãã­ãã¯ã·ã§ã³ããã¯ãå¼ã³åºããã®ã¨ãã
+
+ã»ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ã§ã®éåãçºçããå ´åï¼
+ãã©ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ã§ããããç¹å®ããå¦çãåé¤
+
+----------------------------------------------------------------------
+		ATK2-SC3
+		Release 1.3.1 ãã 1.3.2 ã¸ã®å¤æ´ç¹
+		ãªãªã¼ã¹æ¥ 2015-03-30
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»ä¿¡é ¼é¢æ°ããã¹ããã¦å¼ã³åºãã¦æ»ã£ãã¨ãã«ï¼ä¿¡é ¼é¢æ°å®è¡ä¸­ã«ã¿ã¹ã¯
+ãã³ã³ãã­ã¹ãã¨ãã­ãã¯ã·ã§ã³ããã¯ã§å¤å®ãããåé¡ãä¿®æ­£
+
+ã»t_syslog.hããincludeããã¿ã¼ã²ããä¾å­é¨ã®ããããã¡ã¤ã«ã
+ãtarget_syslog.hã«ä¿®æ­£
+
+ã»OsMemoryModuleNameã®å¤éåº¦ã1..*ã«ä¿®æ­£
+
+ã»kernel.tfã§ï¼OsIsrInterruptSourceã«DISABLEãæå®ããå ´åã«ã¨ã©ã¼
+ãã¨ãªãåé¡ãä¿®æ­£
+
+ã»kernel_mem.tfã§ï¼æ¨æºã®data/bsssec_inibãåºåããå¦çãçç¥ãã
+ãéã«ï¼kernel_mem.cã¸ã®å¤æ°ã®åºåãæå¶ããããã«ä¿®æ­£
+
+ã»ã¿ã¹ã¯ãã£ã¹ãããçºçæã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ãªã©ã«ããã¦ï¼
+ãä¿è­·éåã¿ã¹ã¯ãå¼·å¶çµäºããå ´åã«ãã®ã¿ã¹ã¯ãæ­£å¸¸ã«çµäºãããªã
+ãåé¡ãä¿®æ­£
+
+ã»ã·ã¹ãã ãµã¼ãã¹IDã®æ¯ãç´ã
+
+ã»ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®å²è¾¼ã¿ãã»ãããããªããªãåé¡ãä¿®æ­£
+
+ã»ãã¬ã¼ã¹ã­ã°ãæå¹åããè¨­å®ãéä¾å­é¨ã®sample/Makefileã«ç§»å
+
+ã»ãã®ä»ç´°ããä¿®æ­£
+	- ã³ã¡ã³ãã®ä¿®æ­£ãªã©
+    - arch/logtrace/tlv.tfãåé¤
+    - configureã§ã·ãªã¢ã«éä¿¡ã®æå¹/ç¡å¹ãåæããããããã«ä¿®æ­£
+    - sample1ã®ä¿®æ­£
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼1.3.1 â 1.3.2ï¼
+
+ã»å²è¾¼ã¿ã®åæç¶æ
+ãå²è¾¼ã¿ç¦æ­¢ã®å ´åã§ãï¼x_config_intã«ããã¦
+ãå²è¾¼ã¿åªå
+åº¦è¨­å®ãããããã«ä¿®æ­£
+
+ã»ä¿¡é ¼é¢æ°ã®å
+¥ãå£ã§ã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ï¼trustedfunc_stack_checkï¼
+ãã«ããã¦ï¼sp == sstk + tf_stksz ã®å ´åã« E_OS_STACKINSUFFICIENT
+ãã¨ãªãããã«ä¿®æ­£ï¼ãã¸ãã¯ãã³ãã¼é åãèæ
+®ï¼
+
+ã»ã¿ã¼ã²ããä¾å­é¨ã®ããããã¡ã¤ã«åãprc_syslogã§ãã£ãå ´åï¼
+ãtarget_syslog.hã«ãã¡ã¤ã«åãä¿®æ­£
+
+ã»Platform_Types.h ã§ï¼stdint.h ãincludeããããã«ä¿®æ­£
+	- INT64_MAXã®å®ç¾©ãã¿ã¼ã²ããä¾å­ã§è¿½å ãã
+
+ã»ãã¬ã¼ã¹ã­ã°ãæå¹åããè¨­å®ãã¿ã¼ã²ããä¾å­é¨ã®Makefileãã
+ãåé¤
+
+ã»sample1ã®ããã«ï¼target_test.hã§ï¼sample1ã§ä½¿ç¨ãããã¼ãã¦ã§ã¢
+ãã«ã¦ã³ã¿ããç´1ç§ã§ã¢ã©ã¼ã ãèµ·åããããã«ï¼ç´1ç§ã«ç¸å½ãã
+ããã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ãã£ãã¯å¤ãCOUNTER_MIN_CYCLEãã¯ã­ã«å®ç¾©
+
+----------------------------------------------------------------------
+		ATK2-SC3
+		Release 1.3.0 ãã 1.3.1 ã¸ã®å¤æ´ç¹
+		ãªãªã¼ã¹æ¥ 2014-09-30
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»ã¿ã¹ã¯ã®å¼·å¶å¦çæã«ï¼å¯¾è±¡ã¿ã¹ã¯ãæä½ä¸­ã®ã«ã¦ã³ã¿ã®ç¶æ
+ãæ»ãå¦çã
+  è¿½å 
+
+ã»ã¿ã¹ã¯ã®å¼·å¶å¦çæã«ï¼readyã­ã¥ã¼ã®ç¶æ
+ãä¸æ­£ã¨ãªãåé¡ãä¿®æ­£
+
+ã»OSAPå¼·å¶å¦çæã«ï¼ã¿ã¹ã¯å¼·å¶å¦çã®åéã§å²è¾¼ã¿ç¦æ­¢ç¶æ
+ãè§£é¤ããªãããã«
+  ä¿®æ­£
+
+ã»TerminateApplicationçºè¡æã®OSAPã®ç¶æ
+ããã§ãã¯ããå¦çãï¼OSå²è¾¼ã¿
+  ç¦æ­¢ãããã¨ã«å®æ½ããããã«ä¿®æ­£
+ 
+ã»ã³ã³ãã¤ã«æã«è­¦åãåºãåé¡ã¸ã®å¯¾å¿
+	- æ¡å¼µã¨ã©ã¼ãã¨ã©ã¼ããã¯æå¹æã®ã¿ä½¿ç¨ããã­ã¼ã«ã«å¤æ°ããã¯ã­ã«
+	  ããç¡å¹åããããã«ä¿®æ­£
+	- set_event_actionï¼activate_task_actionã®è¿ãå¤ã®åãStatusTypeã¨ãï¼
+	  ercdãè¿ãããã«ä¿®æ­£ï¼ãããã®é¢æ°ãå¼ã³åºãéã«ã¯voidã§ã­ã£ã¹ãï¼
+	- syslogå
+é¨ã§constã«ã­ã£ã¹ããã¦ããé¨åãä¿®æ­£
+	- sampleã®ã½ã¼ã¹ã³ã¼ãããï¼ä½¿ç¨ãã¦ããªãé¢æ°svc_perrorãåé¤
+
+ã»TNUM_QUEUEIOCã0ã®å ´åã«ioccb_tableãTOPPERS_EMPTY_LABELãç¨ãã¦åºå
+  ããããã«ä¿®æ­£
+
+ã»OsMemorySectionInitializeã«NO_INITIALIZEãæå®ããå ´åã«æ­£å¸¸ã«å¦çãããªã
+  åé¡ãä¿®æ­£
+
+ã»æ¨æºã®data/bsssec_inibãåºåããå¦çãçç¥å¯è½ã¨ãã
+
+ã»ãã®ä»ç´°ããä¿®æ­£
+	- ã³ã¡ã³ãã®ä¿®æ­£ãªã©
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼1.3.0 â 1.3.1ï¼
+
+ã»ãã£ã¹ãããã£ã®ã¢ã¤ãã«ã«ã¼ãã«ããã¦ï¼callevelãå¤æ´ããªãããã«
+ãä¿®æ­£
+
+ã»ã¿ã¼ã²ããä¾å­é¨ã«ããã¦ï¼ç¬èªã®data/bsssec_inibãåºåãããå ´åï¼
+  OMIT_STANDARD_DATA/BSSSECINIBãã¯ã­ãããããå®ç¾©ããããã§ï¼åæå
+  ãã­ãã¯çæå¦çãï¼ã¿ã¼ã²ããä¾å­é¨ã®tfã§å®ç¾©ãã
+
+----------------------------------------------------------------------
+			ATK2-SC3
+		Release 1.2.1 ãã 1.3.0 ã¸ã®å¤æ´ç¹
+		ãªãªã¼ã¹æ¥ 2014-03-12
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»ABREXå°å
+¥
+	- AUTOSARæºæ ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã¯XMLå½¢å¼ã§ããï¼æå
+	  ã§ä½æï¼ç·¨éããã®ã«ä¸åãã§ããï¼YAMLå½¢å¼ã§è¨è¿°ããã³ã³ãã£ã®ã¥
+	  ã¬ã¼ã·ã§ã³æ
+å ±ãXMLå½¢å¼ã¸å¤æãããã¼ã«(ABREX)ãéçºãã
+
+ã»éçAPIã®å»æ­¢
+	- SC3ã«ããã¦ï¼ã¿ã¼ã²ããä¾å­é¨ã§ç¨æãããã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã¸ã®ã¢
+	  ã¯ã»ã¹æ¨©è¨­å®ãå°é£ã§ãããã¨ããï¼ã¿ã¼ã²ããä¾å­é¨ã§ç¨æããã³ã³
+	  ãã£ã®ã¥ã¬ã¼ã·ã§ã³æ
+å ±ã¯ï¼YAMLå½¢å¼ã¨ãã¦ï¼ãã¼ã«(ABREX)ãç¨ãã¦
+	  XMLã¸å¤æããææ³ãæ¡ç¨ãã
+	- ããã«ä¼´ãï¼éçAPIã®å¿
+è¦æ§ãç¡ããªã£ãããï¼å»æ­¢ãã
+	- éçAPIã«é¢é£ãããã¡ã¤ã«ãåé¤
+
+ã»è¤æ°XMLå
+¥åå¯¾å¿
+	- è¤æ°ã®XMLã«åãã¦ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³æ
+å ±ãç®¡çããéï¼ããã¾ã§
+	  ã¯ããªãã­ã»ããµã®#includeæ©è½ãarxmlãã¡ã¤ã«ã«ä½¿ç¨ãã¦å®ç¾ãã¦ã
+	  ããï¼#includeã¯XMLã¨ãã¦æ¨æºçã«ä½¿ç¨ã§ããªãè¨è¿°ã§ããï¼ä»ã®ãã¼
+	  ã«ã§ä½æããarxmlã§ã¯ä½¿ç¨ãããªããã®ã§ããã®ã§ï¼ããªãã­ã»ããµç¨
+	  ã®è¨è¿°ãå»æ­¢ãã
+	- ããªãã­ã»ããµå»æ­¢ã«ä¼´ãï¼ã¸ã§ãã¬ã¼ã¿ææ°çï¼1.9.4ï¼ã§ãµãã¼ãã
+	  ããï¼XMLè¤æ°å
+¥åæ©è½ãç¨ãã¦ï¼è¤æ°ã®XMLã«åãã¦ã³ã³ãã£ã®ã¥ã¬ã¼
+	  ã·ã§ã³æ
+å ±ãåæã«å¦çã§ããããã«å¯¾å¿ãã
+	- ç·¨éç¨ã¨ãã¦åarxmlãã¡ã¤ã«ã«å¯¾å¿ããyamlãã¡ã¤ã«ãè¿½å ãã
+
+ã»ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãã¿ã¼ã²ããä¾å­é¨ã§æ¨æºãµãã¼ãã¨ãã
+	- AUTOSARã§ã¯ï¼æå®ããæéã§å¨æçã«ã¿ã¹ã¯ãèµ·åããä½¿ç¨æ¹æ³ãä¸è¬
+	  çã§ããããï¼1ã¤ä»¥ä¸ã®ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãå¿
+é ã§ãããã¨ããï¼
+	  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãã¿ã¼ã²ããä¾å­é¨ã§ç¨æãããã¨ã«ãã
+
+ã»ã·ã¹ãã ã¿ã¤ããæ¨æºãµãã¼ãããå¤ã
+	- ã·ã¹ãã ã¿ã¤ãã¯ï¼ä¸»ã«ãã¬ã¼ã¹ã­ã°ãæ§è½è©ä¾¡ç­ã§æéãè¨æ¸¬ãããã
+	  ã«ä½¿ç¨ãããã¨ãæ³å®ãã¦ããï¼AUTOSARã§ã¯å¿
+é ã®æ©è½ã§ã¯ãªãããï¼
+	  æ¨æºã®æ©è½ããå¤ãã
+
+ã»å»æ­¢ã³ã³ããæ
+å ±ã®åé¤æ¼ãå¯¾å¿
+	- ä¸è¦ãªOsMemoryRegionAttributeãã©ã¡ã¼ã¿è¨­å®ãåé¤
+
+ã»ä¾å­é¨ã§C1ISRæ¬ä½ã®externå®£è¨ãå¶å¾¡ã§ããããã«å¤æ´
+	- ä¾å­é¨ã§ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³é¢æ°(EXTERN_C1ISR_HANDLER)ãå®è£
+ãã
+	  ãã¨ã§ï¼éä¾å­é¨ã§åºåããC1ISRæ¬ä½ã®externå®£è¨ãå¤æ´ã§ããããã«
+	  å¯¾å¿ãã
+
+ã»OSå²è¾¼ã¿ç¦æ­¢è§£é¤æ¼ããã°ã®ä¿®æ­£
+	- GetAlarmBase
+	- AllowAccess
+	- TerminateApplication
+
+ã»ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«(kernel.ini)ã«ãªãã·ã§ã³æ
+å ±è¿½å 
+	- æªå®ç¾©ãã©ã¡ã¼ã¿ãã§ãã¯ãªãã·ã§ã³ï¼CheckUnknownParameter
+
+ã»Rte_Type.hã¤ã³ã¯ã«ã¼ãå¯¾å¿
+	- AUTOSARã§ã¯ã·ã¹ãã å
+¨ä½ã§ä½¿ç¨ãããã¼ã¿åãçµ±åãã¦å®ç¾©ããä»çµã¿
+	  ãããï¼å®ç¾©ãããã¼ã¿åã¯ï¼RTEã¸ã§ãã¬ã¼ã¿ã«ãã£ã¦ï¼Rte_Type.hã«
+	  åºåããã
+	- IOCç­ã§ï¼OSããã·ã¹ãã å
+¨ä½ã§ä½¿ç¨ãããã¼ã¿åãä½¿ç¨ããããã«ï¼
+	  Rte_Os_Type.hããï¼Rte_Type.hãã¤ã³ã¯ã«ã¼ãããããå¯¾å¿ãã
+	- RTEã¸ã§ãã¬ã¼ã¿ãä½¿ç¨ããªãå ´åãï¼ã·ã¹ãã å
+¨ä½ã§ä½¿ç¨ãããã¼ã¿å
+	  ãä½¿ç¨ããªãå ´åã¯ï¼ç©ºã®Rte_Type.hãç¨æããå¿
+è¦ããã
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼1.2.1 â 1.3.0ï¼
+
+ã»éçAPIã«é¢é£ãããã¡ã¤ã«ï¼è¨­å®ãåé¤
+
+ã»è¤æ°XMLå
+¥åå¯¾å¿
+	- ä¾å­é¨ã§ç¨æããarxmlãã¡ã¤ã«ã«å¯¾å¿ããyamlãã¡ã¤ã«ãè¿½å 
+	- çµ±åå¯è½ãªarxmlãã¡ã¤ã«ã1ã¤ã«ã¾ã¨ãã
+
+ã»ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿è¿½å 
+	- target_hw_counter.c|.h|.cfg|.arxml
+	- target_test.c|.h|.cfg|.arxmlã§å®ç¾ãã¦ããå ´åï¼ãã¼ãã¦ã§ã¢ã«ã¦
+	  ã³ã¿é¨åã®ã¿åãåºã
+	- ããã©ã«ãã§target_timer.oããã«ãå¯¾è±¡ã¨ãã¦ããç®æã
+	  target_hw_counter.oã¸å¤æ´
+
+ã»ã·ã¹ãã ã¿ã¤ãã®ãªãã·ã§ã³å
+	- Makefileã«æ°è¨­ããENABLE_SYS_TIMERãtrueã®å ´åã®ã¿ï¼ã·ã¹ãã ã¿ã¤
+	  ãç¨ãªãã¸ã§ã¯ã(target_timer.oç­)ããã«ãå¯¾è±¡ã¨ãã
+
+----------------------------------------------------------------------
+		ATK2-SC3
+		Release 1.2.0 ãã 1.2.1 ã¸ã®å¤æ´ç¹
+		ãªãªã¼ã¹æ¥ 2013-12-26
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»ã·ã¹ãã ãµã¼ãã¹ã«ãããï¼ãã¤ã³ã¿æ¸¡ãå¼æ°ã®ã¢ã©ã¤ã³ãã§ãã¯ãè¿½å 
+	- ALIGNED_TYPEãã¯ã­ã¯ï¼OSä»¥å¤ã§ãä½¿ç¨ã§ããããã«å®ç¾©
+
+ã»NULLãã¯ã­ã®å®ç¾©ãCompiler_Cfg.hããkernel_impl.hã¸ç§»å
+	- AUTOSARã§ã¯ï¼NULLãã¤ã³ã¿ç¨ãã¯ã­ã¨ãã¦ï¼NULL_PTR(Compiler.h)ã
+	  ä½¿ç¨ãã
+
+ã»kernel.tfã§ï¼PLABELãå®ç¾©ããããã«å¤æ´
+	- ã¿ã¼ã²ããã«ãã£ã¦ï¼MPUã®åé åã«è¨­å®ããå¤ãtfã§åºåããã¨ãã«ï¼
+	  ãã¼ã¿ã»ã¯ã·ã§ã³ã«ã¤ãã¦ã¯PLABELãä½¿ãããå ´åããã
+
+ã»force_terminate_task()ããcancel_nontrusted_hook()ã®å¼ã³åºããåé¤
+	- call_protectionhk_main()å
+ã§force_terminate_task()ãå¼ã³åºãã±ã¼
+	  ã¹ã¯ã¿ã¹ã¯åä½æã®ã¿ãªã®ã§ï¼cancel_nontrusted_hook()ã®å¼ã³åºãã
+	  ä¸è¦ã§ãã
+
+ã»å²è¾¼ã¿ç¦æ­¢ä¸­ã«Getç³»ã·ã¹ãã ãµã¼ãã¹å¼ã³åºããããã«å¤æ´
+	- å¯¾è±¡ã¨ãªãã·ã¹ãã ãµã¼ãã¹ãªã¹ã
+	  GetTaskID
+	  GetTaskState
+	  GetISRID
+	  GetApplicationID
+	  GetApplicationState
+
+ã»å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§StartOSãå¼ã³åºããå ´åã«ãããï¼å²è¾¼ã¿è¨±å¯å¦çã®ä¿®æ­£
+	- DisableAllInterruptsã¾ãã¯SuspendAllInterruptsã«ããå²è¾¼ã¿ç¦æ­¢ç¶
+	  æ
+ã§ï¼StartOSãå¼ã³åºããå ´åï¼EnableAllInterruptsã¾ãã¯
+	  ResumeAllInterruptsã®çºè¡ã¨åç­ã®å¦çãè¡ãªã£ã¦ï¼å²è¾¼ã¿è¨±å¯ç¶æ
+ã¸
+	  é·ç§»ããä¸ã§ï¼OSãèµ·åããããã«ä¿®æ­£
+
+ã»TerminateApplicationã®å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸ã®å¯¾å¿
+	- å²è¾¼ã¿è¨±å¯ç¶æ
+ã§ã®ï¼S_D_CHECK_STATEãå¼ã³åºããï¼S_CHECK_STATEã¸
+	  å¤æ´
+	- OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§ãªã¿ã¼ã³ããå¦çãä¿®æ­£
+
+ã»OSå
+é¨é¢æ°åã®å¤æ´
+	- get_reltick_api â get_reltick
+	- get_abstick_api â get_abstick
+
+ã»ä¿¡é ¼/éä¿¡é ¼ãã¯ã­å®ç¾©ã®è¿½å 
+	- TOPPERS_TRUSTEDï¼é¢æ°å¼åºãã«ããã·ã¹ãã ãµã¼ãã¹ã®å®è¡
+	- TOPPERS_NON_TRUSTEDï¼ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããã·ã¹ãã ãµã¼ãã¹ã®
+	                       å®è¡
+	â»TOPPERS_TRUSTEDï¼TOPPERS_NON_TRUSTEDä¸¡æ¹å®ç¾©æï¼ã³ã³ãã¤ã«ã¨ã©ã¼
+
+ã»OSå²è¾¼ã¿ç¦æ­¢è§£é¤é¢æ°ã2åå¼ã°ãããã°ã®ä¿®æ­£
+	- GetCounterValue
+	- GetElapsedValue
+
+ã»IOCåæåãã­ãã¯ã«éåä¿¡ãã¼ã¿ã®ã¢ã©ã¤ã³ãµã¤ãºæ
+å ±ãè¿½å 
+	- IOCã®éåä¿¡æã«ï¼ã¢ã©ã¤ã³ãµã¤ãºæ
+å ±ãä½¿ç¨ãã¦ã¢ã©ã¤ã³ãã§ãã¯ã
+	  è¡ã
+
+ã»ãã®ä»ç´°ããä¿®æ­£
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼1.2.0 â 1.2.1ï¼
+
+ã»Compiler_Cfg.hãã¡ã¤ã«ã«alignofï¼ALIGNED_TYPEãã¯ã­ãå®ç¾©ãã
+	- æå®åã®ã¢ã©ã¤ã³ã®ãµã¤ãºãåå¾ããalignofãã¯ã­ã®å®ç¾©
+	  å®ç¾©ä¾ï¼
+	  #ifndef alignof
+	  #define alignof(type)                                     \
+	      offsetof(struct { uint8 field1; type field2; }, field2)
+	  #endif
+
+	- æå®ã¢ãã¬ã¹ãã¢ã©ã¤ã³ããã¦ãããããã§ãã¯ããALIGNED_TYPE
+	  ãã¯ã­ã®å®ç¾©
+	  å®ç¾©ä¾ï¼
+	  #ifndef ALIGNED_TYPE
+	  #define ALIGNED_TYPE(addr, type)                     \
+	      ((((uintptr)(addr)) & (alignof(type) - 1)) == 0U)
+	  #endif
+
+----------------------------------------------------------------------
+		ATK2-SC3
+		Release 1.1.0 ãã 1.2.0 ã¸ã®å¤æ´ç¹
+		ãªãªã¼ã¹æ¥ 2013-06-28
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»SC3FL2ã®æ©è½æ¡å¼µã«ä¼´ãï¼OSAPã®çµäº/åèµ·åããµãã¼ã
+	- TerminateApplicationã·ã¹ãã ãµã¼ãã¹è¿½å 
+	- AllowAccessã·ã¹ãã ãµã¼ãã¹è¿½å 
+	- ãã­ãã¯ã·ã§ã³ããã¯ã®æ»ãå¤ãPRO_TERMINATEAPPL_RESTART/
+	  PRO_TERMINATEAPPLæã®å¦çè¿½å 
+
+ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã«ããã¦ï¼ä»ã®OSAPããéä¿¡é ¼OSAPæå±ã«ã¦ã³ã¿ã¸
+  ã®é¢é£ä»ãç¦æ­¢ããããã«å¤æ´
+
+ã»AUTOSAR R.4.0.3ä»æ§èª¤è¨å¯¾å¿
+	- E_OS_PROTECTION_FATALå®ç¾©ãè¿½å ãã¦ï¼OS_E_PARAM_POINTERã
+	  E_OS_PROTECTION_FATALã¨ãã¦å®ç¾©ããããã«å¤æ´
+
+ã»XMLã³ã³ããå®ç¾©èª¤è¨å¯¾å¿
+	- OsSchTblAccesingApplicationãOsSchTblAccessingApplicationã¸å¤æ´
+	- OsScheduleTableStartValueã®å¤éåº¦ã1ãã0..1ã¸å¤æ´
+
+ã»Std_Types.hã«ããATK2å
+±éå®ç¾©ã®ç§»å
+	- ATK2å
+±éå®ç¾©ãStd_Types.hããCompiler_Cfg.hã«ç§»å
+
+ã»OSèµ·ååã«åç
+§ãããå¯è½æ§ãããå¤æ°ã®åæåå¯¾å¿
+	- OSèµ·ååã«åç
+§ãããå¯è½æ§ãããå¤æ°ãå®ç¾©æã«0åæåãã¦ï¼BSSã«
+	  é
+ç½®ããããã«å®è£
+å¤æ´
+	- OSèµ·ååã«åç
+§ãããå¯è½æ§ãããå¤æ°ãOSèµ·åæã«ååº¦åæåããªã
+	  ããã«å¤æ´
+
+ã»ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã«ããããã°ä¿®æ­£
+	- USE_TSKINICTXBã®æ¡ä»¶å¤å®ãéã ã£ãã®ã§ï¼ä¿®æ­£
+	- å¤æ°åã®èª¤è¨ãä¿®æ­£
+	- GENERATE_OSAPINIB_MPUINFOBã«å¼æ°è¿½å ãï¼å¼æ°ã«ããå¦çã«å¤æ´
+	- cfg2_out.tfã«LNK_SECã®æ
+å ±ãåºåããããã«å¤æ´
+
+ã»MISRAã«ã¼ã«å¯¾å¿ã«ããï¼ä¸é¨ã½ã¼ã¹ã³ã¼ããä¿®æ­£ãã
+
+ã»ãã®ä»ç´°ããä¿®æ­£
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼1.1.0 â 1.2.0ï¼
+
+ã»Std_Types.hã«ãã£ãatk2å
+±éå®ç¾©ã®è¿½å 
+	- atk2å
+±éå®ç¾©ãCompiler_Cfg.hã«è¿½å 
+
+----------------------------------------------------------------------
+		ATK2-SC3
+		Release 1.0.1 ãã 1.1.0 ã¸ã®å¤æ´ç¹
+		ãªãªã¼ã¹æ¥ 2013-06-28
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»StartOSã·ã¹ãã ãµã¼ãã¹ã®ã¨ã©ã¼ã³ã¼ãå¤æ´
+	- OSèµ·åå¾ã®StartOSå¼åºãã«ãã£ã¦å®è¡ãããã¨ã©ã¼ããã¯ã«
+	  æ¸¡ãã¨ã©ã¼ã³ã¼ããï¼E_OS_CALLEVELããE_OS_ACCESSã¸å¤æ´
+
+ã»IOCæ©è½ã®è¿½å 
+	- OSAPééä¿¡ããããã®æ©è½ãæ°è¦è¿½å 
+
+ã»ã¸ã§ãã¬ã¼ã¿æ°ãã¼ã¸ã§ã³ï¼1.9.2ï¼å¯¾å¿
+	- ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ï¼kernel_xml.iniï¼ã«ããã¦ï¼
+	 ãAUTOSARã¹ã­ã¼ãã®ãã¡ã¤ã«åãè¨­å®å¤ã®å¤æ´
+
+ã»å¤éå²è¾¼ã¿çºçæã®ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ¹å¼å¤æ´
+	- ã¹ã¿ãã¯ãã¤ã³ã¿ãã§ãã¯æ¹å¼ãã
+	  ã¹ã¿ãã¯æ®éãã§ãã¯æ¹å¼ã«å¤æ´
+
+ã»HRP2ã®ã¡ã¢ãªä¿è­·ã­ã¸ãã¯ã®è¿½å¾
+	- ã¡ã¢ãªãªãã¸ã§ã¯ãã®ã¡ã¢ãªé
+ç½®æ¹æ³ãHRP2ã«åããã
+	- ã¡ã¢ãªãªã¼ã¸ã§ã³æå®ä»æ§ã®å¤æ´
+
+ã»ãã­ã¥ã¡ã³ãã®èª¬æè¿½å åã³èª¤è¨ä¿®æ­£
+	- ãã¼ãã£ã³ã°ã¬ã¤ã
+	- ã¦ã¼ã¶ã¼ãºããã¥ã¢ã«
+
+ã»ãã®ä»ç´°ããä¿®æ­£
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼1.0.1 â 1.1.0ï¼
+
+ç¹ã«ãªã
+
+----------------------------------------------------------------------
+		ATK2-SC3
+		Release 1.0.0 ãã 1.0.1 ã¸ã®å¤æ´ç¹
+		ãªãªã¼ã¹æ¥ 2013-03-29
+
+âå¤æ´ç¹ã®ãªã¹ã
+
+ã»MISRAã«ã¼ã«å¯¾å¿ã«ããï¼ä¸é¨ã½ã¼ã¹ã³ã¼ããä¿®æ­£ãã
+
+ã»ã¸ã§ãã¬ã¼ã¿æ°ãã¼ã¸ã§ã³ï¼1.9.1ï¼å¯¾å¿
+	- ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ï¼kernel_xml.iniï¼ã®èª¤è¨ä¿®æ­£
+	- ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«ï¼kernel_xml.iniï¼ã®ã³ã¡ã³ãä¿®æ­£
+
+ã»ãã®ä»ã®ä¿®æ­£ï¼
+	- ã·ã£ãããã¦ã³ããã¯ä¸­ã®CPUä¾å¤å¦çã®å®è£
+æ¼ãå¯¾å¿
+
+ã»ãã­ã¥ã¡ã³ãã®å
+
+å®ï¼ã³ã¡ã³ãã®ä¿®æ­£
+
+ã»ãã¼ã¸ã§ã³çªå·ã®æ´æ°
+
+âã¿ã¼ã²ããä¾å­é¨ã®è¦ä¿®æ­£ç®æï¼1.0.0 â 1.0.1ï¼
+
+(1)éä¿¡é ¼ã·ã£ãããã¦ã³ããã¯ã®å®è¡ä¸­ããè¿ãé¢æ°
+   is_running_nontrusted_shutdown_hookã
+   is_running_nontrusted_shtdwnhkã«ä¿®æ­£
+
+(2)MPUä¾å­ã®ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã¡ã¢ãªãã§ãã¯é¢æ°
+   prc_chkmemãprobe_trusted_osap_memã«ä¿®æ­£
+
+(3)æå®é åãéä¿¡é ¼ããã¯ç¨ã¹ã¿ãã¯ã«å«ã¾ããããã§ãã¯é¢æ°
+   prc_chk_nthkstkãprobe_nthkstkã«ä¿®æ­£
+
+(4)ãã¹ãããOSå²è¾¼ã¿ç¦æ­¢ãã¯ãªã¢ããé¢æ°x_clear_nested_lock_cntã
+   x_clear_nested_os_intã«ä¿®æ­£
+
+----------------------------------------------------------------------
Index: /atk2-sc3-1.4.0-ntisr/include/MemMap.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/MemMap.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/MemMap.h	(revision 172)
@@ -0,0 +1,78 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: MemMap.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+#ifndef TOPPERS_MEMMAP_H
+#define TOPPERS_MEMMAP_H
+
+
+#endif /* TOPPERS_MEMMAP_H */
Index: /atk2-sc3-1.4.0-ntisr/include/Os.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/Os.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/Os.h	(revision 172)
@@ -0,0 +1,699 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Os.h 500 2015-12-23 07:10:02Z ertl-ishikawa $
+ */
+
+/*
+ *		ATK2 OSããããã¡ã¤ã«
+ *
+ *  ATK2ããµãã¼ãããã·ã¹ãã ãµã¼ãã¹ã®å®£è¨ã¨ï¼å¿
+è¦ãªãã¼
+ *  ã¿åï¼å®æ°ï¼ãã¯ã­ã®å®ç¾©ãå«ãããããã¡ã¤ã«
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ãã
+ *  ããã«ããï¼ãã¯ã­å®ç¾©ä»¥å¤ãé¤ãããã«ãªã£ã¦ãã
+ *
+ *  ãã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããåã«ã¤ã³ã¯ã«ã¼ããã¦ããã¹ããã¡ã¤ã«
+ *  ã¯ãªã
+ */
+
+#ifndef TOPPERS_OS_H
+#define TOPPERS_OS_H
+
+#ifdef TOPPERS_TRUSTED
+#define TOPPERS_SVC_FUNCCALL
+#endif
+
+#if defined(TOPPERS_TRUSTED) && defined(TOPPERS_NON_TRUSTED)
+#error "both TOPPERS_TRUSTED and TOPPERS_NON_TRUSTED are defined!"
+#endif
+
+/*
+ *  å
+±éã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­
+ */
+#include "Std_Types.h"
+#include "MemMap.h"
+#include "Rte_Os_Type.h"
+
+#if !defined(TOPPERS_CFG1_OUT) && !defined(OMIT_INCLUDE_OS_CFG)
+#include "Os_Cfg.h"
+#endif
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨
+ */
+#include "target_kernel.h"
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ãã¼ã¿åã®å®ç¾©
+ */
+
+/*
+ *  ãªãã¸ã§ã¯ãçªå·ã®åå®ç¾©
+ */
+typedef uint8	TaskStateType;                  /* ã¿ã¹ã¯ç¶æ
+ */
+typedef uint32	EventMaskType;                  /* ã¤ãã³ããã¹ã¯ */
+typedef uint32	TickType;                       /* ã«ã¦ã³ã¿å¤ï¼ãã£ãã¯ï¼*/
+typedef uint32	AppModeType;                    /* ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ã */
+typedef uint8	OSServiceIdType;                /* ã·ã¹ãã ãµã¼ãã¹ID */
+typedef uint8	ScheduleTableStatusType;        /* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¶æ
+ */
+typedef uint8	ProtectionReturnType;           /* ãã­ãã¯ã·ã§ã³ããã¯ããã®è¿ãå¤ */
+typedef uintptr	MemorySizeType;                 /* ã¡ã¢ãªé åãµã¤ãº */
+typedef uint8	ApplicationType;                /* OSã¢ããªã±ã¼ã·ã§ã³ID */
+typedef uint8	ObjectTypeType;                 /* OSãªãã¸ã§ã¯ãç¨®å¥ */
+typedef uint8	ApplicationStateType;           /* OSã¢ããªã±ã¼ã·ã§ã³ç¶æ
+ */
+typedef uint8	AccessType;                     /* ã¡ã¢ãªé åã¢ã¯ã»ã¹æ¨© */
+typedef boolean	ObjectAccessType;               /* OSãªãã¸ã§ã¯ãã¢ã¯ã»ã¹æ¨© */
+typedef uint8	RestartType;                    /* OSAPãªã¹ã¿ã¼ãå±æ§ */
+
+typedef struct {
+	TickType	maxallowedvalue;                /* ã«ã¦ã³ã¿æå®ã®æå¤§å¤ */
+	TickType	ticksperbase;                   /* OSã§ã¯ä½¿ç¨ããï¼ã¦ã¼ã¶ãèªç±ã«ä½¿ç¨ããå¤ */
+	TickType	mincycle;                       /* ãµã¤ã¯ã«æå®ã®æå°å¤ */
+} AlarmBaseType;
+
+/*
+ *  æé©åããããï¼ä¾å­é¨åå®ç¾©ã§ããå
+ */
+#ifndef OMIT_DATA_TYPE
+typedef uint32	TimeType;                       /* æé */
+typedef uint32	AlarmType;                      /* ã¢ã©ã¼ã ID */
+typedef uint32	ResourceType;                   /* ãªã½ã¼ã¹ID */
+typedef uint32	TaskType;                       /* ã¿ã¹ã¯ID */
+typedef uint32	ISRType;                        /* ISR ID */
+typedef uint32	CounterType;                    /* ã«ã¦ã³ã¿ID */
+typedef uint32	ScheduleTableType;              /* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ID */
+typedef float32	PhysicalTimeType;               /* ï¼ãã£ãã¯ããæéã«æç®ç¨ï¼æé */
+typedef uint32	IocType;                        /* IOC ID */
+typedef uint8	SenderIdType;                   /* Sender ID */
+typedef uint32	TrustedFunctionIndexType;       /* Trusted Function Index */
+#endif /* OMIT_DATA_TYPE */
+
+typedef AlarmBaseType *				AlarmBaseRefType;
+typedef TaskType *					TaskRefType;
+typedef TaskStateType *				TaskStateRefType;
+typedef EventMaskType *				EventMaskRefType;
+typedef TickType *					TickRefType;
+typedef ScheduleTableStatusType *	ScheduleTableStatusRefType;
+typedef ApplicationStateType *		ApplicationStateRefType;
+typedef void *						MemoryStartAddressType;             /* ã¡ã¢ãªé åå
+é ­ */
+typedef void *						TrustedFunctionParameterRefType;    /* Trusted Function Parameter */
+
+/*
+ *  ä¿è­·éåãèµ·ãããå¦çåä½ã®å
+ */
+typedef uint8 FaultyContextType;
+
+/*
+ *  OSãªãã¸ã§ã¯ãå®£è¨ç¨ã®ãã¯ã­
+ */
+#define DeclareTask(TaskIdentifier)
+#define DeclareResource(ResourceIdentifier)
+#define DeclareEvent(EventIdentifier)
+#define DeclareAlarm(AlarmIdentifier)
+
+/*
+ *  ã¡ã¤ã³ã«ã¼ãã³å®ç¾©ç¨ã®ãã¯ã­
+ */
+#define TASK(TaskName)		void TaskMain ## TaskName(void)
+#define ISR(ISRName)		void ISRMain ## ISRName(void)
+#ifndef C1ISR
+#define C1ISR(ISRName)	void C1ISRMain ## ISRName(void)
+#endif /* C1ISR */
+
+#define TRUSTEDFUNCTION(TrustedFunctionName, FunctionIndex, FunctionParams)	\
+	StatusType TrustedFunctionName(											\
+		TrustedFunctionIndexType FunctionIndex,								\
+		TrustedFunctionParameterRefType FunctionParams						\
+		)
+
+/*
+ *  ã¡ã¢ãªé åç¢ºä¿ã®ããã®åå®ç¾©
+ */
+#ifndef TOPPERS_STK_T
+#define TOPPERS_STK_T	sintptr
+#endif /* TOPPERS_STK_T */
+typedef	TOPPERS_STK_T StackType;    /* ã¹ã¿ãã¯é åãç¢ºä¿ããããã®å */
+
+/*
+ *  ã·ã¹ãã ãµã¼ãã¹ãã©ã¡ã¼ã¿åå¾ã®ããã®å®ç¾©
+ */
+typedef union {
+	TaskType						tskid;
+	TaskRefType						p_tskid;
+	TaskStateRefType				p_stat;
+	ResourceType					resid;
+	EventMaskType					mask;
+	EventMaskRefType				p_mask;
+	AlarmType						almid;
+	AlarmBaseRefType				p_info;
+	TickRefType						p_tick;
+	TickRefType						p_val;
+	TickRefType						p_eval;
+	TickType						incr;
+	TickType						cycle;
+	TickType						start;
+	AppModeType						mode;
+	CounterType						cntid;
+	ScheduleTableType				schtblid;
+	TickType						offset;
+	ScheduleTableType				schtblid_from;
+	ScheduleTableType				schtblid_to;
+	ScheduleTableStatusRefType		p_schtblstate;
+	StatusType						error;
+	ISRType							isrid;
+	IocType							iocid;
+	SenderIdType					senderid;
+	TrustedFunctionIndexType		tfnid;
+	TrustedFunctionParameterRefType	tfnpr;
+	MemoryStartAddressType			adr;
+	MemorySizeType					sz;
+	ApplicationType					applid;
+	ApplicationStateRefType			p_appstat;
+	RestartType						restartoption;
+} _ErrorHook_Par;
+
+
+/*
+ *  ã¡ã¢ãªé åç¢ºä¿ã®ããã®ãã¯ã­
+ *
+ *  ä»¥ä¸ã®TOPPERS_COUNT_SZã¨TOPPERS_ROUND_SZã®å®ç¾©ã¯ï¼unitã2ã®å·¾ä¹ã§ã
+ *  ããã¨ãä»®å®ãã¦ããï¼
+ */
+#ifndef TOPPERS_COUNT_SZ
+#define TOPPERS_COUNT_SZ(sz, unit)	((((sz) + (unit)) - (1U)) / (unit))
+#endif /* TOPPERS_COUNT_SZ */
+#ifndef TOPPERS_ROUND_SZ
+#define TOPPERS_ROUND_SZ(sz, unit)	((((sz) + (unit)) - (1U)) & (~((unit) - (1U))))
+#endif /* TOPPERS_ROUND_SZ */
+
+#define COUNT_STK_T(sz)		(TOPPERS_COUNT_SZ((sz), sizeof(StackType)))
+#define ROUND_STK_T(sz)		(TOPPERS_ROUND_SZ((sz), sizeof(StackType)))
+
+/*
+ *  ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_ERRORHOOK
+extern void ErrorHook(StatusType Error);
+#endif /* CFG_USE_ERRORHOOK */
+
+#ifdef CFG_USE_PRETASKHOOK
+extern void PreTaskHook(void);
+#endif /* CFG_USE_PRETASKHOOK */
+
+#ifdef CFG_USE_POSTTASKHOOK
+extern void PostTaskHook(void);
+#endif /* CFG_USE_POSTTASKHOOK */
+
+#ifdef CFG_USE_STARTUPHOOK
+extern void StartupHook(void);
+#endif /* CFG_USE_STARTUPHOOK */
+
+#ifdef CFG_USE_SHUTDOWNHOOK
+extern void ShutdownHook(StatusType Error);
+#endif /* CFG_USE_SHUTDOWNHOOK */
+
+#ifdef CFG_USE_PROTECTIONHOOK
+extern ProtectionReturnType ProtectionHook(StatusType FatalError);
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+/*
+ *  ã©ã¤ãã©ãªã§æä¾ããã·ã¹ãã ãµã¼ãã¹
+ */
+extern ObjectAccessType CheckObjectAccess(ApplicationType ApplID, ObjectTypeType ObjectType, ...);
+extern ApplicationType CheckObjectOwnership(ObjectTypeType ObjectType, ...);
+
+/*
+ *  ãã¡ã¤ã«åï¼è¡çªå·ã®åç
+§ç¨ã®å¤æ°
+ */
+extern const char8	*fatal_file_name;   /* ãã¡ã¤ã«å */
+extern sint32		fatal_line_num;     /* è¡çªå· */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ã·ã¹ãã ãµã¼ãã¹å¼åºãã®ããã®å®ç¾©ã¨å®£è¨
+ */
+#include "kernel_fncode.h"              /* æ©è½ã³ã¼ãã®å®ç¾© */
+#include "svc_funccall.h"               /* é¢æ°å¼åºãã«ããå¼åºã */
+#include "target_svc.h"                 /* ã½ããã¦ã§ã¢å²è¾¼ã¿ã«ããå¼åºã */
+
+#if !defined(TOPPERS_CFG1_OUT) && !defined(OMIT_INCLUDE_OS_CFG) && !defined(OMIT_INCLUDE_OS_LCFG)
+#include "Os_Lcfg.h"
+#endif
+
+/*
+ *  OSã®ã¨ã©ã¼ã³ã¼ã
+ */
+#define E_OS_ACCESS							UINT_C(1)
+#define E_OS_CALLEVEL						UINT_C(2)
+#define E_OS_ID								UINT_C(3)
+#define E_OS_LIMIT							UINT_C(4)
+#define E_OS_NOFUNC							UINT_C(5)
+#define E_OS_RESOURCE						UINT_C(6)
+#define E_OS_STATE							UINT_C(7)
+#define E_OS_VALUE							UINT_C(8)
+#define E_OS_SERVICEID						UINT_C(9)
+#define E_OS_ILLEGAL_ADDRESS				UINT_C(10)
+#define E_OS_MISSINGEND						UINT_C(11)
+#define E_OS_DISABLEDINT					UINT_C(12)
+#define E_OS_STACKFAULT						UINT_C(13)
+#define E_OS_PROTECTION_MEMORY				UINT_C(14)
+#define E_OS_PROTECTION_TIME_TASK			UINT_C(15)
+#define E_OS_PROTECTION_TIME_ISR			UINT_C(16)
+#define E_OS_PROTECTION_ARRIVAL_TASK		UINT_C(17)
+#define E_OS_PROTECTION_ARRIVAL_ISR			UINT_C(18)
+#define E_OS_PROTECTION_LOCKED_RESOURCE		UINT_C(19)
+#define E_OS_PROTECTION_LOCKED_OSINT		UINT_C(20)
+#define E_OS_PROTECTION_LOCKED_ALLINT		UINT_C(21)
+#define E_OS_PROTECTION_EXCEPTION			UINT_C(22)
+#define E_OS_PROTECTION_FATAL				UINT_C(23)
+#define E_OS_MODE							UINT_C(24)
+#define E_OS_SHUTDOWN_FATAL					UINT_C(25)
+#define E_OS_PARAM_POINTER					UINT_C(26)
+#define E_OS_SYS_ASSERT_FATAL				UINT_C(27)
+#define E_OS_STACKINSUFFICIENT				UINT_C(28)
+#define E_OS_CORE							UINT_C(29)
+#define E_OS_SPINLOCK						UINT_C(30)
+#define E_OS_INTERFERENCE_DEADLOCK			UINT_C(31)
+#define E_OS_NESTING_DEADLOCK				UINT_C(32)
+#define E_OS_SHUTDOWN_OTHER_CORE			UINT_C(33)
+#define E_OS_TIMEINSUFFICIENT				UINT_C(34)
+#define E_OS_PROTECTION_TIMEWINDOW			UINT_C(35)
+#define E_OS_PROTECTION_COUNT_ISR			UINT_C(36)
+
+/* AUTOSARä»æ§R4.0.3ã¨ã®äºææ§èæ
+® */
+#define OS_E_PARAM_POINTER					E_OS_PARAM_POINTER
+
+#define ERRCODE_NUM							UINT_C(36) /* ã¨ã©ã¼ã³ã¼ãæ° */
+/*
+ *  IOCã®ã¨ã©ã¼ã³ã¼ã
+ */
+#define IOC_E_OK			UINT_C(0)
+#define IOC_E_NOK			UINT_C(1)
+#define IOC_E_LIMIT			UINT_C(130)
+#define IOC_E_LOST_DATA		UINT_C(64)
+#define IOC_E_NO_DATA		UINT_C(131)
+
+/*
+ *  ãã®ä»ã®å®æ°å¤
+ */
+#define UINT32_INVALID		UINT_C(0xffffffff)
+#define UINT8_INVALID		UINT_C(0xff)
+
+#define SUSPENDED			((TaskStateType) 0) /* ä¼æ­¢ç¶æ
+ */
+#define RUNNING				((TaskStateType) 1) /* å®è¡ç¶æ
+ */
+#define READY				((TaskStateType) 2) /* å®è¡å¯è½ç¶æ
+ */
+#define WAITING				((TaskStateType) 3) /* å¾
+ã¡ç¶æ
+ */
+
+/*
+ *  æé©åããããï¼ä¾å­é¨ã§ã®åå®ç¾©ãå¿
+è¦
+ */
+#ifndef OMIT_DATA_TYPE
+#define INVALID_TASK			((TaskType) UINT32_INVALID)
+#define INVALID_ISR				((ISRType) UINT32_INVALID)
+#endif /* OMIT_DATA_TYPE */
+#define INVALID_APPMODETYPE		((AppModeType) UINT32_INVALID)
+#define INVALID_OSAPPLICATION	((ApplicationType) UINT8_INVALID)
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®ã¹ãã¼ã¿ã¹å®ç¾©
+ */
+#define SCHEDULETABLE_STOPPED					((ScheduleTableStatusType) 0x01)
+#define SCHEDULETABLE_NEXT						((ScheduleTableStatusType) 0x02)
+#define SCHEDULETABLE_WAITING					((ScheduleTableStatusType) 0x04)
+#define SCHEDULETABLE_RUNNING					((ScheduleTableStatusType) 0x08)
+#define SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS	((ScheduleTableStatusType) 0x10)
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³ã®ç¶æ
+
+ */
+#define APPLICATION_ACCESSIBLE	((ApplicationStateType) 0)  /* å©ç¨å¯è½ç¶æ
+ */
+#define APPLICATION_RESTARTING	((ApplicationStateType) 1)  /* åèµ·åç¶æ
+ */
+#define APPLICATION_TERMINATED	((ApplicationStateType) 2)  /* ã¢ããªã±ã¼ã·ã§ã³çµäºç¶æ
+ */
+
+/*
+ *  ã¢ã¯ã»ã¹æ
+å ±
+ */
+#define ACCESS		(TRUE)
+#define NO_ACCESS	(FALSE)
+
+/*
+ *  ã·ã¹ãã ãµã¼ãã¹ID
+ */
+#define OSServiceId_GetApplicationID			((OSServiceIdType) 0x00)
+#define OSServiceId_GetISRID					((OSServiceIdType) 0x01)
+#define OSServiceId_CallTrustedFunction			((OSServiceIdType) 0x02)
+#define OSServiceId_CheckISRMemoryAccess		((OSServiceIdType) 0x03)
+#define OSServiceId_CheckTaskMemoryAccess		((OSServiceIdType) 0x04)
+#define OSServiceId_StartScheduleTableRel		((OSServiceIdType) 0x07)
+#define OSServiceId_StartScheduleTableAbs		((OSServiceIdType) 0x08)
+#define OSServiceId_StopScheduleTable			((OSServiceIdType) 0x09)
+#define OSServiceId_NextScheduleTable			((OSServiceIdType) 0x0a)
+#define OSServiceId_GetScheduleTableStatus		((OSServiceIdType) 0x0e)
+#define OSServiceId_IncrementCounter			((OSServiceIdType) 0x0f)
+#define OSServiceId_GetCounterValue				((OSServiceIdType) 0x10)
+#define OSServiceId_GetElapsedValue				((OSServiceIdType) 0x11)
+#define OSServiceId_TerminateApplication		((OSServiceIdType) 0x12)
+#define OSServiceId_AllowAccess					((OSServiceIdType) 0x13)
+#define OSServiceId_GetApplicationState			((OSServiceIdType) 0x14)
+#define IOCServiceId_IOC_Send					((OSServiceIdType) 0x1e)
+#define IOCServiceId_IOC_Write					((OSServiceIdType) 0x1f)
+#define IOCServiceId_IOC_SendGroup				((OSServiceIdType) 0x20)
+#define IOCServiceId_IOC_WriteGroup				((OSServiceIdType) 0x21)
+#define IOCServiceId_IOC_Receive				((OSServiceIdType) 0x22)
+#define IOCServiceId_IOC_Read					((OSServiceIdType) 0x23)
+#define IOCServiceId_IOC_ReceiveGroup			((OSServiceIdType) 0x24)
+#define IOCServiceId_IOC_ReadGroup				((OSServiceIdType) 0x25)
+#define IOCServiceId_IOC_EmptyQueue				((OSServiceIdType) 0x26)
+
+#define OSServiceId_EnableInterruptSource		((OSServiceIdType) 0xa0)
+#define OSServiceId_DisableInterruptSource		((OSServiceIdType) 0xa1)
+#define OSServiceId_CheckTaskAccess				((OSServiceIdType) 0xa2)
+#define OSServiceId_CheckISRAccess				((OSServiceIdType) 0xa3)
+#define OSServiceId_CheckAlarmAccess			((OSServiceIdType) 0xa4)
+#define OSServiceId_CheckResourceAccess			((OSServiceIdType) 0xa5)
+#define OSServiceId_CheckCounterAccess			((OSServiceIdType) 0xa6)
+#define OSServiceId_CheckScheduleTableAccess	((OSServiceIdType) 0xa7)
+#define OSServiceId_CheckTaskOwnership			((OSServiceIdType) 0xa9)
+#define OSServiceId_CheckISROwnership			((OSServiceIdType) 0xaa)
+#define OSServiceId_CheckAlarmOwnership			((OSServiceIdType) 0xab)
+#define OSServiceId_CheckCounterOwnership		((OSServiceIdType) 0xac)
+#define OSServiceId_CheckScheduleTableOwnership	((OSServiceIdType) 0xad)
+#define OSServiceId_TaskMissingEnd				((OSServiceIdType) 0xaf)
+#define OSServiceId_ISRMissingEnd				((OSServiceIdType) 0xb0)
+#define OSServiceId_HookMissingEnd				((OSServiceIdType) 0xb1)
+
+#define OSServiceId_ActivateTask				((OSServiceIdType) 0xe0)
+#define OSServiceId_TerminateTask				((OSServiceIdType) 0xe1)
+#define OSServiceId_ChainTask					((OSServiceIdType) 0xe2)
+#define OSServiceId_Schedule					((OSServiceIdType) 0xe3)
+#define OSServiceId_GetTaskID					((OSServiceIdType) 0xe4)
+#define OSServiceId_GetTaskState				((OSServiceIdType) 0xe5)
+#define OSServiceId_EnableAllInterrupts			((OSServiceIdType) 0xe6)
+#define OSServiceId_DisableAllInterrupts		((OSServiceIdType) 0xe7)
+#define OSServiceId_ResumeAllInterrupts			((OSServiceIdType) 0xe8)
+#define OSServiceId_SuspendAllInterrupts		((OSServiceIdType) 0xe9)
+#define OSServiceId_ResumeOSInterrupts			((OSServiceIdType) 0xea)
+#define OSServiceId_SuspendOSInterrupts			((OSServiceIdType) 0xeb)
+#define OSServiceId_GetResource					((OSServiceIdType) 0xec)
+#define OSServiceId_ReleaseResource				((OSServiceIdType) 0xed)
+#define OSServiceId_SetEvent					((OSServiceIdType) 0xee)
+#define OSServiceId_ClearEvent					((OSServiceIdType) 0xef)
+#define OSServiceId_GetEvent					((OSServiceIdType) 0xf0)
+#define OSServiceId_WaitEvent					((OSServiceIdType) 0xf1)
+#define OSServiceId_GetAlarmBase				((OSServiceIdType) 0xf2)
+#define OSServiceId_GetAlarm					((OSServiceIdType) 0xf3)
+#define OSServiceId_SetRelAlarm					((OSServiceIdType) 0xf4)
+#define OSServiceId_SetAbsAlarm					((OSServiceIdType) 0xf5)
+#define OSServiceId_CancelAlarm					((OSServiceIdType) 0xf6)
+#define OSServiceId_GetActiveApplicationMode	((OSServiceIdType) 0xf7)
+#define OSServiceId_StartOS						((OSServiceIdType) 0xf8)
+#define OSServiceId_ShutdownOS					((OSServiceIdType) 0xf9)
+
+#define OSServiceId_INVALID						((OSServiceIdType) 0xff)  /* ç¡å¹ãªã·ã¹ãã ãµã¼ãã¹ID */
+
+/*
+ *  ä¿è­·éåãèµ·ãããå¦çåä½ã®å®ç¾©
+ */
+#define FC_INVALID			UINT_C(0x00)        /* ä¿è­·éåãèµ·ãããå¦çåä½ãç¹å®ã§ããªã */
+#define FC_TASK				UINT_C(0x01)        /* ä¿è­·éåãèµ·ãããå¦çåä½ãã¿ã¹ã¯ */
+#define FC_C2ISR			UINT_C(0x02)        /* ä¿è­·éåãèµ·ãããå¦çåä½ãC2ISR */
+#define FC_SYSTEM_HOOK		UINT_C(0x03)        /* ä¿è­·éåãèµ·ãããå¦çåä½ãããã¯ */
+#define FC_TRUSTED_FUNC		UINT_C(0x04)        /* ä¿è­·éåãèµ·ãããå¦çåä½ãä¿¡é ¼é¢æ° */
+
+/*
+ *  ã·ã¹ãã ãµã¼ãã¹ãã©ã¡ã¼ã¿åå¾ã®ããã®å®ç¾©
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã¨ã©ã¼ããã¯OFFæï¼ãµã¼ãã¹IDåå¾ã¨ãã©ã¡ã¼ã¿åå¾ãOFFã«ãªã
+ */
+#ifdef CFG_USE_ERRORHOOK
+
+#ifdef CFG_USE_GETSERVICEID
+extern OSServiceIdType	_errorhook_svcid;
+#endif /* CFG_USE_GETSERVICEID */
+
+#ifdef CFG_USE_PARAMETERACCESS
+extern _ErrorHook_Par	errorhook_par1;
+extern _ErrorHook_Par	errorhook_par2;
+extern _ErrorHook_Par	errorhook_par3;
+#endif /* CFG_USE_PARAMETERACCESS */
+
+#endif /* CFG_USE_ERRORHOOK */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ã¨ã©ã¼ããã¯OFFæï¼ãµã¼ãã¹IDåå¾ã¨ãã©ã¡ã¼ã¿åå¾ãOFFã«ãªã
+ */
+#ifdef CFG_USE_ERRORHOOK
+
+/*
+ *  ãã¯ã­ã®å®ç¾©
+ */
+#ifdef CFG_USE_GETSERVICEID
+#define OSErrorGetServiceId()				(_errorhook_svcid)
+#endif /* CFG_USE_GETSERVICEID */
+
+/*
+ *  ã¨ã©ã¼ãå¼ãèµ·ãããã·ã¹ãã ãµã¼ãã¹ID
+ */
+#ifdef CFG_USE_PARAMETERACCESS
+#define OSError_StartOS_Mode()									(errorhook_par1.mode)
+#define OSError_ActivateTask_TaskID()							(errorhook_par1.tskid)
+#define OSError_ChainTask_TaskID()								(errorhook_par1.tskid)
+#define OSError_GetTaskID_TaskID()								(errorhook_par1.p_tskid)
+#define OSError_GetTaskState_TaskID()							(errorhook_par1.tskid)
+#define OSError_GetTaskState_State()							(errorhook_par2.p_stat)
+#define OSError_GetResource_ResID()								(errorhook_par1.resid)
+#define OSError_ReleaseResource_ResID()							(errorhook_par1.resid)
+#define OSError_SetEvent_TaskID()								(errorhook_par1.tskid)
+#define OSError_SetEvent_Mask()									(errorhook_par2.mask)
+#define OSError_ClearEvent_Mask()								(errorhook_par1.mask)
+#define OSError_GetEvent_TaskID()								(errorhook_par1.tskid)
+#define OSError_GetEvent_Event()								(errorhook_par2.p_mask)
+#define OSError_WaitEvent_Mask()								(errorhook_par1.mask)
+#define OSError_GetAlarmBase_AlarmID()							(errorhook_par1.almid)
+#define OSError_GetAlarmBase_Info()								(errorhook_par2.p_info)
+#define OSError_GetAlarm_AlarmID()								(errorhook_par1.almid)
+#define OSError_GetAlarm_Tick()									(errorhook_par2.p_tick)
+#define OSError_SetRelAlarm_AlarmID()							(errorhook_par1.almid)
+#define OSError_SetRelAlarm_increment()							(errorhook_par2.incr)
+#define OSError_SetRelAlarm_cycle()								(errorhook_par3.cycle)
+#define OSError_SetAbsAlarm_AlarmID()							(errorhook_par1.almid)
+#define OSError_SetAbsAlarm_start()								(errorhook_par2.start)
+#define OSError_SetAbsAlarm_cycle()								(errorhook_par3.cycle)
+#define OSError_CancelAlarm_AlarmID()							(errorhook_par1.almid)
+#define OSError_IncrementCounter_CounterID()					(errorhook_par1.cntid)
+#define OSError_GetCounterValue_CounterID()						(errorhook_par1.cntid)
+#define OSError_GetCounterValue_Value()							(errorhook_par2.p_val)
+#define OSError_GetElapsedValue_CounterID()						(errorhook_par1.cntid)
+#define OSError_GetElapsedValue_Value()							(errorhook_par2.p_val)
+#define OSError_GetElapsedValue_ElapsedValue()					(errorhook_par3.p_eval)
+#define OSError_StartScheduleTableRel_ScheduleTableID()			(errorhook_par1.schtblid)
+#define OSError_StartScheduleTableRel_Offset()					(errorhook_par2.offset)
+#define OSError_StartScheduleTableAbs_ScheduleTableID()			(errorhook_par1.schtblid)
+#define OSError_StartScheduleTableAbs_Start()					(errorhook_par2.start)
+#define OSError_StopScheduleTable_ScheduleTableID()				(errorhook_par1.schtblid)
+#define OSError_NextScheduleTable_ScheduleTableID_From()		(errorhook_par1.schtblid_from)
+#define OSError_NextScheduleTable_ScheduleTableID_To()			(errorhook_par2.schtblid_to)
+#define OSError_GetScheduleTableStatus_ScheduleTableID()		(errorhook_par1.schtblid)
+#define OSError_GetScheduleTableStatus_ScheduleStatus()			(errorhook_par2.p_schtblstate)
+#define OSError_ShutdownOS_Error()								(errorhook_par1.error)
+#define OSError_DisableInterruptSource_DisableISR()				(errorhook_par1.isrid)
+#define OSError_EnableInterruptSource_EnableISR()				(errorhook_par1.isrid)
+#define OSError_GetApplicationState_Application()				(errorhook_par1.applid)
+#define OSError_GetApplicationState_Value()						(errorhook_par2.p_appstat)
+#define OSError_CallTrustedFunction_FunctionIndex()				(errorhook_par1.tfnid)
+#define OSError_CallTrustedFunction_FunctionParams()			(errorhook_par2.tfnpr)
+#define OSError_CheckISRMemoryAccess_ISRID()					(errorhook_par1.isrid)
+#define OSError_CheckISRMemoryAccess_Address()					(errorhook_par2.adr)
+#define OSError_CheckISRMemoryAccess_Size()						(errorhook_par3.sz)
+#define OSError_CheckTaskMemoryAccess_TaskID()					(errorhook_par1.tskid)
+#define OSError_CheckTaskMemoryAccess_Address()					(errorhook_par2.adr)
+#define OSError_CheckTaskMemoryAccess_Size()					(errorhook_par3.sz)
+#define OSError_CheckTaskAccess_ApplID()						(errorhook_par1.applid)
+#define OSError_CheckTaskAccess_TaskID()						(errorhook_par2.tskid)
+#define OSError_CheckISRAccess_ApplID()							(errorhook_par1.applid)
+#define OSError_CheckISRAccess_ISRID()							(errorhook_par2.isrid)
+#define OSError_CheckAlarmAccess_ApplID()						(errorhook_par1.applid)
+#define OSError_CheckAlarmAccess_AlarmID()						(errorhook_par2.almid)
+#define OSError_CheckResourceAccess_ApplID()					(errorhook_par1.applid)
+#define OSError_CheckResourceAccess_ResID()						(errorhook_par2.resid)
+#define OSError_CheckCounterAccess_ApplID()						(errorhook_par1.applid)
+#define OSError_CheckCounterAccess_CounterID()					(errorhook_par2.cntid)
+#define OSError_CheckScheduleTableAccess_ApplID()				(errorhook_par1.applid)
+#define OSError_CheckScheduleTableAccess_ScheduleTableID()		(errorhook_par2.schtblid)
+#define OSError_CheckTaskOwnership_TaskID()						(errorhook_par1.tskid)
+#define OSError_CheckISROwnership_ISRID()						(errorhook_par1.isrid)
+#define OSError_CheckAlarmOwnership_AlarmID()					(errorhook_par1.almid)
+#define OSError_CheckCounterOwnership_CounterID()				(errorhook_par1.cntid)
+#define OSError_CheckScheduleTableOwnership_ScheduleTableID()	(errorhook_par1.schtblid)
+#define OSError_IocSend_IocId()									(errorhook_par1.iocid)
+#define OSError_IocSend_SenderId()								(errorhook_par2.senderid)
+#define OSError_IocWrite_IocId()								(errorhook_par1.iocid)
+#define OSError_IocWrite_SenderId()								(errorhook_par2.senderid)
+#define OSError_IocReceive_IocId()								(errorhook_par1.iocid)
+#define OSError_IocRead_IocId()									(errorhook_par1.iocid)
+#define OSError_IocEmptyQueue_IocId()							(errorhook_par1.iocid)
+#define OSError_TerminateApplication_Application()				(errorhook_par1.applid)
+#define OSError_TerminateApplication_RestartOption()			(errorhook_par2.restartoption)
+
+#endif /* CFG_USE_PARAMETERACCESS */
+
+#endif /* CFG_USE_ERRORHOOK */
+
+/*
+ *  ãã­ãã¯ã·ã§ã³ããã¯é¢ä¿ã®ãã¯ã­
+ */
+#define PRO_IGNORE					UINT_C(0x00)
+#define PRO_SHUTDOWN				UINT_C(0x01)
+#define PRO_TERMINATETASKISR		UINT_C(0x02)
+#define PRO_TERMINATEAPPL			UINT_C(0x03)
+#define PRO_TERMINATEAPPL_RESTART	UINT_C(0x04)
+
+/*
+ *  OSAPçµäº/åèµ·åé¢ä¿ã®ãã¯ã­
+ */
+#define NO_RESTART					UINT_C(0x00)
+#define RESTART						UINT_C(0x01)
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã®ããã®ãã¯ã­
+ */
+
+/*
+ *  ã¡ã¢ãªé å æ¨©é
+ */
+
+#define AP_NoAccess		UINT_C(0x0)
+#define AP_Executable	UINT_C(0x1)
+#define AP_Readable		UINT_C(0x2)
+#define AP_Writable		UINT_C(0x4)
+#define AP_StackSpace	UINT_C(0x8)
+
+/*
+ *  ã¢ã¯ã»ã¹ãã§ãã¯ãã¯ã­
+ */
+#define OSMEMORY_IS_READABLE(AccessType)	((AccessType) & AP_Readable)
+#define OSMEMORY_IS_WRITEABLE(AccessType)	((AccessType) & AP_Writable)
+#define OSMEMORY_IS_EXECUTABLE(AccessType)	((AccessType) & AP_Executable)
+#define OSMEMORY_IS_STACKSPACE(AccessType)	((AccessType) & AP_StackSpace)
+
+/*
+ *   ãªãã¸ã§ã¯ãã¿ã¤ã
+ */
+#define OBJECT_TASK				UINT_C(0x01)
+#define OBJECT_ISR				UINT_C(0x02)
+#define OBJECT_ALARM			UINT_C(0x03)
+#define OBJECT_RESOURCE			UINT_C(0x04)
+#define OBJECT_COUNTER			UINT_C(0x05)
+#define OBJECT_SCHEDULETABLE	UINT_C(0x06)
+
+/*
+ *  ãã¼ã¸ã§ã³æ
+å ±
+ */
+#define OS_SW_MAJOR_VERSION				UINT_C(1)   /* ãµãã©ã¤ã¤ã¼ãã¼ã¸ã§ã³ */
+#define OS_SW_MINOR_VERSION				UINT_C(4)
+#define OS_SW_PATCH_VERSION				UINT_C(0)
+
+#define OS_AR_RELEASE_MAJOR_VERSION		UINT_C(4)   /* AUTOSARãªãªã¼ã¹ãã¼ã¸ã§ã³ */
+#define OS_AR_RELEASE_MINOR_VERSION		UINT_C(0)
+#define OS_AR_RELEASE_REVISION_VERSION	UINT_C(3)
+
+#define TKERNEL_NAME	"TOPPERS/ATK2-SC3"  /* ã«ã¼ãã«åç§°ï¼ç¬èªä»æ§ï¼ */
+
+#endif /* TOPPERS_OS_H */
Index: /atk2-sc3-1.4.0-ntisr/include/Rte_Os_Type.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/Rte_Os_Type.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/Rte_Os_Type.h	(revision 172)
@@ -0,0 +1,84 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Rte_Os_Type.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+#ifndef TOPPERS_RTE_OS_TYPE_H
+#define TOPPERS_RTE_OS_TYPE_H
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/* RTEã¸ã§ãã¬ã¼ã¿ã«ããçæããã */
+#include "Rte_Type.h"
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_RTE_OS_TYPE_H */
Index: /atk2-sc3-1.4.0-ntisr/include/Std_Types.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/Std_Types.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/Std_Types.h	(revision 172)
@@ -0,0 +1,140 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Std_Types.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		AUTOSARä»æ§å
+±éè¦å®ã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼AUTOSARä»æ§å
+±éè¦å®ã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­
+ *  ã®å®ç¾©ãå«ãããããã¡ã¤ã«
+ *  AUTOSARä»æ§ã¨ã®äºææ§ãå¿
+è¦ã¨ããã¢ããªã±ã¼ã·ã§ã³ãã¤ã³ã¯ã«ã¼ã
+ *  ãããã¨ãæ³å®ãã¦ãã
+ *  ATK2ã®ã³ã³ãã¤ã«ã«å¿
+è¦ãªå
+±éã®å®ç¾©ãæ¬ãããã«ã¦å®ç¾©ãã
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ãã
+ *  ããã«ããï¼ãã¯ã­å®ç¾©ä»¥å¤ãé¤ãããã«ãªã£ã¦ãã
+ */
+
+#ifndef TOPPERS_STD_TYPES_H
+#define TOPPERS_STD_TYPES_H
+
+#include "Platform_Types.h"
+#include "Compiler.h"
+
+/*
+ *  Type definitions
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef uint8 Std_ReturnType;
+
+typedef struct {
+	uint16	vendorID;
+	uint16	moduleID;
+	uint8	sw_major_version;
+	uint8	sw_minor_version;
+	uint8	sw_patch_version;
+} Std_VersionInfoType;
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  Symbol definitions
+ */
+#ifndef STATUSTYPEDEFINED
+#define STATUSTYPEDEFINED
+
+#ifndef TOPPERS_MACRO_ONLY
+typedef unsigned char StatusType;   /* OSEK compliance */
+#endif /* TOPPERS_MACRO_ONLY */
+
+#define E_OK		UINT_C(0x00)
+#endif /* STATUSTYPEDEFINED */
+
+#define E_NOT_OK	UINT_C(0x01)
+
+#define STD_HIGH	UINT_C(1)   /* Physical state 5V or 3.3V */
+#define STD_LOW		UINT_C(0)   /* Physical state 0V         */
+
+#define STD_ACTIVE	UINT_C(1)   /* Logical state active */
+#define STD_IDLE	UINT_C(0)   /* Logical state idle   */
+
+#define STD_ON		UINT_C(1)
+#define STD_OFF		UINT_C(0)
+
+#endif /* TOPPERS_STD_TYPES_H */
Index: /atk2-sc3-1.4.0-ntisr/include/histogram.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/histogram.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/histogram.h	(revision 172)
@@ -0,0 +1,103 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2006-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: histogram.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		å®è¡æéåå¸éè¨ã¢ã¸ã¥ã¼ã«
+ */
+
+#ifndef TOPPERS_HISTOGRAM_H
+#define TOPPERS_HISTOGRAM_H
+
+#include "t_syslog.h"
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®åæå
+ */
+extern boolean init_hist(ObjectIDType histid, uint32 maxval, uint32 *histarea);
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®éå§
+ */
+extern boolean begin_measure(ObjectIDType histid);
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®çµäº
+ */
+extern boolean end_measure(ObjectIDType histid);
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®è¡¨ç¤º
+ */
+extern boolean print_hist(ObjectIDType histid);
+
+#endif /* TOPPERS_HISTOGRAM_H */
Index: /atk2-sc3-1.4.0-ntisr/include/kernel_fncode.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/kernel_fncode.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/kernel_fncode.h	(revision 172)
@@ -0,0 +1,143 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: kernel_fncode.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#ifndef TOPPERS_KERNEL_FNCODE_H
+#define TOPPERS_KERNEL_FNCODE_H
+
+#define TMAX_SVCID	(61 + TARGET_SVC_NUM)
+
+#define TFN_STARTOS						UINT_C(0)
+#define TFN_SHUTDOWNOS					UINT_C(1)
+#define TFN_ACTIVATETASK				UINT_C(2)
+#define TFN_TERMINATETASK				UINT_C(3)
+#define TFN_CHAINTASK					UINT_C(4)
+#define TFN_SCHEDULE					UINT_C(5)
+#define TFN_GETTASKID					UINT_C(6)
+#define TFN_GETTASKSTATE				UINT_C(7)
+#define TFN_ENABLEALLINTERRUPTS			UINT_C(8)
+#define TFN_DISABLEALLINTERRUPTS		UINT_C(9)
+#define TFN_RESUMEALLINTERRUPTS			UINT_C(10)
+#define TFN_SUSPENDALLINTERRUPTS		UINT_C(11)
+#define TFN_RESUMEOSINTERRUPTS			UINT_C(12)
+#define TFN_SUSPENDOSINTERRUPTS			UINT_C(13)
+#define TFN_GETISRID					UINT_C(14)
+#define TFN_DISABLEINTERRUPTSOURCE		UINT_C(15)
+#define TFN_ENABLEINTERRUPTSOURCE		UINT_C(16)
+#define TFN_GETRESOURCE					UINT_C(17)
+#define TFN_RELEASERESOURCE				UINT_C(18)
+#define TFN_SETEVENT					UINT_C(19)
+#define TFN_CLEAREVENT					UINT_C(20)
+#define TFN_GETEVENT					UINT_C(21)
+#define TFN_WAITEVENT					UINT_C(22)
+#define TFN_GETALARMBASE				UINT_C(23)
+#define TFN_GETALARM					UINT_C(24)
+#define TFN_SETRELALARM					UINT_C(25)
+#define TFN_SETABSALARM					UINT_C(26)
+#define TFN_CANCELALARM					UINT_C(27)
+#define TFN_INCREMENTCOUNTER			UINT_C(28)
+#define TFN_GETCOUNTERVALUE				UINT_C(29)
+#define TFN_GETELAPSEDVALUE				UINT_C(30)
+#define TFN_CHECKISRMEMORYACCESS		UINT_C(31)
+#define TFN_CHECKTASKMEMORYACCESS		UINT_C(32)
+#define TFN_CHECKTASKACCESS				UINT_C(33)
+#define TFN_CHECKISRACCESS				UINT_C(34)
+#define TFN_CHECKALARMACCESS			UINT_C(35)
+#define TFN_CHECKRESOURCEACCESS			UINT_C(36)
+#define TFN_CHECKCOUNTERACCESS			UINT_C(37)
+#define TFN_CHECKSCHEDULETABLEACCESS	UINT_C(38)
+#define TFN_CHECKTASKOWNERSHIP			UINT_C(39)
+#define TFN_CHECKISROWNERSHIP			UINT_C(40)
+#define TFN_CHECKALARMOWNERSHIP			UINT_C(41)
+#define TFN_CHECKCOUNTEROWNERSHIP		UINT_C(42)
+#define TFN_CHECKSCHEDULETABLEOWNERSHIP	UINT_C(43)
+#define TFN_GETAPPLICATIONID			UINT_C(44)
+#define TFN_CALLTRUSTEDFUNCTION			UINT_C(45)
+#define TFN_GETAPPLICATIONSTATE			UINT_C(46)
+#define TFN_GETACTIVEAPPLICATIONMODE	UINT_C(47)
+#define TFN_STARTSCHEDULETABLEREL		UINT_C(48)
+#define TFN_STARTSCHEDULETABLEABS		UINT_C(49)
+#define TFN_STOPSCHEDULETABLE			UINT_C(50)
+#define TFN_NEXTSCHEDULETABLE			UINT_C(51)
+#define TFN_GETSCHEDULETABLESTATUS		UINT_C(52)
+#define TFN_GETFAULTYCONTEXT			UINT_C(53)
+#define TFN_IOC_SEND_GENERIC			UINT_C(54)
+#define TFN_IOC_WRITE_GENERIC			UINT_C(55)
+#define TFN_IOC_RECEIVE_GENERIC			UINT_C(56)
+#define TFN_IOC_READ_GENERIC			UINT_C(57)
+#define TFN_IOC_EMPTY_QUEUE_GENERIC		UINT_C(58)
+#define TFN_ALLOWACCESS					UINT_C(59)
+#define TFN_TERMINATEAPPLICATION		UINT_C(60)
+
+#endif /* TOPPERS_KERNEL_FNCODE_H */
Index: /atk2-sc3-1.4.0-ntisr/include/log_output.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/log_output.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/log_output.h	(revision 172)
@@ -0,0 +1,129 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: log_output.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°ã®ãã©ã¼ãããåºå
+ */
+
+#ifndef TOPPERS_LOG_OUTPUT_H
+#define TOPPERS_LOG_OUTPUT_H
+
+#include "t_syslog.h"
+
+/*
+ *  æå­åæ´å½¢åºå
+ *
+ *  formatã§æå®ããããã©ã¼ãããè¨è¿°ã¨p_argsã§æå®ãããå¼æ°åããä½
+ *  æããã¡ãã»ã¼ã¸ãï¼1æå­åºåé¢æ°putcãç¨ãã¦åºåãã
+ */
+extern void	_syslog_syslog_printf(const char8 *format, const uintptr *p_args,
+								  void (*outputc)(char8 c));
+
+/*
+ *  ã­ã°æ
+å ±ã®åºå
+ *
+ *  p_syslogã§æå®ãããã­ã°æ
+å ±ãæå­åã«æ´å½¢ãï¼1æå­åºåé¢æ°putcãç¨
+ *  ãã¦åºåãã
+ */
+extern void _syslog_syslog_print(const SYSLOG *p_syslog, void (*outputc)(char8 c));
+
+LOCAL_INLINE void
+syslog_printf(const char8 *format, const uintptr *p_args, void (*outputc)(char8 c))
+{
+	KERLIBSLG_PRM prm;
+
+	prm.index = KERLIBSLG_ID_SYSLOG_PRINTF;
+	prm.p_format = format;
+	prm.p_args = p_args;
+	prm.outputc = outputc;
+	KernelLibrarySyslog(&prm);
+	return;
+}
+
+LOCAL_INLINE void
+syslog_print(const SYSLOG *p_syslog, void (*outputc)(char8 c))
+{
+	KERLIBSLG_PRM prm;
+
+	prm.index = KERLIBSLG_ID_SYSLOG_PRINT;
+	prm.p_const_syslog = p_syslog;
+	prm.outputc = outputc;
+	KernelLibrarySyslog(&prm);
+	return;
+}
+
+#endif /* TOPPERS_LOG_OUTPUT_H */
Index: /atk2-sc3-1.4.0-ntisr/include/queue.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/queue.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/queue.h	(revision 172)
@@ -0,0 +1,171 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2006-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: queue.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã­ã¥ã¼æä½ã©ã¤ãã©ãª
+ *
+ *  ãã®ã­ã¥ã¼æä½ã©ã¤ãã©ãªã§ã¯ï¼ã­ã¥ã¼ããããå«ããªã³ã°æ§é ã®ããã«
+ *  ãªã³ã¯ã­ã¥ã¼ãæ±ãï¼å
+·ä½çã«ã¯ï¼ã­ã¥ã¼ãããã®æ¬¡ã¨ã³ããªã¯ã­ã¥ã¼ã®
+ *  å
+é ­ã®ã¨ã³ããªï¼åã¨ã³ããªã¯ã­ã¥ã¼ã®æ«å°¾ã®ã¨ã³ããªã¨ããï¼ã¾ãï¼ã­
+ *  ã¥ã¼ã®å
+é ­ã®ã¨ã³ããªã®åã¨ã³ããªã¨ï¼ã­ã¥ã¼ã®æ«å°¾ã®ã¨ã³ããªã®æ¬¡ã¨ã³
+ *  ããªã¯ï¼ã­ã¥ã¼ãããã¨ããï¼ç©ºã®ã­ã¥ã¼ã¯ï¼æ¬¡ã¨ã³ããªï¼åã¨ã³ããªã¨
+ *  ãèªåèªèº«ãæãã­ã¥ã¼ãããã§ãããã
+ */
+
+#ifndef	TOPPERS_QUEUE_H
+#define	TOPPERS_QUEUE_H
+
+/*
+ *  ã­ã¥ã¼ã®ãã¼ã¿æ§é ã®å®ç¾©
+ */
+typedef struct queue {
+	struct queue	*p_next;    /* æ¬¡ã¨ã³ããªã¸ã®ãã¤ã³ã¿ */
+	struct queue	*p_prev;    /* åã¨ã³ããªã¸ã®ãã¤ã³ã¿ */
+} QUEUE;
+
+/*
+ *  ã­ã¥ã¼ã®åæå
+ */
+LOCAL_INLINE void
+queue_initialize(QUEUE *p_queue)
+{
+	p_queue->p_prev = p_queue;
+	p_queue->p_next = p_queue;
+}
+
+/*
+ *  ã­ã¥ã¼ã®åã¨ã³ããªã¸ã®æ¿å
+¥
+ */
+LOCAL_INLINE void
+queue_insert_prev(QUEUE *p_queue, QUEUE *p_entry)
+{
+	p_entry->p_prev = p_queue->p_prev;
+	p_entry->p_next = p_queue;
+	p_queue->p_prev->p_next = p_entry;
+	p_queue->p_prev = p_entry;
+}
+
+/*
+ *  ã­ã¥ã¼ã®å¾ã¨ã³ããªã¸ã®æ¿å
+¥
+ */
+LOCAL_INLINE void
+queue_insert_next(QUEUE *p_queue, QUEUE *p_entry)
+{
+	p_entry->p_next = p_queue->p_next;
+	p_entry->p_prev = p_queue;
+	p_queue->p_next->p_prev = p_entry;
+	p_queue->p_next = p_entry;
+}
+
+/*
+ *  ã¨ã³ããªã®åé¤
+ */
+LOCAL_INLINE void
+queue_delete(QUEUE *p_entry)
+{
+	p_entry->p_prev->p_next = p_entry->p_next;
+	p_entry->p_next->p_prev = p_entry->p_prev;
+}
+
+/*
+ *  ã­ã¥ã¼ã®æ¬¡ã¨ã³ããªã®ååºã
+ */
+LOCAL_INLINE QUEUE *
+queue_delete_next(QUEUE *p_queue)
+{
+	QUEUE *p_entry;
+
+	ASSERT(p_queue->p_next != p_queue);
+	p_entry = p_queue->p_next;
+	p_queue->p_next = p_entry->p_next;
+	p_entry->p_next->p_prev = p_queue;
+	return(p_entry);
+}
+
+/*
+ *  ã­ã¥ã¼ãç©ºãã©ããã®ãã§ãã¯
+ */
+LOCAL_INLINE boolean
+queue_empty(const QUEUE *p_queue)
+{
+	return(p_queue->p_next == p_queue);
+}
+
+#endif /* TOPPERS_QUEUE_H */
Index: /atk2-sc3-1.4.0-ntisr/include/svc_funccall.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/svc_funccall.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/svc_funccall.h	(revision 172)
@@ -0,0 +1,210 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: svc_funccall.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#ifndef TOPPERS_SVC_FUNCCALL_H
+#define TOPPERS_SVC_FUNCCALL_H
+
+#define SVC_CALL(system_service)	_kernel_ ## system_service
+
+#ifdef TOPPERS_SVC_FUNCCALL
+#define StartOS						_kernel_StartOS
+#define ShutdownOS					_kernel_ShutdownOS
+#define ActivateTask				_kernel_ActivateTask
+#define TerminateTask				_kernel_TerminateTask
+#define ChainTask					_kernel_ChainTask
+#define Schedule					_kernel_Schedule
+#define GetTaskID					_kernel_GetTaskID
+#define GetTaskState				_kernel_GetTaskState
+#define EnableAllInterrupts			_kernel_EnableAllInterrupts
+#define DisableAllInterrupts		_kernel_DisableAllInterrupts
+#define ResumeAllInterrupts			_kernel_ResumeAllInterrupts
+#define SuspendAllInterrupts		_kernel_SuspendAllInterrupts
+#define ResumeOSInterrupts			_kernel_ResumeOSInterrupts
+#define SuspendOSInterrupts			_kernel_SuspendOSInterrupts
+#define GetISRID					_kernel_GetISRID
+#define DisableInterruptSource		_kernel_DisableInterruptSource
+#define EnableInterruptSource		_kernel_EnableInterruptSource
+#define GetResource					_kernel_GetResource
+#define ReleaseResource				_kernel_ReleaseResource
+#define SetEvent					_kernel_SetEvent
+#define ClearEvent					_kernel_ClearEvent
+#define GetEvent					_kernel_GetEvent
+#define WaitEvent					_kernel_WaitEvent
+#define GetAlarmBase				_kernel_GetAlarmBase
+#define GetAlarm					_kernel_GetAlarm
+#define SetRelAlarm					_kernel_SetRelAlarm
+#define SetAbsAlarm					_kernel_SetAbsAlarm
+#define CancelAlarm					_kernel_CancelAlarm
+#define IncrementCounter			_kernel_IncrementCounter
+#define GetCounterValue				_kernel_GetCounterValue
+#define GetElapsedValue				_kernel_GetElapsedValue
+#define CheckISRMemoryAccess		_kernel_CheckISRMemoryAccess
+#define CheckTaskMemoryAccess		_kernel_CheckTaskMemoryAccess
+#define CheckTaskAccess				_kernel_CheckTaskAccess
+#define CheckISRAccess				_kernel_CheckISRAccess
+#define CheckAlarmAccess			_kernel_CheckAlarmAccess
+#define CheckResourceAccess			_kernel_CheckResourceAccess
+#define CheckCounterAccess			_kernel_CheckCounterAccess
+#define CheckScheduleTableAccess	_kernel_CheckScheduleTableAccess
+#define CheckTaskOwnership			_kernel_CheckTaskOwnership
+#define CheckISROwnership			_kernel_CheckISROwnership
+#define CheckAlarmOwnership			_kernel_CheckAlarmOwnership
+#define CheckCounterOwnership		_kernel_CheckCounterOwnership
+#define CheckScheduleTableOwnership	_kernel_CheckScheduleTableOwnership
+#define GetApplicationID			_kernel_GetApplicationID
+#define CallTrustedFunction			_kernel_CallTrustedFunction
+#define GetApplicationState			_kernel_GetApplicationState
+#define GetActiveApplicationMode	_kernel_GetActiveApplicationMode
+#define StartScheduleTableRel		_kernel_StartScheduleTableRel
+#define StartScheduleTableAbs		_kernel_StartScheduleTableAbs
+#define StopScheduleTable			_kernel_StopScheduleTable
+#define NextScheduleTable			_kernel_NextScheduleTable
+#define GetScheduleTableStatus		_kernel_GetScheduleTableStatus
+#define GetFaultyContext			_kernel_GetFaultyContext
+#define ioc_send_generic			_kernel_ioc_send_generic
+#define ioc_write_generic			_kernel_ioc_write_generic
+#define ioc_receive_generic			_kernel_ioc_receive_generic
+#define ioc_read_generic			_kernel_ioc_read_generic
+#define ioc_empty_queue_generic		_kernel_ioc_empty_queue_generic
+#define AllowAccess					_kernel_AllowAccess
+#define TerminateApplication		_kernel_TerminateApplication
+#endif
+
+#ifndef TOPPERS_MACRO_ONLY
+
+extern void _kernel_StartOS(AppModeType Mode);
+extern void _kernel_ShutdownOS(StatusType Error);
+extern StatusType _kernel_ActivateTask(TaskType TaskID);
+extern StatusType _kernel_TerminateTask(void);
+extern StatusType _kernel_ChainTask(TaskType TaskID);
+extern StatusType _kernel_Schedule(void);
+extern StatusType _kernel_GetTaskID(TaskRefType TaskID);
+extern StatusType _kernel_GetTaskState(TaskType TaskID, TaskStateRefType State);
+extern void _kernel_EnableAllInterrupts(void);
+extern void _kernel_DisableAllInterrupts(void);
+extern void _kernel_ResumeAllInterrupts(void);
+extern void _kernel_SuspendAllInterrupts(void);
+extern void _kernel_ResumeOSInterrupts(void);
+extern void _kernel_SuspendOSInterrupts(void);
+extern ISRType _kernel_GetISRID(void);
+extern StatusType _kernel_DisableInterruptSource(ISRType DisableISR);
+extern StatusType _kernel_EnableInterruptSource(ISRType EnableISR);
+extern StatusType _kernel_GetResource(ResourceType ResID);
+extern StatusType _kernel_ReleaseResource(ResourceType ResID);
+extern StatusType _kernel_SetEvent(TaskType TaskID, EventMaskType Mask);
+extern StatusType _kernel_ClearEvent(EventMaskType Mask);
+extern StatusType _kernel_GetEvent(TaskType TaskID, EventMaskRefType Event);
+extern StatusType _kernel_WaitEvent(EventMaskType Mask);
+extern StatusType _kernel_GetAlarmBase(AlarmType AlarmID, AlarmBaseRefType Info);
+extern StatusType _kernel_GetAlarm(AlarmType AlarmID, TickRefType Tick);
+extern StatusType _kernel_SetRelAlarm(AlarmType AlarmID, TickType increment, TickType cycle);
+extern StatusType _kernel_SetAbsAlarm(AlarmType AlarmID, TickType start, TickType cycle);
+extern StatusType _kernel_CancelAlarm(AlarmType AlarmID);
+extern StatusType _kernel_IncrementCounter(CounterType CounterID);
+extern StatusType _kernel_GetCounterValue(CounterType CounterID, TickRefType Value);
+extern StatusType _kernel_GetElapsedValue(CounterType CounterID, TickRefType Value, TickRefType ElapsedValue);
+extern AccessType _kernel_CheckISRMemoryAccess(ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size);
+extern AccessType _kernel_CheckTaskMemoryAccess(TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size);
+extern ObjectAccessType _kernel_CheckTaskAccess(ApplicationType ApplID, TaskType TaskID);
+extern ObjectAccessType _kernel_CheckISRAccess(ApplicationType ApplID, ISRType ISRID);
+extern ObjectAccessType _kernel_CheckAlarmAccess(ApplicationType ApplID, AlarmType AlarmID);
+extern ObjectAccessType _kernel_CheckResourceAccess(ApplicationType ApplID, ResourceType ResID);
+extern ObjectAccessType _kernel_CheckCounterAccess(ApplicationType ApplID, CounterType CounterID);
+extern ObjectAccessType _kernel_CheckScheduleTableAccess(ApplicationType ApplID, ScheduleTableType ScheduleTableID);
+extern ApplicationType _kernel_CheckTaskOwnership(TaskType TaskID);
+extern ApplicationType _kernel_CheckISROwnership(ISRType ISRID);
+extern ApplicationType _kernel_CheckAlarmOwnership(AlarmType AlarmID);
+extern ApplicationType _kernel_CheckCounterOwnership(CounterType CounterID);
+extern ApplicationType _kernel_CheckScheduleTableOwnership(ScheduleTableType ScheduleTableID);
+extern ApplicationType _kernel_GetApplicationID(void);
+extern StatusType _kernel_CallTrustedFunction(TrustedFunctionIndexType FunctionIndex, TrustedFunctionParameterRefType FunctionParams);
+extern StatusType _kernel_GetApplicationState(ApplicationType Application, ApplicationStateRefType Value);
+extern AppModeType _kernel_GetActiveApplicationMode(void);
+extern StatusType _kernel_StartScheduleTableRel(ScheduleTableType ScheduleTableID, TickType Offset);
+extern StatusType _kernel_StartScheduleTableAbs(ScheduleTableType ScheduleTableID, TickType Start);
+extern StatusType _kernel_StopScheduleTable(ScheduleTableType ScheduleTableID);
+extern StatusType _kernel_NextScheduleTable(ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To);
+extern StatusType _kernel_GetScheduleTableStatus(ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus);
+extern FaultyContextType _kernel_GetFaultyContext(void);
+extern Std_ReturnType _kernel_ioc_send_generic(IocType IocWrapperId, const void *in);
+extern Std_ReturnType _kernel_ioc_write_generic(IocType IocWrapperId, const void *in);
+extern Std_ReturnType _kernel_ioc_receive_generic(IocType IocId, void *out);
+extern Std_ReturnType _kernel_ioc_read_generic(IocType IocId, void *out);
+extern Std_ReturnType _kernel_ioc_empty_queue_generic(IocType IocId);
+extern StatusType _kernel_AllowAccess(void);
+extern StatusType _kernel_TerminateApplication(ApplicationType Application, RestartType RestartOption);
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_SVC_FUNCCALL */
Index: /atk2-sc3-1.4.0-ntisr/include/t_stdlib.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/t_stdlib.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/t_stdlib.h	(revision 172)
@@ -0,0 +1,111 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: t_stdlib.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		åºæ¬çãªã©ã¤ãã©ãªé¢æ°
+ */
+
+#ifndef TOPPERS_T_STDLIB_H
+#define TOPPERS_T_STDLIB_H
+
+/*
+ *  ã¨ã©ã¼ã¡ãã»ã¼ã¸æå­åãè¿ãé¢æ°
+ *
+ *  ercdã§æå®ãããã¨ã©ã¼ã³ã¼ãã®ã¡ã¤ã³ã¨ã©ã¼ã³ã¼ãã®åç§°ï¼E_OS_IDï¼
+ *  E_OS_VALUEãªã©ï¼ã®æå­åãè¿ãé¢æ°
+ */
+extern const char8 *atk2_strerror(StatusType ercd);
+
+/*
+ *  ã¨ã©ã¼ã¡ãã»ã¼ã¸æå­åãè¿ãé¢æ°(IOC)
+ */
+extern const char8 *atk2_ioc_strerror(StatusType ercd);
+
+/*
+ *  ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®ã­ã°åºå
+ *
+ *  ãµã¼ãã¹ã³ã¼ã«ãã¨ã©ã¼ãè¿ããå ´åã«ï¼ãã®ãã¡ã¤ã«åï¼è¡çªå·ï¼ã¡ã¤
+ *  ã³ã¨ã©ã¼ã³ã¼ãç­ãè¡¨ç¤ºããããã®é¢æ°
+ */
+extern void	t_perror(uint32 prio, const char8 *file, sint32 line,
+					 const char8 *expr, StatusType ercd);
+
+/*
+ *  ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®ã­ã°åºå(IOC)
+ */
+extern void	t_ioc_perror(uint32 prio, const char8 *file, sint32 line,
+						 const char8 *expr, StatusType ercd);
+
+#endif /* TOPPERS_T_STDLIB_H */
Index: /atk2-sc3-1.4.0-ntisr/include/t_syslog.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/include/t_syslog.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/include/t_syslog.h	(revision 172)
@@ -0,0 +1,534 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: t_syslog.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°åºåãè¡ãããã®å®ç¾©
+ *
+ *  ã·ã¹ãã ã­ã°ãµã¼ãã¹ã¯ï¼ã·ã¹ãã ã®ã­ã°æ
+å ±ãåºåããããã®ãµã¼ãã¹
+ *  ã§ãã
+ *  ã«ã¼ãã«ããã®ã­ã°æ
+å ±ã®åºåã«ãç¨ããããï¼å
+é¨ã§å¾
+ã¡ç¶æ
+ã«ã¯ãã
+ *  ãã¨ã¯ãªã
+ *
+ *  ã­ã°æ
+å ±ã¯ï¼ã«ã¼ãã«å
+ã®ã­ã°ãããã¡ã«æ¸ãè¾¼ããï¼ä½ã¬ãã«ã®æå­åº
+ *  åé¢æ°ãç¨ãã¦åºåãã
+ *  ã©ã¡ããä½¿ããã¯ï¼æ¡å¼µãµã¼ãã¹ã³ã¼ã«ã§åãæãããã¨ãã§ãã
+ *
+ *  ã­ã°ãããã¡é åããªã¼ããã­ã¼ããå ´åã«ã¯ï¼å¤ãã­ã°æ
+å ±ãæ¶ãã¦ä¸
+ *  æ¸ããã
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ãããã¨ã§ï¼ãã¯ã­å®ç¾©ä»¥å¤ã®è¨è¿°ã
+ *  é¤ããã¨ãã§ãã
+ */
+
+#ifndef TOPPERS_T_SYSLOG_H
+#define TOPPERS_T_SYSLOG_H
+
+#include "Os.h"
+
+/*
+ *  ã­ã°æ
+å ±ã®ç¨®å¥ã®å®ç¾©
+ */
+#define LOG_TYPE_COMMENT	UINT_C(0x01)    /* ã³ã¡ã³ã */
+#define LOG_TYPE_ASSERT		UINT_C(0x02)    /* ã¢ãµã¼ã·ã§ã³ã®å¤±æ */
+
+#define LOG_TYPE_ISR			UINT_C(0x11)    /* å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ */
+#define LOG_TYPE_ALM			UINT_C(0x12)    /* ã¢ã©ã¼ã ãã³ãã© */
+#define LOG_TYPE_TSKSTAT		UINT_C(0x13)    /* ã¿ã¹ã¯ç¶æ
+å¤å */
+#define LOG_TYPE_DSP			UINT_C(0x14)    /* ãã£ã¹ãããã£ */
+#define LOG_TYPE_SVC			UINT_C(0x15)    /* ãµã¼ãã¹ã³ã¼ã« */
+#define LOG_TYPE_SCHTBL			UINT_C(0x16)    /* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦ç */
+#define LOG_TYPE_STAHOOK		UINT_C(0x17)    /* ã¹ã¿ã¼ãã¢ããããã¯ */
+#define LOG_TYPE_ERRHOOK		UINT_C(0x18)    /* ã¨ã©ã¼ããã¯ */
+#define LOG_TYPE_PROHOOK		UINT_C(0x19)    /* ãã­ãã¯ã·ã§ã³ããã¯ */
+#define LOG_TYPE_SHUTHOOK		UINT_C(0x1a)    /* ã·ã£ãããã¦ã³ããã¯ */
+#define LOG_TYPE_TFN			UINT_C(0x1b)    /* ä¿¡é ¼é¢æ° */
+
+#define LOG_ENTER			UINT_C(0x00)    /* å
+¥å£ï¼éå§ */
+#define LOG_LEAVE			UINT_C(0x80)    /* åºå£ï¼çµäº */
+
+/*
+ *  ã­ã°æ
+å ±ã®éè¦åº¦ã®å®ç¾©
+ */
+#define LOG_EMERG			UINT_C(0)       /* ã·ã£ãããã¦ã³ã«å¤ããã¨ã©ã¼ */
+#define LOG_ALERT			UINT_C(1)
+#define LOG_CRIT			UINT_C(2)
+#define LOG_ERROR			UINT_C(3)       /* ã·ã¹ãã ã¨ã©ã¼ */
+#define LOG_WARNING			UINT_C(4)       /* è­¦åã¡ãã»ã¼ã¸ */
+#define LOG_NOTICE			UINT_C(5)
+#define LOG_INFO			UINT_C(6)
+#define LOG_DEBUG			UINT_C(7)       /* ãããã°ç¨ã¡ãã»ã¼ã¸ */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã­ã°åºåç¨ãã¼ã¿å
+ */
+
+typedef uint32 ObjectIDType;                /* ãªãã¸ã§ã¯ãã®IDçªå· */
+
+/*
+ *  ã­ã°æ
+å ±ã®ãã¼ã¿æ§é 
+ */
+
+#define TMAX_LOGINFO	UINT_C(6)
+
+typedef struct {
+	uint32				logtype;                /* ã­ã°æ
+å ±ã®ç¨®å¥ */
+	SystemTimeMsType	logtim;                 /* ã­ã°æå» */
+	uintptr				loginfo[TMAX_LOGINFO];  /* ãã®ä»ã®ã­ã°æ
+å ± */
+} SYSLOG;
+
+/*
+ *  ã­ã°æ
+å ±ã®éè¦åº¦ã®ãããããããä½ãããã®ãã¯ã­
+ */
+#define LOG_MASK(prio)		(1U << (prio))
+#define LOG_UPTO(prio)		((((uint32) 1) << ((prio) + 1U)) - 1U)
+
+#include "target_syslog.h"
+
+#ifndef TOPPERS_OMIT_SYSLOG
+
+/*
+ *  ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ç¨ã·ã¹ãã ã­ã°æ©è½ã®åæå
+ */
+extern void _syslog_syslog_initialize(void);
+
+/*
+ *  ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ç¨åºåãã¹ãã­ã°æ
+å ±ã®éè¦åº¦ã®è¨­å®
+ */
+extern StatusType _syslog_syslog_msk_log(uint32 lowmask);
+
+/*
+ *  ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ç¨ã­ã°æ
+å ±ãåºåããããã®ã©ã¤ãã©ãªé¢æ°
+ */
+extern StatusType _syslog_syslog_wri_log(uint32 prio, const SYSLOG *p_syslog);
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ç¨ã­ã°æ
+å ±ãåºåããããã®ã©ã¤ãã©ãªé¢æ°
+ */
+extern StatusType syslog_wri_log(uint32 prio, const SYSLOG *p_syslog);
+
+#define KERLIBSLG_ID_SYSLOG_INITIALIZE		UINT_C(0)
+#define KERLIBSLG_ID_SYSLOG_WRI_LOG			UINT_C(1)
+#define KERLIBSLG_ID_SYSLOG_MSK_LOG			UINT_C(3)
+#define KERLIBSLG_ID_SYSLOG_PRINTF			UINT_C(5)
+#define KERLIBSLG_ID_SYSLOG_PRINT			UINT_C(6)
+
+typedef struct kernel_library_syslog_parameter {
+	uint8			index;
+	uint32			prio;
+	const SYSLOG	*p_const_syslog;
+	uint32			lowmask;
+	const char8		*p_format;
+	const uintptr	*p_args;
+	void (*outputc)(char8 c);
+	StatusType return_er;
+} KERLIBSLG_PRM;
+
+LOCAL_INLINE void
+_syslog_1(uint32 prio, uint32 type, uintptr arg1)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	(void) syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_2(uint32 prio, uint32 type, uintptr arg1, uintptr arg2)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	(void) syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_3(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+		  uintptr arg3)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	syslog.loginfo[2] = arg3;
+	(void) syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_4(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+		  uintptr arg3, uintptr arg4)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	syslog.loginfo[2] = arg3;
+	syslog.loginfo[3] = arg4;
+	(void) syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_5(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+		  uintptr arg3, uintptr arg4, uintptr arg5)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	syslog.loginfo[2] = arg3;
+	syslog.loginfo[3] = arg4;
+	syslog.loginfo[4] = arg5;
+	(void) syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_6(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+		  uintptr arg3, uintptr arg4, uintptr arg5, uintptr arg6)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	syslog.loginfo[2] = arg3;
+	syslog.loginfo[3] = arg4;
+	syslog.loginfo[4] = arg5;
+	syslog.loginfo[5] = arg6;
+	(void) syslog_wri_log(prio, &syslog);
+}
+
+/*
+ *	ã­ã°æ
+å ±ãåºåããããã®ã©ã¤ãã©ãªé¢æ°
+ *	ä¿¡é ¼é¢æ°ãçµç±ããç´æ¥å¼åºããè¡ã
+ */
+LOCAL_INLINE void
+_syslog_syslog_1(uint32 prio, uint32 type, uintptr arg1)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	(void) _syslog_syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_syslog_2(uint32 prio, uint32 type, uintptr arg1, uintptr arg2)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	(void) _syslog_syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_syslog_3(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+				 uintptr arg3)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	syslog.loginfo[2] = arg3;
+	(void) _syslog_syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_syslog_4(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+				 uintptr arg3, uintptr arg4)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	syslog.loginfo[2] = arg3;
+	syslog.loginfo[3] = arg4;
+	(void) _syslog_syslog_wri_log(prio, &syslog);
+}
+
+
+LOCAL_INLINE void
+_syslog_syslog_5(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+				 uintptr arg3, uintptr arg4, uintptr arg5)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	syslog.loginfo[2] = arg3;
+	syslog.loginfo[3] = arg4;
+	syslog.loginfo[4] = arg5;
+	(void) _syslog_syslog_wri_log(prio, &syslog);
+}
+
+LOCAL_INLINE void
+_syslog_syslog_6(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+				 uintptr arg3, uintptr arg4, uintptr arg5, uintptr arg6)
+{
+	SYSLOG syslog;
+
+	syslog.logtype = type;
+	syslog.loginfo[0] = arg1;
+	syslog.loginfo[1] = arg2;
+	syslog.loginfo[2] = arg3;
+	syslog.loginfo[3] = arg4;
+	syslog.loginfo[4] = arg5;
+	syslog.loginfo[5] = arg6;
+	(void) _syslog_syslog_wri_log(prio, &syslog);
+}
+
+/*
+ *  ã­ã°æ
+å ±ï¼ã³ã¡ã³ãï¼ãåºåããããã®ã©ã¤ãã©ãªé¢æ°ï¼vasyslog.cï¼
+ */
+extern void syslog(uint32 prio, const char8 *format, ...);
+
+#else /* TOPPERS_OMIT_SYSLOG */
+
+/*
+ *  ã·ã¹ãã ã­ã°åºåãææ­¢ããå ´å
+ */
+
+LOCAL_INLINE void
+_syslog_1(uint32 prio, uint32 type, uintptr arg1)
+{
+}
+
+LOCAL_INLINE void
+_syslog_2(uint32 prio, uint32 type, uintptr arg1, uintptr arg2)
+{
+}
+
+LOCAL_INLINE void
+_syslog_3(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+		  uintptr arg3)
+{
+}
+
+LOCAL_INLINE void
+_syslog_4(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+		  uintptr arg3, uintptr arg4)
+{
+}
+
+LOCAL_INLINE void
+_syslog_5(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+		  uintptr arg3, uintptr arg4, uintptr arg5)
+{
+}
+
+LOCAL_INLINE void
+_syslog_6(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+		  uintptr arg3, uintptr arg4, uintptr arg5, uintptr arg6)
+{
+}
+
+LOCAL_INLINE void
+_syslog_syslog_1(uint32 prio, uint32 type, uintptr arg1)
+{
+}
+
+LOCAL_INLINE void
+_syslog_syslog_2(uint32 prio, uint32 type, uintptr arg1, uintptr arg2)
+{
+}
+
+LOCAL_INLINE void
+_syslog_syslog_3(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+				 uintptr arg3)
+{
+}
+
+LOCAL_INLINE void
+_syslog_syslog_4(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+				 uintptr arg3, uintptr arg4)
+{
+}
+
+LOCAL_INLINE void
+_syslog_syslog_5(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+				 uintptr arg3, uintptr arg4, uintptr arg5)
+{
+}
+
+LOCAL_INLINE void
+_syslog_syslog_6(uint32 prio, uint32 type, uintptr arg1, uintptr arg2,
+				 uintptr arg3, uintptr arg4, uintptr arg5, uintptr arg6)
+{
+}
+
+LOCAL_INLINE void
+syslog(uint32 prio, const char8 *format, ...)
+{
+}
+
+#endif /* TOPPERS_OMIT_SYSLOG */
+
+/*
+ *  ã­ã°æ
+å ±ï¼ã³ã¡ã³ãï¼ãåºåããããã®ãã¯ã­
+ *
+ *  formatããã³å¾ç¶ã®å¼æ°ããä½æããã¡ãã»ã¼ã¸ãï¼éå¤§åº¦prioã§ã­ã°æ
+
+ *  å ±ã¨ãã¦åºåããããã®ãã¯ã­
+ *  arg1ãargnã¯uintptråã«ã­ã£ã¹ãããããï¼uintptråã«åå¤æã§ããä»»
+ *  æã®åã§ãã
+ */
+
+#define syslog_0(prio, format) \
+	_syslog_1((prio), LOG_TYPE_COMMENT, (uintptr) (format))
+
+#define syslog_1(prio, format, arg1)						\
+	_syslog_2((prio), LOG_TYPE_COMMENT, (uintptr) (format),	\
+			  (uintptr) (arg1))
+
+#define syslog_2(prio, format, arg1, arg2)					\
+	_syslog_3((prio), LOG_TYPE_COMMENT, (uintptr) (format),	\
+			  (uintptr) (arg1), (uintptr) (arg2))
+
+#define syslog_3(prio, format, arg1, arg2, arg3)			\
+	_syslog_4((prio), LOG_TYPE_COMMENT, (uintptr) (format),	\
+			  (uintptr) (arg1), (uintptr) (arg2), (uintptr) (arg3))
+
+#define syslog_4(prio, format, arg1, arg2, arg3, arg4)				\
+	_syslog_5((prio), LOG_TYPE_COMMENT, (uintptr) (format),			\
+			  (uintptr) (arg1), (uintptr) (arg2), (uintptr) (arg3),	\
+			  (uintptr) (arg4))
+
+#define syslog_5(prio, format, arg1, arg2, arg3, arg4, arg5)		\
+	_syslog_6((prio), LOG_TYPE_COMMENT, (uintptr) (format),			\
+			  (uintptr) (arg1), (uintptr) (arg2), (uintptr) (arg3),	\
+			  (uintptr) (arg4), (uintptr) (arg5))
+
+#define syslog_syslog_0(prio, format) \
+	_syslog_syslog_1((prio), LOG_TYPE_COMMENT, (uintptr) (format))
+
+#define syslog_syslog_1(prio, format, arg1)						   \
+	_syslog_syslog_2((prio), LOG_TYPE_COMMENT, (uintptr) (format), \
+					 (uintptr) (arg1))
+
+#define syslog_syslog_2(prio, format, arg1, arg2)				   \
+	_syslog_syslog_3((prio), LOG_TYPE_COMMENT, (uintptr) (format), \
+					 (uintptr) (arg1), (uintptr) (arg2))
+
+#define syslog_syslog_3(prio, format, arg1, arg2, arg3)			   \
+	_syslog_syslog_4((prio), LOG_TYPE_COMMENT, (uintptr) (format), \
+					 (uintptr) (arg1), (uintptr) (arg2), (uintptr) (arg3))
+
+#define syslog_syslog_4(prio, format, arg1, arg2, arg3, arg4)			   \
+	_syslog_syslog_5((prio), LOG_TYPE_COMMENT, (uintptr) (format),		   \
+					 (uintptr) (arg1), (uintptr) (arg2), (uintptr) (arg3), \
+					 (uintptr) (arg4))
+
+#define syslog_syslog_5(prio, format, arg1, arg2, arg3, arg4, arg5)		   \
+	_syslog_syslog_6((prio), LOG_TYPE_COMMENT, (uintptr) (format),		   \
+					 (uintptr) (arg1), (uintptr) (arg2), (uintptr) (arg3), \
+					 (uintptr) (arg4), (uintptr) (arg5))
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_T_SYSLOG_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/Makefile.kernel
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/Makefile.kernel	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/Makefile.kernel	(revision 172)
@@ -0,0 +1,159 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2008-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2011-2013 by Spansion LLC, USA
+#  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2011-2015 by Witz Corporation
+#  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+#  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+#  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.kernel 425 2015-12-07 08:06:19Z witz-itoyo $
+#
+
+#
+#		ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+
+#
+#  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãçæããããã«ä½
+#  æãããã½ã¼ã¹ãã¡ã¤ã«ã®ãªã¹ã
+#
+KERNEL_FCSRCS = counter_manage.c counter.c alarm.c osctl_manage.c osctl.c task_manage.c \
+		event.c resource.c interrupt_manage.c interrupt.c task.c scheduletable.c \
+		osap.c memory.c ioc_manage.c svc_table.c
+
+#
+#  åã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ãªã¹ã
+#
+osctl = internal_call_errorhook.o call_posttaskhook.o call_pretaskhook.o init_stack_magic_region.o \
+		call_protectionhk_main.o internal_shutdownos.o \
+		internal_call_shtdwnhk.o
+
+osctl_manage = StartOS.o GetActiveApplicationMode.o ShutdownOS.o GetFaultyContext.o
+
+
+task = task_initialize.o search_schedtsk.o make_runnable.o make_non_runnable.o \
+		make_active.o preempt.o suspend.o release_taskresources.o cancel_taskcounters.o exit_task.o \
+		remove_task_from_queue.o force_terminate_task.o force_term_osap_task.o move_schedtsk.o
+
+event = SetEvent.o ClearEvent.o GetEvent.o WaitEvent.o set_event_action.o
+
+task_manage = ActivateTask.o TerminateTask.o ChainTask.o Schedule.o GetTaskID.o \
+		GetTaskState.o activate_task_action.o
+
+resource = resource_initialize.o GetResource.o ReleaseResource.o
+
+counter = insert_cnt_expr_que.o delete_cnt_expr_que.o counter_initialize.o \
+		counter_terminate.o get_reltick.o get_abstick.o expire_process.o force_term_osap_counter.o
+
+counter_manage = IncrementCounter.o GetCounterValue.o GetElapsedValue.o notify_hardware_counter.o \
+		incr_counter_action.o incr_counter_process.o
+
+alarm = alarm_initialize.o alarm_expire.o GetAlarmBase.o GetAlarm.o SetRelAlarm.o SetAbsAlarm.o \
+		CancelAlarm.o force_term_osap_alarm.o
+
+interrupt = interrupt_initialize.o release_interrupts.o exit_isr2.o
+
+interrupt_manage = DisableAllInterrupts.o EnableAllInterrupts.o SuspendAllInterrupts.o \
+		ResumeAllInterrupts.o SuspendOSInterrupts.o ResumeOSInterrupts.o GetISRID.o \
+		DisableInterruptSource.o EnableInterruptSource.o
+
+scheduletable = schtbl_initialize.o StartScheduleTableRel.o StartScheduleTableAbs.o \
+		StopScheduleTable.o NextScheduleTable.o GetScheduleTableStatus.o \
+		schtbl_expire.o schtbl_expiry_process.o schtbl_head.o schtbl_exppoint_process.o schtbl_tail.o \
+		force_term_osap_schtbl.o
+
+osap = osap_initialize.o GetApplicationID.o GetApplicationState.o CallTrustedFunction.o CheckTaskAccess.o \
+		CheckISRAccess.o CheckAlarmAccess.o CheckResourceAccess.o CheckCounterAccess.o CheckScheduleTableAccess.o \
+		CheckTaskOwnership.o CheckISROwnership.o CheckAlarmOwnership.o CheckCounterOwnership.o CheckScheduleTableOwnership.o \
+		AllowAccess.o TerminateApplication.o force_term_osap.o
+
+
+ioc_manage = ioc_initialize.o ioc_send_generic.o ioc_write_generic.o ioc_receive_generic.o \
+		ioc_read_generic.o ioc_empty_queue_generic.o
+
+memory = search_meminib.o check_address_stack.o check_osap_memory.o check_isr_memory.o CheckISRMemoryAccess.o \
+		 check_task_memory.o CheckTaskMemoryAccess.o probe_memory_access.o probe_memory_write.o \
+		 probe_memory_read.o probe_memory_read_write.o initialize_sections.o
+
+svc_table = svc_table.o
+
+#
+#  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
+#
+$(osctl) $(osctl:.o=.s) $(osctl:.o=.d): osctl.c
+$(osctl_manage) $(osctl_manage:.o=.s) $(osctl_manage:.o=.d): osctl_manage.c
+$(task) $(task:.o=.s) $(task:.o=.d): task.c
+$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
+$(event) $(event:.o=.s) $(event:.o=.d): event.c
+$(resource) $(resource:.o=.s) $(resource:.o=.d): resource.c
+$(counter) $(counter:.o=.s) $(counter:.o=.d): counter.c
+$(counter_manage) $(counter_manage:.o=.s) $(counter_manage:.o=.d): counter_manage.c
+$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
+$(scheduletable) $(scheduletable:.o=.s) $(scheduletable:.o=.d): scheduletable.c
+$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
+$(interrupt_manage) $(interrupt_manage:.o=.s) $(interrupt_manage:.o=.d): interrupt_manage.c
+$(osap) $(osap:.o=.s) $(osap:.o=.d): osap.c
+$(ioc_manage) $(ioc_manage:.o=.s) $(ioc_manage:.o=.d): ioc_manage.c
+$(memory) $(memory:.o=.s) $(memory:.o=.d): memory.c
+$(svc_table) $(svc_table:.o=.s) $(svc_table:.o=.d): svc_table.c
Index: /atk2-sc3-1.4.0-ntisr/kernel/alarm.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/alarm.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/alarm.c	(revision 172)
@@ -0,0 +1,539 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: alarm.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¢ã©ã¼ã ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "alarm.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_GETALB_ENTER
+#define LOG_GETALB_ENTER(almid)
+#endif /* LOG_GETALB_ENTER */
+
+#ifndef LOG_GETALB_LEAVE
+#define LOG_GETALB_LEAVE(ercd, info)
+#endif /* LOG_GETALB_LEAVE */
+
+#ifndef LOG_GETALM_ENTER
+#define LOG_GETALM_ENTER(almid)
+#endif /* LOG_GETALM_ENTER */
+
+#ifndef LOG_GETALM_LEAVE
+#define LOG_GETALM_LEAVE(ercd, p_tick)
+#endif /* LOG_GETALM_LEAVE */
+
+#ifndef LOG_SETREL_ENTER
+#define LOG_SETREL_ENTER(almid, incr, cycle)
+#endif /* LOG_SETREL_ENTER */
+
+#ifndef LOG_SETREL_LEAVE
+#define LOG_SETREL_LEAVE(ercd)
+#endif /* LOG_SETREL_LEAVE */
+
+#ifndef LOG_SETABS_ENTER
+#define LOG_SETABS_ENTER(almid, start, cycle)
+#endif /* LOG_SETABS_ENTER */
+
+#ifndef LOG_SETABS_LEAVE
+#define LOG_SETABS_LEAVE(ercd)
+#endif /* LOG_SETABS_LEAVE */
+
+#ifndef LOG_CANALM_ENTER
+#define LOG_CANALM_ENTER(almid)
+#endif /* LOG_CANALM_ENTER */
+
+#ifndef LOG_CANALM_LEAVE
+#define LOG_CANALM_LEAVE(ercd)
+#endif /* LOG_CANALM_LEAVE */
+
+#ifndef LOG_ALM_ENTER
+#define LOG_ALM_ENTER(p_cntexpinfo)
+#endif /* LOG_ALM_ENTER */
+
+#ifndef LOG_ALM_LEAVE
+#define LOG_ALM_LEAVE(p_cntexpinfo)
+#endif /* LOG_ALM_LEAVE */
+
+/*
+ *  ã¢ã©ã¼ã æ©è½ã®åæå
+ */
+#ifdef TOPPERS_alarm_initialize
+
+void
+alarm_initialize(void)
+{
+	AlarmType	i;
+	ALMCB		*p_almcb;
+
+	for (i = 0U; i < tnum_alarm; i++) {
+		p_almcb = &(almcb_table[i]);
+
+		p_almcb->p_alminib = &(alminib_table[i]);
+		(p_almcb->cntexpinfo).expirefunc = &alarm_expire;
+		if ((p_almcb->p_alminib->autosta & ((AppModeType) 1 << appmodeid)) != APPMODE_NONE) {
+			if (p_almcb->p_alminib->actatr == ABSOLUTE) {
+				/*
+				 *  çµ¶å¯¾æéã®èµ·å
+				 *  æºäºæéã0ã®å ´åï¼æ¬¡ã®å¨æã®0ã®ã¿ã¤ãã³ã°ã¨ãªã
+				 *  ï¼get_abstickã«èæ
+®æ¸ã¿ï¼
+				 */
+				(p_almcb->cntexpinfo).expiretick =
+					get_abstick(p_almcb->p_alminib->p_cntcb, p_almcb->p_alminib->almval);
+			}
+			else {
+				/* ç¸å¯¾æéã®èµ·å */
+				(p_almcb->cntexpinfo).expiretick =
+					get_reltick(p_almcb->p_alminib->p_cntcb, p_almcb->p_alminib->almval);
+			}
+			p_almcb->cycle = p_almcb->p_alminib->cycle;
+
+			insert_cnt_expr_que(&(p_almcb->cntexpinfo), p_almcb->p_alminib->p_cntcb);
+		}
+		else {
+			queue_initialize(&(p_almcb->cntexpinfo.cntexpque));
+		}
+	}
+}
+
+#endif /* TOPPERS_alarm_initialize */
+
+/*
+ *  ã¢ã©ã¼ã æ
+å ±ã®åå¾
+ */
+#ifdef TOPPERS_GetAlarmBase
+
+StatusType
+GetAlarmBase(AlarmType AlarmID, AlarmBaseRefType Info)
+{
+	StatusType	ercd = E_OK;
+	ALMCB		*p_almcb;
+	CNTCB		*p_cntcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_GETALB_ENTER(AlarmID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_GETALARMBASE);
+	CHECK_ID(AlarmID < tnum_alarm);
+	CHECK_PARAM_POINTER(Info);
+	CHECK_MEM_WRITE(Info, AlarmBaseType);
+	p_almcb = get_almcb(AlarmID);
+	CHECK_RIGHT(p_almcb->p_alminib->acsbtmp);
+	p_cntcb = p_almcb->p_alminib->p_cntcb;
+
+	p_osapcb = p_almcb->p_alminib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* ã¢ã©ã¼ã æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	Info->maxallowedvalue = p_cntcb->p_cntinib->maxval;
+	Info->ticksperbase = p_cntcb->p_cntinib->tickbase;
+	Info->mincycle = p_cntcb->p_cntinib->mincyc;
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_GETALB_LEAVE(ercd, Info);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.almid = AlarmID;
+	_errorhook_par2.p_info = Info;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetAlarmBase);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_GetAlarmBase */
+
+/*
+ *  ã¢ã©ã¼ã ã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_GetAlarm
+
+StatusType
+GetAlarm(AlarmType AlarmID, TickRefType Tick)
+{
+	StatusType	ercd = E_OK;
+	TickType	curval;
+	ALMCB		*p_almcb;
+	CNTCB		*p_cntcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_GETALM_ENTER(AlarmID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_GETALARM);
+	CHECK_ID(AlarmID < tnum_alarm);
+	CHECK_PARAM_POINTER(Tick);
+	CHECK_MEM_WRITE(Tick, TickType);
+	p_almcb = get_almcb(AlarmID);
+	CHECK_RIGHT(p_almcb->p_alminib->acsbtmp);
+	p_cntcb = p_almcb->p_alminib->p_cntcb;
+
+	p_osapcb = p_almcb->p_alminib->p_osapcb;
+	x_nested_lock_os_int();
+	/* ã¢ã©ã¼ã æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	S_D_CHECK_NOFUNC(queue_empty(&(p_almcb->cntexpinfo.cntexpque)) == FALSE);
+
+	/*
+	 *  ã«ã¦ã³ã¿ã®ç¾å¨å¤ãåå¾
+	 *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®å ´åï¼æ¢ã«æºäºãã¦ããå¯è½æ§ããã
+	 */
+	curval = get_curval(p_cntcb, CNTID(p_cntcb));
+
+	*Tick = diff_tick(p_almcb->cntexpinfo.expiretick, curval, p_cntcb->p_cntinib->maxval2);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_GETALM_LEAVE(ercd, Tick);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.almid = AlarmID;
+	_errorhook_par2.p_tick = Tick;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetAlarm);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_GetAlarm */
+
+/*
+ *  ã¢ã©ã¼ã ã®è¨­å®ï¼ç¸å¯¾å¤ï¼
+ */
+#ifdef TOPPERS_SetRelAlarm
+
+StatusType
+SetRelAlarm(AlarmType AlarmID, TickType increment, TickType cycle)
+{
+	StatusType	ercd = E_OK;
+	TickType	maxval;
+	ALMCB		*p_almcb;
+	CNTCB		*p_cntcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_SETREL_ENTER(AlarmID, increment, cycle);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_SETRELALARM);
+	CHECK_ID(AlarmID < tnum_alarm);
+	p_almcb = get_almcb(AlarmID);
+	CHECK_RIGHT(p_almcb->p_alminib->acsbtmp);
+	p_cntcb = p_almcb->p_alminib->p_cntcb;
+
+	maxval = p_cntcb->p_cntinib->maxval;
+	CHECK_VALUE((0U < increment) && (increment <= maxval));
+	CHECK_VALUE((cycle == 0U)
+				|| ((p_cntcb->p_cntinib->mincyc <= cycle) && (cycle <= maxval)));
+
+	p_osapcb = p_almcb->p_alminib->p_osapcb;
+	x_nested_lock_os_int();
+	/* ã¢ã©ã¼ã æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	S_D_CHECK_STATE(queue_empty(&(p_almcb->cntexpinfo.cntexpque)) != FALSE);
+
+	p_almcb->cntexpinfo.expiretick = get_reltick(p_cntcb, increment);
+	p_almcb->cycle = cycle;
+
+	insert_cnt_expr_que(&(p_almcb->cntexpinfo), p_cntcb);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_SETREL_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.almid = AlarmID;
+	_errorhook_par2.incr = increment;
+	_errorhook_par3.cycle = cycle;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_SetRelAlarm);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_SetRelAlarm */
+
+/*
+ *  ã¢ã©ã¼ã ã®è¨­å®ï¼çµ¶å¯¾å¤ï¼
+ */
+#ifdef TOPPERS_SetAbsAlarm
+
+StatusType
+SetAbsAlarm(AlarmType AlarmID, TickType start, TickType cycle)
+{
+	StatusType	ercd = E_OK;
+	TickType	maxval;
+	ALMCB		*p_almcb;
+	CNTCB		*p_cntcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_SETABS_ENTER(AlarmID, start, cycle);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_SETABSALARM);
+	CHECK_ID(AlarmID < tnum_alarm);
+	p_almcb = get_almcb(AlarmID);
+	CHECK_RIGHT(p_almcb->p_alminib->acsbtmp);
+	p_cntcb = p_almcb->p_alminib->p_cntcb;
+
+	maxval = p_cntcb->p_cntinib->maxval;
+	CHECK_VALUE(start <= maxval);
+	CHECK_VALUE((cycle == 0U)
+				|| ((p_cntcb->p_cntinib->mincyc <= cycle) && (cycle <= maxval)));
+
+	p_osapcb = p_almcb->p_alminib->p_osapcb;
+	x_nested_lock_os_int();
+	/* ã¢ã©ã¼ã æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	S_D_CHECK_STATE(queue_empty(&(p_almcb->cntexpinfo.cntexpque)) != FALSE);
+
+	p_almcb->cntexpinfo.expiretick = get_abstick(p_cntcb, start);
+	p_almcb->cycle = cycle;
+
+	insert_cnt_expr_que(&(p_almcb->cntexpinfo), p_cntcb);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_SETABS_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.almid = AlarmID;
+	_errorhook_par2.start = start;
+	_errorhook_par3.cycle = cycle;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_SetAbsAlarm);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_SetAbsAlarm */
+
+/*
+ *  ã¢ã©ã¼ã ã®ã­ã£ã³ã»ã«
+ */
+#ifdef TOPPERS_CancelAlarm
+
+StatusType
+CancelAlarm(AlarmType AlarmID)
+{
+	StatusType	ercd = E_OK;
+	ALMCB		*p_almcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_CANALM_ENTER(AlarmID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CANCELALARM);
+	CHECK_ID(AlarmID < tnum_alarm);
+	p_almcb = get_almcb(AlarmID);
+	CHECK_RIGHT(p_almcb->p_alminib->acsbtmp);
+
+	p_osapcb = p_almcb->p_alminib->p_osapcb;
+	x_nested_lock_os_int();
+	/* ã¢ã©ã¼ã æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	S_D_CHECK_NOFUNC(queue_empty(&(p_almcb->cntexpinfo.cntexpque)) == FALSE);
+
+	delete_cnt_expr_que(&(p_almcb->cntexpinfo), p_almcb->p_alminib->p_cntcb);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_CANALM_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.almid = AlarmID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CancelAlarm);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_CancelAlarm */
+
+/*
+ *  ã¢ã©ã¼ã æºäºã¢ã¯ã·ã§ã³å¦çç¨é¢æ°
+ */
+#ifdef TOPPERS_alarm_expire
+
+void
+alarm_expire(CNTEXPINFO *p_cntexpinfo, const CNTCB *p_cntcb)
+{
+	ALMCB	*p_almcb;
+	OSAPCB	*p_runosap_saved;
+
+	p_almcb = (ALMCB *) p_cntexpinfo;
+
+	/* ã«ã¦ã³ã¿æºäºã­ã¥ã¼ã¸ã®åæ¿å
+¥ï¼å¨æã¢ã©ã¼ã ã®å ´åï¼ */
+	if (p_almcb->cycle > 0U) {
+		p_cntexpinfo->expiretick = add_tick(p_cntexpinfo->expiretick, p_almcb->cycle,
+											p_cntcb->p_cntinib->maxval2);
+		insert_cnt_expr_que(p_cntexpinfo, (CNTCB *) p_cntcb);
+	}
+
+	LOG_ALM_ENTER(p_almcb);
+
+	p_runosap_saved = p_runosap;
+	p_runosap = p_almcb->p_alminib->p_osapcb;
+
+	/* ã¢ã©ã¼ã æºäºã¢ã¯ã·ã§ã³ã®å¼åºã */
+	(p_almcb->p_alminib->action)();
+
+	p_runosap = p_runosap_saved;
+
+	LOG_ALM_LEAVE(p_almcb);
+}
+
+#endif /* TOPPERS_alarm_expire */
+
+/*
+ *  OSAPæå±ããã¢ã©ã¼ã ã®å¼·å¶çµäº
+ */
+#ifdef TOPPERS_force_term_osap_alarm
+
+void
+force_term_osap_alarm(OSAPCB *p_osapcb)
+{
+	/* ã«ã¦ã³ã¿ã®æºäºã­ã¥ã¼ããæ¶ã */
+	AlarmType	i;
+	ALMCB		*p_almcb;
+
+	for (i = 0U; i < tnum_alarm; i++) {
+		if (alminib_table[i].p_osapcb == p_osapcb) {
+			p_almcb = &almcb_table[i];
+			/*
+			 *  æºäºã­ã¥ã¼ããåé¤ãã
+			 *  åæåããå
+ã«å®æ½ããå¿
+è¦ããã
+			 */
+			delete_cnt_expr_que(&(p_almcb->cntexpinfo), p_almcb->p_alminib->p_cntcb);
+			p_almcb->cycle = 0U;
+		}
+	}
+}
+
+#endif /* TOPPERS_force_term_osap_alarm */
Index: /atk2-sc3-1.4.0-ntisr/kernel/alarm.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/alarm.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/alarm.h	(revision 172)
@@ -0,0 +1,147 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: alarm.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¢ã©ã¼ã æ©è½
+ */
+
+#ifndef TOPPERS_ALARM_H
+#define TOPPERS_ALARM_H
+
+#include "counter.h"
+
+/*
+ *  ã¢ã©ã¼ã IDããã¢ã©ã¼ã ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define get_almcb(almid)	(&(almcb_table[(almid)]))
+
+/*
+ *  ã¢ã©ã¼ã åæåãã­ãã¯
+ */
+typedef struct alarm_initialization_block {
+	CNTCB			*p_cntcb;       /* é§åã«ã¦ã³ã¿ç®¡çãã­ãã¯ã®ãã¤ã³ã¿ */
+	FunctionRefType	action;         /* ã¢ã©ã¼ã æºäºã¢ã¯ã·ã§ã³ */
+	AppModeType		autosta;        /* èµ·åããã¢ã¼ã */
+	TickType		almval;         /* expire ãããã£ãã¯å¤ */
+	TickType		cycle;          /* ã¢ã©ã¼ã ã®å¨æ */
+	AttributeType	actatr;         /* æºäºã¢ã¯ã·ã§ã³ã»èªåèµ·åã®å±æ§ */
+	OSAPCB			*p_osapcb;      /* æå±ããOSã¢ããªã±ã¼ã·ã§ã³ã®ç®¡çãã­ãã¯ */
+	uint32			acsbtmp;        /* ã¢ã¯ã»ã¹è¨±å¯OSã¢ããªã±ã¼ã·ã§ã³ ãããããã */
+} ALMINIB;
+
+/*
+ *  ã¢ã©ã¼ã ç®¡çãã­ãã¯
+ */
+typedef struct alarm_control_block {
+	CNTEXPINFO		cntexpinfo;     /* ã«ã¦ã³ã¿æºäºæ
+å ±(æ§é ä½ã®å
+é ­ã«å
+¥ãå¿
+è¦) */
+	const ALMINIB	*p_alminib;     /* ã¢ã©ã¼ã åæåãã­ãã¯ãã¤ã³ã¿ */
+	TickType		cycle;          /* ã¢ã©ã¼ã ã®å¨æ */
+} ALMCB;
+
+/*
+ *  ã¢ã©ã¼ã æ°ãä¿æããå¤æ°ã®å®£è¨ï¼Os_Lcfg.cï¼
+ */
+extern const AlarmType	tnum_alarm;       /* ã¢ã©ã¼ã ã®æ° */
+
+/*
+ *  ã¢ã©ã¼ã åæåãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern const ALMINIB	alminib_table[];
+
+/*
+ *  ã¢ã©ã¼ã ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern ALMCB			almcb_table[];
+
+/*
+ *  ã¢ã©ã¼ã æ©è½ã®åæå
+ */
+extern void alarm_initialize(void);
+
+/*
+ *  ã¢ã©ã¼ã æºäºã¢ã¯ã·ã§ã³å¦çç¨é¢æ°
+ */
+extern void alarm_expire(CNTEXPINFO *p_cntexpinfo, const CNTCB *p_cntcb);
+
+/*
+ *  OSAPæå±ããã¢ã©ã¼ã ã®å¼·å¶çµäº
+ */
+extern void force_term_osap_alarm(OSAPCB *p_osapcb);
+
+#endif /* TOPPERS_ALARM_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/allfunc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/allfunc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/allfunc.h	(revision 172)
@@ -0,0 +1,225 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: allfunc.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ãã¹ã¦ã®é¢æ°ãã³ã³ãã¤ã«ããããã®å®ç¾©
+ */
+
+#ifndef TOPPERS_ALLFUNC_H
+#define TOPPERS_ALLFUNC_H
+
+/* alarm.c */
+#define TOPPERS_alarm_initialize
+#define TOPPERS_GetAlarmBase
+#define TOPPERS_GetAlarm
+#define TOPPERS_SetRelAlarm
+#define TOPPERS_SetAbsAlarm
+#define TOPPERS_CancelAlarm
+#define TOPPERS_alarm_expire
+#define TOPPERS_force_term_osap_alarm
+
+/* counter_manage.c */
+#define TOPPERS_IncrementCounter
+#define TOPPERS_GetCounterValue
+#define TOPPERS_GetElapsedValue
+#define TOPPERS_notify_hardware_counter
+#define TOPPERS_incr_counter_action
+#define TOPPERS_incr_counter_process
+
+/* counter.c */
+#define TOPPERS_insert_cnt_expr_que
+#define TOPPERS_delete_cnt_expr_que
+#define TOPPERS_counter_initialize
+#define TOPPERS_counter_terminate
+#define TOPPERS_get_reltick
+#define TOPPERS_get_abstick
+#define TOPPERS_expire_process
+#define TOPPERS_force_term_osap_counter
+
+/* event.c */
+#define TOPPERS_SetEvent
+#define TOPPERS_ClearEvent
+#define TOPPERS_GetEvent
+#define TOPPERS_WaitEvent
+#define TOPPERS_set_event_action
+
+/* interrupt.c */
+#define TOPPERS_interrupt_initialize
+#define TOPPERS_release_interrupts
+#define TOPPERS_exit_isr2
+
+/* interrupt_manage.c */
+#define TOPPERS_DisableAllInterrupts
+#define TOPPERS_EnableAllInterrupts
+#define TOPPERS_SuspendAllInterrupts
+#define TOPPERS_ResumeAllInterrupts
+#define TOPPERS_SuspendOSInterrupts
+#define TOPPERS_ResumeOSInterrupts
+#define TOPPERS_GetISRID
+#define TOPPERS_DisableInterruptSource
+#define TOPPERS_EnableInterruptSource
+
+/* osctl.c */
+#define TOPPERS_internal_call_errorhook
+#define TOPPERS_call_posttaskhook
+#define TOPPERS_call_pretaskhook
+#define TOPPERS_call_protectionhk_main
+#define TOPPERS_init_stack_magic_region
+#define TOPPERS_internal_shutdownos
+#define TOPPERS_internal_call_shtdwnhk
+
+/* osctl_manage.c */
+#define TOPPERS_StartOS
+#define TOPPERS_GetActiveApplicationMode
+#define TOPPERS_ShutdownOS
+#define TOPPERS_GetFaultyContext
+
+/* resource.c */
+#define TOPPERS_resource_initialize
+#define TOPPERS_GetResource
+#define TOPPERS_ReleaseResource
+
+/* scheduletable.c */
+#define TOPPERS_schtbl_initialize
+#define TOPPERS_StartScheduleTableRel
+#define TOPPERS_StartScheduleTableAbs
+#define TOPPERS_StopScheduleTable
+#define TOPPERS_NextScheduleTable
+#define TOPPERS_GetScheduleTableStatus
+#define TOPPERS_schtbl_expire
+#define TOPPERS_schtbl_expiry_process
+#define TOPPERS_schtbl_head
+#define TOPPERS_schtbl_exppoint_process
+#define TOPPERS_schtbl_tail
+#define TOPPERS_force_term_osap_schtbl
+
+/* task.c */
+#define TOPPERS_task_initialize
+#define TOPPERS_search_schedtsk
+#define TOPPERS_make_runnable
+#define TOPPERS_make_non_runnable
+#define TOPPERS_make_active
+#define TOPPERS_preempt
+#define TOPPERS_suspend
+#define TOPPERS_release_taskresources
+#define TOPPERS_cancel_taskcounters
+#define TOPPERS_exit_task
+#define TOPPERS_remove_task_from_queue
+#define TOPPERS_force_terminate_task
+#define TOPPERS_force_term_osap_task
+#define TOPPERS_move_schedtsk
+
+/* task_manage.c */
+#define TOPPERS_ActivateTask
+#define TOPPERS_TerminateTask
+#define TOPPERS_ChainTask
+#define TOPPERS_Schedule
+#define TOPPERS_GetTaskID
+#define TOPPERS_GetTaskState
+#define TOPPERS_activate_task_action
+
+/* memory.c */
+#define TOPPERS_search_meminib
+#define TOPPERS_check_address_stack
+#define TOPPERS_check_osap_memory
+#define TOPPERS_check_isr_memory
+#define TOPPERS_CheckISRMemoryAccess
+#define TOPPERS_check_task_memory
+#define TOPPERS_CheckTaskMemoryAccess
+#define TOPPERS_probe_memory_access
+#define TOPPERS_probe_memory_read
+#define TOPPERS_probe_memory_write
+#define TOPPERS_probe_memory_read_write
+#define TOPPERS_initialize_sections
+
+/* osap.c */
+#define TOPPERS_osap_initialize
+#define TOPPERS_GetApplicationID
+#define TOPPERS_GetApplicationState
+#define TOPPERS_CallTrustedFunction
+#define TOPPERS_CheckTaskAccess
+#define TOPPERS_CheckISRAccess
+#define TOPPERS_CheckAlarmAccess
+#define TOPPERS_CheckResourceAccess
+#define TOPPERS_CheckCounterAccess
+#define TOPPERS_CheckScheduleTableAccess
+#define TOPPERS_CheckTaskOwnership
+#define TOPPERS_CheckISROwnership
+#define TOPPERS_CheckAlarmOwnership
+#define TOPPERS_CheckCounterOwnership
+#define TOPPERS_CheckScheduleTableOwnership
+#define TOPPERS_force_term_osap
+#define TOPPERS_TerminateApplication
+#define TOPPERS_AllowAccess
+
+#endif /* TOPPERS_ALLFUNC_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/check.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/check.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/check.h	(revision 172)
@@ -0,0 +1,266 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: check.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¨ã©ã¼ãã§ãã¯ç¨ãã¯ã­
+ */
+
+#ifndef TOPPERS_CHECK_H
+#define TOPPERS_CHECK_H
+
+#include "Os_Cfg.h"
+#include "memory.h"
+
+/*
+ * æ±ç¨ãã§ãã¯ãã¯ã­
+ */
+#define CHECK_ERROR_ERCD(exp, error) \
+	do {							 \
+		if (!(exp)) {				 \
+			ercd = (error);			 \
+			goto error_exit;		 \
+		}							 \
+	} while (0)
+
+#define CHECK_ERROR_NO_ERCD(exp) \
+	do {						 \
+		if (!(exp)) {			 \
+			goto error_exit;	 \
+		}						 \
+	} while (0)
+
+#define D_CHECK_ERROR_ERCD(exp, error) \
+	do {							   \
+		if (!(exp)) {				   \
+			ercd = (error);			   \
+			goto d_error_exit;		   \
+		}							   \
+	} while (0)
+
+#define D_CHECK_ERROR_NO_ERCD(exp) \
+	do {						   \
+		if (!(exp)) {			   \
+			goto d_error_exit;	   \
+		}						   \
+	} while (0)
+
+/*
+ *  æ¨æºã¨ã©ã¼ã®ãã§ãã¯ãã¯ã­
+ */
+#define S_CHECK_ERROR(exp, error)		CHECK_ERROR_ERCD(exp, error)
+
+
+#ifdef CFG_USE_ERRORHOOK
+/*
+ *  ã¨ã©ã¼ããã¯ä½¿ç¨æç¡ã«ããã©ãã«ã®åå®ç¾©
+ */
+#define error_exit		exit_errorhook
+#define d_error_exit	d_exit_errorhook
+
+/*
+ *  ã¨ã©ã¼ããã¯ãä½¿ç¨ããæã¯ã¨ã©ã¼ã³ã¼ããä»£å
+¥ãã
+ */
+#define S_N_CHECK_ERROR(exp, error)		CHECK_ERROR_ERCD(exp, error)
+
+#else /* CFG_USE_ERRORHOOK */
+/*
+ *  ã¨ã©ã¼ããã¯ä½¿ç¨æç¡ã«ããã©ãã«ã®åå®ç¾©
+ */
+#define error_exit		exit_no_errorhook
+#define d_error_exit	d_exit_no_errorhook
+
+/*
+ *  ã¨ã©ã¼ããã¯ãä½¿ç¨ããªãæã¯ã¨ã©ã¼ã³ã¼ããä»£å
+¥ããªã
+ */
+#define S_N_CHECK_ERROR(exp, error)		CHECK_ERROR_NO_ERCD(exp)
+
+#endif /* CFG_USE_ERRORHOOK */
+
+
+/* ä»¥ä¸ã®ãã§ãã¯ãã¯ã­ãOSå
+é¨ã§ç¨ãã */
+
+/*
+ *  ã¨ã©ã¼ã³ã¼ãã«å¯¾å¿ãããã¯ã­
+ *   æ¨æºã¨ã©ã¼
+ */
+#ifdef OMIT_STANDARD_DISALLINT
+
+#define S_CHECK_DISALLINT()
+#define S_N_CHECK_DISALLINT()
+
+#else /* OMIT_STANDARD_DISALLINT */
+
+#define S_CHECK_DISALLINT()								 \
+	S_CHECK_ERROR(										 \
+		((callevel_stat & TSYS_DISALLINT) == TSYS_NULL), \
+		E_OS_DISABLEDINT								 \
+		)
+#define S_N_CHECK_DISALLINT()							 \
+	S_N_CHECK_ERROR(									 \
+		((callevel_stat & TSYS_DISALLINT) == TSYS_NULL), \
+		E_OS_DISABLEDINT								 \
+		)
+
+#endif /* OMIT_STANDARD_DISALLINT */
+
+#define S_CHECK_STATE(exp)				S_CHECK_ERROR(exp, E_OS_STATE)
+#define S_N_CHECK_STATE(exp)			S_N_CHECK_ERROR(exp, E_OS_STATE)
+#define S_CHECK_LIMIT(exp)				S_CHECK_ERROR(exp, E_OS_LIMIT)
+#define S_N_CHECK_LIMIT(exp)			S_N_CHECK_ERROR(exp, E_OS_LIMIT)
+#define S_D_CHECK_NOFUNC(exp)			D_CHECK_ERROR_ERCD(exp, E_OS_NOFUNC)
+#define S_D_CHECK_STATE(exp)			D_CHECK_ERROR_ERCD(exp, E_OS_STATE)
+#define S_D_CHECK_LIMIT(exp)			D_CHECK_ERROR_ERCD(exp, E_OS_LIMIT)
+
+#define S_D_CHECK_IOC_LIMIT(exp) do { \
+		if (!(exp)) {				  \
+			ercd = IOC_E_LIMIT;		  \
+			p_ioccb->lostflg = TRUE;  \
+			goto d_error_exit;		  \
+		}							  \
+} while (0)
+
+#define S_D_CHECK_IOC_LOST(exp) do {  \
+		if (!(exp)) {				  \
+			ercd = IOC_E_LOST_DATA;	  \
+			p_ioccb->lostflg = FALSE; \
+			goto d_error_exit;		  \
+		}							  \
+} while (0)
+
+#define S_D_CHECK_IOC_NO_DATA(exp)		D_CHECK_ERROR_ERCD(exp, IOC_E_NO_DATA)
+
+
+/*
+ *  ã¨ã©ã¼ã³ã¼ãã«å¯¾å¿ãããã¯ã­
+ *   æ¡å¼µã¨ã©ã¼
+ */
+#define CHECK_ACCESS(exp)				CHECK_ERROR_ERCD(exp, E_OS_ACCESS)
+#define D_CHECK_ACCESS(exp)				D_CHECK_ERROR_ERCD(exp, E_OS_ACCESS)
+#define CHECK_CALLEVEL(clmask)					  \
+	CHECK_ERROR_ERCD(							  \
+		((callevel_stat | (clmask)) == (clmask)), \
+		E_OS_CALLEVEL							  \
+		)
+#define CHECK_NOFUNC(exp)				CHECK_ERROR_ERCD(exp, E_OS_NOFUNC)
+#define CHECK_RESOURCE(exp)				CHECK_ERROR_ERCD(exp, E_OS_RESOURCE)
+#define CHECK_STATE(exp)				CHECK_ERROR_ERCD(exp, E_OS_STATE)
+#define D_CHECK_STATE(exp)				D_CHECK_ERROR_ERCD(exp, E_OS_STATE)
+#define CHECK_VALUE(exp)				CHECK_ERROR_ERCD(exp, E_OS_VALUE)
+#define CHECK_DISABLEDINT()										\
+	CHECK_ERROR_ERCD(											\
+		((callevel_stat &										\
+		  (TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT)) ==	\
+		 TSYS_NULL												\
+		),														\
+		E_OS_DISABLEDINT										\
+		)
+#define CHECK_PARAM_POINTER(p_exp)		CHECK_ERROR_ERCD(((p_exp) != NULL), OS_E_PARAM_POINTER)
+#define CHECK_ID(exp)					CHECK_ERROR_ERCD(exp, E_OS_ID)
+#define D_CHECK_ID(exp)					D_CHECK_ERROR_ERCD(exp, E_OS_ID)
+#define CHECK_IOC_ACCESS(exp)			CHECK_ERROR_ERCD(exp, IOC_E_NOK)
+#define CHECK_IOC_CALLEVEL_DISABLEDINT(clmask)	  \
+	CHECK_ERROR_ERCD(							  \
+		((callevel_stat | (clmask)) == (clmask)), \
+		IOC_E_NOK								  \
+		)
+#define CHECK_SERVICEID(exp)			CHECK_ERROR_ERCD(exp, E_OS_SERVICEID)
+#define CHECK_RIGHT(btmp)														   \
+	CHECK_ERROR_ERCD(															   \
+		(run_trusted != FALSE) || ((p_runosap->p_osapinib->btptn & (btmp)) != 0U), \
+		E_OS_ACCESS																   \
+		)
+#define CHECK_ILLEGAL_ADDRESS(exp)		CHECK_ERROR_ERCD(exp, E_OS_ILLEGAL_ADDRESS)
+#define CHECK_MEM_WRITE(p_var, type)	CHECK_ERROR_ERCD((PROBE_MEM_WRITE(p_var, type) != FALSE), E_OS_ILLEGAL_ADDRESS)
+#define CHECK_MEM_RW(p_var, type)		CHECK_ERROR_ERCD((PROBE_MEM_RW(p_var, type) != FALSE), E_OS_ILLEGAL_ADDRESS)
+#define CHECK_NO_ERCD(exp)				CHECK_ERROR_NO_ERCD(exp)
+#define CHECK_IOC_MEM_READ(p_var, size, alignsz) {			\
+		if ((probe_memory_read(p_var, size) == FALSE) ||	\
+			(((uintptr) (p_var) & (alignsz - 1U)) != 0U)) {	\
+			ercd = E_OS_SYS_ASSERT_FATAL;					\
+			goto exit_no_errorhook;							\
+		}													\
+}
+#define CHECK_IOC_MEM_WRITE(p_var, size, alignsz) {			\
+		if ((probe_memory_write(p_var, size) == FALSE) ||	\
+			(((uintptr) (p_var) & (alignsz - 1U)) != 0U)) {	\
+			ercd = E_OS_SYS_ASSERT_FATAL;					\
+			goto exit_no_errorhook;							\
+		}													\
+}
+
+#endif /* TOPPERS_CHECK_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/counter.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/counter.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/counter.c	(revision 172)
@@ -0,0 +1,509 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: counter.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã«ã¦ã³ã¿å¶å¾¡ã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "task.h"
+#include "counter.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_INCCNT_ENTER
+#define LOG_INCCNT_ENTER(cntid)
+#endif /* LOG_INCCNT_ENTER */
+
+#ifndef LOG_INCCNT_LEAVE
+#define LOG_INCCNT_LEAVE(ercd)
+#endif /* LOG_INCCNT_LEAVE */
+
+#ifndef LOG_GETCNT_ENTER
+#define LOG_GETCNT_ENTER(cntid, p_val)
+#endif /* LOG_GETCNT_ENTER */
+
+#ifndef LOG_GETCNT_LEAVE
+#define LOG_GETCNT_LEAVE(ercd, val)
+#endif /* LOG_GETCNT_LEAVE */
+
+#ifndef LOG_GETECT_ENTER
+#define LOG_GETECT_ENTER(cntid, val, p_eval)
+#endif /* LOG_GETECT_ENTER */
+
+#ifndef LOG_GETECT_LEAVE
+#define LOG_GETECT_LEAVE(ercd, val, eval)
+#endif /* LOG_GETECT_LEAVE */
+
+/*
+ *  ã«ã¦ã³ã¿æºäºã­ã¥ã¼ã¸ã®æ¿å
+¥
+ */
+#ifdef TOPPERS_insert_cnt_expr_que
+
+void
+insert_cnt_expr_que(CNTEXPINFO *p_cntexpinfo, CNTCB *p_cntcb)
+{
+	TickType	enqval, curval;
+	QUEUE		*next;
+	CounterType cntid;
+
+	enqval = p_cntexpinfo->expiretick;
+
+	/*
+	 *  ã«ã¦ã³ã¿æºäºã­ã¥ã¼ã¸ã®æ¿å
+¥ä½ç½®ãæ±ºå®ããããã®åºæºç¹
+	 *
+	 *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®å ´åï¼ã«ã¦ã³ã¿æºäºã­ã¥ã¼ã¸ã®æ¿å
+¥ä½ç½®ãæ±ºããåºæºç¹ã¯
+	 *  æºäºå¦çæã«æ´æ°ãã¦ããå¤ãä½¿ç¨ãï¼ãã¼ãã¦ã§ã¢ããç¾å¨å¤ãåå¾ã¯ããªã
+	 *  (ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ä¸ã®ãã£ãã¯å¤ã¯æºäºãã¦ãããï¼ã¾ã æºäºå¦çãå®è¡ãã¦
+	 *  ããªãå ´åã«ï¼æ¿å
+¥å ´æã®åºæºãããã¦ãã¾ããã)
+	 */
+	curval = p_cntcb->curval;
+
+	/* æ¿å
+¥å ´æã®ãµã¼ã */
+	next = p_cntcb->cntexpque.p_next;
+
+	if (curval < enqval) {
+		/* ã«ã¦ã³ã¿ã®ãªã¼ãã¼ãã­ã¼ãèµ·ãããªãå ´å */
+		while ((next != &(p_cntcb->cntexpque)) &&
+			   (curval <= ((CNTEXPINFO *) next)->expiretick) &&
+			   (((CNTEXPINFO *) next)->expiretick <= enqval)) {
+			next = next->p_next;
+		}
+	}
+	else {
+		/* ã«ã¦ã³ã¿ã®ãªã¼ãã¼ãã­ã¼ãèµ·ããå ´å */
+		while ((next != &(p_cntcb->cntexpque)) &&
+			   ((curval <= ((CNTEXPINFO *) next)->expiretick)
+				|| (((CNTEXPINFO *) next)->expiretick <= enqval))) {
+			next = next->p_next;
+		}
+	}
+
+	queue_insert_prev(next, &(p_cntexpinfo->cntexpque));
+
+	/*
+	 *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãã¤å
+é ­ã«æ¿å
+¥ããå ´å,ååº¦ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã«
+	 *  æºäºæéãè¨­å®ãç´ãå¿
+è¦ããã
+	 */
+	cntid = CNTID(p_cntcb);
+	if (is_hwcnt(cntid) && (p_cntcb->cntexpque.p_next == &(p_cntexpinfo->cntexpque))) {
+
+		/* ç¾å¨è¨­å®ããã¦ããæå»ãã­ã£ã³ã»ã« */
+		(hwcntinib_table[cntid].cancel)();
+
+		/* å
+é ­ã«æ¿å
+¥ããæå»ã«åè¨­å® */
+		(hwcntinib_table[cntid].set)(enqval);
+		p_cntcb->hwset = TRUE;
+
+		/*
+		 *  åè¨­å®ä¸­ã«æ¬¡ã®æºäºæéãéãã¦ãã¾ã£ãããã§ãã¯
+		 *
+		 *  éãã¦ãã¾ã£ãå ´å, å¼·å¶å²è¾¼ã¿ã«ããæºäºå¦çãå®è¡ãã
+		 *  ã¾ãsetããæéã¨getããæéãåãã§ãã£ãå ´å,
+		 *  ãã¼ãã¦ã§ã¢ã§åããã¼ãã¦ããã¨æ³å®ã, å¼·å¶å²è¾¼ã¿ãçºçããã
+		 *  ãã¼ãã¦ã§ã¢ã§åããã¼ãã¦ããªãå ´åã«å¼·å¶å²è¾¼ã¿ãèµ·ããã¦ãåé¡ãªã
+		 */
+		if (diff_tick((hwcntinib_table[cntid].get)(), enqval,
+					  p_cntcb->p_cntinib->maxval2) <= p_cntcb->p_cntinib->maxval) {
+			/* ç¾å¨è¨­å®ããã¦ããæå»ãã­ã£ã³ã»ã« */
+			(hwcntinib_table[cntid].cancel)();
+			/* å¼·å¶å²è¾¼ã¿ãçºçããã */
+			(hwcntinib_table[cntid].trigger)();
+		}
+	}
+}
+
+#endif /* TOPPERS_insert_cnt_expr_que */
+
+/*
+ *  ã«ã¦ã³ã¿æºäºã­ã¥ã¼ããåé¤
+ */
+#ifdef TOPPERS_delete_cnt_expr_que
+
+void
+delete_cnt_expr_que(CNTEXPINFO *p_cntexpinfo, CNTCB *p_cntcb)
+{
+	CounterType cntid;
+	QUEUE		*p_cntexpque;
+
+	/* ã«ã¦ã³ã¿ã­ã¥ã¼ããæºäºå¦çãåé¤ããåã®å
+é ­ã­ã¥ã¼ä¿æ */
+	p_cntexpque = p_cntcb->cntexpque.p_next;
+
+	queue_delete(&(p_cntexpinfo->cntexpque));
+	queue_initialize(&(p_cntexpinfo->cntexpque));
+
+	/*
+	 *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãã¤åé¤ããæºäºå¦çã¯ã«ã¦ã³ã¿æºäºã®
+	 *  å
+é ­ã®å ´åï¼ã¿ã¤ããã­ã£ã³ã»ã«ãã
+	 */
+	cntid = CNTID(p_cntcb);
+	if (is_hwcnt(cntid) && (p_cntcb->cntexpque.p_next != p_cntexpque)) {
+
+		/* ç¾å¨è¨­å®ããã¦ããæå»ãã­ã£ã³ã»ã« */
+		(hwcntinib_table[cntid].cancel)();
+
+		/* ãã³ãã£ã³ã°ä¸­ã®å²è¾¼ã¿è¦æ±ãã­ã£ã³ã»ã« */
+		(hwcntinib_table[cntid].intcancel)();
+
+		/*
+		 *  p_cntexpinfoã§æå®ãããæºäºå¦çåé¤å¾ï¼ã«ã¦ã³ã¿æºäºæ¬¡ã®
+		 *  æºäºå¦çã®æºäºç¹ãè¨­å®ãã
+		 */
+		if (queue_empty(&(p_cntcb->cntexpque)) == FALSE) {
+
+			/* å
+é ­ã«æ¿å
+¥ããæå»ã«åè¨­å® */
+			(hwcntinib_table[cntid].set)(((CNTEXPINFO *) p_cntcb->cntexpque.p_next)->expiretick);
+			p_cntcb->hwset = TRUE;
+
+			/*
+			 *  åè¨­å®ä¸­ã«æ¬¡ã®æºäºæéãéãã¦ãã¾ã£ãããã§ãã¯
+			 *
+			 *  éãã¦ãã¾ã£ãå ´å, å¼·å¶å²è¾¼ã¿ã«ããæºäºå¦çãå®è¡ãã
+			 *  ã¾ãsetããæéã¨getããæéãåãã§ãã£ãå ´å,
+			 *  ãã¼ãã¦ã§ã¢ã§åããã¼ãã¦ããã¨æ³å®ã, å¼·å¶å²è¾¼ã¿ãçºçããã
+			 *  ãã¼ãã¦ã§ã¢ã§åããã¼ãã¦ããªãå ´åã«å¼·å¶å²è¾¼ã¿ãèµ·ããã¦ãåé¡ãªã
+			 */
+			if (diff_tick((hwcntinib_table[cntid].get)(),
+						  ((CNTEXPINFO *) p_cntcb->cntexpque.p_next)->expiretick,
+						  p_cntcb->p_cntinib->maxval2) <= p_cntcb->p_cntinib->maxval) {
+				/* ç¾å¨è¨­å®ããã¦ããæå»ãã­ã£ã³ã»ã« */
+				(hwcntinib_table[cntid].cancel)();
+				/* å¼·å¶å²è¾¼ã¿ãçºçããã */
+				(hwcntinib_table[cntid].trigger)();
+			}
+		}
+	}
+
+}
+
+#endif /* TOPPERS_delete_cnt_expr_que */
+
+/*
+ *  ã«ã¦ã³ã¿æ©è½ã®åæå
+ */
+#ifdef TOPPERS_counter_initialize
+
+void
+counter_initialize(void)
+{
+	CounterType	i;
+	CNTCB		*p_cntcb;
+
+	for (i = 0U; i < tnum_counter; i++) {
+		p_cntcb = &(cntcb_table[i]);
+		p_cntcb->p_cntinib = &(cntinib_table[i]);
+		p_cntcb->curval = 0U;
+		p_cntcb->p_prevcntcb = NULL;
+		queue_initialize(&(p_cntcb->cntexpque));
+		p_cntcb->cstat = CS_NULL;
+	}
+
+	for (i = 0U; i < tnum_hardcounter; i++) {
+		(hwcntinib_table[i].init)(cntinib_table[i].maxval2,
+								  hwcntinib_table[i].nspertick);
+		(hwcntinib_table[i].start)();
+	}
+
+}
+
+#endif /* TOPPERS_counter_initialize */
+
+/*
+ *  ã«ã¦ã³ã¿æ©è½ã®çµäºå¦ç
+ */
+#ifdef TOPPERS_counter_terminate
+
+void
+counter_terminate(void)
+{
+	CounterType i;
+
+	for (i = 0U; i < tnum_hardcounter; i++) {
+		(hwcntinib_table[i].stop)();
+	}
+}
+
+#endif /* TOPPERS_counter_terminate */
+
+/*
+ *  æå®ããç¸å¯¾æéããã®ã«ã¦ã³ã¿å¤åå¾(APIããã®åå¾)
+ *
+ *  æå®ããã«ã¦ã³ã¿ã®ç¾å¨å¤ã¨, æ¸¡ãããç¸å¯¾å¤ãè¶³ããã¿æ´æ°å¤ã
+ *  æ»ãå¤ã¨ãã¦è¿ã
+ */
+#ifdef TOPPERS_get_reltick
+
+TickType
+get_reltick(const CNTCB *p_cntcb, TickType relval)
+{
+	CounterType	cntid;
+	TickType	result;
+	TickType	curval;
+
+	cntid = CNTID(p_cntcb);
+
+	curval = get_curval(p_cntcb, cntid);
+
+	/* ç¾å¨æéããæå®ããããªãã»ããåéããæéãç®åºãã */
+	result = add_tick(curval, relval, p_cntcb->p_cntinib->maxval2);
+
+	return(result);
+}
+
+#endif /* TOPPERS_get_reltick */
+
+/*
+ *  æå®ããçµ¶å¯¾æéããã®ã«ã¦ã³ã¿å¤åå¾(APIããã®åå¾)
+ *
+ *  å¼æ°ã§æ¸¡ãããçµ¶å¯¾å¤ãæå®ããã«ã¦ã³ã¿ã®ç¾å¨å¤ã«å¤æã
+ *  æ´æ°å¤ãæ»ãå¤ã¨ãã¦è¿ã
+ */
+#ifdef TOPPERS_get_abstick
+
+TickType
+get_abstick(const CNTCB *p_cntcb, TickType absval)
+{
+	CounterType	cntid;
+	TickType	result;
+	TickType	curval;
+	TickType	nextval;
+
+	cntid = CNTID(p_cntcb);
+
+	curval = get_curval(p_cntcb, cntid);
+
+	/* maxval2ãèæ
+®ããçµ¶å¯¾æéã«å¤æ */
+	nextval = absval +  p_cntcb->p_cntinib->maxval + 1U;
+
+	if (curval < (p_cntcb->p_cntinib->maxval + 1U)) {
+		/*
+		 *  ã«ã¦ã³ã¿ã®ç¾å¨å¤ã0ãmaxvalã®éã®å ´åï¼
+		 *  çµ¶å¯¾æå»ã«æªå°éãªã®ã§ï¼çµ¶å¯¾æå»ãè¿ã
+		 */
+		if (absval > curval) {
+			result = absval;
+		}
+		else {
+			result = nextval;
+		}
+	}
+	else {
+		/*
+		 *  ã«ã¦ã³ã¿ã®ç¾å¨å¤ãmaxvalãmaxval2ã®éã®å ´åï¼
+		 *  maxval2èæ
+®ããçµ¶å¯¾ãè¶
+ããã®ã§ï¼çµ¶å¯¾æå»ãè¿ã
+		 */
+		if (nextval <= curval) {
+			result = absval;
+		}
+		else {
+			result = nextval;
+		}
+	}
+
+	return(result);
+}
+
+#endif /* TOPPERS_get_abstick */
+
+/*
+ *  ã«ã¦ã³ã¿ã®æºäºå¦ç
+ */
+#ifdef TOPPERS_expire_process
+
+void
+expire_process(CNTCB *p_cntcb, CounterType cntid)
+{
+	CNTEXPINFO	*p_cntexpinfo;
+	TickType	nowval;
+
+	p_cntcb->hwset = FALSE;
+	nowval = get_curval(p_cntcb, cntid);
+
+	/*
+	 *  ã«ã¦ã³ã¿ã®æºäºå¦ç
+	 *
+	 *  ã­ã¥ã¼ãç©ºã§ãªã, ãªã¢ã«ã¿ã¤ã ãªç¾å¨æéããè¦ã¦ã­ã¥ã¼ã®å
+é ­ã®æºäº
+	 *  æéãæ¢ã«éãã¦ããã°, æºäºå¦çãå®è¡ãã
+	 *
+	 *  ãªã¢ã«ã¿ã¤ã ãªç¾å¨æéããã®é½åº¦åå¾ãããã,ã­ã¥ã¼ã®å
+é ­æºäºå¦ç
+	 *  ã®æºäºæéãåè¨­å®ããæã«ç®çã®æºäºæéãè¶
+ãã¦ãã¾ã£ã¦ãã«ãã¼
+	 *  ã§ãã
+	 */
+	while ((queue_empty(&(p_cntcb->cntexpque)) == FALSE) &&
+		   (diff_tick(nowval, ((CNTEXPINFO *) p_cntcb->cntexpque.p_next)->expiretick,
+					  p_cntcb->p_cntinib->maxval2) <= p_cntcb->p_cntinib->maxval)) {
+
+		/* ã«ã¦ã³ã¿æºäºã­ã¥ã¼ã®å
+é ­ã®æºäºå¦çãï¼ã­ã¥ã¼ããå¤ã */
+		p_cntexpinfo = (CNTEXPINFO *) p_cntcb->cntexpque.p_next;
+		queue_delete(&(p_cntexpinfo->cntexpque));
+		queue_initialize(&(p_cntexpinfo->cntexpque));
+
+		if (is_hwcnt(cntid)) {
+			/*
+			 *  ã«ã¦ã³ã¿å¤ãæºäºå¦çã®æºäºç¹ã§æ´æ°ãï¼æºäºå¦çã­ã¥ã¼ã«æºäºç¹ã
+			 *  æ¿å
+¥ããæï¼æºäºå¦çã­ã¥ã¼ã®æ¿å
+¥ä½ç½®æ¯è¼ã«ä½¿ç¨
+			 */
+			p_cntcb->curval = p_cntexpinfo->expiretick;
+
+			/*
+			 *  æ¬¡ã®æºäºç¹ã®è¨­å®
+			 *  æ¬¡ã®æºäºç¹ãå®æéãçµéãã¦ããªãå ´åè¨­å®ãã
+			 */
+			if ((queue_empty(&(p_cntcb->cntexpque)) == FALSE) && ((diff_tick((hwcntinib_table[cntid].get)(),
+																			 ((CNTEXPINFO *) p_cntcb->cntexpque.p_next)->expiretick, p_cntcb->p_cntinib->maxval2)) >
+																  p_cntcb->p_cntinib->maxval)) {
+				(hwcntinib_table[cntid].set)(((CNTEXPINFO *) p_cntcb->cntexpque.p_next)->expiretick);
+				p_cntcb->hwset = TRUE;
+			}
+		}
+
+		/* ã«ã¦ã³ã¿æºäºå¦çå¼åºã */
+		(p_cntexpinfo->expirefunc)(p_cntexpinfo, p_cntcb);
+
+		/*
+		 *  ã¿ã¹ã¯ããã®å¼ã³åºãæï¼é«åªå
+åº¦ã¿ã¹ã¯ã¬ãã£ç¶æ
+ã«ãªã£ãå ´åããã®ã§ï¼
+		 *  ãã§ãã¯ãã¦ãã£ã¹ããããã
+		 */
+		if ((p_runtsk != p_schedtsk) && (callevel_stat == TCL_TASK)) {
+			dispatch();
+		}
+
+		/*
+		 *  å²è¾¼ã¿ã¬ã¹ãã³ã¹èæ
+®ãï¼1åã®æºäºç¹å¦çå¾ã«
+		 *  1åã®å²è¾¼è¨±å¯/ç¦æ­¢ãå®æ½
+		 */
+		x_nested_unlock_os_int();
+		x_nested_lock_os_int();
+
+		nowval = get_curval(p_cntcb, cntid);
+	}
+
+	if (is_hwcnt(cntid) && (queue_empty(&(p_cntcb->cntexpque)) == FALSE) && (p_cntcb->hwset == FALSE)) {
+		(hwcntinib_table[cntid].set)(((CNTEXPINFO *) p_cntcb->cntexpque.p_next)->expiretick);
+	}
+}
+#endif /* TOPPERS_expire_process */
+
+/*
+ *  OSAPæå±ããã«ã¦ã³ã¿ã®å¼·å¶çµäº
+ */
+#ifdef TOPPERS_force_term_osap_counter
+
+void
+force_term_osap_counter(OSAPCB *p_osapcb)
+{
+	CounterType	i;
+	CNTCB		*p_cntcb;
+
+	/* ç¶æ
+ãã¯ãªã¢ãã */
+	/* ç¾å¨å¤ã0ã«åæåãã */
+	for (i = 0U; i < tnum_counter; i++) {
+		if (cntinib_table[i].p_osapcb == p_osapcb) {
+			p_cntcb = &cntcb_table[i];
+			p_cntcb->curval = 0U;
+			p_cntcb->cstat = CS_NULL;
+		}
+	}
+}
+
+#endif /* TOPPERS_force_term_osap_counter */
Index: /atk2-sc3-1.4.0-ntisr/kernel/counter.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/counter.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/counter.h	(revision 172)
@@ -0,0 +1,362 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: counter.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã«ã¦ã³ã¿æ©è½
+ */
+
+#ifndef TOPPERS_COUNTER_H
+#define TOPPERS_COUNTER_H
+
+#include "queue.h"
+
+/*
+ *  ã«ã¦ã³ã¿ç¶æ
+ã®å®ç¾©
+ *  IncrementCounterã®ãã¹ãé²æ­¢ç­
+ */
+#define CS_NULL		(FALSE)         /* éæä½ä¸­ */
+#define CS_DOING	(TRUE)          /* æä½ä¸­ */
+
+/*
+ *  ã«ã¦ã³ã¿IDããã«ã¦ã³ã¿ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define get_cntcb(cntid)	(&(cntcb_table[(cntid)]))
+
+/*
+ *  ã«ã¦ã³ã¿IDã§ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ããã§ãã¯ç¨ãã¯ã­
+ */
+#define is_hwcnt(cntid)		((cntid) < tnum_hardcounter)
+
+/*
+ *  CNTCBããã«ã¦ã³ã¿IDãåãåºãããã®ãã¯ã­
+ */
+#define CNTID(p_cntcb)	((CounterType) ((p_cntcb) - cntcb_table))
+
+/*
+ *  æºäºã¢ã¯ã·ã§ã³ã®å±æ§
+ */
+#define ACTIVATETASK		UINT_C(0x01)    /* ã¿ã¹ã¯èµ·å */
+#define SETEVENT			UINT_C(0x02)    /* ã¤ãã³ãã»ãã */
+#define CALLBACK			UINT_C(0x04)    /* ã³ã¼ã«ããã¯ */
+#define INCREMENTCOUNTER	UINT_C(0x08)    /* ã«ã¦ã³ã¿ã¤ã³ã¯ãªã¡ã³ã */
+
+/*
+ *  èªåèµ·åã®å±æ§
+ */
+#define ABSOLUTE			UINT_C(0x10)    /* çµ¶å¯¾å¤èµ·å */
+#define RELATIVE			UINT_C(0x20)    /* ç¸å¯¾å¤èµ·å */
+
+/*
+ *  åãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿å¦çé¢æ°å
+ */
+typedef void (*HardwareCounterInitRefType)(TickType maxval, TimeType nspertick);    /* åæåé¢æ°å */
+typedef void (*HardwareCounterStartRefType)(void);                                  /* éå§é¢æ°å */
+typedef void (*HardwareCounterStopRefType)(void);                                   /* åæ­¢é¢æ°å */
+typedef void (*HardwareCounterSetRefType)(TickType exprtick);                       /* æéè¨­å®é¢æ°å */
+typedef TickType (*HardwareCounterGetRefType)(void);                                /* æéåå¾é¢æ°å */
+typedef void (*HardwareCounterCancelRefType)(void);                                 /* è¨­å®æéåæ¶é¢æ°å */
+typedef void (*HardwareCounterTriggerRefType)(void);                                /* å¼·å¶å²è¾¼ã¿è¦æ±é¢æ°å */
+typedef void (*HardwareCounterIntClearRefType)(void);                               /* å²è¾¼ã¿è¦æ±ã¯ãªã¢é¢æ°å */
+typedef void (*HardwareCounterIntCancelRefType)(void);                              /* å²è¾¼ã¿è¦æ±åæ¶é¢æ°å */
+typedef void (*HardwareCounterIncrementRefType)(void);                              /* ã¤ã³ã¯ãªã¡ã³ãé¢æ°å */
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿å¦çé¢æ°å
+ */
+typedef struct hardware_counter_initialization_block {
+	HardwareCounterInitRefType		init;               /* åæåé¢æ°ãã¤ã³ã¿ */
+	HardwareCounterStartRefType		start;              /* éå§é¢æ°ãã¤ã³ã¿ */
+	HardwareCounterStopRefType		stop;               /* åæ­¢é¢æ°ãã¤ã³ã¿ */
+	HardwareCounterSetRefType		set;                /* æéè¨­å®é¢æ°ãã¤ã³ã¿ */
+	HardwareCounterGetRefType		get;                /* æéåå¾é¢æ°ãã¤ã³ã¿*/
+	HardwareCounterCancelRefType	cancel;             /* æéåæ¶é¢æ°ãã¤ã³ã¿ */
+	HardwareCounterTriggerRefType	trigger;            /* å¼·å¶å²è¾¼ã¿è¦æ±é¢æ°ãã¤ã³ã¿ */
+	HardwareCounterIntClearRefType	intclear;           /* å²è¾¼ã¿è¦æ±ã¯ãªã¢é¢æ°å */
+	HardwareCounterIntCancelRefType	intcancel;          /* å²è¾¼ã¿è¦æ±åæ¶é¢æ°å */
+	HardwareCounterIncrementRefType	increment;          /* ã¤ã³ã¯ãªã¡ã³ãé¢æ°ãã¤ã³ã¿ */
+	TimeType						nspertick;          /* ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã§ã®1ãã£ãã¯ã®éã¿(nsåä½) */
+} HWCNTINIB;
+
+/*
+ *  ã«ã¦ã³ã¿åæåãã­ãã¯
+ */
+typedef struct counter_initialization_block {
+	TickType	maxval;                                 /* ã«ã¦ã³ã¿ã®æå¤§å¤ */
+	TickType	maxval2;                                /* ã«ã¦ã³ã¿ã®æå¤§å¤ã®2å+1 */
+	TickType	tickbase;                               /* OSå
+é¨ã§ã¯ä½¿ç¨ããï¼ã¦ã¼ã¶ãèªç±ã«ä½¿ç¨ããå¤ */
+	TickType	mincyc;                                 /* å¨æã®æå°å¤ */
+	OSAPCB		*p_osapcb;                              /* æå±ããOSã¢ããªã±ã¼ã·ã§ã³ã®ç®¡çãã­ãã¯ */
+	uint32		acsbtmp;                                /* ã¢ã¯ã»ã¹è¨±å¯OSã¢ããªã±ã¼ã·ã§ã³ ãããããã */
+} CNTINIB;
+
+/*
+ *  ã«ã¦ã³ã¿ç®¡çãã­ãã¯
+ */
+typedef struct counter_control_block {
+	QUEUE							cntexpque;          /* ã«ã¦ã³ã¿æºäºã­ã¥ã¼ */
+	const CNTINIB					*p_cntinib;         /* ã«ã¦ã³ã¿åæåãã­ãã¯ãã¤ã³ã¿ */
+	TickType						curval;             /* ã«ã¦ã³ã¿ã®ç¾å¨ãã£ãã¯ */
+	struct counter_control_block	*p_prevcntcb;       /* åã«ç²å¾ããã«ã¦ã³ã¿ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	boolean							cstat;              /* ã«ã¦ã³ã¿æä½ä¸­ãã©ã° */
+	boolean							hwset;              /* ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã»ãããã©ã° */
+} CNTCB;
+
+/*
+ *  ã«ã¦ã³ã¿æºäºæ
+å ±
+ */
+typedef struct counter_expire_info CNTEXPINFO;
+
+/*
+ *  æºäºå¦çé¢æ°å
+ */
+typedef void (*EXPFP)(CNTEXPINFO *p_cntexpinfo, const CNTCB *p_cntcb);
+
+/*
+ *  ã«ã¦ã³ã¿æºäºæ
+å ±
+ */
+struct counter_expire_info {
+	QUEUE		cntexpque;                              /* ã«ã¦ã³ã¿æºäºã­ã¥ã¼(æ§é ä½ã®å
+é ­ã«å
+¥ãå¿
+è¦) */
+	TickType	expiretick;                             /* æºäºããã«ã¦ã³ã¿ä¸ã®ãã£ãã¯å¤ */
+	EXPFP		expirefunc;                             /* æºäºå¦çé¢æ°ãã¤ã³ã¿ */
+};
+
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿æ°ãä¿æããå¤æ°ã®å®£è¨ï¼Os_Lcfg.cï¼
+ */
+extern const CounterType	tnum_hardcounter;
+
+/*
+ *  ã«ã¦ã³ã¿æ°ãä¿æããå¤æ°ã®å®£è¨ï¼Os_Lcfg.cï¼
+ */
+extern const CounterType	tnum_counter;
+
+/*
+ *  ã«ã¦ã³ã¿åæåãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern const CNTINIB		cntinib_table[];
+
+/*
+ *  ã«ã¦ã³ã¿ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern CNTCB				cntcb_table[];
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿å¦çé¢æ°ãã¼ãã«ï¼Os_Lcfg.cï¼
+ */
+extern const HWCNTINIB		hwcntinib_table[];
+
+/*
+ *  ãã£ãã¯å¤ã®å ç®
+ */
+LOCAL_INLINE TickType
+add_tick(TickType val, TickType incr, TickType maxval2)
+{
+	TickType result;
+	/*
+	 *  ç´ ç´ãªæ¡ä»¶å¼ã¯ val + incr <= maxval2 ã§ãããï¼ãã®æ¡ä»¶å¼ã§
+	 *  ã¯ï¼val + incr ã TickType ã§è¡¨ããç¯å²ãè¶
+ããå ´åã«æ­£ãã
+	 *  å¤å®ã§ããªããªãããï¼æ¬¡ã®æ¡ä»¶å¼ã¨ãã¦ãã
+	 */
+	if (incr <= (maxval2 - val)) {
+		result = val + incr;
+	}
+	else {
+		/*
+		 *  ä¸ã®è¨ç®å¼ã§ï¼val + incr ã¨ maxval2 + 1 ã TickType ã§è¡¨
+		 *  ããç¯å²ãè¶
+ããå ´åããããï¼ãªã¼ããã­ã¼ãã¦ãæ±ã¾ãå¤ã¯
+		 *  æ­£ããããå·®ãæ¯ããªã
+		 */
+		result = (val + incr) - (maxval2 + 1U);
+	}
+	return(result);
+}
+
+/*
+ *  ãã£ãã¯å¤ã®å·®
+ */
+LOCAL_INLINE TickType
+diff_tick(TickType val1, TickType val2, TickType maxval2)
+{
+	TickType result;
+
+	if (val1 >= val2) {
+		result = val1 - val2;
+	}
+	else {
+		/*
+		 *  ä¸ã®è¨ç®å¼ã§ï¼val1 - val2 ã¨ maxval2 + 1 ã TickType ã§è¡¨ã
+		 *  ãç¯å²ãè¶
+ããå ´åããããï¼ãªã¼ããã­ã¼ãã¦ãæ±ã¾ãå¤ã¯æ­£
+		 *  ããããå·®ãæ¯ããªã
+		 */
+		result = (val1 - val2) + (maxval2 + 1U);
+	}
+	return(result);
+}
+
+/*
+ *  ã«ã¦ã³ã¿ã®ç¾å¨å¤åå¾
+ *  ã½ããã¦ã§ã¢ã«ã¦ã³ã¿ã®å ´å, CNTCBã®curvalãã¼ã¿ãè¿ã
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®å ´å, ææ°ã®ç¾å¨æéãè¿ã
+ */
+LOCAL_INLINE TickType
+get_curval(const CNTCB *p_cntcb, CounterType cntid)
+{
+	TickType curval;
+
+	/* ã«ã¦ã³ã¿å¤ã®åå¾ */
+	if (is_hwcnt(cntid)) {
+		curval = (hwcntinib_table[cntid].get)();
+	}
+	else {
+		curval = p_cntcb->curval;
+	}
+
+	return(curval);
+}
+
+/*
+ *  æå®ããç¸å¯¾æéããã®ã«ã¦ã³ã¿å¤åå¾(APIããã®åå¾)
+ */
+extern TickType get_reltick(const CNTCB *p_cntcb, TickType relval);
+
+/*
+ *  æå®ããçµ¶å¯¾æéããã®ã«ã¦ã³ã¿å¤åå¾(APIããã®åå¾)
+ */
+extern TickType get_abstick(const CNTCB *p_cntcb, TickType absval);
+
+/*
+ *  ã«ã¦ã³ã¿æ©è½ã®åæå
+ */
+extern void counter_initialize(void);
+
+/*
+ *  ã«ã¦ã³ã¿æ©è½ã®çµäºå¦ç
+ */
+extern void counter_terminate(void);
+
+/*
+ *  ã«ã¦ã³ã¿æºäºã­ã¥ã¼ã¸ã®æ¿å
+¥
+ */
+extern void insert_cnt_expr_que(CNTEXPINFO *p_cntexpinfo, CNTCB *p_cntcb);
+
+/*
+ *  ã«ã¦ã³ã¿æºäºã­ã¥ã¼ããåé¤
+ */
+extern void delete_cnt_expr_que(CNTEXPINFO *p_cntexpinfo, CNTCB *p_cntcb);
+
+/*
+ *  ã«ã¦ã³ã¿ã®æºäºå¦ç
+ */
+extern void expire_process(CNTCB *p_cntcb, CounterType cntid);
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿æºäºå¦ç
+ */
+extern void notify_hardware_counter(CounterType cntid);
+
+/*
+ *  ã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+ *
+ *  æ¡ä»¶ï¼å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+ */
+extern StatusType incr_counter_process(CNTCB *p_cntcb, CounterType CounterID);
+
+/*
+ *  ã¢ã©ã¼ã æºäºã«ããã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+ *
+ *  æ¡ä»¶ï¼å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+ */
+extern StatusType incr_counter_action(OSAPCB *p_expire_osapcb, CounterType CounterID);
+
+/*
+ *  OSAPæå±ããã«ã¦ã³ã¿ã®å¼·å¶çµäº
+ */
+extern void force_term_osap_counter(OSAPCB *p_osapcb);
+
+#endif /* TOPPERS_COUNTER_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/counter_manage.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/counter_manage.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/counter_manage.c	(revision 172)
@@ -0,0 +1,435 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: counter_manage.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã«ã¦ã³ã¿ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "counter.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_INCCNT_ENTER
+#define LOG_INCCNT_ENTER(cntid)
+#endif /* LOG_INCCNT_ENTER */
+
+#ifndef LOG_INCCNT_LEAVE
+#define LOG_INCCNT_LEAVE(ercd)
+#endif /* LOG_INCCNT_LEAVE */
+
+#ifndef LOG_GETCNT_ENTER
+#define LOG_GETCNT_ENTER(cntid)
+#endif /* LOG_GETCNT_ENTER */
+
+#ifndef LOG_GETCNT_LEAVE
+#define LOG_GETCNT_LEAVE(ercd, p_val)
+#endif /* LOG_GETCNT_LEAVE */
+
+#ifndef LOG_GETEPS_ENTER
+#define LOG_GETEPS_ENTER(cntid, p_val)
+#endif /* LOG_GETEPS_ENTER */
+
+#ifndef LOG_GETEPS_LEAVE
+#define LOG_GETEPS_LEAVE(ercd, p_val, p_eval)
+#endif /* LOG_GETEPS_LEAVE */
+
+/*
+ *  ã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+ */
+#ifdef TOPPERS_IncrementCounter
+
+StatusType
+IncrementCounter(CounterType CounterID)
+{
+	StatusType	ercd = E_OK;
+	CNTCB		*p_cntcb;
+	OSAPCB		*p_osapcb;
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_INCREMENTCOUNTER);
+	CHECK_ID(CounterID < tnum_counter);
+	CHECK_ID(CounterID >= tnum_hardcounter);
+
+	p_cntcb = get_cntcb(CounterID);
+	CHECK_RIGHT(p_cntcb->p_cntinib->acsbtmp);
+
+	p_osapcb = p_cntcb->p_cntinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* ã«ã¦ã³ã¿æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	/*
+	 *  ã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+	 *  ã¨ã©ã¼ã®å ´åã¯incr_counter_processã§ã¨ã©ã¼ããã¯å¼ã³åºãã¦ããã®ã§ï¼
+	 *  ããã§ã¯ï¼ã¨ã©ã¼ããã¯ãå¼ã³åºããªã
+	 */
+	ercd = incr_counter_process(p_cntcb, CounterID);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.cntid = CounterID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_IncrementCounter);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_IncrementCounter */
+
+/*
+ *  ã«ã¦ã³ã¿å¤ã®åç
+§
+ */
+#ifdef TOPPERS_GetCounterValue
+
+StatusType
+GetCounterValue(CounterType CounterID, TickRefType Value)
+{
+	StatusType	ercd = E_OK;
+	CNTCB		*p_cntcb;
+	TickType	curval;
+	OSAPCB		*p_osapcb;
+
+	LOG_GETCNT_ENTER(CounterID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_GETCOUNTERVALUE);
+	CHECK_ID(CounterID < tnum_counter);
+	CHECK_PARAM_POINTER(Value);
+	CHECK_MEM_WRITE(Value, TickType);
+	p_cntcb = get_cntcb(CounterID);
+	CHECK_RIGHT(p_cntcb->p_cntinib->acsbtmp);
+
+	/*
+	 *  å
+é¨å¦çã®ããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³è¨­å®å¤ã®ï¼åï¼ï¼ã¾ã§ã«ã¦ã³ã
+	 *  ã¢ããããã®ã§ã«ã¦ã³ã¿å¤ãè¨­å®å¤ãããå¤§ããå ´åã¯è¨­å®å¤ãæ¸ç®ãã
+	 *
+	 *  *Value ãç´æ¥æä½ãã¦ãããã,å±æå¤æ°ãã¬ã¸ã¹ã¿ã«å²å½ã¦ããããã¨
+	 *  ã«ããéåº¦ãæå¾
+ãã¦ãã
+	 */
+	p_osapcb = p_cntcb->p_cntinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* ã«ã¦ã³ã¿æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	curval = get_curval(p_cntcb, CounterID);
+	x_nested_unlock_os_int();
+
+	if (curval > p_cntcb->p_cntinib->maxval) {
+		curval -= (p_cntcb->p_cntinib->maxval + 1U);
+	}
+	*Value = curval;
+
+  exit_no_errorhook:
+	LOG_GETCNT_LEAVE(ercd, Value);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.cntid = CounterID;
+	_errorhook_par2.p_val = Value;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetCounterValue);
+#endif /* CFG_USE_ERRORHOOK */
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+}
+
+#endif /* TOPPERS_GetCounterValue */
+
+/*
+ *  çµéã«ã¦ã³ã¿å¤ã®åç
+§
+ */
+#ifdef TOPPERS_GetElapsedValue
+
+StatusType
+GetElapsedValue(CounterType CounterID, TickRefType Value, TickRefType ElapsedValue)
+{
+	StatusType	ercd = E_OK;
+	CNTCB		*p_cntcb;
+	TickType	curval;
+	OSAPCB		*p_osapcb;
+
+	LOG_GETEPS_ENTER(CounterID, Value);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_GETELAPSEDVALUE);
+	CHECK_ID(CounterID < tnum_counter);
+	CHECK_PARAM_POINTER(Value);
+	CHECK_PARAM_POINTER(ElapsedValue);
+	CHECK_MEM_RW(Value,  TickType);
+	CHECK_MEM_WRITE(ElapsedValue, TickType);
+	p_cntcb = get_cntcb(CounterID);
+	CHECK_RIGHT(p_cntcb->p_cntinib->acsbtmp);
+
+	CHECK_VALUE(*Value <= p_cntcb->p_cntinib->maxval);
+
+	/*
+	 *  å
+é¨å¦çã®ããï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³è¨­å®å¤ã®ï¼åï¼ï¼ã¾ã§ã«ã¦ã³ã
+	 *  ã¢ããããã®ã§ã«ã¦ã³ã¿å¤ãè¨­å®å¤ãããå¤§ããå ´åã¯è¨­å®å¤ãæ¸ç®ãã
+	 */
+	p_osapcb = p_cntcb->p_cntinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* ã«ã¦ã³ã¿æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	curval = get_curval(p_cntcb, CounterID);
+	x_nested_unlock_os_int();
+
+	if (curval > p_cntcb->p_cntinib->maxval) {
+		curval -= (p_cntcb->p_cntinib->maxval + 1U);
+	}
+	*ElapsedValue = diff_tick(curval, *Value, p_cntcb->p_cntinib->maxval);
+	*Value = curval;
+
+  exit_no_errorhook:
+	LOG_GETEPS_LEAVE(ercd, Value, ElapsedValue);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.cntid = CounterID;
+	_errorhook_par2.p_val = Value;
+	_errorhook_par3.p_eval = ElapsedValue;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetElapsedValue);
+#endif /* CFG_USE_ERRORHOOK */
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+}
+
+#endif /* TOPPERS_GetElapsedValue */
+
+/*
+ *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿æºäºå¦ç
+ *
+ *  å²è¾¼ã¿ã«ã¼ãã³ããå®è¡ããã
+ */
+#ifdef TOPPERS_notify_hardware_counter
+
+void
+notify_hardware_counter(CounterType cntid)
+{
+	CNTCB *p_cntcb;
+
+	p_cntcb = get_cntcb(cntid);
+
+	/* ã«ã¦ã³ã¿æºäºå¦çä¸­ã¯OSå²è¾¼ã¿ãç¦æ­¢ */
+	x_nested_lock_os_int();
+
+	/*
+	 *  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã«å¯¾å¿ããC2ISRãèµ·åããéã«ï¼
+	 *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢å¦çãå®è¡ãã
+	 */
+	(hwcntinib_table[cntid].intclear)();
+
+	expire_process(p_cntcb, cntid);
+
+	x_nested_unlock_os_int();
+}
+
+#endif /* TOPPERS_notify_hardware_counter */
+
+/*
+ *  ã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+ *
+ *  æ¡ä»¶ï¼å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+ */
+#ifdef TOPPERS_incr_counter_process
+
+StatusType
+incr_counter_process(CNTCB *p_cntcb, CounterType CounterID)
+{
+	StatusType	ercd = E_OK;
+	TickType	newval;
+
+	LOG_INCCNT_ENTER(CounterID);
+
+	/*
+	 *  ã«ã¦ã³ã¿ãæä½ä¸­(IncrementCounterã®ãã¹ãï¼ã®å ´åã¨ã©ã¼
+	 *  â»ç¬èªä»æ§
+	 */
+	D_CHECK_STATE(p_cntcb->cstat == CS_NULL);
+
+	p_cntcb->cstat = CS_DOING;
+
+	newval = add_tick(p_cntcb->curval, 1U, p_cntcb->p_cntinib->maxval2);
+
+	p_cntcb->curval = newval;
+
+	if (p_runisr == NULL) {
+		p_cntcb->p_prevcntcb = p_runtsk->p_lastcntcb;
+		p_runtsk->p_lastcntcb = p_cntcb;
+	}
+	else {
+		p_cntcb->p_prevcntcb = p_runisr->p_lastcntcb;
+		p_runisr->p_lastcntcb = p_cntcb->p_prevcntcb;
+    }
+
+	expire_process(p_cntcb, CounterID);
+
+	if (p_runisr == NULL) {
+		p_runtsk->p_lastcntcb = p_cntcb->p_prevcntcb;
+	}
+	else {
+		p_runisr->p_lastcntcb = p_cntcb->p_prevcntcb;
+    }
+
+	p_cntcb->cstat = CS_NULL;
+
+  d_exit_no_errorhook:
+	LOG_INCCNT_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.cntid = CounterID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_IncrementCounter);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_incr_counter_process */
+
+/*
+ *  ã¢ã©ã¼ã æºäºã«ããã«ã¦ã³ã¿ã®ã¤ã³ã¯ãªã¡ã³ã
+ *
+ *  æ¡ä»¶ï¼å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+ */
+#ifdef TOPPERS_incr_counter_action
+
+StatusType
+incr_counter_action(OSAPCB *p_expire_osapcb, CounterType CounterID)
+{
+	StatusType	ercd = E_OK;
+	CNTCB		*p_cntcb;
+	OSAPCB		*p_osapcb;
+
+	p_cntcb = get_cntcb(CounterID);
+	p_osapcb = p_cntcb->p_cntinib->p_osapcb;
+	/* æºäºç¹æå±ã®OSAPåã³ã¤ã³ã¯ãªã¡ã³ãã«ã¦ã³ã¿æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) || (p_expire_osapcb == p_osapcb));
+
+	ercd = incr_counter_process(p_cntcb, CounterID);
+
+  d_exit_no_errorhook:
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.cntid = CounterID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_IncrementCounter);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_incr_counter_action */
Index: /atk2-sc3-1.4.0-ntisr/kernel/event.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/event.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/event.c	(revision 172)
@@ -0,0 +1,369 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: event.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¤ãã³ãç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_TSKSTAT
+#define LOG_TSKSTAT(p_tcb)
+#endif /* LOG_TSKSTAT */
+
+#ifndef LOG_SETEVT_ENTER
+#define LOG_SETEVT_ENTER(tskid, mask)
+#endif /* LOG_SETEVT_ENTER */
+
+#ifndef LOG_SETEVT_LEAVE
+#define LOG_SETEVT_LEAVE(ercd)
+#endif /* LOG_SETEVT_LEAVE */
+
+#ifndef LOG_CLREVT_ENTER
+#define LOG_CLREVT_ENTER(p_runtsk, mask)
+#endif /* LOG_CLREVT_ENTER */
+
+#ifndef LOG_CLREVT_LEAVE
+#define LOG_CLREVT_LEAVE(ercd)
+#endif /* LOG_CLREVT_LEAVE */
+
+#ifndef LOG_GETEVT_ENTER
+#define LOG_GETEVT_ENTER(tskid)
+#endif /* LOG_GETEVT_ENTER */
+
+#ifndef LOG_GETEVT_LEAVE
+#define LOG_GETEVT_LEAVE(ercd, tskid, p_mask)
+#endif /* LOG_GETEVT_LEAVE */
+
+#ifndef LOG_WAIEVT_ENTER
+#define LOG_WAIEVT_ENTER(p_runtsk, mask)
+#endif /* LOG_WAIEVT_ENTER */
+
+#ifndef LOG_WAIEVT_LEAVE
+#define LOG_WAIEVT_LEAVE(ercd)
+#endif /* LOG_WAIEVT_LEAVE */
+
+/*
+ *  ã¤ãã³ãã®ã»ãã
+ */
+#ifdef TOPPERS_SetEvent
+
+StatusType
+SetEvent(TaskType TaskID, EventMaskType Mask)
+{
+	StatusType	ercd = E_OK;
+	TCB			*p_tcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_SETEVT_ENTER(TaskID, Mask);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_SETEVENT);
+	CHECK_ID(TaskID < tnum_task);
+	CHECK_ACCESS(TaskID < tnum_exttask);
+	p_tcb = get_tcb(TaskID);
+	CHECK_RIGHT(p_tcb->p_tinib->acsbtmp);
+
+	p_osapcb = p_tcb->p_tinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* ã¿ã¹ã¯æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+	D_CHECK_STATE(p_tcb->tstat != SUSPENDED);
+
+	p_tcb->curevt |= Mask;
+	if ((p_tcb->curevt & p_tcb->waievt) != EVTMASK_NONE) {
+		p_tcb->waievt = EVTMASK_NONE;
+		if ((make_runnable(p_tcb) != FALSE) && (callevel_stat == TCL_TASK)) {
+			dispatch();
+		}
+	}
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_SETEVT_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+	_errorhook_par2.mask = Mask;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_SetEvent);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_SetEvent */
+
+/*
+ *  ã¤ãã³ãã®ã¯ãªã¢
+ */
+#ifdef TOPPERS_ClearEvent
+
+StatusType
+ClearEvent(EventMaskType Mask)
+{
+	StatusType ercd = E_OK;
+
+	LOG_CLREVT_ENTER(p_runtsk, Mask);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CLEAREVENT);
+	CHECK_ACCESS(TSKID(p_runtsk) < tnum_exttask);
+
+	x_nested_lock_os_int();
+	p_runtsk->curevt &= ~Mask;
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_CLREVT_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.mask = Mask;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_ClearEvent);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_ClearEvent */
+
+/*
+ *  ã¤ãã³ãã®ç¶æ
+åç
+§
+ */
+#ifdef TOPPERS_GetEvent
+
+StatusType
+GetEvent(TaskType TaskID, EventMaskRefType Event)
+{
+	StatusType	ercd = E_OK;
+	TCB			*p_tcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_GETEVT_ENTER(TaskID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_GETEVENT);
+	CHECK_ID(TaskID < tnum_task);
+	CHECK_ACCESS(TaskID < tnum_exttask);
+	CHECK_PARAM_POINTER(Event);
+	CHECK_MEM_WRITE(Event, EventMaskType);
+	p_tcb = get_tcb(TaskID);
+	CHECK_RIGHT(p_tcb->p_tinib->acsbtmp);
+
+	p_osapcb = p_tcb->p_tinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* ã¿ã¹ã¯æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+	/* å¯¾è±¡ã¿ã¹ã¯ãä¼æ­¢ç¶æ
+ã®å ´åã¯ã¨ã©ã¼ã¨ãã */
+	D_CHECK_STATE((p_tcb->tstat != SUSPENDED) || (p_tcb == p_runtsk));
+
+	*Event = p_tcb->curevt;
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_GETEVT_LEAVE(ercd, TaskID, Event);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+	_errorhook_par2.p_mask = Event;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetEvent);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_GetEvent */
+
+/*
+ *  ã¤ãã³ãå¾
+ã¡
+ */
+#ifdef TOPPERS_WaitEvent
+
+StatusType
+WaitEvent(EventMaskType Mask)
+{
+	StatusType ercd = E_OK;
+
+	LOG_WAIEVT_ENTER(p_runtsk, Mask);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_WAITEVENT);
+	CHECK_ACCESS(TSKID(p_runtsk) < tnum_exttask);
+	CHECK_RESOURCE(p_runtsk->p_lastrescb == NULL);
+
+	x_nested_lock_os_int();
+	if ((p_runtsk->curevt & Mask) == EVTMASK_NONE) {
+		p_runtsk->curpri = p_runtsk->p_tinib->inipri;
+		p_runtsk->tstat = WAITING;
+		LOG_TSKSTAT(p_runtsk);
+		p_runtsk->waievt = Mask;
+		make_non_runnable();
+		dispatch();
+		p_runtsk->curpri = p_runtsk->p_tinib->exepri;
+	}
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_WAIEVT_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.mask = Mask;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_WaitEvent);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_WaitEvent */
+
+/*
+ *  æºäºå¦çå°ç¨ã¤ãã³ãã®ã»ãã
+ *
+ *  æ¡ä»¶ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+ */
+#ifdef TOPPERS_set_event_action
+
+StatusType
+set_event_action(OSAPCB *p_expire_osapcb, TaskType TaskID, EventMaskType Mask)
+{
+	StatusType	ercd;
+	TCB			*p_tcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_SETEVT_ENTER(TaskID, Mask);
+	p_tcb = get_tcb(TaskID);
+
+	p_osapcb = p_tcb->p_tinib->p_osapcb;
+	/* æºäºç¹æå±ã®OSAPåã³ã»ããã¤ãã³ãå¯¾è±¡ã¿ã¹ã¯æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) || (p_expire_osapcb == p_osapcb));
+	D_CHECK_STATE(p_tcb->tstat != SUSPENDED);
+	ercd = E_OK;
+
+	p_tcb->curevt |= Mask;
+	if ((p_tcb->curevt & p_tcb->waievt) != EVTMASK_NONE) {
+		p_tcb->waievt = EVTMASK_NONE;
+		(void) make_runnable(p_tcb);
+	}
+
+  d_exit_no_errorhook:
+	LOG_SETEVT_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+	_errorhook_par2.mask = Mask;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_SetEvent);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_set_event_action */
Index: /atk2-sc3-1.4.0-ntisr/kernel/genoffset.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/genoffset.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/genoffset.tf	(revision 172)
@@ -0,0 +1,177 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by Spansion LLC, USA
+$  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2015 by Witz Corporation
+$  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+$  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+$  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+$  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: genoffset.tf 425 2015-12-07 08:06:19Z witz-itoyo $
+$
+
+$
+$  #defineãã£ã¬ã¯ãã£ãã®çæ
+$
+$FUNCTION DEFINE$
+	#define $ARGV[1]$$TAB$$FORMAT("%d", +ARGV[2])$$NL$
+$END$
+
+$
+$  ãããã®ãµã¼ã
+$
+$FUNCTION SEARCH_BIT$
+	$_val = ARGV[1]$
+	$FOREACH _val_bit RANGE(0,7)$
+		$IF (_val & 1) != 0$
+			$RESULT = _val_bit$
+		$END$
+		$_val = _val >> 1$
+	$END$
+$END$
+
+$
+$  ããããã£ã¼ã«ãã®ãªãã»ããã¨ãããä½ç½®ã®å®ç¾©ã®çæ
+$
+$FUNCTION DEFINE_BIT$
+	$label = ARGV[1]$
+	$struct_size = ARGV[2]$
+	$output_size = ARGV[3]$
+
+	$top = SYMBOL(label)$
+	$IF !LENGTH(top)$
+		$ERROR$$FORMAT("label %1% not found", label)$$END$
+	$ELSE$
+		$val = 0$
+		$FOREACH i RANGE(0,struct_size-1)$
+			$tmp_val = PEEK(top + i, 1)$
+			$IF val == 0 && tmp_val != 0$
+				$val = tmp_val$
+				$offset = i$
+			$END$
+		$END$
+
+		$IF val == 0$
+			$ERROR$$FORMAT("bit not found in %1%", ARGV[1])$$END$
+		$ELSE$
+			$val_bit = SEARCH_BIT(val)$
+			$RESULT = {}$
+			$IF EQ(output_size, "W")$
+				$IF SIL_ENDIAN_BIG$
+					$val_bit = val_bit + 24 - ((offset & 0x03) << 3)$
+				$ELSE$
+					$val_bit = val_bit + ((offset & 0x03) << 3)$
+				$END$
+				$offset = offset & ~0x03$
+			$ELSE$$IF EQ(output_size, "H")$
+				$IF SIL_ENDIAN_BIG$
+					$val_bit = val_bit + 8 - ((offset & 0x01) << 3)$
+				$ELSE$
+					$val_bit = val_bit + ((offset & 0x01) << 3)$
+				$END$
+				$offset = offset & ~0x01$
+			$END$$END$
+		$END$
+
+		#define $label$$TAB$$FORMAT("%d", +offset)$$NL$
+		#define $label$_bit$TAB$$FORMAT("%d", +val_bit)$$NL$
+		#define $label$_mask$TAB$$FORMAT("0x%x", 1 << val_bit)$$NL$
+	$END$
+$END$
+
+$
+$  ãã¤ãé
+ç½®ã®ãã§ãã¯
+$
+$FUNCTION MAGIC_CHECK$
+	$size = ARGV[1]$
+	$check = ARGV[2]$
+
+	$label = FORMAT("MAGIC_%d", +size)$
+	$top = SYMBOL(label)$
+	$IF !LENGTH(top)$
+		$ERROR$$FORMAT("label %1% not found", label)$$END$
+	$ELSE$
+		$FOREACH offset RANGE(1,size)$
+			$IF SIL_ENDIAN_BIG$
+				$val = PEEK(top + offset - 1, 1)$
+			$ELSE$
+				$val = PEEK(top + size - offset, 1)$
+			$END$
+			$IF val != AT(check, offset - 1)$
+				$ERROR$$FORMAT("value check of %1% failed", label)$$END$
+			$END$
+		$END$
+	$END$
+$END$
+
+$MAGIC_CHECK(1, { 0x12 })$
+$MAGIC_CHECK(2, { 0x12, 0x34 })$
+$MAGIC_CHECK(4, { 0x12, 0x34, 0x56, 0x78 })$
+
+$
+$  ãã¡ã¤ã«ãããã®çæ
+$
+$FILE "offset.h"$
+$NL$
Index: /atk2-sc3-1.4.0-ntisr/kernel/interrupt.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/interrupt.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/interrupt.c	(revision 172)
@@ -0,0 +1,330 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: interrupt.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		å²è¾¼ã¿å¶å¾¡ã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "interrupt.h"
+
+#ifdef TOPPERS_interrupt_initialize
+/*
+ *  å®è¡ä¸­ã®C2ISR
+ */
+ISRCB	*p_runisr;
+#ifdef NTC2ISR
+QUEUE	isr_ready_queue;
+#endif /* NTC2ISR */
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½å
+é¨ã§ä½¿ç¨ããå¤æ°ã®å®ç¾©
+ */
+
+/*
+ *  SuspendAllInterrupts ã®ãã¹ãåæ°
+ */
+uint8	sus_all_cnt = 0U;
+
+/*
+ *  SuspendOSInterrupts ã®ãã¹ãåæ°
+ */
+uint8	sus_os_cnt = 0U;
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½ã®åæå
+ */
+#ifndef OMIT_INITIALIZE_INTERRUPT
+
+void
+interrupt_initialize(void)
+{
+	ISRType				i;
+	InterruptNumberType	j;
+	ISRCB				*p_isrcb;
+	const INTINIB		*p_intinib;
+
+	p_runisr = NULL;
+
+	sus_all_cnt = 0U;
+	sus_os_cnt = 0U;
+
+	for (i = 0U; i < tnum_isr2; i++) {
+		p_isrcb = &(isrcb_table[i]);
+		p_isrcb->p_isrinib = &(isrinib_table[i]);
+		p_isrcb->p_lastrescb = NULL;
+		p_isrcb->p_lastcntcb = NULL;
+#ifdef CFG_USE_PROTECTIONHOOK
+		p_isrcb->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+#ifdef NTC2ISR
+    	queue_initialize(&(p_isrcb->isr_queue));
+#endif /* NTC2ISR */
+	}
+
+	for (j = 0U; j < tnum_intno; j++) {
+		p_intinib = &(intinib_table[j]);
+		x_config_int(p_intinib->intno, p_intinib->intatr, p_intinib->intpri);
+	}
+
+#ifdef NTC2ISR
+	queue_initialize(&isr_ready_queue);
+#endif /* NTC2ISR */
+}
+
+#endif /* OMIT_INITIALIZE_INTERRUPT */
+#endif /* TOPPERS_interrupt_initialize */
+
+/*
+ *  å²è¾¼ã¿ç¦æ­¢ã®è§£é¤
+ */
+#ifdef TOPPERS_release_interrupts
+
+void
+release_interrupts(OSServiceIdType serviceId)
+{
+#ifdef CFG_USE_ERRORHOOK
+	boolean call_error_hook = FALSE;
+#endif /* CFG_USE_ERRORHOOK */
+
+	if (sus_os_cnt > 0U) {
+		sus_os_cnt = 0U;
+		LEAVE_CALLEVEL(TSYS_SUSOSINT);
+		x_nested_unlock_os_int();
+#ifdef CFG_USE_ERRORHOOK
+		call_error_hook = TRUE;
+#endif /* CFG_USE_ERRORHOOK */
+	}
+
+	if (sus_all_cnt > 0U) {
+		sus_all_cnt = 0U;
+		LEAVE_CALLEVEL(TSYS_SUSALLINT);
+		ASSERT((callevel_stat & TSYS_DISALLINT) == TSYS_NULL);
+		x_unlock_all_int();
+#ifdef CFG_USE_ERRORHOOK
+		call_error_hook = TRUE;
+#endif /* CFG_USE_ERRORHOOK */
+	}
+
+	/* C2ISRã®å ´åã®ã¿DisAllãè§£é¤ãã */
+	if (serviceId == OSServiceId_ISRMissingEnd) {
+		if ((callevel_stat & TSYS_DISALLINT) != TSYS_NULL) {
+			LEAVE_CALLEVEL(TSYS_DISALLINT);
+			x_unlock_all_int();
+#ifdef CFG_USE_ERRORHOOK
+			call_error_hook = TRUE;
+#endif /* CFG_USE_ERRORHOOK */
+		}
+	}
+
+#ifdef CFG_USE_ERRORHOOK
+	if ((serviceId != OSServiceId_Invalid) && (call_error_hook != FALSE)) {
+		call_errorhook(E_OS_DISABLEDINT, serviceId);
+	}
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_release_interrupts */
+
+/*
+ *  C2ISRçµäºæã®ãã§ãã¯é¢æ°
+ */
+#ifdef TOPPERS_exit_isr2
+
+/*
+ *  C2ISRã®å
+¨ãªã½ã¼ã¹è¿å´
+ */
+LOCAL_INLINE void
+release_isrresources(ISRCB *p_isrcb)
+{
+
+	/* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ä»¥ä¸ã§æ¥ãã¯ã */
+	if (p_isrcb->p_lastrescb != NULL) {
+		do {
+			x_set_ipm(p_isrcb->p_lastrescb->prevpri);
+			p_isrcb->p_lastrescb->lockflg = FALSE;
+			p_isrcb->p_lastrescb = p_isrcb->p_lastrescb->p_prevrescb;
+		} while (p_isrcb->p_lastrescb != NULL);
+
+#ifdef CFG_USE_ERRORHOOK
+		call_errorhook(E_OS_RESOURCE, OSServiceId_ISRMissingEnd);
+#endif /* CFG_USE_ERRORHOOK */
+	}
+}
+
+/*
+ *  ã¿ã¹ã¯ã®ã«ã¦ã³ã¿ã®ç¶æ
+ããã¹ã¦CS_NULLã«æ»ã
+ */
+void
+cancel_isrcounters(ISRCB *p_isrcb)
+{
+	if (p_isrcb->p_lastcntcb != NULL) {
+
+		/* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ä»¥ä¸ã§æ¥ã */
+		do {
+			p_isrcb->p_lastcntcb->cstat = CS_NULL;
+			p_isrcb->p_lastcntcb = p_isrcb->p_lastcntcb->p_prevcntcb;
+		} while (p_isrcb->p_lastcntcb != NULL);
+	}
+}
+
+void
+exit_isr2(void)
+{
+	x_nested_lock_os_int();
+
+	release_interrupts(OSServiceId_ISRMissingEnd);
+
+	release_isrresources(p_runisr);
+
+	x_nested_unlock_os_int();
+}
+
+#endif /* TOPPERS_exit_isr2 */
+
+void
+force_term_osap_isr(OSAPCB *p_osapcb)
+{
+	ISRType				i;
+    ISRCB *p_isrcb;
+	const INTINIB		*p_intinib;
+
+    /* ã¬ãã£ã­ã¥ã¼ã«ç¹ããã¦ããISRãå¼·å¶çµäº */
+    for (p_isrcb = (&isr_ready_queue)->p_next; 
+         p_isrcb != &isr_ready_queue; 
+         p_isrcb = p_isrcb->isr_queue.p_next) {
+         if (p_isrcb->p_isrinib->p_osapcb == p_osapcb) {
+#ifdef CFG_USE_PROTECTIONHOOK
+			p_isrcb->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+            /* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+            release_isrresources(p_isrcb);
+            /* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+            cancel_isrcounters(p_isrcb);
+            /*ã¬ãã£ã­ã¥ã¼ããé¤å¤*/
+            queue_delete(p_isrcb);
+         }
+    }
+
+    if (p_runisr != NULL && p_runisr->p_isrinib->p_osapcb == p_osapcb) {
+#ifdef CFG_USE_PROTECTIONHOOK
+        p_runisr->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+        /* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+        release_isrresources(p_runisr);
+        /* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+        cancel_isrcounters(p_runisr);
+    }
+
+	for (i = 0U; i < tnum_isr2; i++) {
+		p_isrcb = &(isrcb_table[i]);
+		if (p_isrcb->p_isrinib->p_osapcb == p_osapcb) {
+            p_intinib = &(intinib_table[i]);
+            x_disable_int(p_intinib->intno);
+        }
+	}
+}
+
+/*
+ * ãã­ãã¯ã·ã§ã³ããã¯ã®åºå£ããããã¸æ¥ã
+ * ããã«æ¥ããã¹ã¯ä»¥ä¸ã®ã¨ãã
+ * - ISR â ãã­ãã¯ã·ã§ã³ããã¯ â PRO_TERMINATE_TASKISR
+ */
+void
+force_terminate_isr(ISRCB *p_isrcb)
+{
+	/*
+	 *  å²è¾¼ã¿ç¦æ­¢ãè§£é¤ãã
+	 *  ã¨ã©ã¼ããã¯ãå¼ã°ãªãããï¼å¼æ°ã«OSServiceId_Invalidããã
+	 */
+	release_interrupts(OSServiceId_Invalid);
+
+	/* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+	release_isrresources(p_isrcb);
+	/* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+	cancel_isrcounters(p_isrcb);
+
+	exit_and_dispatch_isr();
+}
+
+
Index: /atk2-sc3-1.4.0-ntisr/kernel/interrupt.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/interrupt.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/interrupt.h	(revision 172)
@@ -0,0 +1,216 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: interrupt.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		å²è¾¼ã¿ç®¡çæ©è½
+ */
+
+#ifndef TOPPERS_INTERRUPT_H
+#define TOPPERS_INTERRUPT_H
+
+#include "resource.h"
+#include "osap.h"
+
+/*
+ *  åªå
+åº¦å¤ã®å®ç¾©ï¼å
+é¨è¡¨ç¾ï¼
+ */
+#define TPRI_MINISR		(-1)            /* æä½å²è¾¼ã¿åªå
+åº¦ */
+
+/*
+ *  ISRIDããISRCBãåãåºãããã®ãã¯ã­
+ */
+#define get_isrcb(isrid)	(&(isrcb_table[(isrid)]))
+
+/*
+ *  ISRCBããISRIDãåãåºãããã®ãã¯ã­
+ */
+#define ISR2ID(p_isrcb)	((ISRType) ((p_isrcb) - isrcb_table))
+
+#ifndef OMIT_INITIALIZE_INTERRUPT
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯
+ */
+typedef struct interrupt_request_initialization_block {
+	InterruptNumberType	intno;          /* å²è¾¼ã¿çªå· */
+	AttributeType		intatr;         /* å²è¾¼ã¿å±æ§ */
+	PriorityType		intpri;         /* å²è¾¼ã¿åªå
+åº¦ */
+#if defined(TOPPERS_CFG1_OUT) || defined(CFG_USE_STACKMONITORING)
+	MemorySizeType remain_stksz;        /* ã¹ã¿ãã¯æ®éãã§ãã¯æ¹å¼ç¨ã¹ã¿ãã¯ãµã¤ãº */
+#endif /* defined(TOPPERS_CFG1_OUT) || defined(CFG_USE_STACKMONITORING) */
+} INTINIB;
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°ï¼Os_Lcfg.cï¼
+ */
+extern const InterruptNumberType	tnum_intno;
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern const INTINIB				intinib_table[];
+
+/*
+ *  ISRCBããå²è¾¼ã¿çªå·ãå²åºããã¯ã­
+ */
+#define GET_INTNO(p_isrcb)	((p_isrcb)->p_isrinib->p_intinib->intno)
+
+/*
+ *  ISRCBããå²è¾¼ã¿åªå
+åº¦ãå²åºããã¯ã­
+ */
+#define GET_INTPRI(p_isrcb)	((p_isrcb)->p_isrinib->p_intinib->intpri)
+
+#endif /* OMIT_INITIALIZE_INTERRUPT */
+
+typedef struct isr_initialization_block {
+	const INTINIB	*p_intinib;     /* å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	OSAPCB			*p_osapcb;      /* æå±ããOSã¢ããªã±ã¼ã·ã§ã³ã®ç®¡çãã­ãã¯ */
+	uint32			acsbtmp;        /* ã¢ã¯ã»ã¹è¨±å¯OSã¢ããªã±ã¼ã·ã§ã³ ãããããã */
+#ifdef NTC2ISR
+	TSKINICTXB tskinictxb;           /* ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ */
+	STKMPUINFOB	stkmpu;             /* ã¹ã¿ãã¯ã®MPUæ
+å ± */
+#endif /* NTC2ISR */
+} ISRINIB;
+
+typedef struct isr_control_block {
+#ifdef NTC2ISR
+    QUEUE           isr_queue;
+#endif /* NTC2ISR */
+	const ISRINIB	*p_isrinib;
+	RESCB			*p_lastrescb;   /* æå¾ã«ç²å¾ãããªã½ã¼ã¹ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+#ifdef NTC2ISR
+	CNTCB			*p_lastcntcb;   /* æå¾ã«æä½ããã«ã¦ã³ã¿ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	TSKCTXB			tskctxb;        /* ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ */
+#endif /* NTC2ISR */
+#ifdef CFG_USE_PROTECTIONHOOK
+	boolean	calltfn;                /* ä¿¡é ¼é¢æ°å¼ã³åºãä¸­ãã©ã° */
+#endif /* CFG_USE_PROTECTIONHOOK */
+} ISRCB;
+
+/*
+ *  C2ISRæ°ãä¿æããå¤æ°ã®å®£è¨ï¼Os_Lcfg.cï¼
+ */
+extern const ISRType	tnum_isr2;                         /* C2ISRã®æ° */
+
+/*
+ *  C2ISRã®åæåãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern const ISRINIB	isrinib_table[];
+
+/*
+ *  C2ISRã®ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern ISRCB			isrcb_table[];
+
+/*
+ *  å®è¡ä¸­ã®C2ISR
+ *
+ *  C2ISRãå®è¡ãã¦ããªãæã¯ï¼NULL ã«ãã
+ */
+extern ISRCB			*p_runisr;
+
+/*
+ *  SuspendAllInterrupts ã®ãã¹ãåæ°
+ */
+extern uint8			sus_all_cnt;
+
+/*
+ *  SuspendOSInterrupts ã®ãã¹ãåæ°
+ */
+extern uint8			sus_os_cnt;
+
+/*
+ *  å²è¾¼ã¿ç®¡çæ©è½ã®åæå
+ */
+extern void interrupt_initialize(void);
+
+/*
+ *  å²è¾¼ã¿ç¦æ­¢ã®å¼·å¶è§£é¤
+ */
+
+extern void release_interrupts(OSServiceIdType serviceId);
+
+/*
+ *  C2ISRçµäºæã®ãã§ãã¯é¢æ°
+ */
+extern void exit_isr2(void);
+
+#endif /* TOPPERS_INTERRUPT_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/interrupt_manage.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/interrupt_manage.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/interrupt_manage.c	(revision 172)
@@ -0,0 +1,506 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: interrupt_manage.c 434 2015-12-09 12:24:27Z witz-itoyo $
+ */
+
+/*
+ *		å²è¾¼ã¿ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "interrupt.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_DISINT_ENTER
+#define LOG_DISINT_ENTER()
+#endif /* LOG_DISINT_ENTER */
+
+#ifndef LOG_DISINT_LEAVE
+#define LOG_DISINT_LEAVE()
+#endif /* LOG_DISINT_LEAVE */
+
+#ifndef LOG_ENAINT_ENTER
+#define LOG_ENAINT_ENTER()
+#endif /* LOG_ENAINT_ENTER */
+
+#ifndef LOG_ENAINT_LEAVE
+#define LOG_ENAINT_LEAVE()
+#endif /* LOG_ENAINT_LEAVE */
+
+#ifndef LOG_SUSALL_ENTER
+#define LOG_SUSALL_ENTER()
+#endif /* LOG_SUSALL_ENTER */
+
+#ifndef LOG_SUSALL_LEAVE
+#define LOG_SUSALL_LEAVE()
+#endif /* LOG_SUSALL_LEAVE */
+
+#ifndef LOG_RSMALL_ENTER
+#define LOG_RSMALL_ENTER()
+#endif /* LOG_RSMALL_ENTER */
+
+#ifndef LOG_RSMALL_LEAVE
+#define LOG_RSMALL_LEAVE()
+#endif /* LOG_RSMALL_LEAVE */
+
+#ifndef LOG_SUSOSI_ENTER
+#define LOG_SUSOSI_ENTER()
+#endif /* LOG_SUSOSI_ENTER */
+
+#ifndef LOG_SUSOSI_LEAVE
+#define LOG_SUSOSI_LEAVE()
+#endif /* LOG_SUSOSI_LEAVE */
+
+#ifndef LOG_RSMOSI_ENTER
+#define LOG_RSMOSI_ENTER()
+#endif /* LOG_RSMOSI_ENTER */
+
+#ifndef LOG_RSMOSI_LEAVE
+#define LOG_RSMOSI_LEAVE()
+#endif /* LOG_RSMOSI_LEAVE */
+
+#ifndef LOG_GETISRID_ENTER
+#define LOG_GETISRID_ENTER()
+#endif /* LOG_GETISRID_ENTER */
+
+#ifndef LOG_GETISRID_LEAVE
+#define LOG_GETISRID_LEAVE(ercd)
+#endif /* LOG_GETISRID_LEAVE */
+
+#ifndef LOG_DISINTSRC_ENTER
+#define LOG_DISINTSRC_ENTER(isrid)
+#endif /* LOG_DISINTSRC_ENTER */
+
+#ifndef LOG_DISINTSRC_LEAVE
+#define	LOG_DISINTSRC_LEAVE(ercd)
+#endif /* LOG_DISINTSRC_LEAVE */
+
+#ifndef LOG_ENAINTSRC_ENTER
+#define LOG_ENAINTSRC_ENTER(isrid)
+#endif /* LOG_ENAINTSRC_ENTER */
+
+#ifndef LOG_ENAINTSRC_LEAVE
+#define	LOG_ENAINTSRC_LEAVE(ercd)
+#endif /* LOG_ENAINTSRC_LEAVE */
+
+/*
+ *  ãã¹ã¦ã®å²è¾¼ã¿ã®ç¦æ­¢ï¼é«éç°¡æçï¼
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸ç§»è¡
+ */
+#ifdef TOPPERS_DisableAllInterrupts
+
+#ifndef OMIT_STANDARD_DISALLINT
+
+void
+DisableAllInterrupts(void)
+{
+	LOG_DISINT_ENTER();
+	if ((callevel_stat & (TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT)) == TSYS_NULL) {
+		x_lock_all_int();
+		ENTER_CALLEVEL(TSYS_DISALLINT);
+	}
+	LOG_DISINT_LEAVE();
+}
+
+#endif /* OMIT_STANDARD_DISALLINT */
+
+#endif /* TOPPERS_DisableAllInterrupts */
+
+/*
+ *  ãã¹ã¦ã®å²è¾¼ã¿ã®è¨±å¯ï¼é«éç°¡æçï¼
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ãè§£é¤ãã
+ */
+#ifdef TOPPERS_EnableAllInterrupts
+
+#ifndef OMIT_STANDARD_DISALLINT
+
+void
+EnableAllInterrupts(void)
+{
+	LOG_ENAINT_ENTER();
+	if ((callevel_stat & (TSYS_SUSALLINT | TSYS_SUSOSINT)) == TSYS_NULL) {
+		if ((callevel_stat & TSYS_DISALLINT) != TSYS_NULL) {
+			LEAVE_CALLEVEL(TSYS_DISALLINT);
+			x_unlock_all_int();
+		}
+	}
+	LOG_ENAINT_LEAVE();
+}
+
+#endif /* OMIT_STANDARD_DISALLINT */
+
+#endif /* TOPPERS_EnableAllInterrupts */
+
+/*
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢
+ *  CPUå
+¨ã¦ã®å²è¾¼ã¿ãå¯¾è±¡ã®å²è¾¼ã¿ç¦æ­¢(ãã¹ãã«ã¦ã³ãæã)
+ */
+#ifdef TOPPERS_SuspendAllInterrupts
+
+void
+SuspendAllInterrupts(void)
+{
+#ifdef CFG_USE_ERRORHOOK
+	StatusType ercd;
+#endif /* CFG_USE_ERRORHOOK */
+
+	LOG_SUSALL_ENTER();
+	S_N_CHECK_DISALLINT();
+	S_N_CHECK_ERROR((run_trusted != FALSE), E_OS_ACCESS);
+	/* ãã¹ãåæ°ã®ä¸éå¤è¶
+é */
+	S_N_CHECK_LIMIT(sus_all_cnt != UINT8_INVALID);
+
+	if (sus_all_cnt == 0U) {
+		x_lock_all_int();
+		ENTER_CALLEVEL(TSYS_SUSALLINT);
+	}
+
+	sus_all_cnt++;
+
+  exit_no_errorhook:
+	LOG_SUSALL_LEAVE();
+	return;
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	if (kerflg != FALSE) {
+		x_nested_lock_os_int();
+		call_errorhook(ercd, OSServiceId_SuspendAllInterrupts);
+		x_nested_unlock_os_int();
+		goto exit_no_errorhook;
+	}
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_SuspendAllInterrupts */
+
+/*
+ *  å
+¨å²è¾¼ã¿ç¦æ­¢è§£é¤
+ *  CPUå
+¨ã¦ã®å²è¾¼ã¿ãå¯¾è±¡ã®å²è¾¼ã¿è¨±å¯(ãã¹ãã«ã¦ã³ãæã)
+ */
+#ifdef TOPPERS_ResumeAllInterrupts
+
+void
+ResumeAllInterrupts(void)
+{
+#ifdef CFG_USE_ERRORHOOK
+	StatusType ercd;
+#endif /* CFG_USE_ERRORHOOK */
+
+	LOG_RSMALL_ENTER();
+	S_N_CHECK_DISALLINT();
+	S_N_CHECK_STATE(sus_all_cnt != 0U);
+
+	sus_all_cnt--;
+
+	if (sus_all_cnt == 0U) {
+		LEAVE_CALLEVEL(TSYS_SUSALLINT);
+		x_unlock_all_int();
+	}
+
+  exit_no_errorhook:
+	LOG_RSMALL_LEAVE();
+	return;
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	if (kerflg != FALSE) {
+		x_nested_lock_os_int();
+		call_errorhook(ercd, OSServiceId_ResumeAllInterrupts);
+		x_nested_unlock_os_int();
+		goto exit_no_errorhook;
+	}
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_ResumeAllInterrupts */
+
+/*
+ *  OSå²è¾¼ã¿ã®ç¦æ­¢
+ *  C2ISRãå¯¾è±¡ã®å²è¾¼ã¿ç¦æ­¢(ãã¹ãã«ã¦ã³ãæã)
+ */
+#ifdef TOPPERS_SuspendOSInterrupts
+
+void
+SuspendOSInterrupts(void)
+{
+#ifdef CFG_USE_ERRORHOOK
+	StatusType ercd;
+#endif /* CFG_USE_ERRORHOOK */
+
+	LOG_SUSOSI_ENTER();
+	S_N_CHECK_DISALLINT();
+	/* ãã¹ãåæ°ã®ä¸éå¤è¶
+é */
+	S_N_CHECK_LIMIT(sus_os_cnt != UINT8_INVALID);
+
+	if (sus_os_cnt == 0U) {
+		x_suspend_lock_os_int();
+		ENTER_CALLEVEL(TSYS_SUSOSINT);
+	}
+
+	sus_os_cnt++;
+
+  exit_no_errorhook:
+	LOG_SUSOSI_LEAVE();
+	return;
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+	call_errorhook(ercd, OSServiceId_SuspendOSInterrupts);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_SuspendOSInterrupts */
+
+/*
+ *  OSå²è¾¼ã¿ç¦æ­¢è§£é¤
+ *  C2ISRãå¯¾è±¡ã®å²è¾¼ã¿è¨±å¯(ãã¹ãã«ã¦ã³ãæã)
+ */
+#ifdef TOPPERS_ResumeOSInterrupts
+
+void
+ResumeOSInterrupts(void)
+{
+#ifdef CFG_USE_ERRORHOOK
+	StatusType ercd;
+#endif /* CFG_USE_ERRORHOOK */
+
+	LOG_RSMOSI_ENTER();
+	S_N_CHECK_DISALLINT();
+	S_N_CHECK_STATE(sus_os_cnt != 0U);
+
+	sus_os_cnt--;
+
+	if (sus_os_cnt == 0U) {
+		LEAVE_CALLEVEL(TSYS_SUSOSINT);
+		x_resume_unlock_os_int();
+	}
+
+  exit_no_errorhook:
+	LOG_RSMOSI_LEAVE();
+	return;
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+	call_errorhook(ercd, OSServiceId_ResumeOSInterrupts);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_ResumeOSInterrupts */
+
+/*
+ *  C2ISR IDã®åå¾
+ */
+#ifdef TOPPERS_GetISRID
+
+ISRType
+GetISRID(void)
+{
+	ISRType		isrid;
+	StatusType	ercd;
+
+	LOG_GETISRID_ENTER();
+	CHECK_CALLEVEL(CALLEVEL_GETISRID);
+
+	isrid = (p_runisr == NULL) ? INVALID_ISR : ISR2ID(p_runisr);
+
+  exit_finish:
+	LOG_GETISRID_LEAVE(isrid);
+	return(isrid);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+	/*
+	 *  ã¨ã©ã¼çºçæã¯INVALID_ISRIDãè¿ããï¼ã¨ã©ã¼ãçºçããã®ãå®è¡ä¸­ã®
+	 *  C2ISRãå­å¨ããªãã®ãåºå¥ããããï¼ã¨ã©ã¼ããã¯ãå¼ã¶
+	 */
+	call_errorhook(ercd, OSServiceId_GetISRID);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	isrid = INVALID_ISR;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_GetISRID */
+
+/*
+ *  å²è¾¼ã¿ã®ç¦æ­¢
+ */
+#ifdef TOPPERS_DisableInterruptSource
+
+StatusType
+DisableInterruptSource(ISRType DisableISR)
+{
+	ISRCB		*p_isrcb;
+	StatusType	ercd;
+
+	LOG_DISINTSRC_ENTER(DisableISR);
+	CHECK_CALLEVEL(CALLEVEL_DISABLEINTERRUPTSOURCE);
+	CHECK_ID(DisableISR < tnum_isr2);
+	p_isrcb = get_isrcb(DisableISR);
+	CHECK_RIGHT(p_isrcb->p_isrinib->acsbtmp);
+	CHECK_NOFUNC(target_is_int_controllable(p_isrcb->p_isrinib->p_intinib->intno) != FALSE);
+
+	x_nested_lock_os_int();
+	D_CHECK_ACCESS((p_isrcb->p_isrinib->p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_isrcb->p_isrinib->p_osapcb == p_runosap));
+	x_disable_int(GET_INTNO(p_isrcb));
+	ercd = E_OK;
+  d_exit_no_errorhook:
+    x_nested_unlock_os_int();
+
+  exit_no_errorhook:
+	LOG_DISINTSRC_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.isrid = DisableISR;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_DisableInterruptSource);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_DisableInterruptSource */
+
+/*
+ *  å²è¾¼ã¿ã®è¨±å¯
+ */
+#ifdef TOPPERS_EnableInterruptSource
+
+StatusType
+EnableInterruptSource(ISRType EnableISR)
+{
+	ISRCB		*p_isrcb;
+	StatusType	ercd;
+
+	LOG_ENAINTSRC_ENTER(EnableISR);
+	CHECK_CALLEVEL(CALLEVEL_ENABLEINTERRUPTSOURCE);
+	CHECK_ID(EnableISR < tnum_isr2);
+	p_isrcb = get_isrcb(EnableISR);
+	CHECK_RIGHT(p_isrcb->p_isrinib->acsbtmp);
+	CHECK_NOFUNC(target_is_int_controllable(p_isrcb->p_isrinib->p_intinib->intno) != FALSE);
+
+	x_nested_lock_os_int();
+	D_CHECK_ACCESS((p_isrcb->p_isrinib->p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_isrcb->p_isrinib->p_osapcb == p_runosap));
+	x_enable_int(GET_INTNO(p_isrcb));
+	ercd = E_OK;
+  d_exit_no_errorhook:
+    x_nested_unlock_os_int();
+
+  exit_no_errorhook:
+	LOG_ENAINTSRC_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.isrid = EnableISR;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_EnableInterruptSource);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_EnableInterruptSource */
Index: /atk2-sc3-1.4.0-ntisr/kernel/ioc.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/ioc.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/ioc.tf	(revision 172)
@@ -0,0 +1,845 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2015 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2015 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2015 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2015 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2015 by Witz Corporation
+$  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+$  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+$  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+$  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: ioc.tf 425 2015-12-07 08:06:19Z witz-itoyo $
+$
+
+$ =====================================================================
+$ IMPLEMENTATION_DATA_TYPE.CATEGORYã®å¤ãè¿ãé¢æ°
+$ ARGV[1] = IMPLEMENTATION_DATA_TYPE.SHORT_NAME_PATH
+$ =====================================================================
+
+$FUNCTION GET_CATEGORY$
+	$datatypeid = 0$
+	$datatypecategory = "NULL"$
+
+	$FOREACH shortnamepath  IMPLEMENTATION_DATA_TYPE.SHORT_NAME_PATH.ID_LIST$
+		$IF EQ(shortnamepath , ARGV[1]) && LENGTH(IMPLEMENTATION_DATA_TYPE.CATEGORY[datatypeid])$
+			$datatypecategory = IMPLEMENTATION_DATA_TYPE.CATEGORY[datatypeid]$
+		$END$
+		$datatypeid = datatypeid + 1$
+	$END$
+	
+$	// ä¸è´ããCATEGORYãå­å¨ããªãã¨ã¨ã©ã¼
+	$IF EQ(datatypecategory, "NULL")$
+		$ERROR ARGV[2]$$FORMAT(_("CATEGORY(%1%) is not defined"), ARGV[1])$$END$
+	$END$
+	
+	$RESULT = datatypecategory$
+$END$
+
+$ =====================================================================
+$ IMPLEMENTATION_DATA_TYPE.SHORT_NAMEã®å¤ãè¿ãé¢æ°
+$ ARGV[1] = IMPLEMENTATION_DATA_TYPE.SHORT_NAME_PATH
+$ =====================================================================
+
+$FUNCTION GET_SHORT_NAME$
+	$datatypeid = 0$
+	$datatypeshortname = "NULL"$
+
+	$FOREACH shortnamepath  IMPLEMENTATION_DATA_TYPE.SHORT_NAME_PATH.ID_LIST$
+		$IF EQ(shortnamepath , ARGV[1])$
+			$datatypeshortname = IMPLEMENTATION_DATA_TYPE.SHORT_NAME[datatypeid]$
+		$END$
+		$datatypeid = datatypeid + 1$
+	$END$
+	
+$	// ä¸è´ããIMPLEMENTATION_DATA_TYPEãå­å¨ããªãã¨ã¨ã©ã¼
+	$IF EQ(datatypeshortname, "NULL")$
+		$ERROR ARGV[2]$$FORMAT(_("%1% is not defined"), ARGV[1])$$END$
+	$END$
+
+	$RESULT = datatypeshortname$
+$END$
+
+$ =====================================================================
+$ IOCã®ã¨ã©ã¼ãã§ãã¯ã¨å
+é¨ãã¼ã¿ã®çæ
+$ =====================================================================
+$TRACE("IOC CHECK")$
+
+$
+$ IOCã®OSå
+é¨ã§ç¨ããIDãå²ãå½ã¦ã
+$ ã­ã¥ã¼ããéä¿¡ããIDãå²ãå½ã¦ã
+$
+$i = 0$
+$tnum_queioc = 0$
+$new_id_list = {}$
+$FOREACH iocid IOC.ID_LIST$
+	$IF !EQ(IOC.BUFLEN[iocid] ,"NULL")$
+		$IOC.ID[iocid] = i$
+		$i = i + 1$
+		$tnum_queioc = tnum_queioc + 1$
+		$new_id_list = APPEND(new_id_list, iocid)$
+	$END$
+$END$
+$FOREACH iocid IOC.ID_LIST$
+	$IF EQ(IOC.BUFLEN[iocid] ,"NULL")$
+		$IOC.ID[iocid] = i$
+		$i = i + 1$
+		$new_id_list = APPEND(new_id_list, iocid)$
+	$END$
+$END$
+$IOC.ID_LIST = new_id_list$
+
+$ 
+$ IOCã¨IOCDATAã®é¢é£ä»ã
+$ 
+$ IOCDATA.IOCããIOC.IOCDATA_LISTã®ä½æ
+$FOREACH iocdataid IOCDATA.ID_LIST$
+	$iocid                   = IOCDATA.IOC[iocdataid]$
+	$IOC.IOCDATA_LIST[iocid] = APPEND(IOC.IOCDATA_LIST[iocid], VALUE(IOCDATA.ID_LIST[iocdataid], iocdataid))$
+$END$
+
+$ 
+$ IOCã¨IOCSNDã®é¢é£ä»ã
+$ 
+$ IOCSND.IOCããIOC.IOCSND_LISTã®ä½æ
+$FOREACH iocsndid IOCSND.ID_LIST$
+	$iocid                  = IOCSND.IOC[iocsndid]$
+	$IOC.IOCSND_LIST[iocid] = APPEND(IOC.IOCSND_LIST[iocid], VALUE(IOCSND.ID_LIST[iocsndid], iocsndid))$
+$END$
+
+
+$ 
+$ IOCã¨IOCRCVã®é¢é£ä»ã
+$ 
+$ IOCRCV.IOCããIOC.IOCRCV_LISTã®ä½æ
+$FOREACH iocrcvid IOCRCV.ID_LIST$
+	$iocid             = IOCRCV.IOC[iocrcvid]$
+	$IOC.IOCRCV[iocid] = APPEND(IOC.IOCRCV[iocid], VALUE(IOCRCV.ID_LIST[iocrcvid], iocrcvid))$
+$END$
+
+
+$ 
+$ ã¨ã©ã¼ãã§ãã¯
+$ 
+$FOREACH iocid IOC.ID_LIST$
+$ 	// buflenã«0ãæå®ãã¦ããªãã
+	$IF IOC.BUFLEN[iocid] == 0 && !EQ(IOC.BUFLEN[iocid], "NULL")$
+		$ERROR IOC.TEXT_LINE[iocid]$$FORMAT(_("illegal %1% `%2%\'. Do not specify `0\'" ), "buflen", IOC.BUFLEN[iocid])$$END$
+	$END$
+
+$ 	// ã°ã«ã¼ãéä¿¡ã®å ´åï¼indexã§0ãå®ç¾©ããã¦ããï¼ã¾ãï¼indexãçç¥ããã¦ããªãã
+	$IF LENGTH(IOC.IOCDATA_LIST[iocid]) > 1$
+		$FOREACH iocdataid IOC.IOCDATA_LIST[iocid]$
+			$IF EQ(IOCDATA.INDEX[iocdataid], "NULL")$
+				$ERROR IOCDATA.TEXT_LINE[iocdataid]$$FORMAT(_("illegal %1% `%2%\' if Group communication"), "index", IOCDATA.INDEX[iocdataid])$$END$
+			$END$
+		$END$
+	$END$
+
+$ 	// 1:1éä¿¡ã®å ´åï¼OsIocSenderPropertiesã®senderidãNULLä»¥å¤ã§ã¯ãªãã
+	$IF LENGTH(IOC.IOCSND_LIST[iocid]) == 1$
+		$FOREACH iocsndid IOC.IOCSND_LIST[iocid]$
+			$IF !EQ(IOCSND.SENDERID[iocsndid], "NULL")$
+				$ERROR IOCSND.TEXT_LINE[iocsndid]$$FORMAT(_("illegal %1% `%2%\' if 1:1 communication"), "senderid", IOCSND.SENDERID[iocsndid])$$END$
+			$END$
+		$END$
+	$END$
+
+$ 	// N:1éä¿¡ã®å ´åï¼OsIocSenderPropertiesã®senderidãçç¥ããã¦ããªãã
+	$IF LENGTH(IOC.IOCSND_LIST[iocid]) > 1$
+		$FOREACH iocsndid IOC.IOCSND_LIST[iocid]$
+			$IF EQ(IOCSND.SENDERID[iocsndid], "NULL")$
+				$ERROR IOCSND.TEXT_LINE[iocsndid]$$FORMAT(_("illegal %1% `%2%\' if N:1 communication"), "senderid", IOCSND.SENDERID[iocsndid])$$END$
+			$END$
+		$END$
+	$END$
+
+$ 	// ã­ã¥ã¼ç¡ãéä¿¡ã®å ´åï¼åæåå¤ãæå®ãã¦ããã
+	$IF IOC.ID[iocid] >= tnum_queioc$
+		$IF EQ(IOCDATA.INITVAL[IOC.IOCDATA_LIST[iocid]], "NULL")$
+			$ERROR IOC.TEXT_LINE[iocid]$$FORMAT(_("illegal %1% `%2%\' in case of using unqueued" ), "initval", IOCDATA.INITVAL[IOC.IOCDATA_LIST[iocid]])$$END$
+		$END$
+	$END$
+
+$	//1:1éä¿¡ã®å ´åï¼ã»ã³ãã¨ã¬ã·ã¼ããåä¸OSAPã«æå±ãã¦ããªãã
+	$iocsnd = IOC.IOCSND_LIST[iocid]$
+	$IF LENGTH(IOC.IOCSND_LIST[iocid]) == 1$
+		$IF EQ(IOCSND.OSAPID[iocsnd], IOCRCV.OSAPID[IOC.IOCRCV[iocid]])$
+			$ERROR IOC.TEXT_LINE[iocsndid]$$FORMAT(_("Sender and receiver are refferenced the same osap `%1%`"), IOCSND.OSAPID[iocsnd])$$END$
+		$END$
+	$END$
+$END$
+
+$FOREACH iocsndid IOC.IOCSND_LIST$
+$ 	// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ä»¥å¤ã¯ã¨ã©ã¼
+	$IF !EQ(IOCSND.IMPLKIND[iocsndid], "FUNCTION")
+	 && !EQ(IOCSND.IMPLKIND[iocsndid], "DO_NOT_CARE")
+	 && !EQ(IOCSND.IMPLKIND[iocsndid], "NULL")
+	 && !EQ(IOCSND.IMPLKIND[iocsndid], "MACRO")$
+		$ERROR IOCSND.TEXT_LINE[iocsndid]$$FORMAT(_("illegal %1% `%2%\'. Do not specify anything other than `FUNCTION\', `MACRO\', `DO_NOT_CARE\' and omission"), "implkind", IOCSND.IMPLKIND[iocsnd])$$END$
+	$END$
+$END$
+
+
+$ 
+$ ã°ã«ã¼ãéä¿¡ã¨ãªãIOC.IOCDATA_LISTãIOCDATA.INDEXã®é ã«ã½ã¼ã
+$ 
+$FOREACH iocid IOC.ID_LIST$
+	$IF LENGTH(IOC.IOCDATA_LIST[iocid]) > 1$
+		$find = 0$
+		$new_list = {}$
+		$FOREACH index RANGE(0, LENGTH(IOC.IOCDATA_LIST[iocid])-1)$
+			$FOREACH iocdataid IOC.IOCDATA_LIST[iocid]$
+				$IF IOCDATA.INDEX[iocdataid] == index$
+					$new_list = APPEND(new_list, iocdataid)$
+					$find = find + 1$
+				$END$
+			$END$
+			$IF find == 0$
+				$ERROR IOCDATA.TEXT_LINE[iocdataid]$$FORMAT(_("OsIocDataPropertyIndex `%1%\' is missing for `%2%\'. These should be sequential."), index, IOCDATA.IOC[iocdataid])$$END$
+			$END$
+			$IF find > 1$
+				$ERROR IOCDATA.TEXT_LINE[iocdataid]$$FORMAT(_("OsIocDataPropertyIndex `%1%\' is duplicated for `%2%\'. These should be unique."), index, IOCDATA.IOC[iocdataid])$$END$
+			$END$
+			$find = 0$
+		$END$
+		$IOC.IOCDATA_LIST[iocid] = new_list$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ Os_Lcfg.hã®çæ
+$ =====================================================================
+
+$FILE "Os_Lcfg.h"$
+
+/****** Object IOC ******/$NL$
+$IF LENGTH(IOC.ID_LIST)$
+$ 	// IOC IDã®ä½æ
+	/* IOC ID */$NL$
+	$FOREACH iocid IOC.ID_LIST$
+		#define $iocid$$TAB$UINT_C($IOC.ID[iocid]$)$NL$
+	$END$
+	$NL$
+
+$ 	// Wrapper IDã®ä½æï¼IOCSNDã®ãªãã¸ã§ã¯ãè­å¥IDãä½¿ç¨ãã
+	/* Wrapper ID */$NL$
+	$FOREACH wrapperid RANGE(0, LENGTH(IOCSND.ID_LIST) - 1)$
+		#define IOC_WRAPPER_$wrapperid$$TAB$UINT_C($wrapperid$)$NL$
+	$END$
+	$NL$
+$END$
+
+	#define TNUM_IOC			UINT_C($LENGTH(IOC.ID_LIST)$)$NL$
+	#define TNUM_QUEUEIOC		UINT_C($tnum_queioc$)$NL$
+	#define TNUM_IOC_WRAPPER	UINT_C($LENGTH(IOCSND.ID_LIST)$)$NL$
+
+
+$ =====================================================================
+$ Os_Lcfg.cã®çæ
+$ =====================================================================
+$FILE "Os_Lcfg.c"$
+
+	/****** Object IOC ******/$NL$
+	const IocType	tnum_ioc = TNUM_IOC;$NL$
+	const IocType	tnum_queueioc = TNUM_QUEUEIOC;$NL$
+	$NL$
+
+$IF LENGTH(IOC.ID_LIST)$
+$ 	// IOCåæåå¤
+	/*$NL$
+	$SPC$*  IOC Initialize Value$NL$
+	$SPC$*/$NL$
+	$FOREACH iocid IOC.ID_LIST$
+		/* $iocid$ */$NL$
+		$IF IOC.ID[iocid] < tnum_queioc$
+			/* No initialize value because queue communication */$NL$
+		$ELSE$
+			$IF EQ(IOCDATA.INITVAL[IOC.IOCDATA_LIST[iocid]], "NULL")$
+$ 				// ããã«ã¯æ¥ãªãï¼ã¨ã©ã¼ãã§ãã¯å¦çã§æ¤åºæ¸ã¿ï¼
+				/* No initialize value */$NL$
+			$ELSE$
+				IOCMB_$iocid$ ioc_inival_$iocid$ = {$NL$
+				$JOINEACH iocdata IOC.IOCDATA_LIST[iocid] ",\n"$
+$					//OsIocInitValueã¯æå­ååã§èª­ã¿è¾¼ãããï¼arxmlã§Uãè¨è¼ããæ¹éã¨ãã
+					$TAB$$IOCDATA.INITVAL[iocdata]$
+				$END$
+				$NL$};$NL$
+			$END$
+		$END$
+		$NL$
+	$END$
+	$NL$
+
+$ 	// IOCåæåå¤ãã¼ãã«
+	void *ioc_inival_table[TNUM_IOC] = {$NL$
+	$JOINEACH iocid IOC.ID_LIST ",\n"$
+		$IF IOC.ID[iocid] < tnum_queioc$
+			$TAB$NULL
+		$ELSE$
+			$IF EQ(IOCDATA.INITVAL[IOC.IOCDATA_LIST[iocid]], "NULL")$
+				$TAB$NULL
+			$ELSE$
+				$TAB$(void *)&ioc_inival_$iocid$
+			$END$
+		$END$
+	$END$
+	$NL$};$NL$
+	$NL$
+
+$ 	// IOCç®¡çãã­ãã¯ãã¼ãã«
+	$IF tnum_queioc > 0$
+		IOCCB ioccb_table[TNUM_QUEUEIOC];$NL$
+	$ELSE$
+		TOPPERS_EMPTY_LABEL(IOCCB, ioccb_table);$NL$
+	$END$
+	$NL$
+
+$ 	// IOCãã¼ã¿ç®¡çãã­ãã¯ãã¼ãã«ã®å®£è¨
+	$FOREACH iocid IOC.ID_LIST$
+		$IF EQ(IOC.BUFLEN[iocid], "NULL")$
+			IOCMB_$iocid$ iocmb_table_$iocid$[1];$NL$
+		$ELSE$
+			IOCMB_$iocid$ iocmb_table_$iocid$[$IOC.BUFLEN[iocid]$];$NL$
+		$END$
+	$END$
+	$NL$
+
+$ 	// IOCåæåãã¼ãã«
+	const IOCINIB iocinib_table[TNUM_IOC] = {$NL$
+	$JOINEACH iocid IOC.ID_LIST ",\n"$
+		$TAB${$NL$
+			$TAB$$TAB$$+IOC.BUFLEN[iocid]$U,$NL$
+			$TAB$$TAB$sizeof(IOCMB_$iocid$),$NL$
+			$TAB$$TAB$alignof(IOCMB_$iocid$),$NL$
+			#ifdef CFG_USE_ERRORHOOK$NL$
+			$IF LENGTH(IOC.IOCDATA_LIST[iocid]) != 1$
+				$TAB$$TAB$TRUE,$NL$
+			$ELSE$
+				$TAB$$TAB$FALSE,$NL$
+			$END$
+			#endif /* CFG_USE_ERRORHOOK */$NL$
+			$TAB$$TAB$&osapcb_table[$IOCRCV.OSAPID[IOC.IOCRCV[iocid]]$],$NL$
+			$TAB$$TAB$&iocmb_table_$iocid$$NL$
+		$TAB$}
+	$END$
+	$NL$};$NL$
+	$NL$
+
+$ 	// IOCã©ããã¼åæåãã¼ãã«
+	const IOCWRPINIB iocwrpinib_table[TNUM_IOC_WRAPPER] = {$NL$
+	$JOINEACH iocsndid IOCSND.ID_LIST ",\n"$
+		$TAB${$NL$
+			$TAB$$TAB$&iocinib_table[$IOCSND.IOC[iocsndid]$],$NL$
+			$TAB$$TAB$&osapcb_table[$IOCSND.OSAPID[iocsndid]$],$NL$
+			$IF EQ(IOCSND.SENDERID[iocsndid], "NULL")$
+				$TAB$0U$NL$
+			$ELSE$
+				$TAB$$TAB$$IOCSND.SENDERID[iocsndid]$U$NL$
+			$END$
+		$TAB$}
+	$END$
+	$NL$};$NL$
+	$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(void *, ioc_inival_table);$NL$
+	TOPPERS_EMPTY_LABEL(IOCCB, ioccb_table);$NL$
+	TOPPERS_EMPTY_LABEL(const IOCINIB, iocinib_table);$NL$
+	TOPPERS_EMPTY_LABEL(const IOCWRPINIB, iocwrpinib_table);$NL$
+
+$END$
+
+
+$ =====================================================================
+$ Ioc.hã®çæ
+$ =====================================================================
+$FILE "Ioc.h"$
+#ifndef TOPPERS_IOC_H$NL$
+#define TOPPERS_IOC_H$NL$
+$NL$
+
+#include "Os.h"$NL$
+#include "Os_Lcfg.h"$NL$
+$NL$
+
+$IF LENGTH(IOC.ID_LIST)$
+	/* IOC data management block */$NL$
+	$FOREACH iocid IOC.ID_LIST$
+		typedef struct ioc_data_management_block_$iocid$ {$NL$
+		$arg = 1$
+		$FOREACH iocdataid IOC.IOCDATA_LIST[iocid]$
+			$TAB$$GET_SHORT_NAME(IOCDATA.DATATYPE[iocdataid])$$TAB$data$arg$;$NL$
+			$arg = arg + 1$
+		$END$
+		}IOCMB_$iocid$;$NL$
+		$NL$
+	$END$
+$ELSE$
+	/* IOC is not used */
+$END$
+
+
+$ =====================================================================
+$ Ioc.cã®çæ
+$ =====================================================================
+$FILE "Ioc.c"$
+
+$IF LENGTH(IOC.ID_LIST)$
+	#include "Ioc.h"$NL$
+$ELSE$
+	/* IOC is not used */
+$END$
+
+$ =====================================================================
+$ APIã®çæ
+$ =====================================================================
+$IF LENGTH(IOC.ID_LIST)$
+	$FOREACH iocid IOC.ID_LIST$
+		$FILE "Ioc.h"$
+		$NL$
+		/* $iocid$ API */
+		$FILE "Ioc.c"$
+		$NL$
+		
+		$shortname = GET_SHORT_NAME(IOCDATA.DATATYPE[IOC.IOCDATA_LIST[iocid]], iocid)$
+		$category = GET_CATEGORY(IOCDATA.DATATYPE[IOC.IOCDATA_LIST[iocid]], iocid)$
+		/* $iocid$ API */
+$ 		// éä¿¡API
+$		// 1:1éä¿¡
+		$IF LENGTH(IOC.IOCSND_LIST[iocid]) == 1$
+$ 			// 1:1ï¼åä¸ãã¼ã¿éä¿¡
+			$IF LENGTH(IOC.IOCDATA_LIST[iocid]) == 1$
+$				// 1:1ï¼åä¸ãã¼ã¿éä¿¡ï¼ã­ã¥ã¼ç¡ã
+				$IF EQ(IOC.BUFLEN[iocid], "NULL")$
+					$iocsender = "IocWrite"$
+					$iocsender_generic = "ioc_write_generic"$
+$				// 1:1ï¼åä¸ãã¼ã¿éä¿¡ï¼ã­ã¥ã¼ãã
+				$ELSE$
+					$iocsender = "IocSend"$
+					$iocsender_generic = "ioc_send_generic"$
+				$END$
+$				// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ãå¤æ­ãã¦ã³ã¼ããçæ
+				$FOREACH iocsnd IOC.IOCSND_LIST[iocid]$
+$					// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ä»¥å¤ã®ã¨ã©ã¼ãã§ãã¯ã¯ç¢ºèªæ¸ã¿
+					$IF !EQ(IOCSND.IMPLKIND[iocsnd], "MACRO")$
+						$FILE "Ioc.h"$
+						extern Std_ReturnType $iocsender$_$iocid$(
+							$IF !EQ(category, "VALUE")$
+								const $shortname$ *
+							$ELSE$
+								$shortname$$SPC$
+							$END$
+						in1);
+						
+						$FILE "Ioc.c"$
+						Std_ReturnType$NL$
+						$iocsender$_$iocid$(
+							$IF !EQ(category, "VALUE")$
+								const $shortname$ *
+							$ELSE$
+								$shortname$$SPC$
+							$END$
+						in1)$NL$
+						{$NL$
+							$TAB$Std_ReturnType$TAB$ercd;$NL$
+							$TAB$IOCMB_$iocid$$TAB$in;$NL$
+							$TAB$in.data1 =$SPC$
+								$IF !EQ(category, "VALUE")$
+									*
+								$END$
+							in1;$NL$
+							$TAB$ercd = $iocsender_generic$(IOC_WRAPPER_$+iocsnd - 1$, (void *)(&in));$NL$
+							$TAB$return(ercd);$NL$
+						}$NL$
+					$ELSE$
+						$FILE "Ioc.h"$
+						LOCAL_INLINE Std_ReturnType$NL$
+						$iocsender$_$iocid$(
+							$IF !EQ(category, "VALUE")$
+								const $shortname$ *
+							$ELSE$
+								$shortname$$SPC$
+							$END$
+						 in1)$NL$
+						{$NL$
+							$TAB$Std_ReturnType$TAB$ercd;$NL$
+							$TAB$IOCMB_$iocid$$TAB$in;$NL$
+							$TAB$in.data1 =$SPC$
+								$IF !EQ(category, "VALUE")$
+								 *
+								$END$
+							in1;$NL$
+							$TAB$ercd = $iocsender_generic$(IOC_WRAPPER_$+iocsnd - 1$, (void *)(&in));$NL$
+							$TAB$return(ercd);$NL$
+						}$NL$
+					$END$
+				$END$
+$ 			// 1:1ï¼ã°ã«ã¼ãéä¿¡
+			$ELSE$
+$				// 1:1ï¼ã°ã«ã¼ãéä¿¡ï¼ã­ã¥ã¼ç¡ã
+				$IF EQ(IOC.BUFLEN[iocid], "NULL")$
+					$iocsender = "IocWriteGroup"$
+					$iocsender_generic = "ioc_write_generic"$
+$				// 1:1ï¼ã°ã«ã¼ãéä¿¡ï¼ã­ã¥ã¼ãã
+				$ELSE$
+					$iocsender = "IocSendGroup"$
+					$iocsender_generic = "ioc_send_generic"$
+				$END$
+$				// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ãå¤æ­ãã¦ã³ã¼ããçæ
+				$FOREACH iocsnd IOC.IOCSND_LIST[iocid]$
+$					// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ä»¥å¤ã®ã¨ã©ã¼ãã§ãã¯ã¯ç¢ºèªæ¸ã¿
+					$IF !EQ(IOCSND.IMPLKIND[iocsnd], "MACRO")$
+						$FILE "Ioc.h"$
+						extern Std_ReturnType $iocsender$_$iocid$(
+							$arg = 1$
+							$JOINEACH iocdata IOC.IOCDATA_LIST[iocid] ", "$
+								$shortname = GET_SHORT_NAME(IOCDATA.DATATYPE[iocdata], iocid)$
+								$IF !EQ(GET_CATEGORY(IOCDATA.DATATYPE[iocdata], iocid), "VALUE")$
+									const $shortname$ *in$arg$
+								$ELSE$
+									$shortname$ in$arg$
+								$END$
+								$arg = arg + 1$
+							$END$
+						);
+						$FILE "Ioc.c"$
+						Std_ReturnType$NL$
+						$iocsender$_$iocid$(
+							$arg = 1$
+							$JOINEACH iocdata IOC.IOCDATA_LIST[iocid] ", "$
+								$shortname = GET_SHORT_NAME(IOCDATA.DATATYPE[iocdata], iocid)$
+								$IF !EQ(GET_CATEGORY(IOCDATA.DATATYPE[iocdata], iocid), "VALUE")$
+									const $shortname$ *in$arg$
+								$ELSE$
+									$shortname$ in$arg$
+								$END$
+								$arg = arg + 1$
+							$END$
+						)$NL$
+						{$NL$
+							$TAB$Std_ReturnType$TAB$ercd;$NL$
+							$TAB$IOCMB_$iocid$$TAB$in;$NL$
+							$arg = 1$
+							$FOREACH iocdata IOC.IOCDATA_LIST[iocid]$
+								$TAB$in.data$arg$ =$SPC$
+									$IF !EQ(GET_CATEGORY(IOCDATA.DATATYPE[iocdata], iocid), "VALUE")$
+										*
+									$END$
+								in$arg$;$NL$
+								$arg = arg + 1$
+							$END$
+							$TAB$ercd = $iocsender_generic$(IOC_WRAPPER_$+iocsnd - 1$, (void *)(&in));$NL$
+							$TAB$return(ercd);$NL$
+						}$NL$
+					$ELSE$
+						$FILE "Ioc.h"$
+						LOCAL_INLINE Std_ReturnType$NL$
+						$iocsender$_$iocid$(
+							$arg = 1$
+							$JOINEACH iocdata IOC.IOCDATA_LIST[iocid] ", "$
+								$shortname = GET_SHORT_NAME(IOCDATA.DATATYPE[iocdata], iocid)$
+								$IF !EQ(GET_CATEGORY(IOCDATA.DATATYPE[iocdata], iocid), "VALUE")$
+									const $shortname$ *in$arg$
+								$ELSE$
+									$shortname$ in$arg$
+								$END$
+								$arg = arg + 1$
+							$END$
+						)$NL$
+						{$NL$
+							$TAB$Std_ReturnType$TAB$ercd;$NL$
+							$TAB$IOCMB_$iocid$$TAB$in;$NL$
+							$arg = 1$
+							$FOREACH iocdata IOC.IOCDATA_LIST[iocid]$
+								$TAB$in.data$arg$ =$SPC$
+									$IF !EQ(GET_CATEGORY(IOCDATA.DATATYPE[iocdata], iocid), "VALUE")$
+										*
+									$END$
+								in$arg$;$NL$
+								$arg = arg + 1$
+							$END$
+							$TAB$ercd = $iocsender_generic$(IOC_WRAPPER_$+iocsnd - 1$, (void *)(&in));$NL$
+							$TAB$return(ercd);$NL$
+						}
+					$END$
+				$END$
+			$END$
+$ 		// N:1éä¿¡
+		$ELSE$
+$ 			// N:1ï¼éå¸¸éä¿¡
+			$IF LENGTH(IOC.IOCDATA_LIST[iocid]) == 1$
+$ 				// N:1ï¼åä¸ãã¼ã¿éä¿¡ï¼ã­ã¥ã¼ç¡ã
+				$IF EQ(IOC.BUFLEN[iocid], "NULL")$
+					$iocsender = "IocWrite"$
+					$iocsender_generic = "ioc_write_generic"$
+$ 				// N:1ï¼åä¸ãã¼ã¿éä¿¡ï¼ã­ã¥ã¼ãã
+				$ELSE$
+					$iocsender = "IocSend"$
+					$iocsender_generic = "ioc_send_generic"$
+				$END$
+$				// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ãå¤æ­ãã¦ã³ã¼ããçæ
+				$FOREACH iocsnd IOC.IOCSND_LIST[iocid]$
+$					// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ä»¥å¤ã®ã¨ã©ã¼ãã§ãã¯ã¯ç¢ºèªæ¸ã¿
+					$IF !EQ(IOCSND.IMPLKIND[iocsnd], "MACRO")$
+						$FILE "Ioc.h"$
+						extern Std_ReturnType $iocsender$_$iocid$_$IOCSND.SENDERID[iocsnd]$(
+							$IF !EQ(category, "VALUE")$
+								const $shortname$ *
+							$ELSE$
+								$shortname$$SPC$
+							$END$
+						in1);
+						
+						$FILE "Ioc.c"$
+						Std_ReturnType$NL$
+						$iocsender$_$iocid$_$IOCSND.SENDERID[iocsnd]$(
+							$IF !EQ(category, "VALUE")$
+								const $shortname$ *
+							$ELSE$
+								$shortname$$SPC$
+							$END$
+						in1)$NL$
+						{$NL$
+							$TAB$Std_ReturnType$TAB$ercd;$NL$
+							$TAB$IOCMB_$iocid$$TAB$in;$NL$
+							$TAB$in.data1 =$SPC$
+								$IF !EQ(category, "VALUE")$
+									*
+								$END$
+							in1;$NL$
+							$TAB$ercd = $iocsender_generic$(IOC_WRAPPER_$+iocsnd - 1$, (void *)(&in));$NL$
+							$TAB$return(ercd);$NL$
+						}$NL$
+					$ELSE$
+						$FILE "Ioc.h"$
+						LOCAL_INLINE Std_ReturnType$NL$
+						$iocsender$_$iocid$_$IOCSND.SENDERID[iocsnd]$(
+							$IF !EQ(category, "VALUE")$
+								const $shortname$ *
+							$ELSE$
+								$shortname$$SPC$
+							$END$
+						in1)$NL$
+						{$NL$
+							$TAB$Std_ReturnType$TAB$ercd;$NL$
+							$TAB$IOCMB_$iocid$$TAB$in;$NL$
+							$TAB$in.data1 =$SPC$
+								$IF !EQ(category, "VALUE")$
+								 *
+								$END$
+							in1;$NL$
+							$TAB$ercd = $iocsender_generic$(IOC_WRAPPER_$+iocsnd - 1$, (void *)(&in));$NL$
+							$TAB$return(ercd);$NL$
+						}
+					$END$
+				$END$
+$ 			// N:1ï¼ã°ã«ã¼ãéä¿¡ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã¯ã¨ã©ã¼
+			$ELSE$
+				$ERROR IOC.TEXT_LINE[iocid]$$FORMAT(_("N:1 and Group IOC can not be used."))$$END$
+			$END$
+		$END$
+
+$ 		// åä¿¡API - åä¿¡APIã¯1:1 or N:1ã«ãã£ã¦APIçæã¯å¤åããªã
+$ 		// åä¸ãã¼ã¿éä¿¡
+		$IF LENGTH(IOC.IOCDATA_LIST[iocid]) == 1$
+$	 		// åä¸ãã¼ã¿éä¿¡ï¼ã­ã¥ã¼ç¡ã
+			$IF EQ(IOC.BUFLEN[iocid], "NULL")$
+				$iocreceiver = "IocRead"$
+				$iocreceiver_generic = "ioc_read_generic"$
+				$iocerrorcheck = "ercd == IOC_E_OK"$
+$	 		// åä¸ãã¼ã¿éä¿¡ï¼ã­ã¥ã¼ãã
+			$ELSE$
+				$iocreceiver = "IocReceive"$
+				$iocreceiver_generic = "ioc_receive_generic"$
+				$iocerrorcheck = "(ercd == IOC_E_OK) || (ercd == IOC_E_LOST_DATA)"$
+			$END$
+$			// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ãå¤æ­ãã¦ã³ã¼ããçæ
+$			// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ä»¥å¤ã®ã¨ã©ã¼ãã§ãã¯ã¯ç¢ºèªæ¸ã¿
+			$IF !EQ(IOCRCV.IMPLKIND[IOC.IOCRCV[iocid]], "MACRO")$
+				$FILE "Ioc.h"$
+				extern Std_ReturnType $iocreceiver$_$iocid$($shortname$ *out1);
+				
+				$FILE "Ioc.c"$
+				Std_ReturnType$NL$
+				$iocreceiver$_$iocid$($shortname$ *out1)$NL$
+				{$NL$
+					$TAB$Std_ReturnType$TAB$ercd;$NL$
+					$TAB$IOCMB_$iocid$$TAB$out;$NL$
+					$TAB$ercd = $iocreceiver_generic$($iocid$, (void *)(&out));$NL$
+					$TAB$if ($iocerrorcheck$) {$NL$
+					$TAB$$TAB$*out1 = out.data1;$NL$
+					$TAB$}$NL$
+					$TAB$return(ercd);$NL$
+				}$NL$
+			$ELSE$
+				$FILE "Ioc.h"$
+				LOCAL_INLINE Std_ReturnType$NL$
+				$iocreceiver$_$iocid$($shortname$ *out1)$NL$
+				{$NL$
+					$TAB$Std_ReturnType$TAB$ercd;$NL$
+					$TAB$IOCMB_$iocid$$TAB$out;$NL$
+					$TAB$ercd = $iocreceiver_generic$($iocid$, (void *)(&out));$NL$
+					$TAB$if ($iocerrorcheck$) {$NL$
+					$TAB$$TAB$*out1 = out.data1;$NL$
+					$TAB$}$NL$
+					$TAB$return(ercd);$NL$
+				}
+			$END$
+$ 		// ã°ã«ã¼ãéä¿¡
+		$ELSE$
+$ 			// ã°ã«ã¼ãéä¿¡ï¼ã­ã¥ã¼ç¡ã
+			$IF EQ(IOC.BUFLEN[iocid], "NULL")$
+				$iocreceiver = "IocReadGroup"$
+				$iocreceiver_generic = "ioc_read_generic"$
+				$iocerrorcheck = "ercd == IOC_E_OK"$
+$ 			// ã°ã«ã¼ãéä¿¡ï¼ã­ã¥ã¼ãã
+			$ELSE$
+				$iocreceiver = "IocReceiveGroup"$
+				$iocreceiver_generic = "ioc_receive_generic"$
+				$iocerrorcheck = "(ercd == IOC_E_OK) || (ercd == IOC_E_LOST_DATA)"$
+			$END$
+$			// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ãå¤æ­ãã¦ã³ã¼ããçæ
+$			// FUNCTION, MACRO, DO_NOT_CARE, çç¥(NULL)ä»¥å¤ã®ã¨ã©ã¼ãã§ãã¯ã¯ç¢ºèªæ¸ã¿
+			$IF !EQ(IOCRCV.IMPLKIND[IOC.IOCRCV[iocid]], "MACRO")$
+				$FILE "Ioc.h"$
+				extern Std_ReturnType $iocreceiver$_$iocid$(
+				$arg = 1$
+				$JOINEACH iocdata IOC.IOCDATA_LIST[iocid] ", "$
+					$shortname = GET_SHORT_NAME(IOCDATA.DATATYPE[iocdata], iocid)$
+					$shortname$$SPC$*out$arg$
+					$arg = arg + 1$
+				$END$
+				);
+				
+				$FILE "Ioc.c"$
+				Std_ReturnType$NL$
+				$iocreceiver$_$iocid$(
+				$arg = 1$
+				$JOINEACH iocdata IOC.IOCDATA_LIST[iocid] ", "$
+					$shortname = GET_SHORT_NAME(IOCDATA.DATATYPE[iocdata], iocid)$
+					$shortname$$SPC$*out$arg$
+					$arg = arg + 1$
+				$END$
+				)$NL$
+				{$NL$
+					$TAB$Std_ReturnType$TAB$ercd;$NL$
+					$TAB$IOCMB_$iocid$$TAB$out;$NL$
+					$TAB$ercd = $iocreceiver_generic$($iocid$, (void *)(&out));$NL$
+					$TAB$if ($iocerrorcheck$) {$NL$
+					$arg = 1$
+					$FOREACH iocdata IOC.IOCDATA_LIST[iocid]$
+						$TAB$$TAB$*out$arg$ = out.data$arg$;$NL$
+						$arg = arg + 1$
+					$END$
+					$TAB$}$NL$
+					$TAB$return(ercd);$NL$
+				}$NL$
+			$ELSE$
+				$FILE "Ioc.h"$
+				LOCAL_INLINE Std_ReturnType$NL$
+				$iocreceiver$_$iocid$(
+				$arg = 1$
+				$JOINEACH iocdata IOC.IOCDATA_LIST[iocid] ", "$
+					$shortname = GET_SHORT_NAME(IOCDATA.DATATYPE[iocdata], iocid)$
+					$shortname$$SPC$*out$arg$
+					$arg = arg + 1$
+				$END$
+				)$NL$
+				{$NL$
+					$TAB$Std_ReturnType$TAB$ercd;$NL$
+					$TAB$IOCMB_$iocid$$TAB$out;$NL$
+					$TAB$ercd = $iocreceiver_generic$($iocid$, (void *)(&out));$NL$
+					$TAB$if ($iocerrorcheck$) {$NL$
+					$arg = 1$
+					$FOREACH iocdata IOC.IOCDATA_LIST[iocid]$
+						$TAB$$TAB$*out$arg$ = out.data$arg$;$NL$
+						$arg = arg + 1$
+					$END$
+					$TAB$}$NL$
+					$TAB$return(ercd);$NL$
+				}
+			$END$
+		$END$
+
+$ 		// queue empty API
+		$IF !EQ(IOC.BUFLEN[iocid], "NULL")$
+			$FILE "Ioc.h"$
+			extern Std_ReturnType IocEmptyQueue_$iocid$(void);
+			
+			$FILE "Ioc.c"$
+			Std_ReturnType$NL$
+			IocEmptyQueue_$iocid$(void)$NL$
+			{$NL$
+				$TAB$Std_ReturnType	ercd;$NL$
+				$TAB$ercd = ioc_empty_queue_generic($iocid$);$NL$
+				$TAB$return(ercd);$NL$
+			}$NL$
+		$END$
+	$END$
+$END$
+
+$FILE "Ioc.h"$
+$NL$
+#endif /* TOPPERS_IOC_H_ */$NL$
Index: /atk2-sc3-1.4.0-ntisr/kernel/ioc_impl.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/ioc_impl.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/ioc_impl.h	(revision 172)
@@ -0,0 +1,170 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: ioc_impl.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		IOCæ©è½
+ */
+
+#ifndef TOPPERS_IOC_IMPL_H
+#define TOPPERS_IOC_IMPL_H
+
+#include "kernel_impl.h"
+#include "osap.h"
+
+/*
+ *  Wrapper IDããIOCWRPINIBãåãåºãããã®ãã¯ã­
+ */
+#define get_iocwrpinib(WrapperId)	(&iocwrpinib_table[(WrapperId)])
+
+/*
+ *  IOC IDããIOCCB,IOCINIBãåãåºãããã®ãã¯ã­
+ */
+#define get_ioccb(iocid)		(&ioccb_table[(iocid)])
+#define get_iocinib(iocid)		(&iocinib_table[(iocid)])
+
+/*
+ *  IOCWRPINIBããIOC IDãåãåºãããã®ãã¯ã­
+ */
+#define IOCID(p_iocwrpinib)	((IocType) (((p_iocwrpinib)->p_iocinib) - iocinib_table))
+
+
+
+/*
+ *  IOCåæåãã­ãã¯
+ */
+typedef struct ioc_initialization_block {
+	uint32	maxque;                 /* ã­ã¥ã¼æ° */
+	uint32	datasz;                 /* ãã¼ã¿ãµã¤ãº */
+	uint32	alignsz;                /* ã¢ã©ã¤ã³ãµã¤ãº */
+#ifdef CFG_USE_ERRORHOOK
+	boolean	groupflg;            /* ã°ã«ã¼ãéä¿¡ãã©ã° */
+#endif /* CFG_USE_ERRORHOOK */
+	OSAPCB	*p_rcvosapcb;        /* Receiverãæå±ããOSAPã®åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	void	*p_iocmb;
+} IOCINIB;
+
+/*
+ *  IOCç®¡çãã­ãã¯ï¼Os_Lcfg.cï¼
+ */
+typedef struct ioc_control_block {
+	uint32	quecnt;                 /* ç¾å¨ã®ã­ã¥ã¼æ° */
+	uint32	head;                   /* ã­ã¥ã¼ã®å
+é ­ */
+	uint32	tail;                   /* ã­ã¥ã¼ã®æå¾ */
+	boolean	lostflg;                /* ã­ã¥ã¼ãã«ã¨ã©ã¼(E_LOST_DATA)ç¨ãã©ã° */
+} IOCCB;
+
+/*
+ *  IOC Wrapperåæåãã­ãã¯
+ */
+typedef struct ioc_wrapper_initialization_block {
+	const IOCINIB	*p_iocinib;         /* IOCåæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	OSAPCB			*p_sndosapcb;       /* Senderãæå±ããOSAPã®åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	SenderIdType	senderid;           /* SenderID */
+} IOCWRPINIB;
+
+
+extern const IocType	tnum_ioc;       /* IOCã®æ° */
+extern const IocType	tnum_queueioc;  /* ã­ã¥ã¼ããIOCã®æ° */
+
+/*
+ *  IOC Wrapperåæåãã­ãã¯ï¼Os_Lcfg.cï¼
+ */
+extern const IOCWRPINIB	iocwrpinib_table[];
+
+/*
+ *  IOCåæåãã­ãã¯ï¼Os_Lcfg.cï¼
+ */
+extern const IOCINIB	iocinib_table[];
+
+/*
+ *  IOCç®¡çãã­ãã¯ï¼Os_Lcfg.cï¼
+ */
+extern IOCCB			ioccb_table[];
+
+/*
+ *  IOC WRAPPERåæåãã­ãã¯ï¼Os_Lcfg.cï¼
+ */
+extern const IOCWRPINIB	iocwrpinib_table[];
+
+/*
+ *  IOCåæåå¤ãã¼ãã«
+ */
+extern void				*ioc_inival_table[];
+
+/*
+ *  IOCç®¡çã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+extern void ioc_initialize(void);
+
+#endif /* TOPPERS_IOC_IMPL_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/ioc_manage.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/ioc_manage.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/ioc_manage.c	(revision 172)
@@ -0,0 +1,421 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: ioc_manage.c 453 2015-12-10 08:31:20Z nces-hibino $
+ */
+
+/*
+ *		IOCã¢ã¸ã¥ã¼ã«
+ */
+#include "ioc_impl.h"
+#include "check.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_IOCSEND_ENTER
+#define LOG_IOCSEND_ENTER(senderid)
+#endif /* LOG_IOCSEND_ENTER */
+
+#ifndef LOG_IOCSEND_LEAVE
+#define LOG_IOCSEND_LEAVE(ercd)
+#endif /* LOG_IOCSEND_LEAVE */
+
+#ifndef LOG_IOCWRITE_ENTER
+#define LOG_IOCWRITE_ENTER(senderid)
+#endif /* LOG_IOCWRITE_ENTER */
+
+#ifndef LOG_IOCWRITE_LEAVE
+#define LOG_IOCWRITE_LEAVE(ercd)
+#endif /* LOG_IOCWRITE_LEAVE */
+
+#ifndef LOG_IOCRECEIVE_ENTER
+#define LOG_IOCRECEIVE_ENTER(iocid)
+#endif /* LOG_IOCRECEIVE_ENTER */
+
+#ifndef LOG_IOCRECEIVE_LEAVE
+#define LOG_IOCRECEIVE_LEAVE(ercd)
+#endif /* LOG_IOCRECEIVE_LEAVE */
+
+#ifndef LOG_IOCREAD_ENTER
+#define LOG_IOCREAD_ENTER(iocid)
+#endif /* LOG_IOCREAD_ENTER */
+
+#ifndef LOG_IOCREAD_LEAVE
+#define LOG_IOCREAD_LEAVE(ercd)
+#endif /* LOG_IOCREAD_LEAVE */
+
+#ifndef LOG_IOCEMPTYQUEUE_ENTER
+#define LOG_IOCEMPTYQUEUE_ENTER(iocid)
+#endif /* LOG_IOCEMPTYQUEUE_ENTER */
+
+#ifndef LOG_IOCEMPTUQUEUE_LEAVE
+#define LOG_IOCEMPTUQUEUE_LEAVE(ercd)
+#endif /* LOG_IOCEMPTUQUEUE_LEAVE */
+
+
+/* å
+é¨é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */
+LOCAL_INLINE void ioc_memcpy(void *p_dst, const void *p_src, uint32 sz);
+
+
+/*
+ *  åæåé¢æ°
+ */
+void
+ioc_initialize(void)
+{
+	IocType			i;
+	IOCCB			*p_ioccb;
+	const IOCINIB	*p_iocinib;
+
+	/* ã­ã¥ã¼ã®åæå */
+	for (i = 0U; i < tnum_queueioc; i++) {
+		p_ioccb = &ioccb_table[i];
+		p_ioccb->quecnt = 0U;
+		p_ioccb->head = 0U;
+		p_ioccb->tail = 0U;
+		p_ioccb->lostflg = FALSE;
+	}
+
+	/* åIOCã®ãããã¡åæå */
+	for (i = 0U; i < tnum_ioc; i++) {
+		if (ioc_inival_table[i] != NULL) {
+			p_iocinib = &iocinib_table[i];
+			ioc_memcpy((void *) (p_iocinib->p_iocmb), ioc_inival_table[i], p_iocinib->datasz);
+		}
+	}
+}
+
+
+
+LOCAL_INLINE void
+ioc_memcpy(void *p_dst, const void *p_src, uint32 sz)
+{
+	uint8		*p_tmp_dst = (uint8 *) p_dst;
+	const uint8	*p_tmp_src = (const uint8 *) p_src;
+	CounterType	i;
+
+	for (i = 0U; i < sz; i++) {
+		p_tmp_dst[i] = p_tmp_src[i];
+	}
+}
+
+
+Std_ReturnType
+ioc_send_generic(IocType IocWrapperId, const void *in)
+{
+	const IOCWRPINIB	*p_iocwrpinib;
+	const IOCINIB		*p_iocinib;
+	IOCCB				*p_ioccb;
+	Std_ReturnType		ercd = IOC_E_OK;
+
+	p_iocwrpinib = get_iocwrpinib(IocWrapperId);
+	p_iocinib = get_iocinib(IOCID(p_iocwrpinib));
+	p_ioccb = get_ioccb(IOCID(p_iocwrpinib));
+
+	LOG_IOCSEND_ENTER(p_iocwrpinib->senderid);
+
+	CHECK_IOC_CALLEVEL_DISABLEDINT(CALLEVEL_IOCSEND);
+	CHECK_IOC_ACCESS(p_iocwrpinib->p_sndosapcb == p_runosap);
+	CHECK_IOC_MEM_READ((const MemoryStartAddressType) in, p_iocinib->datasz, p_iocinib->alignsz);
+
+	x_nested_lock_os_int();
+
+	S_D_CHECK_IOC_LIMIT(p_ioccb->quecnt < p_iocinib->maxque);
+	ioc_memcpy((void *) ((uint32) p_iocinib->p_iocmb + ((p_iocinib->datasz) * (p_ioccb->tail))), in, p_iocinib->datasz);
+	p_ioccb->quecnt++;
+	p_ioccb->tail++;
+	if (p_ioccb->tail >= p_iocinib->maxque) {
+		p_ioccb->tail = 0U;
+	}
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_IOCSEND_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+	goto errorhook_start;
+
+  exit_errorhook:
+	x_nested_lock_os_int();
+  errorhook_start:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.iocid = IOCID(p_iocwrpinib);
+	_errorhook_par2.senderid = p_iocwrpinib->senderid;
+#endif /* CFG_USE_PARAMETERACCESS */
+	if (p_iocinib->groupflg != FALSE) {
+		call_errorhook(ercd, IOCServiceId_IOC_SendGroup);
+	}
+	else {
+		call_errorhook(ercd, IOCServiceId_IOC_Send);
+	}
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+
+Std_ReturnType
+ioc_write_generic(IocType IocWrapperId, const void *in)
+{
+	const IOCWRPINIB	*p_iocwrpinib;
+	const IOCINIB		*p_iocinib;
+	Std_ReturnType		ercd = IOC_E_OK;
+
+	p_iocwrpinib = get_iocwrpinib(IocWrapperId);
+	p_iocinib = get_iocinib(IOCID(p_iocwrpinib));
+
+	LOG_IOCWRITE_ENTER(p_iocwrpinib->senderid);
+
+	CHECK_IOC_CALLEVEL_DISABLEDINT(CALLEVEL_IOCWRITE);
+	CHECK_IOC_ACCESS(p_iocwrpinib->p_sndosapcb == p_runosap);
+	CHECK_IOC_MEM_READ((const MemoryStartAddressType) in, p_iocinib->datasz, p_iocinib->alignsz);
+
+	x_nested_lock_os_int();
+
+	ioc_memcpy((void *) (p_iocinib->p_iocmb), in, p_iocinib->datasz);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_IOCWRITE_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+	goto errorhook_start;
+
+  exit_errorhook:
+	x_nested_lock_os_int();
+  errorhook_start:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.iocid = IOCID(p_iocwrpinib);
+	_errorhook_par2.senderid = p_iocwrpinib->senderid;
+#endif /* CFG_USE_PARAMETERACCESS */
+	if (p_iocinib->groupflg != FALSE) {
+		call_errorhook(ercd, IOCServiceId_IOC_WriteGroup);
+	}
+	else {
+		call_errorhook(ercd, IOCServiceId_IOC_Write);
+	}
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+
+Std_ReturnType
+ioc_receive_generic(IocType IocId, void *out)
+{
+	const IOCINIB	*p_iocinib;
+	IOCCB			*p_ioccb;
+	Std_ReturnType	ercd = IOC_E_OK;
+
+	LOG_IOCRECEIVE_ENTER(IocId);
+
+	p_iocinib = get_iocinib(IocId);
+	p_ioccb = get_ioccb(IocId);
+
+	CHECK_IOC_CALLEVEL_DISABLEDINT(CALLEVEL_IOCRECEIVE);
+	CHECK_IOC_ACCESS(p_iocinib->p_rcvosapcb == p_runosap);
+	CHECK_IOC_MEM_WRITE(out, p_iocinib->datasz, p_iocinib->alignsz);
+
+	x_nested_lock_os_int();
+
+	S_D_CHECK_IOC_NO_DATA(p_ioccb->quecnt > 0U);
+	ioc_memcpy(out, (void *) ((uint32) p_iocinib->p_iocmb + ((p_iocinib->datasz) * (p_ioccb->head))), p_iocinib->datasz);
+
+	p_ioccb->quecnt--;
+	p_ioccb->head++;
+	if (p_ioccb->head >= p_iocinib->maxque) {
+		p_ioccb->head = 0U;
+	}
+
+	S_D_CHECK_IOC_LOST(p_ioccb->lostflg == FALSE);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_IOCRECEIVE_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+	goto errorhook_start;
+
+  exit_errorhook:
+	x_nested_lock_os_int();
+  errorhook_start:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.iocid = IocId;
+#endif /* CFG_USE_PARAMETERACCESS */
+	if (p_iocinib->groupflg != FALSE) {
+		call_errorhook(ercd, IOCServiceId_IOC_ReceiveGroup);
+	}
+	else {
+		call_errorhook(ercd, IOCServiceId_IOC_Receive);
+	}
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+
+Std_ReturnType
+ioc_read_generic(IocType IocId, void *out)
+{
+	const IOCINIB	*p_iocinib;
+	Std_ReturnType	ercd = IOC_E_OK;
+
+	LOG_IOCREAD_ENTER(IocId);
+
+	p_iocinib = get_iocinib(IocId);
+
+	CHECK_IOC_CALLEVEL_DISABLEDINT(CALLEVEL_IOCREAD);
+	CHECK_IOC_ACCESS(p_iocinib->p_rcvosapcb == p_runosap);
+	CHECK_IOC_MEM_WRITE(out, p_iocinib->datasz, p_iocinib->alignsz);
+
+	x_nested_lock_os_int();
+
+	ioc_memcpy(out, (void *) (p_iocinib->p_iocmb), p_iocinib->datasz);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_IOCREAD_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+	goto errorhook_start;
+
+  exit_errorhook:
+	x_nested_lock_os_int();
+  errorhook_start:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.iocid = IocId;
+#endif /* CFG_USE_PARAMETERACCESS */
+	if (p_iocinib->groupflg != FALSE) {
+		call_errorhook(ercd, IOCServiceId_IOC_ReadGroup);
+	}
+	else {
+		call_errorhook(ercd, IOCServiceId_IOC_Read);
+	}
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+
+Std_ReturnType
+ioc_empty_queue_generic(IocType IocId)
+{
+	IOCCB			*p_ioccb;
+	const IOCINIB	*p_iocinib;
+	Std_ReturnType	ercd = IOC_E_OK;
+
+	p_ioccb = get_ioccb(IocId);
+	p_iocinib = get_iocinib(IocId);
+
+	CHECK_IOC_CALLEVEL_DISABLEDINT(CALLEVEL_IOCEMPTYQUEUE);
+	CHECK_IOC_ACCESS(p_iocinib->p_rcvosapcb == p_runosap);
+
+	x_nested_lock_os_int();
+
+	p_ioccb->quecnt = 0U;
+	p_ioccb->head = 0U;
+	p_ioccb->tail = 0U;
+	p_ioccb->lostflg = FALSE;
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_IOCREAD_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+	goto errorhook_start;
+
+  exit_errorhook:
+	x_nested_lock_os_int();
+  errorhook_start:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.iocid = IocId;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, IOCServiceId_IOC_EmptyQueue);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel.csv
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel.csv	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel.csv	(revision 172)
@@ -0,0 +1,155 @@
+/AUTOSAR/EcucDefs/Os,,,1
+/AUTOSAR/EcucDefs/Os/OsOS,OS,,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsScalabilityClass,SC,ENUM,0,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsStackMonitoring,STACKMONITORING,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsStatus,STATUS,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsUseGetServiceId,GETSERVICEID,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsUseParameterAccess,PARAMETERACCESS,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHooks,HOOK,,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsStartupHook,STARTUPHOOK,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsShutdownHook,SHUTDOWNHOOK,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPreTaskHook,PRETASKHOOK,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPostTaskHook,POSTTASKHOOK,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsErrorHook,ERRORHOOK,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsProtectionHook,PROTECTIONHOOK,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsOsStack,OSTK,,0,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsOsStack/OsOsStackSize,STKSZ,INT,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsOsStack/OsOsStackStartAddress,STK,+STRING,0,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack,HSTK,,0,1
+/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack/OsHookStackSize,STKSZ,INT,1
+/AUTOSAR/EcucDefs/Os/OsInclude,XINCLUDE,,0,*
+/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName,XINCNAME,+INCLUDE,1,*
+/AUTOSAR/EcucDefs/Os/OsAppMode,APP,,1,*
+/AUTOSAR/EcucDefs/Os/OsTask,TSK,,0,*
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation,ACTIVATION,INT,1
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority,PRIORITY,INT,1
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule,SCHEDULE,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef,EVT_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef,RES_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize,STKSZ,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress,STK,+STRING,0,1
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication,ACS_OSAP_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize,SSTKSZ,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress,SSTK,+STRING,0,1
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart,TSK.AUTOSTART,,0,1
+/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef,APP_LIST,REF,1,*
+/AUTOSAR/EcucDefs/Os/OsIsr,ISR,,0,*
+/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrCategory,CATEGORY,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptNumber,INTNO,INT,1
+/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptPriority,INTPRI,INT,1
+/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrResourceRef,RES_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrStackSize,STKSZ,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptTrigger,INTATR,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptSource,SOURCE,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrAccessingApplication,ACS_OSAP_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsEvent,EVT,,0,*
+/AUTOSAR/EcucDefs/Os/OsEvent/OsEventMask,MASK,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsResource,RES,,0,*
+/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty,RESATR,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsResource/OsResourceLinkedResourceRef,LINKEDRESID,REF,0,1
+/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication,ACS_OSAP_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsCounter,CNT,,0,*
+/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue,MAXALLOWED,INT,1
+/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle,MINCYCLE,INT,1
+/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase,TICKSPERBASE,INT,1
+/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType,CNTATR,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsCounter/OsSecondsPerTick,SECONDSPERTICK,FLOAT,0,1
+/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterIsrRef,ISRID,REF,0,1
+/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterAccessingApplication,ACS_OSAP_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsAlarm,ALM,,0,*
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef,CNTID,REF,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAccessingApplication,ACS_OSAP_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction,ALM.ACTION,,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask,ALM.ACTION.ACTIVATETASK,,0,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef,TSKID,REF,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmCallback,ALM.ACTION.CALLBACK,,0,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmCallback/OsAlarmCallbackName,CALLBACK,FUNCTION,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter,ALM.ACTION.INCREMENTCOUNTER,,0,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter/OsAlarmIncrementCounterRef,INCID,REF,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent,ALM.ACTION.SETEVENT,,0,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef,EVTID,REF,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef,TSKID,REF,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart,ALM.AUTOSTART,,0,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime,ALARMTIME,INT,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef,APP_LIST,REF,1,*
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime,CYCLETIME,INT,1
+/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType,TYPE,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable,SCHTBL,,0,*
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration,DURATIONTICK,INT,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating,REPEAT,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef,CNTID,REF,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsSchTblAccessingApplication,ACS_OSAP_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableAutostart,SCHTBL.AUTOSTART,,0,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableAutostart/OsScheduleTableStartValue,STARTTICK,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableAutostart/OsScheduleTableAutostartType,TYPE,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableAutostart/OsScheduleTableAppModeRef,APP_LIST,REF,1,*
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint,SCHTBL.EXPPT,,1,*
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset,OFFSET,INT,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting,SCHTBL.EXPPT.SETEVENT,,0,*
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef,EVTID,REF,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef,TSKID,REF,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation,SCHTBL.EXPPT.ACTIVATETASK,,0,*
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef,TSKID,REF,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync,SCHTBL.SYNC,,0,1
+/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy,STRATEGY,ENUM,1
+/AUTOSAR/EcucDefs/Os/OsApplication,OSAP,,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted,TRUSTED,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef,ALM_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef,CNT_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsAppIsrRef,ISR_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef,SCHTBL_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef,TSK_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef,SEC_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemoryModuleRef,MOD_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemoryAreaRef,MEM_LIST,REF,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsRestartTask,RESTARTTASK,REF,0,1
+/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction,OSAP.TFN,,0,*
+/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName,FUNC,FUNCTION,1
+/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize,STKSZ,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsMemoryRegion,REG,,2,*
+/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionName,REGION,STRING,1
+/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionWriteable,WRITE,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionStartAddress,BASE,INT,1
+/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionSize,SIZE,INT,1
+/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion,SRG,,1
+/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion/OsStandardMemoryRomRegionRef,STDROM,REF,1
+/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion/OsStandardMemoryRamRegionRef,STDRAM,REF,1
+/AUTOSAR/EcucDefs/Os/OsMemoryArea,MEM,,0,*
+/AUTOSAR/EcucDefs/Os/OsMemoryArea/OsMemoryAreaStartAddress,BASE,+STRING,1
+/AUTOSAR/EcucDefs/Os/OsMemoryArea/OsMemoryAreaSize,SIZE,INT,1
+/AUTOSAR/EcucDefs/Os/OsMemoryArea/OsMemoryAreaWriteable,WRITE,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemoryArea/OsMemoryAreaReadable,READ,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemoryArea/OsMemoryAreaExecutable,EXEC,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemoryArea/OsMemoryAreaCacheable,CACHE,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemoryArea/OsMemoryAreaDevice,DEVICE,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection,SEC,,0,*
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName,SECTION,STRING,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef,MEMREG,REF,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable,WRITE,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable,READ,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable,EXEC,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort,SDATA,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable,CACHE,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice,DEVICE,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionInitialize,INIT,ENUM,0,1
+/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport,EXPORT,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsMemoryModule,MOD,,0,*
+/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleName,MODULE,STRING,1,*
+/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleExport,EXPORT,BOOLEAN,1
+/AUTOSAR/EcucDefs/Os/OsLinkSection,LNK,,0,*
+/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionName,SECTION,STRING,1
+/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionMemoryRegionRef,MEMREG,REF,1
+/AUTOSAR/EcucDefs/Os/OsIoc,OSIOC,,0,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication,IOC,,0,*
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocBufferLength,BUFLEN,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties,IOCDATA,,1,*
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex,INDEX,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue,INITVAL,+STRING,0,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef,DATATYPE,+STRING,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties,IOCRCV,,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind,IMPLKIND,ENUM,0,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef,OSAPID,REF,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties,IOCSND,,1,*
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind,IMPLKIND,ENUM,0,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId,SENDERID,INT,0,1
+/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef,OSAPID,REF,1
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel.ini
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel.ini	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel.ini	(revision 172)
@@ -0,0 +1,25 @@
+;ATK2 AUTOSAR R4.0 ç¨ã¸ã§ãã¬ã¼ã¿è¨­å®ãã¡ã¤ã«
+
+;AUTOSARã®å¯¾å¿ãã¼ã¸ã§ã³ï¼3ã¾ãã¯4ã®ã¿å¯¾å¿ï¼
+AUTOSARVersion=4
+
+;AUTOSARã¹ã­ã¼ãã®ãã¡ã¤ã«åï¼cfg.exeã®ç¸å¯¾ãã¹ã§è¨è¼ï¼
+Schema=./AUTOSAR_4-0-3_STRICT.xsd
+
+;AUTOSARã¹ã­ã¼ãã®ã­ã±ã¼ã·ã§ã³æ
+å ±
+SchemaLocation=http://autosar.org/schema/r4.0
+
+;å¤éåº¦ãã§ãã¯ã®ã³ã³ããã®ãã¹æ
+å ±
+ContainerPath=/AUTOSAR/EcucDefs
+
+;å¯¾è±¡ã¢ã¸ã¥ã¼ã«å
+ModuleName=Os
+
+;æªå®ç¾©ãã©ã¡ã¼ã¿ãã§ãã¯ãªãã·ã§ã³(TRUEï¼æªå®ç¾©ãã©ã¡ã¼ã¿ã«å¯¾ãã¦è­¦åãè¡¨ç¤ºï¼
+;FALSE:æªå®ç¾©ãã©ã¡ã¼ã¿ã«å¯¾ãã¦è­¦åãè¡¨ç¤ºããªãï¼çç¥æã¯FALSEã¨è¦ãªã)
+CheckUnknownParameter=FALSE
+
+;æ±ç¨XMLè©ä¾¡ãã¼ãã«ãã¡ã¤ã«åï¼æ¬ãã¡ã¤ã«(kernel.ini)ã®ç¸å¯¾ãã¹ã§è¨è¼ï¼
+XMLEvaluateFile=system.csv
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel.tf	(revision 172)
@@ -0,0 +1,4887 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2007 by TAKAGI Nobuhisa
+$  Copyright (C) 2007-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by Spansion LLC, USA
+$  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2015 by Witz Corporation
+$  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+$  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+$  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+$  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: kernel.tf 491 2015-12-17 10:50:31Z nces-okajima $
+$
+
+$TRACE("EXEC kernel.tf")$
+
+$ XMLã®ãã¼ã¿æ§é ã«åé¡ãããã
+$FATAL = 0$
+
+$ =====================================================================
+$ booleanå¤å®é¢æ°
+$ =====================================================================
+
+$FUNCTION IS_TRUE$
+	$true_list = {1, "1", "true", "TRUE", "ON", "ENABLE"}$
+	$false_list = {0, "0", "false", "FALSE", "OFF", "DISABLE"}$
+	$error_flag = 1$
+	
+	$FOREACH false false_list$
+		$IF EQ(false, ARGV[1])$
+			$check_result = VALUE("FALSE", 0)$
+			$error_flag = 0$
+		$END$
+	$END$
+	$FOREACH true true_list$
+		$IF EQ(true, ARGV[1])$
+			$check_result = VALUE("TRUE", 1)$
+			$error_flag = 0$
+		$END$
+	$END$
+
+	$IF error_flag > 0$
+		$ERROR ARGV[2]$$FORMAT(_("%1% must be boolean type"), ARGV[1])$$END$
+	$END$
+
+	$RESULT = check_result$
+$END$
+
+$ =====================================================================
+$ booleanå¤æ
+$ =====================================================================
+
+$OS.STACKMONITORING[1] = IS_TRUE(OS.STACKMONITORING[1], OS.TEXT_LINE[1])$
+$OS.GETSERVICEID[1] = IS_TRUE(OS.GETSERVICEID[1], OS.TEXT_LINE[1])$
+$OS.PARAMETERACCESS[1] = IS_TRUE(OS.PARAMETERACCESS[1], OS.TEXT_LINE[1])$
+$HOOK.STARTUPHOOK[1] = IS_TRUE(HOOK.STARTUPHOOK[1], HOOK.TEXT_LINE[1])$
+$HOOK.SHUTDOWNHOOK[1] = IS_TRUE(HOOK.SHUTDOWNHOOK[1], HOOK.TEXT_LINE[1])$
+$HOOK.PRETASKHOOK[1] = IS_TRUE(HOOK.PRETASKHOOK[1], HOOK.TEXT_LINE[1])$
+$HOOK.POSTTASKHOOK[1] = IS_TRUE(HOOK.POSTTASKHOOK[1], HOOK.TEXT_LINE[1])$
+$HOOK.ERRORHOOK[1] = IS_TRUE(HOOK.ERRORHOOK[1], HOOK.TEXT_LINE[1])$
+$HOOK.PROTECTIONHOOK[1] = IS_TRUE(HOOK.PROTECTIONHOOK[1], HOOK.TEXT_LINE[1])$
+$FOREACH schtblid SCHTBL.ID_LIST$
+	$SCHTBL.REPEAT[schtblid] = IS_TRUE(SCHTBL.REPEAT[schtblid],SCHTBL.TEXT_LINE[schtblid])$
+$END$
+$FOREACH osapid OSAP.ID_LIST$
+	$OSAP.TRUSTED[osapid] = IS_TRUE(OSAP.TRUSTED[osapid], OSAP.TEXT_LINE[osapid])$
+$END$
+$FOREACH regid REG.ID_LIST$
+	$REG.WRITE[regid] = IS_TRUE(REG.WRITE[regid])$
+$END$
+$FOREACH memid MEM.ID_LIST$
+	$MEM.WRITE[memid] = IS_TRUE(MEM.WRITE[memid], MEM.TEXT_LINE[memid])$
+	$MEM.READ[memid] = IS_TRUE(MEM.READ[memid], MEM.TEXT_LINE[memid])$
+	$MEM.EXEC[memid] = IS_TRUE(MEM.EXEC[memid], MEM.TEXT_LINE[memid])$
+	$MEM.CACHE[memid] = IS_TRUE(MEM.CACHE[memid], MEM.TEXT_LINE[memid])$
+	$MEM.DEVICE[memid] = IS_TRUE(MEM.DEVICE[memid], MEM.TEXT_LINE[memid])$
+$END$
+$FOREACH secid SEC.ID_LIST$
+	$SEC.WRITE[secid] = IS_TRUE(SEC.WRITE[secid], SEC.TEXT_LINE[secid])$
+	$SEC.READ[secid] = IS_TRUE(SEC.READ[secid], SEC.TEXT_LINE[secid])$
+	$SEC.EXEC[secid] = IS_TRUE(SEC.EXEC[secid], SEC.TEXT_LINE[secid])$
+	$SEC.SDATA[secid] = IS_TRUE(SEC.SDATA[secid], SEC.TEXT_LINE[secid])$
+	$SEC.CACHE[secid] = IS_TRUE(SEC.CACHE[secid], SEC.TEXT_LINE[secid])$
+	$SEC.DEVICE[secid] = IS_TRUE(SEC.DEVICE[secid], SEC.TEXT_LINE[secid])$
+$END$
+$FOREACH modid MOD.ID_LIST$
+	$MOD.EXPORT[modid] = IS_TRUE(MOD.EXPORT[modid], MOD.TEXT_LINE[modid])$
+$END$
+
+
+$ =====================================================================
+$ OSAPã®ã¨ã©ã¼ãã§ãã¯ã¨é¢é£ã¥ã
+$ =====================================================================
+
+$tnum_os_restarttask = 0$
+$FOREACH osapid OSAP.ID_LIST$
+	$FOREACH tskid OSAP.TSK_LIST[osapid]$
+		$IF LENGTH(TSK.OSAPID[tskid])$
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsTask(%1%) belongs to another OsApplication(%2%)"), tskid, TSK.OSAPID[tskid])$$END$
+		$ELSE$
+			$TSK.OSAPID[tskid] = osapid$
+		$END$
+	$END$
+
+	$FOREACH cntid OSAP.CNT_LIST[osapid]$
+		$IF LENGTH(CNT.OSAPID[cntid])$
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsCounter(%1%) belongs to another OsApplication(%2%)"), cntid, CNT.OSAPID[cntid])$$END$
+		$ELSE$
+			$CNT.OSAPID[cntid] = osapid$
+		$END$
+	$END$
+
+	$FOREACH almid OSAP.ALM_LIST[osapid]$
+		$IF LENGTH(ALM.OSAPID[almid])$
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsAlarm(%1%) belongs to another OsApplication(%2%)"), almid, ALM.OSAPID[almid])$$END$
+		$ELSE$
+			$ALM.OSAPID[almid] = osapid$
+		$END$
+	$END$
+
+	$FOREACH isrid OSAP.ISR_LIST[osapid]$
+		$IF LENGTH(ISR.OSAPID[isrid])$
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsIsr(%1%) belongs to another OsApplication(%2%)"), isrid, ISR.OSAPID[isrid])$$END$
+		$ELSE$
+			$ISR.OSAPID[isrid] = osapid$
+		$END$
+	$END$
+
+	$FOREACH schtblid OSAP.SCHTBL_LIST[osapid]$
+		$IF LENGTH(SCHTBL.OSAPID[schtblid])$
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsScheduleTable(%1%) belongs to another OsApplication(%2%)"), schtblid, SCHTBL.OSAPID[schtblid])$$END$
+		$ELSE$
+			$SCHTBL.OSAPID[schtblid] = osapid$
+		$END$
+	$END$
+
+	$FOREACH secid OSAP.SEC_LIST[osapid]$
+		$IF LENGTH(SEC.OSAPID[secid])$
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsMemorySection(%1%) belongs to another OsApplication(%2%)"),secid, SEC.OSAPID[secid])$$END$
+		$ELSE$
+			$SEC.OSAPID[secid] = osapid$
+		$END$
+	$END$
+
+	$FOREACH modid OSAP.MOD_LIST[osapid]$
+		$IF LENGTH(MOD.OSAPID[modid])$
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsMemoryModule(%1%) belongs to another OsApplication(%2%)"), modid, MOD.OSAPID[modid])$$END$
+		$ELSE$
+			$MOD.OSAPID[modid] = osapid$
+		$END$
+	$END$
+
+	$FOREACH memid OSAP.MEM_LIST[osapid]$
+		$IF LENGTH(MEM.OSAPID[memid])$
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsMemoryArea(%1%) belongs to another OsApplication(%2%)"), memid, MEM.OSAPID[memid])$$END$
+		$ELSE$
+			$MEM.OSAPID[memid] = osapid$
+		$END$
+	$END$
+
+	$IF LENGTH(OSAP.RESTARTTASK[osapid])$
+		$FOREACH tskid TSK.ID_LIST$
+			$IF EQ(OSAP.RESTARTTASK[osapid], tskid)$
+				$IF LENGTH(TSK.OSAPID[tskid]) && !EQ(TSK.OSAPID[tskid], osapid)$
+					$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsRestartTask(%1%) belongs to another OsApplication(%2%)"), tskid, TSK.OSAPID[tskid])$$END$
+				$ELIF LENGTH(TSK.AUTOSTART.APP_LIST[tskid])$
+					$WARNING OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsRestartTask(%1%) is set to an auto start task"), tskid)$$END$
+					$OSAP.RESTARTTASK[osapid] = tskid$
+					$TSK.OSAPID[tskid] = osapid$
+					$TSK.RESTARTTASK[tskid] = osapid$
+				$ELSE$
+					$OSAP.RESTARTTASK[osapid] = tskid$
+					$TSK.OSAPID[tskid] = osapid$
+					$TSK.RESTARTTASK[tskid] = osapid$
+				$END$
+			$END$
+		$END$
+		$IF !LENGTH(OSAP.RESTARTTASK[osapid])$
+$			// OsRestartTaskãè¦ã¤ãããªãã£ã
+			$ERROR OSAP.TEXT_LINE[osapid]$$FORMAT(_("OsRestartTask(%1%) of OSAP(%2%) no exist"), OSAP.RESTARTTASK[osapid], osapid)$$END$
+		$END$
+	$ELSE$
+$		//ä¿¡é ¼OSAPã®å ´åã¯ï¼å¼·å¶çµäºãããã¨ããªãããï¼ãªã¹ã¿ã¼ãã¿ã¹ã¯ã¯ä¸è¦
+		$IF OSAP.TRUSTED[osapid]$
+			$OSAP.RESTARTTASK[osapid] = VALUE("NO_RESTART_TASK", 0)$
+		$ELSE$
+			$OSAP.RESTARTTASK[osapid] = VALUE("OS_GEN_RESTARTTASK", LENGTH(TSK.ID_LIST)+1)$
+			$TSK.ID_LIST = APPEND(TSK.ID_LIST, VALUE("OS_GEN_RESTARTTASK", +OSAP.RESTARTTASK[osapid]))$
+$			//OSæå®ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®ãã©ã¡ã¼ã¿ãè¨­å®ããï¼
+			$TSK.OSAPID[OSAP.RESTARTTASK[osapid]] = osapid$
+			$TSK.PRIORITY[OSAP.RESTARTTASK[osapid]] = TMAX_TPRI$
+			$TSK.EXTENDED[OSAP.RESTARTTASK[osapid]] = 0$
+			$TSK.ACTIVATION[OSAP.RESTARTTASK[osapid]] = VALUE("1",1)$
+			$TSK.SCHEDULE[OSAP.RESTARTTASK[osapid]] = "FULL"$
+			$TSK.RESTARTTASK[OSAP.RESTARTTASK[osapid]] = osapid$
+			$tnum_os_restarttask = tnum_os_restarttask + 1$
+		$END$
+	$END$
+$END$
+
+$ OSã§çæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®å¤å±æ§ã®ãã¡æå°ã®ãã®
+$tmin_os_restarttask = LENGTH(TSK.ID_LIST) - tnum_os_restarttask + 1$
+$ OSAP.TFN.*ãTFN.*ã«ã³ãã¼
+$TFN.ID_LIST = {}$
+$FOREACH tfnid OSAP.TFN.ID_LIST$
+	$osapid = OSAP.TFN.PARENT[tfnid]$
+	$FOREACH tfnid2 TFN.ID_LIST$
+		$IF EQ(tfnid, tfnid2)$
+			$ERROR OSAP.TEXT_LINE[tfnid]$$FORMAT(_("duplicate OsApplicationTrustedFunction name(%1%) in OSAP (%2%) and (%3%)"), tfnid, osapid, TFN.OSAPID[tfnid2])$$END$
+			$DIE()$
+		$END$
+	$END$
+	$TFN.ID_LIST = APPEND(TFN.ID_LIST, tfnid)$
+	$TFN.FUNC[tfnid] = OSAP.TFN.FUNC[tfnid]$
+	$TFN.STKSZ[tfnid] = OSAP.TFN.STKSZ[tfnid]$
+	$TFN.OSAPID[tfnid] = osapid$
+$END$
+
+
+$ =====================================================================
+$ OSTK.STKããªãå ´åã«NULLãå
+¥ãã
+$ =====================================================================
+
+$FOREACH ostkid OSTK.ID_LIST$
+	$IF !LENGTH(OSTK.STK[ostkid])$
+		$OSTK.STK[ostkid] = "NULL"$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ NTHSTK.STKããªãå ´åã«NULLãå
+¥ãã
+$ =====================================================================
+
+$FOREACH nthstkid NTHSTK.ID_LIST$
+	$IF !LENGTH(NTHSTK.STK[nthstkid])$
+		$NTHSTK.STK[nthstkid] = "NULL"$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ REG.REGATRã¨REG.REGNAMEã®ä½æ
+$ REG.REGIONã¨REG.ID_LISTã®æ´å½¢
+$ =====================================================================
+
+$new_id_list = {}$
+$FOREACH regid REG.ID_LIST$
+	$IF !LENGTH(REG.REGATR[regid])$
+		$REG.REGATR[regid] = TA_NULL$
+	$END$
+	$IF !REG.WRITE[regid]$
+		$REG.REGATR[regid] = REG.REGATR[regid] | TA_NOWRITE$
+	$END$
+	$REG.REGION[regid] = ESCSTR(REG.REGION[regid])$
+	$new_id_list = APPEND(new_id_list, +regid)$
+$END$
+$REG.ID_LIST = new_id_list$
+$REG.ORDER_LIST = new_id_list$
+
+
+$ =====================================================================
+$ SRG.STDROMã¨SRG.STDRAMãæ´å½¢
+$ =====================================================================
+
+$new_id_list = {}$
+$FOREACH srgid SRG.ID_LIST$
+	$SRG.STDROM[srgid] = VALUE(ESCSTR(SRG.STDROM[srgid]), +srgid)$
+	$SRG.STDRAM[srgid] = VALUE(ESCSTR(SRG.STDRAM[srgid]), +srgid)$
+	$new_id_list = APPEND(new_id_list, +srgid)$
+$END$
+$SRG.ORDER_LIST = new_id_list$
+
+$ =====================================================================
+$ SECã®ã¨ã©ã¼ãã§ãã¯ã¨SEC.MEMATRã®ä½æ
+$ =====================================================================
+
+$FOREACH secid SEC.ID_LIST$
+	$SEC.MEMATR[secid] = 0$
+
+	$IF LENGTH(SEC.INIT[secid])$
+		$IF EQ(SEC.INIT[secid], "DATA")$
+			$SEC.MEMATR[secid] = TA_MEMINI$
+		$ELIF EQ(SEC.INIT[secid], "BSS")$
+			$SEC.MEMATR[secid] = TA_NULL$
+		$ELIF EQ(SEC.INIT[secid], "NO_INITIALIZE")$
+			$SEC.MEMATR[secid] = TA_MEMPRSV$
+		$ELSE$
+			$ERROR SEC.TEXT_LINE[secid]$$FORMAT(_("OsMemorySectionInitialize must be DATA or BSS or NO_INITIALIZE"))$$END$
+		$END$
+		$IF !REG.WRITE[SEC.MEMREG[secid]]$
+			$ERROR SEC.TEXT_LINE[secid]$$FORMAT(_("OsMemorySectionInitialize must not be defined on nonwritable memory region"))$$END$
+		$END$
+	$ELSE$
+		$IF REG.WRITE[SEC.MEMREG[secid]]$
+			$ERROR SEC.TEXT_LINE[secid]$$FORMAT(_("OsMemorySectionInitialize must be defined on writable memory region"))$$END$
+		$END$
+	$END$
+
+	$IF !SEC.WRITE[secid]$
+		$SEC.MEMATR[secid] = SEC.MEMATR[secid] | TA_NOWRITE$
+	$END$
+	$IF !SEC.READ[secid]$
+		$SEC.MEMATR[secid] = SEC.MEMATR[secid] | TA_NOREAD$
+	$END$
+	$IF SEC.EXEC[secid]$
+		$SEC.MEMATR[secid] = SEC.MEMATR[secid] | TA_EXEC$
+	$END$
+	$IF SEC.SDATA[secid]$
+		$SEC.MEMATR[secid] = SEC.MEMATR[secid] | TA_SDATA$
+	$END$
+	$IF !SEC.CACHE[secid]$
+		$SEC.MEMATR[secid] = SEC.MEMATR[secid] | TA_UNCACHE$
+	$END$
+	$IF SEC.DEVICE[secid]$
+		$SEC.MEMATR[secid] = SEC.MEMATR[secid] | TA_IODEV$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ MEM.MEMATRã®ä½æ
+$ =====================================================================
+
+$FOREACH memid MEM.ID_LIST$
+	$MEM.MEMATR[memid] = TA_MEMPRSV$
+	$IF !MEM.WRITE[memid]$
+		$MEM.MEMATR[memid] = MEM.MEMATR[memid] | TA_NOWRITE$
+	$END$
+	$IF !MEM.READ[memid]$
+		$MEM.MEMATR[memid] = MEM.MEMATR[memid] | TA_NOREAD$
+	$END$
+	$IF MEM.EXEC[memid]$
+		$MEM.MEMATR[memid] = MEM.MEMATR[memid] | TA_EXEC$
+	$END$
+	$IF !MEM.CACHE[memid]$
+		$MEM.MEMATR[memid] = MEM.MEMATR[memid] | TA_UNCACHE$
+	$END$
+	$IF MEM.DEVICE[memid]$
+		$MEM.MEMATR[memid] = MEM.MEMATR[memid] | TA_IODEV$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ LNKãSECã«çµ±åãã
+$ =====================================================================
+
+$IF LENGTH(SEC.ID_LIST)$
+	$i = AT(SEC.ID_LIST, LENGTH(SEC.ID_LIST) - 1) + 1$
+$ELSE$
+	$i = 1$
+$END$
+$FOREACH lnkid LNK.ID_LIST$
+	$SEC.SECTION[i] = LNK.SECTION[lnkid]$
+	$SEC.MEMREG[i] = LNK.MEMREG[lnkid]$
+	$SEC.ID_LIST = APPEND(SEC.ID_LIST, VALUE(lnkid, i))$
+	$SEC.ORDER_LIST = APPEND(SEC.ORDER_LIST, VALUE(lnkid, i))$
+	$i = i + 1$
+$END$
+
+$ MEMREGã¯REFã«ãªã£ã¦ãããkernel.tfã§ã¯æå­åã¨ãã¦æ±ã
+$FOREACH secid SEC.ID_LIST$
+	$SEC.MEMREG[secid] = REG.REGION[SEC.MEMREG[secid]]$
+	$SEC.SECTION[secid] = ESCSTR(SEC.SECTION[secid])$
+$END$
+
+
+$ =====================================================================
+$ MOD.MODULEã®ä½æ
+$ =====================================================================
+
+$nummod = LENGTH(MOD.ORDER_LIST)$
+$FOREACH modid MOD.ID_LIST$
+	$FOREACH name MOD.MODULE[modid]$
+		$IF EQ(name, AT(MOD.MODULE[modid], 0))$
+			$MOD.MODULE[modid] = ESCSTR(name)$
+		$ELSE$
+			$nummod = nummod + 1$
+			$MOD.ORDER_LIST = APPEND(nummod, MOD.ORDER_LIST)$
+			$MOD.MODULE[nummod] = ESCSTR(name)$
+			$MOD.OSAPID[nummod] = MOD.OSAPID[modid]$
+			$MOD.TEXT_LINE[nummod] = MOD.TEXT_LINE[modid]$
+			$MOD.EXPORT[nummod] = MOD.EXPORT[modid]$
+		$END$
+	$END$
+$END$
+
+$ =====================================================================
+$ TSKã®ã¨ã©ã¼ãã§ãã¯ã¨é¢é£ã¥ã
+$ =====================================================================
+
+$TRACE("ASSOCIATE TASK")$
+
+$ TSK.AUTOSTARTãTSKã«ã³ãã¼
+$FOREACH aid TSK.AUTOSTART.ID_LIST$
+	$tskid                = TSK.AUTOSTART.PARENT[aid]$
+	$TSK.APP_LIST[tskid]  = TSK.AUTOSTART.APP_LIST[aid]$
+$END$
+
+
+$FOREACH tskid TSK.ID_LIST$
+	$IF LENGTH(TSK.OSAPID[tskid])$
+		$IF OSAP.TRUSTED[TSK.OSAPID[tskid]]$
+$			// ä¿¡é ¼ã¿ã¹ã¯ã¯OsTaskSystemStackStartAddressã®ä½¿ç¨ä¸å¯
+			$IF LENGTH(TSK.SSTK[tskid])$
+				$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("Trusted OsTask(%1%) can't use OsTaskSystemStackStartAddress"), tskid)$$END$
+			$END$
+		$ELSE$
+$			// éä¿¡é ¼ã¿ã¹ã¯ã§ã·ã¹ãã ã¹ã¿ãã¯ã®å
+é ­çªå°ãæå®ããã¦ãµã¤ãºãæå®ãããªã
+			$IF LENGTH(TSK.SSTK[tskid]) && !LENGTH(TSK.SSTKSZ[tskid])$
+				$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskSystemStackSize of Non-Trusted OsTask(%1%) is necessary when OsTaskSystemStackStartAddress is used"), tskid)$$END$
+			$END$
+		$END$
+	$ELSE$
+		$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTask(%1%) does not belong OsApplication"), tskid)$$END$
+		$DIE()$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ ISRã®ã¨ã©ã¼ãã§ãã¯ã¨é¢é£ã¥ã
+$ =====================================================================
+
+$TRACE("ASSOCIATE ISR")$
+
+$FOREACH isrid ISR.ID_LIST$
+	$IF !(EQ(ISR.SOURCE[isrid], "ENABLE") || EQ(ISR.SOURCE[isrid], "DISABLE"))$
+		$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsrInterruptSource must be ENABLE or DISABLE"))$$END$
+	$END$
+
+$	// C1ISRã¯ENABLEã«ããå¿
+è¦ããã
+	$IF EQ(ISR.SOURCE[isrid], "DISABLE") && EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+		$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsrInterruptSource of C1ISR OsIsr(%1%) must include ENABLE"), isrid)$$END$
+	$END$
+
+	$IF EQ(ISR.SOURCE[isrid], "ENABLE")$
+		$IF LENGTH(ISR.INTATR[isrid])$
+			$ISR.INTATR[isrid] = VALUE(CONCAT(ISR.INTATR[isrid], " | ENABLE"), ISR.INTATR[isrid] | ENABLE)$
+		$ELSE$
+			$ISR.INTATR[isrid] = ENABLE$
+		$END$
+	$ELSE$
+	
+$		// å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æå¹/ç¡å¹ãå¶å¾¡åºæ¥ãªãã«ãé¢ãããï¼OsIsrInterruptSourceãDISABLEã«ãªã£ã¦ããå ´åã¯ã¨ã©ã¼ã¨ãã
+		$IF !LENGTH(FIND(INTNO_CONTROLLABLE, ISR.INTNO[isrid]))$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("Although the irq-line of ISR OsIsr(%1%) is not controllable, OsIsrInterruptSource of OsIsr(%1%) is DISABLE,  "), isrid)$$END$  
+		$END$
+
+		$IF LENGTH(ISR.INTATR[isrid])$
+			$ISR.INTATR[isrid] = VALUE(CONCAT(ISR.INTATR[isrid], " | DISABLE"), ISR.INTATR[isrid] | DISABLE)$
+		$ELSE$
+			$ISR.INTATR[isrid] = DISABLE$
+		$END$
+	$END$
+
+	$IF EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+		$IF LENGTH(ISR.STKSZ[isrid])$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsrStackSize of C1ISR OsIsr(%1%) must not define"), isrid)$$END$
+		$ELSE$
+			$ISR.STKSZ[isrid] = 0$
+		$END$
+	$ELIF EQ(ISR.CATEGORY[isrid], "CATEGORY_2")$
+		$IF LENGTH(ISR.STKSZ[isrid]) && (ISR.STKSZ[isrid] == 0)$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsrStackSize of C2ISR OsIsr(%1%) should not defined zero"), isrid)$$END$
+		$END$
+$		// C2ISRã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ãè¨­å®
+		$IF !LENGTH(ISR.STKSZ[isrid])$
+			$ISR.STKSZ[isrid] = DEFAULT_ISRSTKSZ$
+		$END$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ EVTã«é¢ããå¦ç
+$ =====================================================================
+
+$FOREACH evtid EVT.ID_LIST$
+$	// ãã¹ã¯ãçç¥ãããå ´åã¯AUTOã«ãã
+	$IF !LENGTH(EVT.MASK[evtid])$
+		$EVT.MASK[evtid] = AUTO$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ CNTã«é¢ããå¦ç
+$ =====================================================================
+
+$
+$ æå­åãæ°å¤ãã©ãããã§ãã¯
+$
+$FUNCTION VALIDATE_NUMBER$
+
+$   // ææ°é¨ã®ãã§ãã¯
+    $e = REGEX_REPLACE(ARGV[1], "^[0-9]+\\.[0-9]+[eE][-]?[0-9]+$|^[0-9]+[eE][-]?[0-9]+$", "")$
+    $IF EQ(e, ARGV[1])$
+$       // ææ°é¨ããªãå ´å
+$       // ä»®æ°é¨ã®ãã§ãã¯
+        $e = REGEX_REPLACE(ARGV[1], "^[0-9]+\\.[0-9]+$", "")$
+        $IF EQ(e, ARGV[1])$
+$           // å°æ°é¨ããªãå ´å
+$           // æ´æ°é¨ã®ãã§ãã¯
+            $e = REGEX_REPLACE(ARGV[1], "^[0-9]+$", "")$
+            $IF EQ(e, ARGV[1])$
+                $ERROR$
+                    $FORMAT("%1% is invalid number\n", ARGV[1])$
+                $END$
+            $END$
+        $END$
+    $END$
+
+$END$
+
+$
+$ æµ®åå°æ°ç¹åã®æå­åãæ´æ°ã«å¤æ
+$
+$FUNCTION FLOAT_TO_FIXINT$
+    $num_org = ARGV[1]$
+    $VALIDATE_NUMBER(num_org)$
+
+$   // ææ°é¨ã®å¤æ
+    $exp = REGEX_REPLACE(num_org, "^[0-9]+\\.[0-9]+[eE]([-]?[0-9]+)$", "$1")$
+    $IF EQ(exp, num_org)$
+        $exp = REGEX_REPLACE(num_org, "^[0-9]+[eE]([-]?[0-9]+)$", "$1")$
+        $IF EQ(exp, num_org)$
+$           // ææ°è¡¨ç¾ã§ãªã
+            $exp = 0$
+        $ELSE$
+$           // ææ°è¡¨ç¾
+            $exp = ATOI(exp)$
+            $num_org = REGEX_REPLACE(num_org, "^([0-9]+)[eE][-]?[0-9]+$", "$1")$
+        $END$
+    $ELSE$
+$       // ææ°è¡¨ç¾
+        $exp = ATOI(exp)$
+        $num_org = REGEX_REPLACE(num_org, "^([0-9]+\\.[0-9]+)[eE][-]?[0-9]+$", "$1")$
+    $END$
+
+    $multiple = 1$
+    $e = REGEX_REPLACE(num_org, "^[0-9]+\\.[0-9]+$", "")$
+    $IF !EQ(e, num_org)$
+$       // å°æ°ç¹
+$       // ä»®æ°é¨ã®å¤æ
+$       // å°æ°ç¹ä»¥ä¸
+        $num_l = REGEX_REPLACE(num_org, "^([0-9]+)\\.[0-9]+$", "$1")$
+$       // å°æ°ç¹ä»¥ä¸
+        $num_r_tmp = REGEX_REPLACE(num_org, "^[0-9]+\\.([0-9]+)$", "$1")$
+        $num_r = "0"$
+$       // å°æ°ç¹ä»¥ä¸ã®æ¡æ°ãè¨ç®
+        $WHILE !EQ(num_r_tmp, "")$
+            $num_r = CONCAT(num_r, REGEX_REPLACE(num_r_tmp, "^(.).*$", "$1"))$
+            $num_r_tmp = REGEX_REPLACE(num_r_tmp, "^.(.*)$", "$1")$
+            $multiple = multiple * 10$
+        $END$
+
+$       // ä»®æ°é¨ãæ´æ°ã«å¤æ
+        $num_result = ATOI(CONCAT("0", num_l), 10) * multiple + ATOI(num_r, 10)$
+$       // ææ°é¨ãæ­£æ°ã®å ´åã¯ï¼ãã®åã®åºæ°ãä»®æ°é¨ã«ä¹ãã
+    $ELSE$
+$       // æ´æ°
+        $num_result = ATOI(num_org)$
+    $END$
+
+$   // ææ°é¨ãæ´æ°ã®å ´å
+    $WHILE exp > 0$
+        $IF multiple >= 10$
+            $multiple = multiple / 10$
+        $ELSE$
+            $num_result = num_result * 10$
+        $END$
+        $exp = exp - 1$
+    $END$
+    
+$   // ææ°é¨ãè² æ°ã®å ´åã¯ï¼è¿ãå¤ã¨ããææ°åã«å ãã
+    $WHILE exp < 0$
+        $multiple = multiple * 10$
+        $exp = exp + 1$
+    $END$
+
+$   // VALUE("æ´æ°åããæ°å¤ãå
+ã®æ°å¤ã®ä½åã", å
+ã®æ°å¤ãæ´æ°åããæ°å¤)ãè¿ã
+    $RESULT = VALUE(FORMAT("%d", multiple), num_result)$
+$END$
+
+$FOREACH cntid CNT.ID_LIST$
+	$IF EQ(CNT.CNTATR[cntid], "HARDWARE")$
+		$IF !LENGTH(CNT.ISRID[cntid])$
+			$FATAL = 1$
+			$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("OsCounterIsrRef of HARDWARE OsCounter(%1%) is not defined"), cntid)$$END$
+		$END$
+
+$		// NSPERTICKãSECONDSPERTICKããè¨ç®ãã
+		$IF LENGTH(CNT.SECONDSPERTICK[cntid])$
+                        $secondspertick = FLOAT_TO_FIXINT(CNT.SECONDSPERTICK[cntid])$
+			$nspertick = (+secondspertick * 1000000000) / ATOI(secondspertick)$
+			$CNT.NSPERTICK[cntid] = CONCAT(nspertick,"U")$
+		$END$
+	$END$
+
+$END$
+
+
+$ =====================================================================
+$ ALMã«é¢ããå¦ç
+$ =====================================================================
+
+$TRACE("ASSOCIATE ALARM")$
+
+$ ALM.AUTOSTART.*ããALM.*ã«ã³ãã¼
+$FOREACH aid ALM.AUTOSTART.ID_LIST$
+	$almid                              = ALM.AUTOSTART.PARENT[aid]$
+	$ALM.APP_LIST[almid]                = ALM.AUTOSTART.APP_LIST[aid]$
+	$ALM.ALARMTIME[almid]               = ALM.AUTOSTART.ALARMTIME[aid]$
+	$ALM.CYCLETIME[almid]               = ALM.AUTOSTART.CYCLETIME[aid]$
+	$ALM.AUTOSTARTTYPE[almid]           = ALM.AUTOSTART.TYPE[aid]$
+$END$
+
+$FOREACH almid ALM.ID_LIST$
+	$ALM.ALMATR_COUNT[almid] = 0$
+$END$
+
+$ ALM.ACTION.ACTIVATETASK.*ããALM.*ã«ã³ãã¼
+$FOREACH almactid ALM.ACTION.ACTIVATETASK.ID_LIST$
+	$almid                      = ALM.ACTION.PARENT[ALM.ACTION.ACTIVATETASK.PARENT[almactid]]$
+	$ALM.ALMATR[almid]          = "ACTIVATETASK"$
+	$ALM.TSKID[almid]           = ALM.ACTION.ACTIVATETASK.TSKID[almactid]$
+	$ALM.ALMATR_COUNT[almid]    = ALM.ALMATR_COUNT[almid] + 1$
+$END$
+
+$ ALM.ACTION.SETEVENT.*ããALM.*ã«ã³ãã¼
+$FOREACH almactid ALM.ACTION.SETEVENT.ID_LIST$
+	$almid                      = ALM.ACTION.PARENT[ALM.ACTION.SETEVENT.PARENT[almactid]]$
+	$ALM.ALMATR[almid]          = "SETEVENT"$
+	$ALM.TSKID[almid]           = ALM.ACTION.SETEVENT.TSKID[almactid]$
+	$ALM.EVTID[almid]           = ALM.ACTION.SETEVENT.EVTID[almactid]$
+	$ALM.ALMATR_COUNT[almid]    = ALM.ALMATR_COUNT[almid] + 1$
+$END$
+
+$ ALM.ACTION.INCREMENTCOUNTER.*ããALM.*ã«ã³ãã¼
+$FOREACH almactid ALM.ACTION.INCREMENTCOUNTER.ID_LIST$
+	$almid                      = ALM.ACTION.PARENT[ALM.ACTION.INCREMENTCOUNTER.PARENT[almactid]]$
+	$ALM.ALMATR[almid]          = "INCREMENTCOUNTER"$
+	$ALM.INCID[almid]           = ALM.ACTION.INCREMENTCOUNTER.INCID[almactid]$
+	$ALM.ALMATR_COUNT[almid]    = ALM.ALMATR_COUNT[almid] + 1$
+$END$
+
+$IF LENGTH(ALM.ACTION.CALLBACK.ID_LIST)$
+	$ERROR ALM.ACTION.CALLBACK.TEXT_LINE[1]$$FORMAT(_("OsAlarmCallback can't be used in SC3"))$$END$
+$END$
+
+$ ALM.ACTION.*ã2ã¤ä»¥ä¸å®ç¾©ãã¦ããªãã
+$FOREACH almid ALM.ID_LIST$
+	$IF ALM.ALMATR_COUNT[almid] != 1$
+		$FATAL = 1$
+		$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmAction of OsAlarm(%1%) have too many sub container"), almid)$$END$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ SCHTBLã«é¢ããå¦ç
+$ =====================================================================
+
+$TRACE("ASSOCIATE SCHTBL")$
+
+$ çç¥ãããå ´åã¯NONEã«ãã
+$FOREACH schtblid SCHTBL.ID_LIST$
+	$SCHTBL.SYNCSTRATEGY[schtblid] = "NONE"$
+$END$
+
+$ SCHTBL.AUTOSTART.*ããSCHTBL.*ã«ã³ãã¼
+$FOREACH aid SCHTBL.AUTOSTART.ID_LIST$
+	$schtblid                                 = SCHTBL.AUTOSTART.PARENT[aid]$
+	$SCHTBL.APP_LIST[schtblid]                = SCHTBL.AUTOSTART.APP_LIST[aid]$
+	$IF LENGTH(SCHTBL.AUTOSTART.STARTTICK[aid])$
+		$SCHTBL.STARTTICK[schtblid]           = SCHTBL.AUTOSTART.STARTTICK[aid]$
+	$ELSE$
+$		// çç¥ããããã¨ãç¤ºã
+		$SCHTBL.STARTTICK[schtblid]           = "NULL"$
+	$END$
+	$SCHTBL.AUTOSTARTTYPE[schtblid]           = SCHTBL.AUTOSTART.TYPE[aid]$
+$END$
+
+$FOREACH syncid SCHTBL.SYNC.ID_LIST$
+	$schtblid = SCHTBL.SYNC.PARENT[syncid]$
+	$SCHTBL.SYNCSTRATEGY[schtblid] = SCHTBL.SYNC.STRATEGY[syncid]$
+$END$
+
+
+$ =====================================================================
+$ EXPPTACTã«é¢ããå¦ç
+$ =====================================================================
+
+$ SCHTBL.EXPPT.ACTIVATETASK.*ããEXPPTACTã«ã³ãã¼
+$i = 0$
+$FOREACH acttskid SCHTBL.EXPPT.ACTIVATETASK.ID_LIST$
+	$expid                          = SCHTBL.EXPPT.ACTIVATETASK.PARENT[acttskid]$
+	$schtblid                       = SCHTBL.EXPPT.PARENT[expid]$
+
+	$EXPPTACT.SCHTBLID[i]           = schtblid$
+	$EXPPTACT.OFFSET[i]             = SCHTBL.EXPPT.OFFSET[expid]$
+	$EXPPTACT.TSKID[i]              = SCHTBL.EXPPT.ACTIVATETASK.TSKID[acttskid]$
+	$EXPPTACT.EXPIREATR[i]          = "ACTIVATETASK"$
+
+	$EXPPTACT.ID_LIST               = APPEND(EXPPTACT.ID_LIST, i)$
+	$i                              = i + 1$
+$END$
+
+$ SCHTBL.EXPPT.SETEVENT.*ããEXPPTACTã«ã³ãã¼
+$FOREACH setevid SCHTBL.EXPPT.SETEVENT.ID_LIST$
+	$expid                          = SCHTBL.EXPPT.SETEVENT.PARENT[setevid]$
+	$schtblid                       = SCHTBL.EXPPT.PARENT[expid]$
+
+	$EXPPTACT.SCHTBLID[i]           = schtblid$
+	$EXPPTACT.OFFSET[i]             = SCHTBL.EXPPT.OFFSET[expid]$
+	$EXPPTACT.TSKID[i]              = SCHTBL.EXPPT.SETEVENT.TSKID[setevid]$
+	$EXPPTACT.EVTID[i]              = SCHTBL.EXPPT.SETEVENT.EVTID[setevid]$
+	$EXPPTACT.EXPIREATR[i]          = "SETEVENT"$
+
+	$EXPPTACT.ID_LIST               = APPEND(EXPPTACT.ID_LIST, i)$
+	$i                              = i + 1$
+$END$
+
+$IF FATAL$
+	$DIE()$
+$END$
+
+
+$ =====================================================================
+$ IOCã«é¢ããå¦ç
+$ =====================================================================
+
+$ OsIocCommunication
+$FOREACH iocid IOC.ID_LIST$
+$ 	// çç¥ããããã©ã¡ã¼ã¿ã«NULLãå
+¥ãã
+	$IF !LENGTH(IOC.BUFLEN[iocid])$
+		$IOC.BUFLEN[iocid] = VALUE("NULL", 0)$
+	$END$
+$END$
+
+$ OsIocDataProperties
+$FOREACH iocdataid IOCDATA.ID_LIST$
+$ 	// IOCDATA.PARENTãIOCDATA.IOCã¸ã³ãã¼
+	$IOCDATA.IOC[iocdataid]  = IOCDATA.PARENT[iocdataid]$
+
+$ 	// çç¥ããããã©ã¡ã¼ã¿ã«NULLãå
+¥ãã
+	$IF !LENGTH(IOCDATA.INDEX[iocdataid])$
+		$IOCDATA.INDEX[iocdataid] = "NULL"$
+	$END$
+	$IF !LENGTH(IOCDATA.INITVAL[iocdataid])$
+		$IOCDATA.INITVAL[iocdataid] = "NULL"$
+	$END$
+$END$
+
+$ OsIocSenderProperties
+$FOREACH iocsndid IOCSND.ID_LIST$
+$ 	// IOCSND.PARENTãIOCSND.IOCã¸ã³ãã¼
+	$IOCSND.IOC[iocsndid]   = IOCSND.PARENT[iocsndid]$
+
+$ 	// çç¥ããããã©ã¡ã¼ã¿ã«NULLãå
+¥ãã
+	$IF !LENGTH(IOCSND.SENDERID[iocsndid])$
+		$IOCSND.SENDERID[iocsndid] = "NULL"$
+	$END$
+	$IF !LENGTH(IOCSND.IMPLKIND[iocsndid])$
+		$IOCSND.IMPLKIND[iocsndid] = "NULL"$
+	$END$
+$END$
+
+$ OsIocReceiverProperties
+$FOREACH iocrcvid IOCRCV.ID_LIST$
+$ 	// IOCRCV.PARENTãIOCRCV.IOCã¸ã³ãã¼
+	$IOCRCV.IOC[iocrcvid] = IOCRCV.PARENT[iocrcvid]$
+
+$ 	// çç¥ããããã©ã¡ã¼ã¿ã«NULLãå
+¥ãã
+	$IF !LENGTH(IOCRCV.IMPLKIND[iocrcvid])$
+		$IOCRCV.IMPLKIND[iocrcvid] = "NULL"$
+	$END$
+$END$
+
+$INCLUDE "kernel/kernel_common.tf"$
+
+$ =====================================================================
+$ OSã®ã¨ã©ã¼ãã§ãã¯
+$ =====================================================================
+
+$IF !EQ(OS.STATUS[1], "EXTENDED")$
+	$ERROR OS.TEXT_LINE[1]$$FORMAT(_("OsStatus must be EXTENDED"))$$END$
+$END$
+
+$IF LENGTH(OS.SC[1]) && !EQ(OS.SC[1], "SC3")$
+	$ERROR OS.TEXT_LINE[1]$$FORMAT(_("OsScalabilityClass must be SC3"))$$END$
+$END$
+
+$ =====================================================================
+$ OSAPã®ã¨ã©ã¼ãã§ãã¯ã¨å
+é¨ãã¼ã¿ã®çæ
+$ =====================================================================
+
+$i = 0$
+$ntosap = 0$
+$FOREACH osapid OSAP.ID_LIST$
+	$OSAP.ID[osapid] = i$
+	$i = i + 1$
+	$IF OSAP.TRUSTED[osapid]$
+		$OSAP.BTMP[osapid] = 0$
+		$OSAP.ACPTN[osapid] = VALUE("TACP_KERNEL", TACP_KERNEL)$
+	$ELSE$
+		$OSAP.BTMP[osapid] = 1 << ntosap$
+		$OSAP.ACPTN[osapid] = 1 << ntosap$
+		$ntosap = ntosap + 1$
+	$END$
+$END$
+
+$ éä¿¡é ¼OSAPæ°ã¯TMAX_NTOSAPPä»¥ä¸ãï¼
+$IF ntosap > TMAX_NTOSAPP$
+	$ERROR$$FORMAT(_("Too many Non-Trusted OsApplication %1% > %2%)"), ntosap, TMAX_NTOSAPP)$$END$
+$END$
+
+
+$ =====================================================================
+$ ã¿ã¹ã¯ã®é¢é£ã¥ã
+$ =====================================================================
+
+$FOREACH tskid TSK.ID_LIST$
+$	// TSKã¨RESã®é¢é£ã¥ã
+	$FOREACH resid TSK.RES_LIST[tskid]$
+		$RES.TSK_LIST[resid] = APPEND(RES.TSK_LIST[resid], tskid)$
+	$END$
+$	// TSKã¨EVTã®é¢é£ã¥ã
+	$FOREACH evtid TSK.EVT_LIST[tskid]$
+		$EVT.TSK_LIST[evtid] = APPEND(EVT.TSK_LIST[evtid], tskid)$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ ISRé¢é£ã®ã¨ã©ã¼ãã§ãã¯ã¨å
+é¨ãã¼ã¿ã®çæ
+$ =====================================================================
+
+$TRACE("ISR CHECK")$
+
+$FOREACH isrid ISR.ID_LIST$
+$	// INTNOãä»ã®ISRã¨éè¤ãã¦ããå ´å
+	$FOREACH isrid2 ISR.ID_LIST$
+		$IF ISR.INTNO[isrid] == ISR.INTNO[isrid2] && isrid2 < isrid$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsrInterruptNumber(%1%) of OsIsr(%2%) is duplicated"), ISR.INTNO[isrid], isrid)$$END$
+		$END$
+	$END$
+
+$	// intpriãå²è¾¼ã¿åªå
+åº¦ã¨ãã¦æ­£ãããªãå ´å
+	$IF (ISR.INTPRI[isrid] > TNUM_INTPRI) || (ISR.INTPRI[isrid] < 1)$
+		$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("illegal OsIsrInterruptPriority(%1%) of OsIsr(%2%)"), ISR.INTPRI[isrid], isrid)$$END$
+	$END$
+
+	$IF !(EQ(ISR.CATEGORY[isrid], "CATEGORY_1") || EQ(ISR.CATEGORY[isrid], "CATEGORY_2"))$
+		$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsrCategory of OsIsr(%1%) must be CATEGORY_1 or CATEGORY_2"), isrid)$$END$
+	$END$
+
+$	// ISRã¨RESã®é¢é£ã¥ã
+	$FOREACH resid ISR.RES_LIST[isrid]$
+		$RES.ISR_LIST[resid] = APPEND(RES.ISR_LIST[resid], isrid)$
+	$END$
+
+	$IF LENGTH(ISR.OSAPID[isrid])$
+$		// ISRã å®ç¾©ãã OSã¢ããªã±ã¼ã·ã§ã³ã¯ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã?
+$		// æ©è½ã¬ãã«2ã§ã¯ISRã¯éä¿¡é ¼ã«æå±ã§ããªã
+		$IF !OSAP.TRUSTED[ISR.OSAPID[isrid]] && EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsAppIsrRef(%1%) of OsApplication(%2%) can't be assign to Non-Trusted OS-Application"), 
+											isrid, ISR.OSAPID[isrid])$$END$
+		$END$
+
+$		// ISRã¸ã®ã¢ã¯ã»ã¹æ¨©ã®è¨­å®
+		$ISR.ACSBTMP[isrid] = OSAP.BTMP[ISR.OSAPID[isrid]]$
+		$FOREACH osapid ISR.ACS_OSAP_LIST[isrid]$
+			$ISR.ACSBTMP[isrid] = ISR.ACSBTMP[isrid] | OSAP.BTMP[osapid]$
+		$END$
+	$ELSE$
+		$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsr(%1%) does not belong OsApplication"), isrid)$$END$
+		$DIE()$
+	$END$
+$END$
+
+
+$ C2ISRã®æä½åªå
+åº¦
+$MAX_PRI_ISR2 = -1$
+$ C2ISRã®æé«åªå
+åº¦
+$MIN_PRI_ISR2 = MAX_PRI_ISR2$
+
+$i = 0$
+$FOREACH isrid ISR.ID_LIST$
+	$IF EQ(ISR.CATEGORY[isrid], "CATEGORY_2")$
+		$ISR.ID[isrid] = i$
+		$i = i + 1$
+		$ISR2.ID_LIST = APPEND(ISR2.ID_LIST, isrid)$
+		$IF MIN_PRI_ISR2 > -ISR.INTPRI[isrid]$
+			$MIN_PRI_ISR2 = -ISR.INTPRI[isrid]$
+		$END$
+		$ISR.INT_ENTRY[isrid] = CONCAT("_kernel_inthdr_", +ISR.INTNO[isrid])$
+
+$		// INTNOãå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´å
+		$IF !LENGTH(FIND(INTNO_CREISR2_VALID, ISR.INTNO[isrid]))$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("illegal OsIsrInterruptNumber(%1%) of OsIsr(%2%)"), ISR.INTNO[isrid], isrid)$$END$
+		$END$
+	$END$
+$END$
+
+$ C2ISRãå®ç¾©ããã¦ããªãå ´å
+$IF !LENGTH(ISR2.ID_LIST)$
+	$MAX_PRI_ISR2 = 0$
+	$MIN_PRI_ISR2 = 0$
+$END$
+
+
+$ C1ISRã®æä½åªå
+åº¦
+$MAX_PRI_ISR1 = MIN_PRI_ISR2 - 1$
+$ C1ISRã®æé«åªå
+åº¦
+$MIN_PRI_ISR1 = -TNUM_INTPRI$
+
+$FOREACH isrid ISR.ID_LIST$
+	$IF EQ(ISR.CATEGORY[isrid], "CATEGORY_1")$
+		$ISR1.ID_LIST = APPEND(ISR1.ID_LIST, isrid)$
+		$ISR.ID[isrid] = i$
+		$i = i + 1$
+
+$		// C1ISRã®å²è¾¼ã¿åªå
+åº¦ãMIN_PRI_ISR2ä»¥ä¸ã§ããå ´å
+		$IF -ISR.INTPRI[isrid] >= MIN_PRI_ISR2$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsrInterruptPriority(%1%) of OsIsr(%2%) is lower than or equal to C2ISR min priority(%3%)"), ISR.INTPRI[isrid], isrid, -MIN_PRI_ISR2)$$END$
+		$END$
+		$ISR.INT_ENTRY[isrid] = CONCAT("C1ISRMain", isrid)$
+
+$		// INTNOãå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´å
+		$IF !LENGTH(FIND(INTNO_VALID, ISR.INTNO[isrid]))$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("illegal OsIsrInterruptNumber(%1%) of OsIsr(%2%)"), ISR.INTNO[isrid], isrid)$$END$
+		$END$
+	$END$
+$END$
+
+
+$ ISR.ID_LISTãC2ISR, C1ISRã®é åºã«ãã
+$ISR.ID_LIST = APPEND(ISR2.ID_LIST, ISR1.ID_LIST)$
+
+
+$FOREACH isrid ISR1.ID_LIST$
+$	// C1ISRã¯ãªã½ã¼ã¹ãåå¾ã§ããªã
+	$IF LENGTH(ISR.RES_LIST[isrid])$
+		$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("C1ISR(%1%) can't use RESOURCE"), isrid)$$END$
+	$END$
+$END$
+
+
+$FOREACH isrid ISR2.ID_LIST$
+$	// ISRã¯å
+é¨ãªã½ã¼ã¹ãåå¾ã§ããªã
+$	// ãªã³ã¯ãªã½ã¼ã¹ã¯æ¨æºãªã½ã¼ã¹ã«ãªã³ã¯ãããã®ã§ãããããªã³ã¯ãªã½ã¼ã¹ã§ããã°ã¨ã©ã¼ã¨ããï¼
+
+	$FOREACH resid ISR.RES_LIST[isrid]$
+		$IF EQ(RES.RESATR[resid], "INTERNAL") || EQ(RES.RESATR[resid], "LINKED")$
+			$ERROR ISR.TEXT_LINE[isrid]$$FORMAT(_("OsIsrResourceRef(%1%) of OsIsr(%2%) must be standard resource"), resid, isrid)$$END$
+		$END$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ ãªã½ã¼ã¹é¢é£ã®ã¨ã©ã¼ãã§ãã¯ã¨å
+é¨ãã¼ã¿ã®çæ
+$ =====================================================================
+
+$TRACE("RESOURCE CHECK")$
+
+$FOREACH resid RES.ID_LIST$
+$	// é¢é£ä»ããã©ã°ã®åæå(ãªã½ã¼ã¹ãã©ã®ã¿ã¹ã¯/C2ISRã«ãé¢é£ä»ãããã¦ããªãå ´åï¼warningåºåãï¼ãªãã¸ã§ã¯ããçæããªã)
+	$RES.RELATION_FLAG[resid] = (LENGTH(RES.TSK_LIST[resid]) || LENGTH(RES.ISR_LIST[resid]))$
+$END$
+
+
+$FOREACH resid RES.ID_LIST$
+	$resatr = RES.RESATR[resid]$
+$	// resatrã®å
+å®¹ãã§ãã¯ï¼"STANDARD","INTERNAL","LINKED"ä»¥å¤ãªãã¨ã©ã¼ï¼
+	$IF !(EQ(resatr, "STANDARD") || EQ(resatr, "INTERNAL") || EQ(resatr, "LINKED"))$
+		$ERROR RES.TEXT_LINE[resid]$$FORMAT(_("OsResourceProperty of OsResource(%1%) must be STANDARD or INTERNAL or LINKED"), resid)$$END$
+	$END$
+
+	$IF EQ(RES.RESATR[resid], "LINKED")$
+		$lnkresid = RES.LINKEDRESID[resid]$
+
+		$IF !LENGTH(lnkresid)$
+			$ERROR RES.TEXT_LINE[resid]$$FORMAT(_("OsResourceLinkedResourceRef of OsResource(%1%) is not defined"), resid)$$END$
+			$DIE()$
+		$END$
+
+		$RES.RELATION_FLAG[resid] = RES.RELATION_FLAG[lnkresid]$
+
+$		// è¢«ãªã³ã¯å´ã®å±æ§ãæ¨æºãªã½ã¼ã¹ãï¼
+		$IF !EQ(RES.RESATR[lnkresid], "STANDARD")$
+			$ERROR RES.TEXT_LINE[resid]$$FORMAT(_("OsResourceLinkedResourceRef(%1%) of OsResource(%2%) must be standard resource"), lnkresid, resid)$$END$
+		$END$
+
+$		// LINKEDRESOURCEä»¥å¤ã®ãã©ã¡ã¼ã¿ï¼ACS_OSAP_LISTï¼æå®ãã¦ããã.
+		$IF LENGTH(RES.ACS_OSAP_LIST[resid])$
+			$ERROR RES.TEXT_LINE[resid]$$FORMAT(_("OsResourceAccessingApplication of LINKED OsResource(%1%) must not define"), resid)$$END$
+		$END$
+	$END$
+
+	$IF !RES.RELATION_FLAG[resid]$
+		$WARNING RES.TEXT_LINE[resid]$$FORMAT(_("OsResource(%1%) is not related to any TASK or ISR"), resid)$$END$
+	$END$
+
+$	// ãªã½ã¼ã¹ã¸ã®ã¢ã¯ã»ã¹æ¨©ã®è¨­å®
+	$RES.ACSBTMP[resid] = 0$
+	$FOREACH osapid RES.ACS_OSAP_LIST[resid]$
+		$RES.ACSBTMP[resid] = RES.ACSBTMP[resid] | OSAP.BTMP[osapid]$
+	$END$
+$END$
+
+
+$
+$ ãªã½ã¼ã¹ã®OSå
+é¨ã§ç¨ããIDãå²ãå½ã¦ã
+$ å
+é¨ãªã½ã¼ã¹ä»¥å¤(æ¨æºï¼ãªã³ã¯)ããIDãå²ãå½ã¦ã
+$
+$i = 0$
+$tnum_intres = 0$
+$new_id_list = {}$
+$FOREACH resid RES.ID_LIST$
+	$IF !EQ(RES.RESATR[resid], "INTERNAL") && RES.RELATION_FLAG[resid]$
+		$RES.ID[resid] = i$
+		$i = i + 1$
+		$new_id_list = APPEND(new_id_list, resid)$
+	$END$
+$END$
+$STDRES.ID_LIST = new_id_list$
+$FOREACH resid RES.ID_LIST$
+	$IF EQ(RES.RESATR[resid], "INTERNAL") && RES.RELATION_FLAG[resid]$
+		$RES.ID[resid] = i$
+		$i = i + 1$
+		$tnum_intres = tnum_intres + 1$
+		$new_id_list = APPEND(new_id_list, resid)$
+	$END$
+$END$
+$RES.ID_LIST = new_id_list$
+
+
+$FOREACH resid RES.ID_LIST$
+	$IF !EQ(RES.RESATR[resid], "LINKED")$
+
+$		// ãªã½ã¼ã¹ã®ä¸éåªå
+åº¦ã®è¨ç®(ã¿ã¹ã¯)
+		$ceilpri = 0$
+		$FOREACH tskid RES.TSK_LIST[resid]$
+			$tskpri = TSK.PRIORITY[tskid]$
+			$IF ceilpri < tskpri$
+				$ceilpri = tskpri$
+			$END$
+		$END$
+		$RES.CEILPRI[resid] = ceilpri$
+
+$		// ãªã½ã¼ã¹ã®ä¸éåªå
+åº¦ã®è¨ç®(ISR)
+$		// ISRã®åªå
+åº¦ã¯-1ãã¨ãã¦ãã
+		$ceilpri = 0$
+		$FOREACH isrid RES.ISR_LIST[resid]$
+			$intpri = -ISR.INTPRI[isrid]$
+			$IF ceilpri > intpri$
+				$ceilpri = intpri$
+			$END$
+		$END$
+
+$		// ISRãç¨ãããªã½ã¼ã¹ã®å ´åã®ã¿æ´æ°
+		$IF ceilpri < 0$
+			$RES.CEILPRI[resid] = ceilpri$
+		$END$
+	$END$
+$END$
+
+
+$FOREACH resid RES.ID_LIST$
+$	// ãªã³ã¯ãªã½ã¼ã¹ã®ä¸éåªå
+åº¦ã¨ã¢ã¯ã»ã¹æ¨©ã®è¨­å®
+	$IF EQ(RES.RESATR[resid], "LINKED")$
+		$RES.CEILPRI[resid] = RES.CEILPRI[RES.LINKEDRESID[resid]]$
+		$RES.ACSBTMP[resid] = RES.ACSBTMP[RES.LINKEDRESID[resid]]$
+	$END$
+$END$
+
+
+
+$ =====================================================================
+$ ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®ã¨ã©ã¼ãã§ãã¯
+$ =====================================================================
+
+$ APP
+$ ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã¯32åä»¥ä¸ãï¼
+$IF LENGTH(APP.ID_LIST) > 32$
+	$ERROR$$FORMAT(_("too many OsAppMode %1% > 32"), LENGTH(APP.ID_LIST))$$END$
+$END$
+
+$i = 0$
+$FOREACH appid APP.ID_LIST$
+	$APP.ID[appid] = i$
+	$i = i + 1$
+$END$
+
+
+$ =====================================================================
+$ ã¿ã¹ã¯é¢é£ã®ã¨ã©ã¼ãã§ãã¯ã¨å
+é¨ãã¼ã¿ã®çæ
+$ =====================================================================
+
+$TRACE("TASK CHECK")$
+
+$FOREACH tskid TSK.ID_LIST$
+	$TSK.EXTENDED[tskid] = LENGTH(TSK.EVT_LIST[tskid]) > 0$
+
+$	// å
+é¨ãªã½ã¼ã¹ãåå¾ããå ´åï¼åå¾æã®åªå
+åº¦ãè¨­å®
+	$FOREACH resid TSK.RES_LIST[tskid]$
+		$IF EQ(RES.RESATR[resid], "INTERNAL")$
+			$TSK.INRESPRI[tskid] = RES.CEILPRI[resid]$
+
+			$osapid = TSK.OSAPID[tskid]$
+			$IF !OSAP.TRUSTED[osapid]$
+				$IF !(RES.ACSBTMP[resid] & OSAP.BTMP[osapid])$
+					$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskResourceRef of OsTask(%1%) can't access INTERNAL OsResource(%2%)"), tskid, resid)$$END$
+				$END$
+			$END$
+		$END$
+	$END$
+
+$	// ã¿ã¹ã¯ã®AUTOSTARTã®èµ·åãã¿ã¼ã³
+	$astptn = 0$
+	$FOREACH appid TSK.APP_LIST[tskid]$
+		$astptn = astptn | (1 << APP.ID[appid])$
+	$END$
+	$TSK.ASTPTN[tskid] = astptn$
+
+$	// ã¿ã¹ã¯ã«é¢é£ä»ããããã¤ãã³ããã¹ã¯ã®ORãã¨ã(AUTOã¯0ã§è¨ç®)
+	$TSK.EVTMSK[tskid] = 0$
+
+	$FOREACH evtid TSK.EVT_LIST[tskid]$
+		$TSK.EVTMSK[tskid] = TSK.EVTMSK[tskid] | EVT.MASK[evtid]$
+	$END$
+
+
+	$tskpri = TSK.PRIORITY[tskid]$
+	$tskext = TSK.EXTENDED[tskid]$
+	$tskact = TSK.ACTIVATION[tskid]$
+	$tsksch = TSK.SCHEDULE[tskid]$
+
+$	// priorityã®ç¯å²ãã§ãã¯
+	$IF (tskpri < TMIN_TPRI) || (TMAX_TPRI < tskpri)$
+		$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskPriority(%1%) of OsTask(%2%) is a range error"), tskpri, tskid)$$END$
+	$END$
+
+$	// activationã®ç¯å²ãã§ãã¯
+	$IF !tskext$
+		$IF (tskact == 0) || (256 < tskact)$
+			$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskActivation(%1%) of OsTask(%2%) is a range error"), tskact, tskid)$$END$
+		$END$
+	$ELSE$
+		$IF (tskact != 1)$
+			$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskActivation(%1%) of OsTask(%2%) must be 1"), tskact, tskid)$$END$
+		$END$
+	$END$
+
+$	// scheduleã®å
+å®¹ãã§ãã¯ï¼"NON","FULL"ä»¥å¤ãªãã¨ã©ã¼ï¼
+	$IF !(EQ(tsksch, "NON") || EQ(tsksch, "FULL"))$
+		$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskSchedule of OsTask(%1%) must be NON or FULL"), tskid)$$END$
+	$END$
+
+	$intres_flag = 0$
+
+	$FOREACH resid TSK.RES_LIST[tskid]$
+		$IF EQ(RES.RESATR[resid], "INTERNAL")$
+
+$			// ã¿ã¹ã¯ã«ã¯æå¤§1ã¤ã®å
+é¨ãªã½ã¼ã¹ããå²ãå½ã¦ãããªãããï¼
+$			// å
+é¨ãªã½ã¼ã¹ã2ã¤ä»¥ä¸å²ãå½ã¦ãå ´åã¯ã¨ã©ã¼ã¨ããï¼
+
+$			// å²ãå½ã¦ããªã½ã¼ã¹ãå
+é¨ãªã½ã¼ã¹ãªãç¢ºèªç¨ãã©ã°ãã»ããããï¼
+$			// å
+é¨ãªã½ã¼ã¹ç¢ºèªç¨ãã©ã°ããã§ã«ã»ããããã¦ãããã¨ã©ã¼ã¨ããï¼
+			$IF intres_flag == 0$
+				$intres_flag = 1$
+			$ELSE$
+				$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("too many assigned internal resource OsTaskResourceRef(%1%) of OsTask(%2%)"), resid, tskid)$$END$
+			$END$
+
+$			// å
+é¨ãªã½ã¼ã¹ããã³ããªã¨ã³ããã£ãã®ã¿ã¹ã¯ã¨é¢é£ä»ãããã¦ãããã¨ã©ã¼ã¨ããï¼
+			$IF EQ(TSK.SCHEDULE[tskid], "NON")$
+				$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("internal resource OsTaskResourceRef(%1%) of OsTask(%2%) can't be assign to a nonpreemptable task"), resid, tskid)$$END$
+			$END$
+		$END$
+
+$		// ãªã³ã¯ãªã½ã¼ã¹ã¯æ¨æºãªã½ã¼ã¹ã«ãªã³ã¯ãããã®ã§ãããã
+$		// ãªã³ã¯ãªã½ã¼ã¹ã§ããã°ã¨ã©ã¼ã¨ããï¼
+		$IF EQ(RES.RESATR[resid], "LINKED")$
+			$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskResourceRef(%1%) of OsTask(%2%) is linked resource"), resid, tskid)$$END$
+		$END$
+	$END$
+
+$	// ã¿ã¹ã¯ã¸ã®ã¢ã¯ã»ã¹æ¨©ã®è¨­å®
+	$TSK.ACSBTMP[tskid] = OSAP.BTMP[TSK.OSAPID[tskid]]$
+	$FOREACH osapid TSK.ACS_OSAP_LIST[tskid]$
+		$TSK.ACSBTMP[tskid] = TSK.ACSBTMP[tskid] | OSAP.BTMP[osapid]$
+	$END$
+$END$
+
+
+$
+$ ã¿ã¹ã¯ã®OSå
+é¨ã§ç¨ããIDãå²ãå½ã¦ã
+$ æ¡å¼µã¿ã¹ã¯ããIDãå²ãå½ã¦ã
+$
+$i = 0$
+$tnum_exttask = 0$
+$new_id_list = {}$
+$FOREACH tskid TSK.ID_LIST$
+	$IF TSK.EXTENDED[tskid]$
+		$TSK.ID[tskid] = i$
+		$i = i + 1$
+		$tnum_exttask = tnum_exttask + 1$
+		$new_id_list = APPEND(new_id_list, tskid)$
+	$END$
+$END$
+$FOREACH tskid TSK.ID_LIST$
+	$IF !TSK.EXTENDED[tskid]$
+		$TSK.ID[tskid] = i$
+		$i = i + 1$
+		$new_id_list = APPEND(new_id_list, tskid)$
+	$END$
+$END$
+$TSK.ID_LIST = new_id_list$
+
+
+
+$ =====================================================================
+$ ã¤ãã³ããã¹ã¯å¤æ±ºå®
+$ =====================================================================
+
+$TRACE("EVENT CHECK")$
+
+$auto_evt_msk = 1$
+$auto_evt_num = 0$
+$FOREACH evtid EVT.ID_LIST$
+$	//ãã¹ã¯å¤æå®æ
+	$IF !EQ(EVT.MASK[evtid], AUTO)$
+		$IF (EVT.MASK[evtid] == 0)$
+			$ERROR EVT.TEXT_LINE[evtid]$$FORMAT(_("OsEventMask of OsEvent(%1%) must not be zero"), evtid)$$END$
+			$DIE()$
+		$END$
+		$EVT.CALC_MASK[evtid] = EVT.MASK[evtid]$
+$	//ãã¹ã¯å¤æå®ç¡
+	$ELSE$
+		$EVT.CALC_MASK[evtid] = 0$
+$		//ã¿ã¹ã¯ã«é¢é£ä»ãæ
+		$IF LENGTH(EVT.TSK_LIST[evtid])$
+			$hit_flg = 0$
+			$auto_tskevt_msk = 1$
+			$FOREACH i RANGE(1, 32)$
+				$IF !hit_flg$
+					$ok_flg = 1$
+					$FOREACH tskid EVT.TSK_LIST[evtid]$
+						$IF (TSK.EVTMSK[tskid] & auto_tskevt_msk) != 0$
+							$ok_flg = 0$
+						$END$
+					$END$
+
+$					//å
+¨ã¿ã¹ã¯ã§ç©ºããããçºè¦
+					$IF ok_flg$
+						$hit_flg = 1$
+						$FOREACH tskid EVT.TSK_LIST[evtid]$
+							$TSK.EVTMSK[tskid] = TSK.EVTMSK[tskid] | auto_tskevt_msk$
+						$END$
+						$EVT.CALC_MASK[evtid] = auto_tskevt_msk$
+					$ELSE$
+						$auto_tskevt_msk = auto_tskevt_msk << 1$
+					$END$
+				$END$
+			$END$
+$			//ç©ºãããããªã
+			$IF !hit_flg$
+				$ERROR EVT.TEXT_LINE[evtid]$$FORMAT(_("Auto OsEventMask of OsEvent(%1%) is no free"), evtid)$$END$
+				$DIE()$
+			$END$
+$		//ã¿ã¹ã¯ã«é¢é£ä»ãç¡
+		$ELSE$
+			$IF auto_evt_num > 31$
+				$ERROR EVT.TEXT_LINE[evtid]$$FORMAT(_("Auto OsEventMask of OsEvent(%1%) is over(32)"))$$END$
+				$DIE()$
+			$END$
+			$EVT.CALC_MASK[evtid] = auto_evt_msk$
+			$auto_evt_msk = auto_evt_msk << 1$
+			$auto_evt_num = auto_evt_num + 1$
+		$END$
+	$END$
+$END$
+$NL$
+
+
+
+$ =====================================================================
+$ ã«ã¦ã³ã¿é¢é£ã®ã¨ã©ã¼ãã§ãã¯ã¨å
+é¨ãã¼ã¿ã®çæ
+$ =====================================================================
+
+$TRACE("COUNTER CHECK")$
+
+
+$FOREACH cntid CNT.ID_LIST$
+$	// ã«ã¦ã³ã¿ã®å±æ§ã¯SOFTWARE / HARDWAREããã§ãã¯
+	$IF !(EQ(CNT.CNTATR[cntid], "SOFTWARE") || EQ(CNT.CNTATR[cntid], "HARDWARE"))$
+		$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("OsCounterType of OsCounter(%1%) must be SOFTWARE or HARDWARE"), cntid)$$END$
+	$END$
+$END$
+
+
+$
+$ ã«ã¦ã³ã¿ã®OSå
+é¨ã§ç¨ããIDãå²ãå½ã¦ã
+$ ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ããIDãå²ãå½ã¦ã
+$
+$i = 0$
+$new_id_list = {}$
+$FOREACH cntid CNT.ID_LIST$
+	$IF EQ(CNT.CNTATR[cntid], "HARDWARE")$
+		$CNT.ID[cntid] = i$
+		$i = i + 1$
+		$new_id_list = APPEND(new_id_list, cntid)$
+	$END$
+$END$
+$FOREACH cntid CNT.ID_LIST$
+	$IF EQ(CNT.CNTATR[cntid], "SOFTWARE")$
+		$CNT.ID[cntid] = i$
+		$i = i + 1$
+		$new_id_list = APPEND(new_id_list, cntid)$
+	$END$
+$END$
+$CNT.ID_LIST = new_id_list$
+
+
+$HWCNT.ID_LIST = {}$
+$FOREACH cntid CNT.ID_LIST$
+	$cnttpb = CNT.TICKSPERBASE[cntid]$
+	$cntmin = CNT.MINCYCLE[cntid]$
+	$cntmax = CNT.MAXALLOWED[cntid]$
+
+$	// ticksperbaseã®ç¯å²ç¢ºèª
+	$IF (cnttpb < 1) || (cnttpb > 0x7fffffff)$
+		$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("OsCounterTicksPerBase(%1%) of OsCounter(%2%) is a range error"), cnttpb, cntid)$$END$
+	$END$
+
+$	// mincycleã®ç¯å²ç¢ºèª
+	$IF (cntmin < 1) || (cntmin > 0x7fffffff)$
+		$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("OsCounterMinCycle(%1%) of OsCounter(%2%) is a range error"), cntmin, cntid)$$END$
+	$END$
+
+$	// maxallowedvalueã®ç¯å²ç¢ºèª
+	$IF (cntmax < 1) || (cntmax > 0x7fffffff)$
+		$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("OsCounterMaxAllowedValue(%1%) of OsCounter(%2%) is a range error"), cntmax, cntid)$$END$
+	$END$
+
+$	// mincycleãmaxallowedvalueããå¤§ãããï¼
+	$IF cntmax < cntmin$
+		$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("OsCounterMinCycle(%1%) of OsCounter(%2%) is more than OsCounterMaxAllowedValue(%3%)"), cntmin, cntid, cntmax)$$END$
+	$END$
+
+$	// ã«ã¦ã³ã¿ã¸ã®ã¢ã¯ã»ã¹æ¨©ã®è¨­å®
+	$IF LENGTH(CNT.OSAPID[cntid])$
+		$CNT.ACSBTMP[cntid] = OSAP.BTMP[CNT.OSAPID[cntid]]$
+		$FOREACH osapid CNT.ACS_OSAP_LIST[cntid]$
+			$CNT.ACSBTMP[cntid] = CNT.ACSBTMP[cntid] | OSAP.BTMP[osapid]$
+		$END$
+	$ELSE$
+		$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("OsCounter(%1%) does not belong OsApplication"), cntid)$$END$
+		$DIE()$
+	$END$
+
+$	// ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ISRãCATEGORY_2ããã§ãã¯
+	$IF EQ(CNT.CNTATR[cntid], "HARDWARE")$
+		$IF EQ(ISR.CATEGORY[CNT.ISRID[cntid]], "CATEGORY_2")$
+			$HWCNT.ID_LIST = APPEND(HWCNT.ID_LIST, cntid)$
+		$ELSE$
+			$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("OsCounterIsrRef(%1%) of OsCounter(%2%) is C1ISR"), CNT.ISRID[cntid], cntid)$$END$
+		$END$
+
+		$IF ISR.OSAPID[CNT.ISRID[cntid]] != CNT.OSAPID[cntid]$
+			$ERROR CNT.TEXT_LINE[cntid]$$FORMAT(_("HARDWARE OsCounter(%1%) and OsCounterIsrRef(%2%) must belong to the same OsApplication"), cntid, isrid)$$END$
+		$END$
+	$END$
+$END$
+
+
+
+$ =====================================================================
+$ ã¢ã©ã¼ã é¢é£ã®ã¨ã©ã¼ãã§ãã¯ã¨å
+é¨ãã¼ã¿ã®çæ
+$ =====================================================================
+
+$TRACE("ALARM CHECK")$
+
+$i = 0$
+$FOREACH almid ALM.ID_LIST$
+
+$	// ã¢ã©ã¼ã ã®AUTOSTARTã®èµ·åãã¿ã¼ã³
+	$astptn = 0$
+	$FOREACH appid ALM.APP_LIST[almid]$
+		$astptn = astptn | (1 << APP.ID[appid])$
+	$END$
+	$ALM.ASTPTN[almid] = astptn$
+
+$	// IDã®è¨­å®
+	$ALM.ID[almid] = i$
+	$i = i + 1$
+
+$	// ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãè¨­å®ããå ´åã®ã¿ï¼ã¢ã©ã¼ã ååèµ·åãã£ãã¯å¤ã¨å¨æã®é©åæ§ããã§ãã¯
+	$IF ALM.ASTPTN[almid]$
+$		// ã¢ã©ã¼ã ååèµ·åãã£ãã¯å¤ã¯ï¼ã«ã¦ã³ã¿æå¤§å¤ãè¶
+ãããæãã¯0ããå°ããã
+		$IF CNT.MAXALLOWED[ALM.CNTID[almid]] < ALM.ALARMTIME[almid] || ALM.ALARMTIME[almid] < 0$
+			$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmAlarmTime(%1%) of OsAlarm(%2%) must be in the range 0 .. OsCounterMaxAllowedValue(%3%)"), 
+													ALM.ALARMTIME[almid], almid, CNT.MAXALLOWED[ALM.CNTID[almid]])$$END$
+		$END$
+
+$		// ã¢ã©ã¼ã å¨æã¯ï¼ã«ã¦ã³ã¿æå¤§å¤ãè¶
+ãããï¼0ããå°ãããï¼ã«ã¦ã³ã¿ã®æå°å¨æããå°ãã(0ãé¤ã)ã
+		$IF CNT.MAXALLOWED[ALM.CNTID[almid]] < ALM.CYCLETIME[almid] || ALM.CYCLETIME[almid] < 0 ||
+			(ALM.CYCLETIME[almid] < CNT.MINCYCLE[ALM.CNTID[almid]] && ALM.CYCLETIME[almid] != 0)$
+			$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmCycleTime(%1%) of OsAlarm(%2%) must be zero OR in the range OsCounterMinCycle(%3%) .. OsCounterMaxAllowedValue(%4%)"), 
+											ALM.CYCLETIME[almid], almid, CNT.MINCYCLE[ALM.CNTID[almid]], CNT.MAXALLOWED[ALM.CNTID[almid]])$$END$
+		$END$
+
+$		// autostarttypeã«ABSOLUTE/RELATIVEä»¥å¤ã®ãã®ãç»é²ããã¦ããªãã
+		$IF !(EQ(ALM.AUTOSTARTTYPE[almid], "ABSOLUTE") || EQ(ALM.AUTOSTARTTYPE[almid], "RELATIVE"))$
+			$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmAutostartType of OsAlarm(%1%) must be ABSOLUTE or RELATIVE"), almid)$$END$
+		$END$
+
+$		// autostarttypeãRELATIVEã®å ´åã¯STARTTICK==0ã¯ç¦æ­¢
+		$IF EQ(ALM.AUTOSTARTTYPE[almid], "RELATIVE") && ALM.ALARMTIME[almid] == 0$
+			$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmAlarmTime of RELATIVE OsAlarm(%1%) must not be zero"), almid)$$END$
+		$END$
+	$END$
+
+$	// ã¢ã©ã¼ã ã¸ã®ã¢ã¯ã»ã¹æ¨©ã®è¨­å®
+	$IF LENGTH(ALM.OSAPID[almid])$
+		$ALM.ACSBTMP[almid] = OSAP.BTMP[ALM.OSAPID[almid]]$
+		$FOREACH osapid ALM.ACS_OSAP_LIST[almid]$
+			$ALM.ACSBTMP[almid] = ALM.ACSBTMP[almid] | OSAP.BTMP[osapid]$
+		$END$
+	$ELSE$
+		$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarm(%1%) does not belong OsApplication"), almid)$$END$
+		$DIE()$
+	$END$
+
+	$osapid = ALM.OSAPID[almid]$
+
+	$IF EQ(ALM.ALMATR[almid], "ACTIVATETASK") || EQ(ALM.ALMATR[almid], "SETEVENT")$
+		$IF !OSAP.TRUSTED[osapid]$
+			$IF !(TSK.ACSBTMP[ALM.TSKID[almid]] & OSAP.BTMP[osapid])$
+				$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmActivateTaskRef or OsAlarmSetEventTaskRef of OsAlarm(%1%) can't access OsTask(%2%)"), 
+												almid, ALM.TSKID[almid])$$END$
+			$END$
+		$END$
+	$END$
+
+$	// taskãæ¡å¼µã¿ã¹ã¯ã(SETEVENTã®å ´å)
+	$IF EQ(ALM.ALMATR[almid], "SETEVENT")$
+		$IF !TSK.EXTENDED[ALM.TSKID[almid]]$
+			$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmSetEventTaskRef(%1%) of OsAlarm(%2%) is not extended task"), ALM.TSKID[almid], almid)$$END$
+		$END$
+	$END$
+
+	$IF EQ(ALM.ALMATR[almid], "INCREMENTCOUNTER")$
+		$IF !OSAP.TRUSTED[osapid]$
+			$IF !(CNT.ACSBTMP[ALM.INCID[almid]] & OSAP.BTMP[osapid])$
+				$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmIncrementCounterRef of OsAlarm(%1%) can't access OsCounter(%2%)"), 
+												almid, ALM.INCID[almid])$$END$
+			$END$
+		$END$
+
+$		// ã¢ã©ã¼ã ãããã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãã¤ã³ã¯ãªã¡ã³ããã¦ããããã§ãã¯
+		$IF EQ(CNT.CNTATR[ALM.INCID[almid]], "HARDWARE")$
+			$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmIncrementCounterRef(%1%) of OsAlarm(%2%) is hardware counter"), ALM.INCID[almid], almid)$$END$
+		$END$
+	$END$
+$END$
+
+
+$
+$ IncrementCounterã®å¾ªç°ãã§ãã¯ã®ããã®é¢æ°
+$
+
+$ è¡åã®æãç®
+$FUNCTION MATRIX_MUL$
+	$FOREACH i RANGE(0, matrix_size - 1)$
+		$FOREACH j RANGE(0, matrix_size - 1)$
+			$result = {}$
+			$FOREACH k RANGE(0, matrix_size - 1)$
+				$IF LENGTH(result) == 0$
+					$IF LENGTH(result_matrix[i * matrix_size + k]) && LENGTH(base_matrix[k * matrix_size + j])$
+						$result = APPEND(result_matrix[i * matrix_size + k], base_matrix[k * matrix_size + j])$
+					$END$
+				$END$
+			$END$
+$			// æãç®çµæãä¸æè¡åã«ä¿æ
+			$tmp_matrix[i * matrix_size + j] = result$
+		$END$
+	$END$
+$	// æãç®çµæãçµæè¡åã«ã»ãã
+	$FOREACH i RANGE(0, matrix_size - 1)$
+		$FOREACH j RANGE(0, matrix_size - 1)$
+			$result_matrix[i * matrix_size + j] = tmp_matrix[i * matrix_size + j]$
+		$END$
+	$END$
+$END$
+
+
+$ è¡åã®0åæå
+$ base_matrix   åæè¡å
+$ result_matrix æãç®ã®çµæã®è¡å
+$FUNCTION INIT_MATRIX$
+	$FOREACH almid ALM.ID_LIST$
+		$IF EQ(ALM.ALMATR[almid], "INCREMENTCOUNTER")$
+			$i = ALM.CNTID[almid] - 1$
+			$j = ALM.INCID[almid] - 1$
+			$IF !LENGTH(base_matrix[i * matrix_size + j])$
+				$base_matrix[i * matrix_size + j] = {almid}$
+				$result_matrix[i * matrix_size + j] = {almid}$
+			$END$
+		$END$
+	$END$
+$END$
+
+
+$ ã¢ã©ã¼ã ã®å¾ªç°ãªã¹ããæå°IDã®ã¢ã©ã¼ã ãå
+é ­ã«ãªãããã«ã­ã¼ãã¼ãããã
+$ ã¾ãï¼å¾ªç°ãªã¹ãã«éè¤ããã¢ã©ã¼ã ãå«ã¾ãã¦ãããéè¤ããã¢ã©ã¼ã ä»¥éã
+$ ãªã¹ãããåãé¤ã
+$FUNCTION ROTATE_LOOPED_ALARM$
+$	// é¢æ°å
+ã§iãä½¿ãããéé¿
+	$tmp_i = i$
+	$alm_list = ARGV[1]$
+	$size = LENGTH(alm_list)$
+$	// ãªã¹ãå
+ã§ã®ã¢ã©ã¼ã IDã®æå°å¤
+	$min_alm_id = AT(alm_list, 0)$
+	$min_alm_id_index = 0$
+	$FOREACH i RANGE(1, size - 1)$
+		$IF min_alm_id > AT(alm_list, i)$
+			$min_alm_id = AT(alm_list, i)$
+			$min_alm_id_index = i$
+		$END$
+	$END$
+	$RESULT = {}$
+$	// éè¤ããã¢ã©ã¼ã IDãå­å¨ããã
+	$duplicate = 0$
+	$FOREACH i RANGE(0, size - 1)$
+		$append_alm = AT(alm_list, (min_alm_id_index + i) % size)$
+		$IF LENGTH(FIND(RESULT, append_alm)) > 0$
+$			// éè¤ããã¢ã©ã¼ã ãããã°ããä»¥éã¯è¿½å ããªã
+			$duplicate = 1$
+		$END$
+		$IF duplicate == 0$
+			$RESULT = APPEND(RESULT, append_alm)$
+		$END$
+	$END$
+	$i = tmp_i$
+$END$
+
+
+$FUNCTION CHECK_COUNTER_LOOP$
+	$matrix_size = LENGTH(CNT.ID_LIST)$
+
+	$INIT_MATRIX()$
+
+$	// å¾ªç°ã¢ã©ã¼ã ãªã¹ãã®ãªã¹ã
+	$alm_loop_list_size = 0$
+
+$	// ã«ã¼ãã®æ¤åºã¨ã¨ã©ã¼åºå
+	$FOREACH n RANGE(0,  matrix_size - 1)$
+		$FOREACH i RANGE(0,  matrix_size - 1)$
+			$IF LENGTH(result_matrix[i * matrix_size + i]) > 0$
+				$result_matrix[i * matrix_size + i] = ROTATE_LOOPED_ALARM(result_matrix[i * matrix_size + i])$
+				$find = 0$
+				$FOREACH ii RANGE(0, alm_loop_list_size - 1)$
+$	 				// éå»ã«æ¤åºãããªã¹ãã«å«ã¾ãããèª¿ã¹ã
+					$IF EQ(alm_loop_list[ii], result_matrix[i * matrix_size + i])$
+						$find = 1$
+					$END$
+				$END$
+				$IF find == 0$
+					$alm_loop_list[alm_loop_list_size] = result_matrix[i * matrix_size + i]$
+					$alm_loop_list_size = alm_loop_list_size + 1$
+					$ERROR ALM.TEXT_LINE[AT(result_matrix[i * matrix_size + i], 0)]$
+								$FORMAT(_("OsAlarmIncrementCounterRef of OsAlarm(%1%) is a cyclic chain of alarm action"), result_matrix[i * matrix_size + i])$$END$
+				$END$
+			$END$
+		$END$
+		$MATRIX_MUL()$
+	$END$
+$END$
+
+
+$ ç´æ¥/éæ¥çã«ã«ã¦ã³ã¿ãã¤ã³ã¯ãªã¡ã³ãããã(INCREMENTCOUNTERã®å ´å)
+$ ã¦ã¼ã¶ãããã«OMIT_CHECK_CYCLIC_CHAINã®å®ç¾©ãããã°ï¼ã¢ã©ã¼ã å¾ªç°ãã§ãã¯ãè¡ããªã
+$IF !OMIT_CHECK_CYCLIC_CHAIN$
+	$CHECK_COUNTER_LOOP()$
+$END$
+
+$ ä»ã®éä¿¡é ¼OSAPã«æå±ããã«ã¦ã³ã¿ãæå®ããå ´å
+$FOREACH almid ALM.ID_LIST$
+	$IF !EQ(ALM.OSAPID[almid], CNT.OSAPID[ALM.CNTID[almid]])$
+		$IF !OSAP.TRUSTED[CNT.OSAPID[ALM.CNTID[almid]]]$
+			$ERROR ALM.TEXT_LINE[almid]$$FORMAT(_("OsAlarmCounterRef(%1%) is on a other Non-Trusted OS-Application"), ALM.CNTID[almid])$$END$
+		$END$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«é¢é£ã®ã¨ã©ã¼ãã§ãã¯ã¨å
+é¨ãã¼ã¿ã®çæ
+$ =====================================================================
+
+$TRACE("SCHEDULETABLE CHECK")$
+
+$FOREACH schtblid SCHTBL.ID_LIST$
+$	// ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã¸ã®ã¢ã¯ã»ã¹æ¨©ã®è¨­å®
+	$IF LENGTH(SCHTBL.OSAPID[schtblid])$
+		$SCHTBL.ACSBTMP[schtblid] = OSAP.BTMP[SCHTBL.OSAPID[schtblid]]$
+		$FOREACH osapid SCHTBL.ACS_OSAP_LIST[schtblid]$
+			$SCHTBL.ACSBTMP[schtblid] = SCHTBL.ACSBTMP[schtblid] | OSAP.BTMP[osapid]$
+		$END$
+	$ELSE$
+		$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTable(%1%) does not belong OsApplication"), schtblid)$$END$
+		$DIE()$
+	$END$
+$	// åææ¹æ³è¨­å®å¤ãã§ãã¯
+$	// syncstrategyã«NONE/IMPLICITããããä¸ã¤ãæå®ããã¦ããã
+	$IF !(EQ(SCHTBL.SYNCSTRATEGY[schtblid], "NONE") || EQ(SCHTBL.SYNCSTRATEGY[schtblid], "IMPLICIT"))$
+		$ERROR SCHTBL.TEXT_LINE[schtblid]$
+				$FORMAT(_("OsScheduleTblSyncStrategy of OsScheduleTable(%1%) must be NONE or IMPLICIT"), schtblid)$$END$
+	$END$
+$END$
+
+
+$ åã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«IDã®å®ç¾©(æé»åæå®ç¾©ã¯å
+ï¼éåæå®ç¾©ã¯å¾)
+$i = 0$
+$ ã¹ã±ã¸ã¥ã¼ã«åæåãã­ãã¯çææã«ä½¿ç¨ããé åºä»ããªã¹ãå¤æ°
+$new_id_list = {}$
+$FOREACH schtblid SCHTBL.ID_LIST$
+	$IF EQ(SCHTBL.SYNCSTRATEGY[schtblid], "IMPLICIT")$
+		$SCHTBL.ID[schtblid] = i$
+		$i = i + 1$
+		$new_id_list = APPEND(new_id_list, schtblid)$
+	$END$
+$END$
+$FOREACH schtblid SCHTBL.ID_LIST$
+	$IF EQ(SCHTBL.SYNCSTRATEGY[schtblid], "NONE")$
+		$SCHTBL.ID[schtblid] = i$
+		$i = i + 1$
+		$new_id_list = APPEND(new_id_list, schtblid)$
+	$END$
+$END$
+$NL$
+$SCHTBL.ID_LIST = new_id_list$
+
+$exppt_index = 0$
+$EXPPT.ID_LIST = {}$
+$FOREACH expptactid EXPPTACT.ID_LIST$
+$	// æºäºã¢ã¯ã·ã§ã³ã®å±æ§ã¨æºäºã¢ã¯ã·ã§ã³å¦çå
+å®¹è¨­å®ã®æ´åæ§ãã§ãã¯
+$	// taskãæ¡å¼µã¿ã¹ã¯ã(SETEVENTã®å ´å)
+	$IF EQ(EXPPTACT.EXPIREATR[expptactid], "SETEVENT")$
+		$IF !TSK.EXTENDED[EXPPTACT.TSKID[expptactid]]$
+			$ERROR EXPPTACT.TEXT_LINE[expptactid]$
+						$FORMAT(_("OsScheduleTableSetEventTaskRef(%1%) of OsScheduleTableExpiryPoint(%2%) is not extended task"), EXPPTACT.TSKID[expptactid], expptactid)$$END$
+		$END$
+	$END$
+
+	$schtblid = EXPPTACT.SCHTBLID[expptactid]$
+	$FOREACH expptid EXPPT.ID_LIST$
+		$IF EXPPT.OFFSET[expptid] == EXPPTACT.OFFSET[expptactid] &&
+			EXPPTACT.SCHTBLID[expptactid] == EXPPT.SCHTBLID[expptid]$
+			$EXPPTACT.EXPPTID[expptactid] = expptid$
+		$END$
+	$END$
+
+$	// æºäºç¹æ
+å ±ã®çæã¨ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã¨ã®é¢é£ä»ã
+	$IF !LENGTH(EXPPTACT.EXPPTID[expptactid])$
+		$EXPPT.ID_LIST = APPEND(EXPPT.ID_LIST, exppt_index)$
+		$EXPPT.SCHTBLID[exppt_index] = schtblid$
+		$EXPPT.OFFSET[exppt_index] = EXPPTACT.OFFSET[expptactid]$
+		$SCHTBL.EXPPTINDEX_LIST[schtblid] = APPEND(SCHTBL.EXPPTINDEX_LIST[schtblid], exppt_index)$
+		$EXPPTACT.EXPPTID[expptactid] = exppt_index$
+
+$		æºäºç¹ã®ãªãã»ãããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®å¨æãè¶
+ããããã§ãã¯
+		$IF EXPPT.OFFSET[exppt_index] > SCHTBL.DURATIONTICK[schtblid]$
+			$ERROR EXPPTACT.TEXT_LINE[expptactid]$
+						$FORMAT(_("OsScheduleTblExpPointOffset(%1%) of OsScheduleTableExpiryPoint(%2%) of OsScheduleTable(%3%) more than OsScheduleTableDuration(%4%)"), 
+							EXPPTACT.OFFSET[expptactid], expptactid, schtblid, SCHTBL.DURATIONTICK[schtblid])$$END$
+		$END$
+		$exppt_index = exppt_index + 1$
+	$END$
+
+	$osapid = SCHTBL.OSAPID[schtblid]$
+	$IF !OSAP.TRUSTED[osapid]$
+		$IF !(TSK.ACSBTMP[EXPPTACT.TSKID[expptactid]] & OSAP.BTMP[osapid])$
+			$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTableActivateTaskRef or OsScheduleTableSetEventTaskRef of OsScheduleTable(%1%) can't access OsTask(%2%)"), 
+												schtblid, EXPPTACT.TSKID[expptactid])$$END$
+		$END$
+	$END$
+$END$
+
+
+$ æé»ã¹ã±ã¸ã¥ã¼ã«ã«ã¦ã³ãç¨å¤æ°
+$tnum_implscheduletable = 0$
+
+$FOREACH schtblid SCHTBL.ID_LIST$
+$	// EXPPTINDEX_LISTãOFFSETã®é ã«ã½ã¼ããã
+	$SCHTBL.EXPPTINDEX_LIST[schtblid] = SORT(SCHTBL.EXPPTINDEX_LIST[schtblid], "EXPPT.OFFSET")$
+
+	$astptn = 0$
+	$FOREACH appid SCHTBL.APP_LIST[schtblid]$
+		$astptn = astptn | (1 << APP.ID[appid])$
+	$END$
+	$SCHTBL.ASTPTN[schtblid] = astptn$
+
+$	// ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãè¨­å®ããå ´åã®ã¿ï¼ååèµ·åãã£ãã¯å¤ããã§ãã¯
+	$IF SCHTBL.ASTPTN[schtblid]$
+
+		$IF !(EQ(SCHTBL.AUTOSTARTTYPE[schtblid], "ABSOLUTE") || EQ(SCHTBL.AUTOSTARTTYPE[schtblid], "RELATIVE"))$
+$			// autostarttypeã«ABSOLUTE/RELATIVEä»¥å¤ã®ãã®ãç»é²ããã¦ããªãã
+			$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTableAutostartType of OsScheduleTable(%1%) must be ABSOLUTE or RELATIVE"), schtblid)$$END$
+		$ELIF EQ(SCHTBL.STARTTICK[schtblid], "NULL")$
+$			// ååèµ·åãã£ãã¯å¤ãçç¥ããããã
+			$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTableStartValue(%1%) of %2% AutoStart OsScheduleTable(%3%) must be designated"),
+													SCHTBL.STARTTICK[schtblid], SCHTBL.AUTOSTARTTYPE[schtblid], schtblid)$$END$
+			$DIE()$
+		$END$
+
+$		// ååèµ·åãã£ãã¯å¤ã¯ï¼ã«ã¦ã³ã¿æå¤§å¤ãè¶
+ãããæãã¯0ããå°ããã
+		$IF CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]] < SCHTBL.STARTTICK[schtblid] || SCHTBL.STARTTICK[schtblid] < 0$
+			$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTableStartValue(%1%) of OsScheduleTable(%2%) must be in the range 0 .. OsCounterMaxAllowedValue(%3%)"), 
+													SCHTBL.STARTTICK[schtblid], schtblid, CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]])$$END$
+		$END$
+
+		$IF EQ(SCHTBL.AUTOSTARTTYPE[schtblid], "RELATIVE")$
+$			// autostarttypeãRELATIVEã®å ´åã¯STARTTICK==0ã¯ç¦æ­¢
+			$IF SCHTBL.STARTTICK[schtblid] == 0$
+				$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTableStartValue of RELATIVE OsScheduleTable(%1%) must not be zero"), schtblid)$$END$
+			$END$
+
+$			//æé»ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®autostarttypeã«RELATIVEãæå®ããã¦ããã
+			$IF EQ(SCHTBL.SYNCSTRATEGY[schtblid], "IMPLICIT")$
+				$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTableAutostartType of IMPLICIT OsScheduleTable(%1%) must not be RELATIVE"), schtblid)$$END$
+			$END$
+		$END$
+	$END$
+
+$	//æºäºç¹æ°254ãè¶
+ããããã§ãã¯
+	$IF LENGTH(SCHTBL.EXPPTINDEX_LIST[schtblid]) > 254$
+		$ERROR SCHTBL.TEXT_LINE[schtblid]$
+					$FORMAT(_("too many OsScheduleTableExpiryPoint of OsScheduleTable(%1%) %2% > 254"), schtblid, LENGTH(SCHTBL.EXPPTINDEX_LIST[schtblid]))$$END$
+	$ELSE$
+		$previous_exp_expptid = AT(SCHTBL.EXPPTINDEX_LIST[schtblid], 0)$
+
+$		// åæãªãã»ããã¯ï¼0ãæ¥ç¶ã«ã¦ã³ã¿ã®æå°å¨æãæå¤§å¤ãã«ãªãå¿
+è¦ããã
+		$IF EXPPT.OFFSET[previous_exp_expptid] != 0 && (EXPPT.OFFSET[previous_exp_expptid] < CNT.MINCYCLE[SCHTBL.CNTID[schtblid]] ||
+												 EXPPT.OFFSET[previous_exp_expptid] > CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]])$
+			$ERROR EXPPT.TEXT_LINE[previous_exp_expptid]$
+							$FORMAT(_("The Initial Offset(%1%) of OsScheduleTable(%2%) must be zero OR in the range OsCounterMinCycle(%3%) .. OsCounterMaxAllowedValue(%4%)"), 
+								EXPPT.OFFSET[previous_exp_expptid], schtblid, CNT.MINCYCLE[SCHTBL.CNTID[schtblid]], CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]])$$END$
+		$END$
+
+$		// åæºäºç¹éã®é
+å»¶å¤ã¯ï¼æ¥ç¶ã«ã¦ã³ã¿ã®æå°å¨æãæå¤§å¤ãã«ãªãå¿
+è¦ããã
+		$FOREACH exp_expptid SCHTBL.EXPPTINDEX_LIST[schtblid]$
+			$IF previous_exp_expptid != exp_expptid$
+				$IF (EXPPT.OFFSET[exp_expptid] - EXPPT.OFFSET[previous_exp_expptid] < CNT.MINCYCLE[SCHTBL.CNTID[schtblid]]) ||
+					(EXPPT.OFFSET[exp_expptid] - EXPPT.OFFSET[previous_exp_expptid] > CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]])$
+					$ERROR EXPPT.TEXT_LINE[exp_expptid]$
+						$FORMAT(_("The delay of OsScheduleTable(%1%) between OsScheduleTblExpPointOffset(%2% and %3%) must be in the range OsCounterMinCycle(%4%) .. OsCounterMaxAllowedValue(%5%)"),
+							schtblid, EXPPT.OFFSET[previous_exp_expptid], EXPPT.OFFSET[exp_expptid], CNT.MINCYCLE[SCHTBL.CNTID[schtblid]], CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]])$$END$
+				$END$
+				$previous_exp_expptid = exp_expptid$
+			$END$
+		$END$
+
+$		// æçµé
+å»¶å¤ã¯ï¼æ¥ç¶ã«ã¦ã³ã¿ã®æå°å¨æãæå¤§å¤ãã«ãªãå¿
+è¦ãããï¼åçºã®å ´å0ãæå¤§å¤ãè¨±ãããï¼
+		$IF (SCHTBL.REPEAT[schtblid] != 1) &&
+			((SCHTBL.DURATIONTICK[schtblid] - EXPPT.OFFSET[previous_exp_expptid] < 0) ||
+			 (SCHTBL.DURATIONTICK[schtblid] - EXPPT.OFFSET[previous_exp_expptid] > CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]]))$
+$			// åçºé§åã®å ´åï¼0æªæºã¾ãã¯ã«ã¦ã³ã¿ã®æå¤§å¤ãè¶
+ããå¤ãè¨­å®ããã¨ã¨ã©ã¼
+			$ERROR EXPPT.TEXT_LINE[previous_exp_expptid]$
+						$FORMAT(_("Final Delay(%1%) of OsScheduleTable(%2%) must be in the range OsCounterMinCycle(%3%) .. OsCounterMaxAllowedValue(%4%), and allow zero when single-shot"), 
+							(SCHTBL.DURATIONTICK[schtblid] - EXPPT.OFFSET[previous_exp_expptid]), schtblid, CNT.MINCYCLE[SCHTBL.CNTID[schtblid]], CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]])$$END$
+		$ELIF (SCHTBL.REPEAT[schtblid] == 1) &&
+			((SCHTBL.DURATIONTICK[schtblid] - EXPPT.OFFSET[previous_exp_expptid] < CNT.MINCYCLE[SCHTBL.CNTID[schtblid]]) ||
+			 (SCHTBL.DURATIONTICK[schtblid] - EXPPT.OFFSET[previous_exp_expptid] > CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]]))$
+$			// å¨æé§åã®å ´åï¼ã«ã¦ã³ã¿ã®æå°å¨ææªæºã¾ãã¯ã«ã¦ã³ã¿ã®æå¤§å¤ãè¶
+ããå¤ãè¨­å®ããã¨ã¨ã©ã¼
+			$ERROR EXPPT.TEXT_LINE[previous_exp_expptid]$
+						$FORMAT(_("Final Delay(%1%) of OsScheduleTable(%2%) must be in the range OsCounterMinCycle(%3%) .. OsCounterMaxAllowedValue(%4%), and allow zero when single-shot"), 
+							(SCHTBL.DURATIONTICK[schtblid] - EXPPT.OFFSET[previous_exp_expptid]), schtblid, CNT.MINCYCLE[SCHTBL.CNTID[schtblid]], CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]])$$END$
+		$END$
+	$END$
+
+$	// æé»ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®ã«ã¦ã³ã
+	$IF EQ(SCHTBL.SYNCSTRATEGY[schtblid], "IMPLICIT")$
+		$tnum_implscheduletable = tnum_implscheduletable + 1$
+
+$		æé»ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®å¨æã¯ï¼é§åã«ã¦ã³ãæå¤§å¤+1ããã§ãã¯
+		$IF SCHTBL.DURATIONTICK[schtblid] != CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]] + 1$
+			$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTableDuration(%1%) of IMPLICIT OsScheduleTable(%2%) must be OsCounterMaxAllowedValue(%3%) + 1"), 
+													SCHTBL.DURATIONTICK[schtblid], schtblid, CNT.MAXALLOWED[SCHTBL.CNTID[schtblid]])$$END$
+		$END$
+	$END$
+$END$
+
+$ ä»ã®éä¿¡é ¼OSAPã«æå±ããã«ã¦ã³ã¿ãæå®ããå ´å
+$FOREACH schtblid SCHTBL.ID_LIST$
+	$IF !EQ(SCHTBL.OSAPID[schtblid], CNT.OSAPID[SCHTBL.CNTID[schtblid]])$
+		$IF !OSAP.TRUSTED[CNT.OSAPID[SCHTBL.CNTID[schtblid]]]$
+			$ERROR SCHTBL.TEXT_LINE[schtblid]$$FORMAT(_("OsScheduleTableCounterRef(%1%) is on a other Non-Trusted OS-Application"), SCHTBL.CNTID[schtblid])$$END$
+		$END$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ ä¿¡é ¼é¢æ°ã®ã¨ã©ã¼ãã§ãã¯ã¨IDè¨­å®
+$ =====================================================================
+
+$i = 0$
+$FOREACH tfnid TFN.ID_LIST$
+	$TFN.ID[tfnid] = i$
+	$i = i + 1$
+
+$	// OSã¢ããªã±ã¼ã·ã§ã³ã¯ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã?
+	$IF !OSAP.TRUSTED[TFN.OSAPID[tfnid]]$
+		$ERROR TFN.TEXT_LINE[tfnid]$$FORMAT(_("OsApplicationTrustedFunction(%1%) of OsApplication(%2%) can't be assign to Non-Trusted OS-Application"), 
+										tfnid, TFN.OSAPID[tfnid])$$END$
+	$END$
+
+	$IF EQ(TFN.FUNC[tfnid], REGEX_REPLACE(TFN.FUNC[tfnid], "^TRUSTED_", ""))$
+		$ERROR TFN.TEXT_LINE[tfnid]$$FORMAT(_("OsTrustedFunctionName(%1%) of OsApplication(%2%) function name must begin with TRUSTED_"), 
+										TFN.FUNC[tfnid], TFN.OSAPID[tfnid])$$END$
+	$END$
+$END$
+
+
+$ =====================================================================
+$ ä»¥ä¸ã¯HRP2ããã®ç§»æ¤
+$ =====================================================================
+
+$ =====================================================================
+$ ä¿è­·ãã¡ã¤ã³ã«é¢ããåå¦ç
+$ =====================================================================
+
+$
+$  ä¿è­·ãã¡ã¤ã³ãªã¹ãã®ä½æ
+$	DOMLISTï¼ã¦ã¼ã¶ãã¡ã¤ã³ã®ãªã¹ã
+$	DOMLIST_ALLï¼ã«ã¼ãã«ãã¡ã¤ã³ï¼ã¦ã¼ã¶ãã¡ã¤ã³ï¼ç¡æå±ã®ãªã¹ã
+$
+$FOREACH domid OSAP.ID_LIST$
+	$IF !OSAP.TRUSTED[domid]$
+		$DOMLIST = APPEND(DOMLIST, domid)$
+	$END$
+$END$
+$DOMLIST_ALL = APPEND(TDOM_KERNEL, DOMLIST, TDOM_NONE)$
+
+$
+$  ä¿è­·ãã¡ã¤ã³æ¯ã®ããã©ã«ãã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ã®ä½æ
+$
+$DEFAULT_ACPTN[TDOM_KERNEL] = VALUE("TACP_KERNEL", TACP_KERNEL)$
+$FOREACH domid OSAP.ID_LIST$
+	$DEFAULT_ACPTN[domid] = OSAP.ACPTN[domid]$
+$END$
+$DEFAULT_ACPTN[TDOM_NONE] = VALUE("TACP_SHARED", TACP_SHARED)$
+
+$
+$  ä¿è­·ãã¡ã¤ã³ã®ã©ãã«ã®ä½æ
+$	OSAP.LABEL[domid]ï¼ä¿è­·ãã¡ã¤ã³ã®ã©ãã«
+$
+$OSAP.LABEL[TDOM_KERNEL] = "kernel"$
+$FOREACH domid OSAP.ID_LIST$
+	$IF !OSAP.TRUSTED[domid]$
+		$OSAP.LABEL[domid] = domid$
+	$END$
+$END$
+$OSAP.LABEL[TDOM_NONE] = "shared"$
+
+$ =====================================================================
+$ ã¡ã¢ãªãªãã¸ã§ã¯ãã«é¢ããåå¦ç
+$
+$ çµ±ååã®ã¡ã¢ãªãªãã¸ã§ã¯ãã®æ
+å ±ãMO.XXXX[moid]ã«çæããï¼
+$
+$ nummoï¼çµ±ååã®ã¡ã¢ãªãªãã¸ã§ã¯ãã®æ°
+$ MO.TYPE[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ã¿ã¤ã
+$	TOPPERS_ATTMODï¼OsMemoryModuleã§ç»é²ãããã»ã¯ã·ã§ã³
+$					ã¢ã¸ã¥ã¼ã«åãMO.MODULE[moid]ã«è¨­å®
+$	TOPPERS_ATTSECï¼OsMemorySectionã§ç»é²ãããã»ã¯ã·ã§ã³
+$	TOPPERS_ATTMEMï¼OsMemoryAreaã§ç»é²ãããã»ã¯ã·ã§ã³
+$					å
+é ­çªå°ãMO.BASE[moid]ã«è¨­å®
+$					ãµã¤ãºãMO.SIZE[moid]ã«è¨­å®
+$	TOPPERS_USTACKï¼ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯é å
+$					ã¿ã¹ã¯IDãMO.STKORDER[moid]ã«è¨­å®
+$					å
+é ­çªå°ãMO.BASE[moid]ã«è¨­å®ï¼ã¦ã¼ã¶ã¹ã¿ãã¯é åãã¢
+$					ããªã±ã¼ã·ã§ã³ãæå®ããå ´åã®ã¿ï¼
+$					ãµã¤ãºãMO.SIZE[moid]ã«è¨­å®
+$ MO.LINKER[moid]ï¼ãªã³ã«ãé
+ç½®ããã¡ã¢ãªãªãã¸ã§ã¯ããï¼
+$ MO.OSAPID[moid]ï¼å±ããOSAPï¼ç¡æå±ã®å ´åã¯TDOM_NONEï¼
+$ MO.MEMREG[moid]ï¼ã¡ã¢ãªãªã¼ã¸ã§ã³çªå·ï¼ãªã³ã«ãé
+ç½®ããå ´åã®ã¿ï¼
+$ MO.SECTION[moid]ï¼ã»ã¯ã·ã§ã³åï¼ãªã³ã«ãé
+ç½®ããå ´åã®ã¿ï¼
+$ MO.MEMATR[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§
+$ MO.ACPTN1[moid]ï¼éå¸¸æä½1ï¼æ¸è¾¼ã¿ï¼ã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³
+$ MO.ACPTN2[moid]ï¼éå¸¸æä½2ï¼èª­åºãï¼å®è¡ï¼ã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³
+$ MO.TEXT_LINE[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ããç»é²ããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã£ã¢ã«ã®è¡çªå·
+$ MO_USTACK_LISTï¼ã¸ã§ãã¬ã¼ã¿ãå²ãä»ããã¦ã¼ã¶ã¹ã¿ãã¯é åã®ãªã¹ã
+$ MO_USTACK_LIST2ï¼å
+é ­çªå°ãæå®ãããã¦ã¼ã¶ã¹ã¿ãã¯é åã®ãªã¹ã
+$ =====================================================================
+
+$TOPPERS_ATTMOD = VALUE("TOPPERS_ATTMOD", TOPPERS_ATTSEC + 1)$
+$nummo = 0$
+$MO_USTACK_LIST = {}$
+$MO_USTACK_LIST2 = {}$ 
+
+$
+$  é
+ç½®ããã»ã¯ã·ã§ã³ã«é¢ããåå¦ç
+$
+$ OsLinkSectionã§é
+ç½®ããã»ã¯ã·ã§ã³ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã¨ãã¦ç»é²ããªãï¼ã®æ
+
+$ å ±ãï¼LNKSEC[lsid]ã«çæããï¼
+$
+$ numlsï¼é
+ç½®ããã»ã¯ã·ã§ã³ã®æ°
+$ LNKSEC.MEMREG[lsid]ï¼ã¡ã¢ãªãªã¼ã¸ã§ã³çªå·
+$ LNKSEC.SECTION[lsid]ï¼ã»ã¯ã·ã§ã³å
+
+$numls = 0$
+
+$
+$  OsMemoryRegionã§ç»é²ããããªã¼ã¸ã§ã³ã«é¢ããã¨ã©ã¼ãã§ãã¯ã¨åå¦ç
+$
+$ REG_LISTï¼å¦çæ¸ã¿ã®ã¡ã¢ãªãªã¼ã¸ã§ã³ã®ãªã¹ã
+$ REG.REGNAME[reg]ï¼ã¡ã¢ãªãªã¼ã¸ã§ã³åï¼ï¼UNESCSTR(MO.REGION[reg])ï¼
+$
+$FOREACH reg REG.ORDER_LIST$
+$	// REG.REGNAME[reg]ã®ä½æ
+	$REG.REGNAME[reg] = UNESCSTR(REG.REGION[reg])$
+
+$	// ã¡ã¢ãªãªã¼ã¸ã§ã³åãç»é²æ¸ã¿ã®å ´å
+	$FOREACH reg2 REG_LIST$
+		$IF EQ(REG.REGNAME[reg], REG.REGNAME[reg2])$
+			$ERROR REG.TEXT_LINE[reg]$$FORMAT(_("OsMemoryRegionName(%1%) of OsMemoryRegion(%2%) is duplicated"), REG.REGNAME[reg], reg)$$END$
+		$END$
+	$END$
+
+$	// regatrãï¼ï¼»TA_NOWRITEï¼½ï¼ã§ãªãå ´å
+	$IF (REG.REGATR[reg] & ~(TA_NOWRITE|TARGET_REGATR)) != 0$
+		$ERROR REG.TEXT_LINE[reg]$$FORMAT(_("illegal attribute(%1%) of OsMemoryRegion(%2%)"), REG.REGATR[reg], reg)$$END$
+	$END$
+
+$	// ãã¡ã¤ã³ã«æå±ãã¦ããå ´å
+	$IF LENGTH(REG.DOMAIN[reg])$
+		$ERROR REG.TEXT_LINE[reg]$$FORMAT(_("OsMemoryRegion(%1%) must be outside of OsApplication"), REG.REGNAME[reg])$$END$
+	$END$
+
+$	// sizeã0ã®å ´å
+	$IF REG.SIZE[reg] == 0$
+		$ERROR REG.TEXT_LINE[reg]$$FORMAT(_("OsMemoryRegionSize of OsMemoryRegion(%1%) must not be zero"), reg)$$END$
+	$END$
+
+$	// base+sizeãæå¤§ã¢ãã¬ã¹ãè¶ããå ´å
+	$limit = (REG.BASE[reg] + REG.SIZE[reg]) & ((1 << sizeof_void_ptr * 8) - 1)$
+	$IF limit < REG.BASE[reg] && limit != 0$
+		$ERROR REG.TEXT_LINE[reg]$$FORMAT(_("OsMemoryRegionSize(%1%) of OsMemoryRegion(%2%) is too large"), REG.SIZE[reg], reg)$$END$
+	$END$
+
+$	// ç»é²æ¸ã¿ã®ã¡ã¢ãªãªã¼ã¸ã§ã³ã¨é åãéãªãå ´å
+	$FOREACH reg2 REG_LIST$
+		$IF ((REG.BASE[reg] <= REG.BASE[reg2]
+						&& REG.BASE[reg] + REG.SIZE[reg] > REG.BASE[reg2])
+		  || (REG.BASE[reg2] < REG.BASE[reg]
+						&& REG.BASE[reg2] + REG.SIZE[reg2] > REG.BASE[reg]))$
+			$ERROR REG.TEXT_LINE[reg]$
+					$FORMAT(_("OsMemoryRegionName(%1%) of OsMemoryRegion(%2%) overlaps with another OsMemoryRegionName(%3%) of OsMemoryRegion(%4%)"), 
+						REG.REGNAME[reg], reg, REG.REGNAME[reg2], reg2)$$END$
+		$END$
+	$END$
+
+$	// ã¿ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯ NOS0804
+	$IF ISFUNCTION("HOOK_ERRORCHECK_REG")$
+		$HOOK_ERRORCHECK_REG(reg)$
+	$END$
+	$REG_LIST = APPEND(REG_LIST, reg)$
+$END$
+
+$ REG_ORDERã®çæ
+$REG_ORDER = SORT(REG.ORDER_LIST, "REG.BASE")$
+
+$
+$  OsStandardMemoryRegionã§å®ç¾©ãããæ¨æºã¡ã¢ãªãªã¼ã¸ã§ã³ã«é¢ããã¨ã©ã¼ãã§ãã¯ã¨åå¦ç
+$
+$ STANDARD_ROMï¼æ¨æºROMãªã¼ã¸ã§ã³ã®ã¡ã¢ãªãªã¼ã¸ã§ã³çªå·
+$ STANDARD_RAMï¼æ¨æºRAMãªã¼ã¸ã§ã³ã®ã¡ã¢ãªãªã¼ã¸ã§ã³çªå·
+$
+$IF !LENGTH(SRG.ORDER_LIST)$
+$	//OsStandardMemoryRegionããªãå ´åã¯ï¼ããã§å¦çãæ­¢ããï¼ä»¥éã®ã¨ã©ã¼ã®ææ­¢ï¼
+	$ERROR$$FORMAT(_("no standard memory region is registered"))$$END$
+	$DIE()$
+$ELSE$
+$	// ãã¡ã¤ã³ã®å²ã¿ã®ä¸­ã«è¨è¿°ããã¦ããå ´å 
+	$IF LENGTH(SRG.DOMAIN[1])$
+		$ERROR SEG.TEXT_LINE[1]$$FORMAT(_("OsStandardMemoryRegion must be outside of OsApplication"))$$END$
+	$END$
+
+$	// OsStandardMemoryRegionãè¤æ°ãã
+	$IF LENGTH(SRG.ORDER_LIST) > 1$
+		$ERROR$$FORMAT(_("too many OsStandardMemoryRegion"))$$END$
+	$END$
+
+$	// stdromãç»é²ããã¦ãããã®ãã§ãã¯
+	$STANDARD_ROM = 0$
+	$FOREACH reg REG.ORDER_LIST$
+		$IF EQ(UNESCSTR(SRG.STDROM[1]), REG.REGNAME[reg])$
+			$STANDARD_ROM = reg$
+		$END$
+	$END$
+	$IF STANDARD_ROM == 0$
+		$ERROR SRG.TEXT_LINE[1]$$FORMAT(_("illegal region name(%1%) in OsStandardMemoryRegion"), UNESCSTR(SRG.STDROM[1]))$
+		$END$
+	$END$
+
+$	// stdromãTA_NOWRITEå±æ§ãã®ãã§ãã¯
+	$IF (REG.REGATR[STANDARD_ROM] & TA_NOWRITE) == 0$
+		$ERROR SRG.TEXT_LINE[1]$$FORMAT(_("standard ROM region must have TA_NOWRITE attribute"))$$END$
+	$END$
+
+$	// stdramãç»é²ããã¦ãããã®ãã§ãã¯
+	$STANDARD_RAM = 0$
+	$FOREACH reg REG.ORDER_LIST$
+		$IF EQ(UNESCSTR(SRG.STDRAM[1]), REG.REGNAME[reg])$
+			$STANDARD_RAM = reg$
+		$END$
+	$END$
+	$IF STANDARD_RAM == 0$
+		$ERROR SRG.TEXT_LINE[1]$$FORMAT(_("illegal region name(%1%) in OsStandardMemoryRegion"), UNESCSTR(SRG.STDRAM[1]))$
+		$END$
+	$END$
+
+$	// stdramãTA_NOWRITEå±æ§ã§ãªããã®ãã§ãã¯
+	$IF (REG.REGATR[STANDARD_RAM] & TA_NOWRITE) != 0$
+		$ERROR SRG.TEXT_LINE[1]$$FORMAT(_("standard RAM region must not have TA_NOWRITE attribute"))$$END$
+	$END$
+
+$	// ã©ã¡ãããã¨ã©ã¼ã®å ´åã¯ï¼ããã§å¦çãæ­¢ããï¼ä»¥éã®ã¨ã©ã¼ã®ææ­¢ï¼
+	$IF STANDARD_ROM==0 || STANDARD_RAM==0$
+		$DIE()$
+	$END$
+$END$
+
+$
+$  æ¨æºã®ã»ã¯ã·ã§ã³ã®å®ç¾©ã¨æ¨æºã»ã¯ã·ã§ã³ã®ãªã¹ãã®ä½æ
+$
+$ DSEC_SECTION_LISTï¼æ¨æºã®ã»ã¯ã·ã§ã³ã¨ä¿è­·ãã¡ã¤ã³æ¯æ¨æºã»ã¯ã·ã§ã³ã®ãªã¹ã
+$
+$FOREACH dsec DSEC.ORDER_LIST$
+	$DSEC_SECTION_LIST = APPEND(DSEC_SECTION_LIST, DSEC.SECTION[dsec])$
+$END$
+$FOREACH domid DOMLIST_ALL$
+	$FOREACH dsec DSEC.ORDER_LIST$
+		$DSEC_SECTION_LIST = APPEND(DSEC_SECTION_LIST,
+					FORMAT("%s_%s", DSEC.SECTION[dsec], OSAP.LABEL[domid]))$
+	$END$
+$END$
+
+$
+$  OsMemoryModuleã§ç»é²ããã®ã¨åç­ã«æ±ãã¢ã¸ã¥ã¼ã«ã®å¦ç
+$
+$ å
+é ­ã§OsMemoryModuleã§ç»é²ããã®ã¨åç­ï¼START_OBJS, libkernel.o, kernel_mem.o, libkernel.a
+$ æ«å°¾ã§OsMemoryModuleã§ç»é²ããã®ã¨åç­ï¼*, END_OBJS
+$
+$IF TOPPERS_SUPPORT_ATT_MOD$
+	$nummod = LENGTH(MOD.ORDER_LIST)$
+
+	$FUNCTION ATT_MOD_FIRST$
+		$nummod = nummod + 1$
+		$MOD.ORDER_LIST = APPEND(nummod, MOD.ORDER_LIST)$
+		$MOD.MODULE[nummod] = ESCSTR(ARGV[1])$
+		$MOD.OSAPID[nummod] = ARGV[2]$
+		$MOD.TEXT_LINE[nummod] = 0$
+		$MOD.EXPORT[nummod] = 0$
+	$END$
+
+	$FUNCTION ATT_MOD_LAST$
+		$nummod = nummod + 1$
+		$MOD.ORDER_LIST = APPEND(MOD.ORDER_LIST, nummod)$
+		$MOD.MODULE[nummod] = ESCSTR(ARGV[1])$
+		$MOD.OSAPID[nummod] = ARGV[2]$
+		$MOD.TEXT_LINE[nummod] = 0$
+		$MOD.EXPORT[nummod] = 0$
+	$END$
+
+	$FOREACH module APPEND("libkernel.a", "kernel_mem.o", "Os_Lcfg.o",
+															START_OBJS)$
+		$ATT_MOD_FIRST(module, TDOM_KERNEL)$
+	$END$
+
+	$ATT_MOD_LAST("*", TDOM_NONE)$
+	$FOREACH module END_OBJS$
+		$ATT_MOD_LAST(module, TDOM_KERNEL)$
+	$END$
+$END$
+
+$
+$  OsMemoryModuleã§ç»é²ãããã¢ã¸ã¥ã¼ã«ã«é¢ããæ
+å ±ã®çæ
+$
+$ MOD_LISTï¼å¦çæ¸ã¿ã®ã¢ã¸ã¥ã¼ã«ã®ãªã¹ã
+$
+$FOREACH mod MOD.ORDER_LIST$
+$	// OsMemoryModuleããµãã¼ãããã¦ããªãå ´å
+	$IF !TOPPERS_SUPPORT_ATT_MOD$
+		$ERROR MOD.TEXT_LINE[mod]$$FORMAT(_("OsMemoryModule is not supported on this target"))$$END$
+	$END$
+
+$	// moduleãç»é²æ¸ã¿ã®å ´å
+	$FOREACH mod2 MOD_LIST$
+		$IF EQ(MOD.MODULE[mod], MOD.MODULE[mod2])$
+			$ERROR MOD.TEXT_LINE[mod]$$FORMAT(_("OsMemoryModuleName(%1%) of OsMemoryModule(%2%) is duplicated"), UNESCSTR(MOD.MODULE[mod]), mod)$$END$
+		$END$
+	$END$
+
+$	// ã¿ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯
+	$IF ISFUNCTION("HOOK_ERRORCHECK_MOD")$
+		$HOOK_ERRORCHECK_MOD(mod)$
+	$END$
+
+$	// ã¡ã¢ãªãªãã¸ã§ã¯ãæ
+å ±ã®çæ
+	$FOREACH dsec DSEC.ORDER_LIST$
+		$nummo = nummo + 1$
+		$MO.TYPE[nummo] = TOPPERS_ATTMOD$
+		$MO.MODULE[nummo] = UNESCSTR(MOD.MODULE[mod])$
+		$MO.LINKER[nummo] = 1$
+		$IF EQ(MOD.OSAPID[mod], "")$
+			$MO.OSAPID[nummo] = TDOM_NONE$
+		$ELSE$
+			$MO.OSAPID[nummo] = MOD.OSAPID[mod]$
+		$END$
+		$IF DSEC.MEMREG[dsec] == 1$
+			$MO.MEMREG[nummo] = STANDARD_ROM$
+		$ELSE$
+			$MO.MEMREG[nummo] = STANDARD_RAM$
+		$END$
+		$MO.SECTION[nummo] = DSEC.SECTION[dsec]$
+		$MO.MEMATR[nummo] = DSEC.MEMATR[dsec]$
+
+		$domptn = DEFAULT_ACPTN[MO.OSAPID[nummo]]$
+		$MO.ACPTN1[nummo] = domptn$
+		$MO.ACPTN2[nummo] = domptn$
+		$IF MOD.EXPORT[mod] == 1$
+			$MO.ACPTN2[nummo] = TACP_SHARED$
+		$END$
+		$MO.TEXT_LINE[nummo] = MOD.TEXT_LINE[mod]$
+	$END$
+	$MOD_LIST = APPEND(MOD_LIST, mod)$
+$END$
+
+$
+$  OsMemorySectionå®ç¾©ã¨åç­ã®æ©è½ãæä¾
+$  ç¬¬1å¼æ° ã»ã¯ã·ã§ã³å
+$  ç¬¬2å¼æ° ã¡ã¢ãªå±æ§
+$  ç¬¬3å¼æ° ã¡ã¢ãªãªã¼ã¸ã§ã³
+$  ç¬¬4å¼æ° å
+±æãªã¼ãå°æã©ã¤ãã«ããã
+$
+$FUNCTION ATT_SEC$
+	$section = ARGV[1]$
+	$mematr = ARGV[2]$
+	$memreg = ARGV[3]$
+	$export = ARGV[4]$
+
+	$numsec = LENGTH(SEC.ORDER_LIST)$
+	$numsec = numsec + 1$
+	$SEC.ORDER_LIST = APPEND(numsec, SEC.ORDER_LIST)$
+	$SEC.SECTION[numsec] = ESCSTR(section)$
+	$SEC.MEMATR[numsec] = mematr$
+	$SEC.MEMREG[numsec] = REG.REGION[memreg]$
+	$SEC.OSAPID[numsec] = TDOM_KERNEL$
+	$SEC.TEXT_LINE[numsec] = 0$
+	$SEC.EXPORT[numsec] = export$
+$END$
+
+$ATT_SEC(".srpw_bss_kernel", TA_SDATA, STANDARD_RAM, 1)$
+
+$
+$  OsMemorySectionï¼OsLinkSectionã§ç»é²ãããã»ã¯ã·ã§ã³ã«é¢ããæ
+å ±ã®çæ
+$
+$ SEC_LISTï¼å¦çæ¸ã¿ã®ã»ã¯ã·ã§ã³ã®ãªã¹ã
+$
+$FOREACH sec SEC.ORDER_LIST$
+$	// sectionãæ¨æºã®ã»ã¯ã·ã§ã³ã®å ´å
+	$IF TOPPERS_SUPPORT_ATT_MOD || !LENGTH(SEC.MEMATR[sec])$
+		$IF LENGTH(FIND(DSEC_SECTION_LIST, UNESCSTR(SEC.SECTION[sec])))$
+			$ERROR SEC.TEXT_LINE[sec]$
+				$FORMAT(_("OsMemorySectionName of OsMemorySection(%1%) can't be attached default section(%2%)"), sec, UNESCSTR(SEC.SECTION[sec]))$
+			$END$
+		$END$
+	$END$
+
+$	// sectionãç»é²æ¸ã¿ã®å ´å
+	$FOREACH sec2 SEC_LIST$
+		$IF EQ(SEC.SECTION[sec], SEC.SECTION[sec2])$
+			$ERROR SEC.TEXT_LINE[sec]$
+				$FORMAT(_("OsMemorySectionName(%1%) of OsMemorySection(%2%) is duplicated"), UNESCSTR(SEC.SECTION[sec]), sec)$
+			$END$
+		$END$
+	$END$
+
+$	// memregã®ãã§ãã¯
+	$memreg = 0$
+	$FOREACH reg REG.ORDER_LIST$
+		$IF EQ(UNESCSTR(SEC.MEMREG[sec]), REG.REGNAME[reg])$
+			$memreg = reg$
+		$END$
+	$END$
+	$IF memreg == 0$
+		$ERROR SEC.TEXT_LINE[sec]$
+			$FORMAT(_("illegal OSMemorySectionMemoryRegionRef(%1%) of OsMemorySection(%2%)"), SEC.MEMREG[sec], sec)$
+		$END$
+$		// ä»¥éã®ã¨ã©ã¼ã®ææ­¢
+		$memreg = STANDARD_RAM$
+	$END$
+
+	$IF LENGTH(SEC.MEMATR[sec])$
+$		// OsMemorySectionã®å ´å
+
+$		// mematrãï¼ï¼»TA_NOWRITE|TA_NOREAD|TA_EXEC|TA_MEMINI|TA_MEMPRSV|TA_SDATA|TA_UNCACHE|TA_IODEVï¼½ï¼ã§ãªãå ´å
+$		// mematrã«TA_MEMINIã¨TA_MEMPRSVã®ä¸¡æ¹ãæå®ããå ´åï¼TA_RSATRï¼
+		$IF (SEC.MEMATR[sec] & ~(TA_NOWRITE|TA_NOREAD|TA_EXEC|TA_MEMINI|TA_MEMPRSV|TA_SDATA|TA_UNCACHE|TA_IODEV|TARGET_MEMATR)) != 0
+			|| (SEC.MEMATR[sec] & (TA_MEMINI|TA_MEMPRSV)) == (TA_MEMINI|TA_MEMPRSV)$
+			$ERROR SEC.TEXT_LINE[sec]$$FORMAT(_("illegal attribute(%1%) of OsMemorySection(%2%)"), SEC.MEMATR[sec], sec)$$END$
+		$END$
+
+		$IF (SEC.EXPORT[sec] == 1 && (SEC.MEMATR[sec] & (TA_NOWRITE | TA_NOREAD | TA_EXEC)))$
+			$ERROR SEC.TEXT_LINE[sec]$$FORMAT(_("illegal Exported section memory attribute(%1%) of OsMemorySection(%2%)"), SEC.MEMATR[sec], sec)$$END$
+		$END$
+
+$		// ã¿ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯
+		$IF ISFUNCTION("HOOK_ERRORCHECK_SEC")$
+			$HOOK_ERRORCHECK_SEC(sec)$
+		$END$
+
+$		// ã¡ã¢ãªãªãã¸ã§ã¯ãæ
+å ±ã®çæ
+		$nummo = nummo + 1$
+		$MO.TYPE[nummo] = TOPPERS_ATTSEC$
+		$MO.LINKER[nummo] = 1$
+		$IF EQ(SEC.OSAPID[sec], "")$
+			$MO.OSAPID[nummo] = TDOM_NONE$
+		$ELSE$
+			$MO.OSAPID[nummo] = SEC.OSAPID[sec]$
+		$END$
+		$MO.MEMREG[nummo] = memreg$
+		$MO.SECTION[nummo] = UNESCSTR(SEC.SECTION[sec])$
+		$IF (REG.REGATR[memreg] & TA_NOWRITE) != 0$
+$			// ã¡ã¢ãªãªã¼ã¸ã§ã³å±æ§ã«TA_NOWRITEãè¨­å®ããã¦ããæã¯ï¼
+$			// ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ã«TA_NOWRITEãè¨­å®ããï¼
+			$MO.MEMATR[nummo] = SEC.MEMATR[sec] | TA_NOWRITE$
+		$ELSE$
+			$MO.MEMATR[nummo] = SEC.MEMATR[sec]$
+		$END$
+
+		$domptn = DEFAULT_ACPTN[MO.OSAPID[nummo]]$
+		$MO.ACPTN1[nummo] = domptn$
+		$MO.ACPTN2[nummo] = domptn$
+		$IF SEC.EXPORT[sec] == 1$
+			$MO.ACPTN2[nummo] = TACP_SHARED$
+		$END$
+		$MO.TEXT_LINE[nummo] = SEC.TEXT_LINE[sec]$
+	$ELSE$
+$		// OsLinkSectionã®å ´å
+
+$		// é
+ç½®ããã»ã¯ã·ã§ã³æ
+å ±ã®çæ
+		$numls = numls + 1$
+		$LNKSEC.MEMREG[numls] = memreg$
+		$LNKSEC.SECTION[numls] = UNESCSTR(SEC.SECTION[sec])$
+	$END$
+	$SEC_LIST = APPEND(SEC_LIST, sec)$
+$END$
+
+$
+$  OsLinkSectionå®ç¾©ã¨åç­ã®æ©è½ãæä¾
+$  ç¬¬1å¼æ° ã»ã¯ã·ã§ã³å
+$  ç¬¬3å¼æ° ã¡ã¢ãªãªã¼ã¸ã§ã³
+$
+$FUNCTION LNK_SEC$
+	$section = ARGV[1]$
+	$memreg = ARGV[2]$
+
+	$numls = numls + 1$
+	$LNKSEC.MEMREG[numls] = memreg$
+	$LNKSEC.SECTION[numls] = section$
+$END$
+
+$
+$  ä¿è­·ãã¡ã¤ã³æ¯ã®æ¨æºã»ã¯ã·ã§ã³ã«é¢ããæ
+å ±ã®çæ
+$
+$FOREACH domid DOMLIST_ALL$
+	$FOREACH dsec DSEC.ORDER_LIST$
+$		// ã¡ã¢ãªãªãã¸ã§ã¯ãæ
+å ±ã®çæ
+		$nummo = nummo + 1$
+		$MO.TYPE[nummo] = TOPPERS_ATTSEC$
+		$MO.LINKER[nummo] = 1$
+		$MO.OSAPID[nummo] = domid$
+		$IF DSEC.MEMREG[dsec] == 1$
+			$MO.MEMREG[nummo] = STANDARD_ROM$
+		$ELSE$
+			$MO.MEMREG[nummo] = STANDARD_RAM$
+		$END$
+		$MO.SECTION[nummo] = FORMAT("%s_%s", DSEC.SECTION[dsec], OSAP.LABEL[domid])$
+		$MO.MEMATR[nummo] = DSEC.MEMATR[dsec]$
+
+		$domptn = DEFAULT_ACPTN[domid]$
+		$MO.ACPTN1[nummo] = domptn$
+		$MO.ACPTN2[nummo] = domptn$
+	$END$
+$END$
+
+$
+$  OsMemoryAreaã§ç»é²ãããã»ã¯ã·ã§ã³ã«é¢ããæ
+å ±ã®çæ
+$
+$FOREACH mem MEM.ORDER_LIST$
+$	// mematrãï¼ï¼»TA_NOWRITE|TA_NOREAD|TA_EXEC|TA_MEMINI|TA_MEMPRSV|TA_UNCACHE|TA_IODEVï¼½ï¼ã§ãªãå ´å
+$	// mematrã«TA_MEMPRSVãæå®ããªããTA_MEMINIãæå®ããå ´åï¼TA_RSATRï¼
+	$IF (MEM.MEMATR[mem] & ~(TA_NOWRITE|TA_NOREAD|TA_EXEC|TA_MEMINI|TA_MEMPRSV|TA_UNCACHE|TA_IODEV|TARGET_MEMATR)) != 0
+		|| (MEM.MEMATR[mem] & (TA_MEMINI|TA_MEMPRSV)) != TA_MEMPRSV$
+		$ERROR MEM.TEXT_LINE[mem]$$FORMAT(_("illegal attribute(%1%) of OsMemoryArea(%2%)"), MEM.MEMATR[mem], mem)$$END$
+	$END$
+
+$	// sizeã0ã®å ´å
+	$IF MEM.SIZE[mem] == 0$
+		$ERROR MEM.TEXT_LINE[mem]$$FORMAT(_("OsMemoryAreaSize of OsMemoryArea(%2%) must not be zero"), MEM.SIZE[mem], mem)$$END$
+	$END$
+
+$	// ã¿ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯
+	$IF ISFUNCTION("HOOK_ERRORCHECK_MEM")$
+		$HOOK_ERRORCHECK_MEM(mem)$
+	$END$
+
+$	// ã¡ã¢ãªãªãã¸ã§ã¯ãæ
+å ±ã®çæ
+	$nummo = nummo + 1$
+	$MO.TYPE[nummo] = TOPPERS_ATTMEM$
+	$MO.BASE[nummo] = MEM.BASE[mem]$
+	$MO.SIZE[nummo] = MEM.SIZE[mem]$
+	$MO.LINKER[nummo] = 0$
+	$IF EQ(MEM.OSAPID[mem], "")$
+		$MO.OSAPID[nummo] = TDOM_NONE$
+	$ELSE$
+		$MO.OSAPID[nummo] = MEM.OSAPID[mem]$
+	$END$
+	$MO.MEMATR[nummo] = MEM.MEMATR[mem]$
+
+	$domptn = DEFAULT_ACPTN[MO.OSAPID[nummo]]$
+	$MO.ACPTN1[nummo] = domptn$
+	$MO.ACPTN2[nummo] = domptn$
+	$MO.TEXT_LINE[nummo] = MEM.TEXT_LINE[mem]$
+$END$
+
+$FOREACH moid RANGE(1, nummo)$
+	$IF MO.OSAPID[moid] != TDOM_KERNEL && MO.OSAPID[moid] != TDOM_NONE &&
+		OSAP.TRUSTED[MO.OSAPID[moid]]$
+		$MO.OSAPID[moid] = TDOM_KERNEL$
+	$END$
+$END$
+
+$ =====================================================================
+$ HRP2ããã®ç§»æ¤ããã¾ã§
+$ =====================================================================
+
+
+$ =====================================================================
+$ Os_Cfg_tmp.hã®çæ Os_Cfg.hã¨å·®åãããå ´åMakefileå
+Os_Cfg.hã¸ã³ãã¼
+$ =====================================================================
+
+$TRACE("OUTPUT FILES")$
+
+$FILE "Os_Cfg_tmp.h"$
+/* Os_Cfg.h */$NL$
+#ifndef TOPPERS_OS_CFG_H$NL$
+#define TOPPERS_OS_CFG_H$NL$
+$NL$
+
+/****** Scalability Class ******/$NL$$NL$
+
+#define CFG_USE_SCALABILITYCLASS3$NL$
+$NL$
+
+/****** Object OS ******/$NL$$NL$
+$IF OS.STACKMONITORING[1]$
+	#define CFG_USE_STACKMONITORING$NL$
+$END$
+
+$IF OS.GETSERVICEID[1]$
+	#define CFG_USE_GETSERVICEID$NL$
+$END$
+
+$IF OS.PARAMETERACCESS[1]$
+	#define CFG_USE_PARAMETERACCESS$NL$
+$END$
+
+$USE_HOOK = 0$
+
+$NL$
+/****** Object HOOK ******/$NL$$NL$
+$IF HOOK.STARTUPHOOK[1]$
+	#define CFG_USE_STARTUPHOOK$NL$
+	$USE_HOOK = 1$
+$END$
+
+$IF HOOK.SHUTDOWNHOOK[1]$
+	#define CFG_USE_SHUTDOWNHOOK$NL$
+	$USE_HOOK = 1$
+$END$
+
+$IF HOOK.PRETASKHOOK[1]$
+	#define CFG_USE_PRETASKHOOK$NL$
+	$USE_HOOK = 1$
+$END$
+
+$IF HOOK.POSTTASKHOOK[1]$
+	#define CFG_USE_POSTTASKHOOK$NL$
+	$USE_HOOK = 1$
+$END$
+
+$IF HOOK.ERRORHOOK[1]$
+	#define CFG_USE_ERRORHOOK$NL$
+	$USE_HOOK = 1$
+$END$
+
+$IF HOOK.PROTECTIONHOOK[1]$
+	#define CFG_USE_PROTECTIONHOOK$NL$
+	$USE_HOOK = 1$
+$END$
+
+$NL$
+#endif /* TOPPERS_OS_CFG_H */$NL$
+
+
+$ =====================================================================
+$ Os_Lcfg.hã®çæ
+$ =====================================================================
+
+$FILE "Os_Lcfg.h"$
+/* Os_Lcfg.h */$NL$
+#ifndef TOPPERS_OS_LCFG_H$NL$
+#define TOPPERS_OS_LCFG_H$NL$
+$NL$
+
+$
+$ ãªãã¸ã§ã¯ãæ°ãã¯ã­ã®åºå
+$
+#define TNUM_ALARM				UINT_C($LENGTH(ALM.ID_LIST)$)$NL$
+#define TNUM_COUNTER			UINT_C($LENGTH(CNT.ID_LIST)$)$NL$
+#define TNUM_HARDCOUNTER		UINT_C($LENGTH(HWCNT.ID_LIST)$)$NL$
+#define TNUM_ISR2				UINT_C($LENGTH(ISR2.ID_LIST)$)$NL$
+#define TNUM_STD_RESOURCE		UINT_C($LENGTH(STDRES.ID_LIST)$)$NL$
+#define TNUM_TASK				UINT_C($LENGTH(TSK.ID_LIST) - tnum_os_restarttask$)$NL$
+#define TNUM_TASK_INC_RT		UINT_C($LENGTH(TSK.ID_LIST)$)$NL$
+#define TNUM_EXTTASK			UINT_C($tnum_exttask$)$NL$
+#define TNUM_APP_MODE			UINT_C($LENGTH(APP.ID_LIST)$)$NL$
+#define TNUM_SCHEDULETABLE		UINT_C($LENGTH(SCHTBL.ID_LIST)$)$NL$
+#define TNUM_IMPLSCHEDULETABLE	UINT_C($tnum_implscheduletable$)$NL$
+#define	TNUM_TFN				UINT_C($LENGTH(TFN.ID_LIST)$)$NL$
+#define TNUM_OSAP				UINT_C($LENGTH(OSAP.ID_LIST)$)$NL$
+$NL$
+
+/*$NL$
+$SPC$*  Default Definitions of Trace Log Macros$NL$
+$SPC$*/$NL$
+$NL$
+#ifndef TOPPERS_ENABLE_TRACE$NL$
+#ifndef LOG_USER_MARK$NL$
+#define LOG_USER_MARK(str)$NL$
+#endif /* LOG_USER_MARK */$NL$
+#endif /* TOPPERS_ENABLE_TRACE */$NL$
+$NL$
+ /****** Object TASK ******/$NL$$NL$
+
+$ ã¿ã¹ã¯ã®IDã®åºå
+$FOREACH tskid TSK.ID_LIST$
+$	//OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ä»¥å¤ã®ã¿ã¹ã¯IDãåºåãã
+	$IF tskid < tmin_os_restarttask$
+		#define $tskid$$TAB$UINT_C($TSK.ID[tskid]$)$NL$
+	$END$
+$END$
+$NL$
+
+ /****** Object COUNTER ******/$NL$$NL$
+
+$ ã«ã¦ã³ã¿IDã®åºå
+
+$FOREACH cntid CNT.ID_LIST$
+	#define $cntid$$TAB$UINT_C($CNT.ID[cntid]$)$NL$
+$END$
+$NL$
+
+$ ã«ã¦ã³ã¿ãªãã¸ã§ã¯ãã®OSå®æ°ã®åºå
+$FOREACH cntid CNT.ID_LIST$
+	#define OSMAXALLOWEDVALUE_$cntid$$TAB$((TickType) $+CNT.MAXALLOWED[cntid]$)$NL$
+	#define OSTICKSPERBASE_$cntid$$TAB$((TickType) $+CNT.TICKSPERBASE[cntid]$)$NL$
+	#define OSMINCYCLE_$cntid$$TAB$((TickType) $+CNT.MINCYCLE[cntid]$)$NL$
+$END$
+$NL$
+
+$ ãã£ãã¯å¤ããæéã¸ã®å¤æãã¯ã­(PhysicalTimeTypeã®åã¯float,doubleã®ããããã¨æ³å®)
+$FOREACH cntid HWCNT.ID_LIST$
+	$IF LENGTH(CNT.NSPERTICK[cntid])$
+		#define OS_TICKS2SEC_$cntid$(tick)$TAB$(((PhysicalTimeType)$CNT.NSPERTICK[cntid]$) * (tick) / 1000000000U)	/* ($CNT.SECONDSPERTICK[cntid]$ * 1000000000) * (tick) / 1000000000 */$NL$
+		#define OS_TICKS2MS_$cntid$(tick)$TAB$(((PhysicalTimeType)$CNT.NSPERTICK[cntid]$) * (tick) / 1000000U)		/* ($CNT.SECONDSPERTICK[cntid]$ * 1000000000) * (tick) / 1000000 */$NL$
+		#define OS_TICKS2US_$cntid$(tick)$TAB$(((PhysicalTimeType)$CNT.NSPERTICK[cntid]$) * (tick) / 1000U)			/* ($CNT.SECONDSPERTICK[cntid]$ * 1000000000) * (tick) / 1000 */$NL$
+		#define OS_TICKS2NS_$cntid$(tick)$TAB$(((PhysicalTimeType)$CNT.NSPERTICK[cntid]$) * (tick))					/* ($CNT.SECONDSPERTICK[cntid]$ * 1000000000) * (tick) */$NL$
+	$END$
+	$NL$
+$END$
+
+ /****** Object ALARM ******/$NL$$NL$
+
+$ ã¢ã©ã¼ã IDã®åºå
+$FOREACH almid ALM.ID_LIST$
+	#define $almid$$TAB$UINT_C($ALM.ID[almid]$)$NL$
+$END$
+$NL$
+
+ /****** Object SCHEDULETABLE ******/$NL$$NL$
+
+$ ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«IDã®åºå
+$FOREACH schtblid SCHTBL.ID_LIST$
+	#define $schtblid$$TAB$UINT_C($SCHTBL.ID[schtblid]$)$NL$
+$END$
+$NL$
+
+ /****** Object RESOURCE ******/$NL$$NL$
+
+$ ãªã½ã¼ã¹IDã®åºå
+$FOREACH resid RES.ID_LIST$
+	#define $resid$$TAB$UINT_C($RES.ID[resid]$)$NL$
+$END$
+$NL$
+
+ /****** Object ISR ******/$NL$$NL$
+
+$ ISRã®IDã®åºå
+$FOREACH isrid ISR.ID_LIST$
+	#define $isrid$$TAB$UINT_C($ISR.ID[isrid]$)$NL$
+$END$
+$NL$
+
+ /****** Object APPMODE ******/$NL$$NL$
+
+$FOREACH appid APP.ID_LIST$
+	#define $appid$$TAB$UINT_C($APP.ID[appid]$)$NL$
+$END$
+$NL$
+
+$ ã¤ãã³ãã®åºå
+ /****** Object EVENT ******/$NL$
+$FOREACH evtid EVT.ID_LIST$
+	#define $evtid$$TAB$UINT_C($FORMAT("0x%08x", +EVT.CALC_MASK[evtid])$)$NL$
+$END$
+$NL$
+
+$ ä¿¡é ¼é¢æ°ã®IDã®åºå
+ /****** Object Trusted Function ******/$NL$$NL$
+$FOREACH tfnid TFN.ID_LIST$
+	#define $tfnid$$TAB$UINT_C($TFN.ID[tfnid]$)$NL$
+$END$
+$NL$
+
+$ OSAPã®IDã®åºå
+ /****** Object OSApplication ******/$NL$
+$FOREACH osapid OSAP.ID_LIST$
+	#define $osapid$ UINT_C($OSAP.ID[osapid]$)$NL$
+$END$
+$NL$
+
+$NL$
+
+
+$ =====================================================================
+$ Os_Lcfg.cã®çæ
+$ =====================================================================
+$FILE "Os_Lcfg.c"$
+
+/* Os_Lcfg.c */$NL$
+#include "kernel/kernel_int.h"$NL$
+#include "Os_Lcfg.h"$NL$
+$IF LENGTH(IOC.ID_LIST)$
+	#include "Ioc.h"$NL$
+	$NL$
+$END$
+$NL$
+#ifndef TOPPERS_EMPTY_LABEL$NL$
+#define TOPPERS_EMPTY_LABEL(x, y) x y[0]$NL$
+#endif$NL$
+$NL$
+
+$
+$  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+$
+/*$NL$
+$SPC$*  Default Definitions of Trace Log Macros$NL$
+$SPC$*/$NL$
+$NL$
+#ifndef LOG_ISR_ENTER$NL$
+#define LOG_ISR_ENTER(isrid)$NL$
+#endif /* LOG_ISR_ENTER */$NL$
+$NL$
+#ifndef LOG_ISR_LEAVE$NL$
+#define LOG_ISR_LEAVE(isrid)$NL$
+#endif /* LOG_ISR_LEAVE */$NL$
+$NL$
+
+$
+$  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+$
+/*$NL$
+$SPC$*  Include Directives (#include)$NL$
+$SPC$*/$NL$
+$NL$
+$INCLUDES$
+$NL$
+
+$
+$ ãªãã¸ã§ã¯ãæ°å¤æ°ã®åºå
+$
+const AlarmType					tnum_alarm				= TNUM_ALARM;$NL$
+const CounterType				tnum_counter			= TNUM_COUNTER;$NL$
+const CounterType				tnum_hardcounter		= TNUM_HARDCOUNTER;$NL$
+const ISRType					tnum_isr2				= TNUM_ISR2;$NL$
+const ResourceType				tnum_stdresource		= TNUM_STD_RESOURCE;$NL$
+const TaskType					tnum_task				= TNUM_TASK;$NL$
+const TaskType					tnum_exttask			= TNUM_EXTTASK;$NL$
+const AppModeType				tnum_appmode			= TNUM_APP_MODE;$NL$
+const ScheduleTableType			tnum_scheduletable		= TNUM_SCHEDULETABLE;$NL$
+const ScheduleTableType			tnum_implscheduletable	= TNUM_IMPLSCHEDULETABLE;$NL$
+const TrustedFunctionIndexType	tnum_tfn				= TNUM_TFN;$NL$
+const ApplicationType			tnum_osap				= TNUM_OSAP;$NL$
+$NL$
+
+$
+$  ã¿ã¹ã¯
+$
+$NL$
+ /****** Object TASK ******/$NL$
+$NL$
+
+$ =====================================================================
+$ ä»¥ä¸ã¯HRP2ããã®ç§»æ¤
+$ =====================================================================
+$
+$  ã·ã¹ãã ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+$
+$IF !ISFUNCTION("ALLOC_SSTACK")$
+$FUNCTION ALLOC_SSTACK$
+	$IF !EQ(ARGV[3], "")$
+		$ARGV[3]$$SPC$
+	$END$
+	StackType $ARGV[1]$[COUNT_STK_T($ARGV[2]$)];$NL$
+$END$
+$END$
+
+$  ã·ã¹ãã ã¹ã¿ãã¯ãµã¤ãºãï¼0ã§ãããï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤
+$  ï¼TARGET_MIN_SSTKSZï¼ãããå°ããå ´åã®ã¨ã©ã¼ãã§ãã¯é¢æ°
+$FUNCTION CHECK_MIN_SSTKSZ$
+	$IF ARGV[1] == 0 || (TARGET_MIN_SSTKSZ && ARGV[1] < TARGET_MIN_SSTKSZ)$
+		$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("%1%(%2%) of OsTask(%3%) is too small"), ARGV[2], ARGV[1], tskid)$$END$
+	$END$
+$END$
+
+$ ã·ã¹ãã ã¹ã¿ãã¯é åã®çæã¨ããã«é¢ããã¨ã©ã¼ãã§ãã¯
+$FOREACH tskid TSK.ID_LIST$
+	$IF OSAP.TRUSTED[TSK.OSAPID[tskid]]$
+$		// ä¿¡é ¼ã¿ã¹ã¯ã®å ´åã®å¦ç
+
+$		// sstkãçç¥ããã¦ãããï¼NULLã§ãªãå ´å
+		$IF LENGTH(TSK.SSTK[tskid]) && !EQ(TSK.SSTK[tskid],"NULL")$
+			$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskSystemStackStartAddress of trusted OsTask(%1%) must not define"), tskid)$$END$
+		$END$
+
+		$IF LENGTH(TSK.STKSZ[tskid]) && TSK.STKSZ[tskid] != 0$
+			$TSK.STKSZ[tskid] = VALUE(CONCAT(+TSK.STKSZ[tskid],"U"),+TSK.STKSZ[tskid])$
+		$ELSE$
+			$TSK.STKSZ[tskid] = VALUE(CONCAT(+DEFAULT_TASKSTKSZ,"U"),+DEFAULT_TASKSTKSZ)$
+		$END$
+$		//ä¿¡é ¼ã¿ã¹ã¯ã«å¯¾ããSystemStackSizeã¯ï¼å­å¨ããå ´åã«StackSizeã«åç®ããä»æ§ã§ããããï¼å­å¨ããªãå ´åã«ã¯DEFAULT_TASKSTKSZã«ããªã
+		$IF LENGTH(TSK.SSTKSZ[tskid]) && TSK.SSTKSZ[tskid] != 0$
+			$TSK.SSTKSZ[tskid] = VALUE(CONCAT(+TSK.SSTKSZ[tskid],"U"),+TSK.SSTKSZ[tskid])$
+		$END$
+
+		$IF EQ(TSK.STK[tskid], "NULL")$
+$			// stkãNULLã®å ´åã®å¦ç
+
+			$IF LENGTH(TSK.SSTKSZ[tskid]) && TSK.SSTKSZ[tskid] > 0$
+$				// sstkszãçç¥ããã¦ããªãå ´åã®å¦ç
+
+$				// ã·ã¹ãã ã¹ã¿ãã¯é åã®ãµã¤ãºãæ±ããï¼ã¨ã©ã¼ãã§ãã¯ã«
+$				// ä½¿ãããï¼ã¨ã©ã¼ãã§ãã¯ã®åã«æ±ãã¦ããï¼
+				$sstksz = VALUE(FORMAT("(%1%) + (%2%)",
+									TSK.STKSZ[tskid], TSK.SSTKSZ[tskid]),
+								TSK.STKSZ[tskid] + TSK.SSTKSZ[tskid])$
+
+$				// stksz+sstkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ãããå°ããå ´å
+				$CHECK_MIN_SSTKSZ(sstksz, "OsTaskStackSize+OsTaskSystemStackSize")$
+			$ELSE$
+$				// sstkszãçç¥ããã¦ããå ´åã®å¦ç
+
+$				// stkszãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ãããå°ããå ´å
+				$CHECK_MIN_SSTKSZ(TSK.STKSZ[tskid], "OsTaskStackSize")$
+
+$				// ã·ã¹ãã ã¹ã¿ãã¯é åã®ãµã¤ãºãæ±ãã
+				$sstksz = TSK.STKSZ[tskid]$
+			$END$
+
+			$IF TSK.EXTENDED[tskid]$
+$				// ã·ã¹ãã ã¹ã¿ãã¯é åã®ç¢ºä¿
+				$ALLOC_SSTACK(CONCAT("_kernel_sstack_", tskid), sstksz, "")$
+				$TSK.TINIB_SSTKSZ[tskid] = FORMAT("ROUND_STK_T(%1%)", sstksz)$
+				$TSK.TINIB_SSTK[tskid] = CONCAT("_kernel_sstack_", tskid)$
+			$ELSE$
+				$TSK.TINIB_SSTK[tskid] = CONCAT("_kernel_shared_sstack_", +TSK.PRIORITY[tskid])$
+				$TSK.SHARED_SSTK_ID[tskid] = TSK.PRIORITY[tskid]$
+$ 				// åºæ¬ã¿ã¹ã¯ç¨ã®å
+±æã¹ã¿ãã¯ã®ãµã¤ãºãæ±ãã
+				$IF !LENGTH(shared_sstack_size[TSK.PRIORITY[tskid]])
+						|| shared_sstack_size[TSK.PRIORITY[tskid]] < sstksz$
+					$shared_sstack_size[TSK.PRIORITY[tskid]] = sstksz$
+				$END$
+			$END$
+		$ELSE$
+$			// stkãNULLã§ãªãå ´åã®å¦ç
+
+$			// stkszãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ãããå°ããå ´å
+			$CHECK_MIN_SSTKSZ(TSK.STKSZ[tskid], "OsTaskStackSize")$
+
+$			// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã®å¶ç´ãæºããã¦ããªãå ´å
+			$IF CHECK_STKSZ_ALIGN
+							&& (TSK.STKSZ[tskid] & (CHECK_STKSZ_ALIGN - 1))$
+				$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskStackSize(%1%) of OsTask(%2%) is not aligned"), TSK.STKSZ[tskid], tskid)$$END$
+			$END$
+
+$			// sstkszãçç¥ããã¦ãããï¼0ã§ãªãå ´å
+			$IF LENGTH(TSK.SSTKSZ[tskid]) && (TSK.SSTKSZ[tskid] != 0)$
+				$ERROR TSK.TEXT_LINE[tskid]$
+						$FORMAT(_("OsTaskSystemStackSize(%1%) of OsTask(%2%) must be zero because OsTaskStackStartAddress defined"), TSK.SSTKSZ[tskid], tskid)$$END$
+			$END$
+
+			$TSK.TINIB_SSTKSZ[tskid] = TSK.STKSZ[tskid]$
+			$TSK.TINIB_SSTK[tskid] = TSK.STK[tskid]$
+		$END$
+	$ELSE$
+$		// éä¿¡é ¼ã¿ã¹ã¯ã®å ´å
+
+		$IF !LENGTH(TSK.SSTK[tskid]) || EQ(TSK.SSTK[tskid], "NULL")$
+$			// sstkãçç¥ããã¦ãããï¼NULLã®å ´åã®å¦ç
+
+			$IF LENGTH(TSK.SSTKSZ[tskid]) && TSK.SSTKSZ[tskid] != 0$
+				$TSK.SSTKSZ[tskid] = VALUE(CONCAT(+TSK.SSTKSZ[tskid],"U"),+TSK.SSTKSZ[tskid])$
+$				// sstkszã0ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ãããå°ããå ´å
+				$CHECK_MIN_SSTKSZ(TSK.SSTKSZ[tskid], "OsTaskSystemStackSize")$
+			$ELSE$
+				$TSK.SSTKSZ[tskid] = VALUE(CONCAT(+DEFAULT_TASKSYSTEMSTKSZ,"U"),+DEFAULT_TASKSYSTEMSTKSZ)$
+			$END$
+
+$			// ã·ã¹ãã ã¹ã¿ãã¯é åã®ãµã¤ãºãæ±ãã
+			$sstksz = TSK.SSTKSZ[tskid]$
+
+
+			$IF TSK.EXTENDED[tskid]$
+$				// ã·ã¹ãã ã¹ã¿ãã¯é åã®ç¢ºä¿
+				$TSK.TINIB_SSTKSZ[tskid] = FORMAT("ROUND_STK_T(%1%)", sstksz)$
+				$ALLOC_SSTACK(CONCAT("_kernel_sstack_", tskid), TSK.TINIB_SSTKSZ[tskid], "")$
+				$TSK.TINIB_SSTK[tskid] = CONCAT("_kernel_sstack_", tskid)$
+			$ELIF !EQ(TSK.RESTARTTASK[tskid],"")$
+				$TSK.TINIB_SSTKSZ[tskid] = FORMAT("ROUND_STK_T(%1%)", sstksz)$
+				$ALLOC_SSTACK(CONCAT("_kernel_sstack_restart_", TSK.RESTARTTASK[tskid]), TSK.TINIB_SSTKSZ[tskid], "")$
+				$TSK.TINIB_SSTK[tskid] = CONCAT("_kernel_sstack_restart_", TSK.RESTARTTASK[tskid])$
+			$ELSE$
+				$TSK.TINIB_SSTK[tskid] = CONCAT("_kernel_shared_sstack_", +TSK.PRIORITY[tskid])$
+				$TSK.SHARED_SSTK_ID[tskid] = TSK.PRIORITY[tskid]$
+$ 				// åºæ¬ã¿ã¹ã¯ç¨ã®å
+±æã¹ã¿ãã¯ã®ãµã¤ãºãæ±ãã
+				$IF !LENGTH(shared_sstack_size[TSK.PRIORITY[tskid]])
+						|| shared_sstack_size[TSK.PRIORITY[tskid]] < sstksz$
+					$shared_sstack_size[TSK.PRIORITY[tskid]] = sstksz$
+				$END$
+			$END$
+		$ELSE$
+$			// sstkãçç¥ããã¦ãããï¼NULLã§ãªãå ´åã®å¦ç
+
+			$IF LENGTH(TSK.SSTKSZ[tskid]) && TSK.SSTKSZ[tskid] != 0$
+				$TSK.SSTKSZ[tskid] = VALUE(CONCAT(+TSK.SSTKSZ[tskid],"U"),+TSK.SSTKSZ[tskid])$
+			$ELSE$
+				$TSK.SSTKSZ[tskid] = VALUE(CONCAT(+DEFAULT_TASKSYSTEMSTKSZ,"U"),+DEFAULT_TASKSYSTEMSTKSZ)$
+			$END$
+
+$			// sstkszã0ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ãããå°ããå ´å
+			$CHECK_MIN_SSTKSZ(TSK.SSTKSZ[tskid], "OsTaskSystemStackSize")$
+
+$			// sstkszãã¹ã¿ãã¯é åã®ãµã¤ãºã®å¶ç´ãæºããã¦ããªãå ´å
+			$IF CHECK_STKSZ_ALIGN
+							&& (TSK.SSTKSZ[tskid] & (CHECK_STKSZ_ALIGN - 1))$
+				$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskSystemStackSize(%1%) of OsTask(%2%) is not aligned"), TSK.SSTKSZ[tskid], tskid)$$END$
+			$END$
+
+			$TSK.TINIB_SSTKSZ[tskid] = TSK.SSTKSZ[tskid]$
+			$TSK.TINIB_SSTK[tskid] = TSK.SSTK[tskid]$
+		$END$
+	$END$
+$END$
+
+$FOREACH tskid TSK.ID_LIST$
+	$IF LENGTH(TSK.SHARED_SSTK_ID[tskid])$
+		$TSK.TINIB_SSTKSZ[tskid] = FORMAT("ROUND_STK_T(%1%)", shared_sstack_size[TSK.PRIORITY[tskid]])$
+	$END$
+$END$
+
+$FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
+	$IF LENGTH(shared_sstack_size[tskpri])$
+		$ALLOC_SSTACK(CONCAT("_kernel_shared_sstack_", +tskpri), shared_sstack_size[tskpri], "")$
+	$END$
+$END$
+$NL$
+
+$ ã¦ã¼ã¶ã¹ã¿ãã¯é åã®çæã¨ããã«é¢ããã¨ã©ã¼ãã§ãã¯
+$FOREACH tskid TSK.ID_LIST$
+	$IF OSAP.TRUSTED[TSK.OSAPID[tskid]] || tmin_os_restarttask <= tskid $
+$		// ä¿¡é ¼ã¿ã¹ã¯ãããã¯OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®å ´åã®å¦ç
+		$TSK.TINIB_USTKSZ[tskid] = VALUE("0U", 0)$
+		$TSK.TINIB_USTK[tskid] = "NULL"$
+	$ELSE$
+$		// éä¿¡é ¼ã¿ã¹ã¯ã®å ´åã®å¦ç
+
+$		// MOçæãããã®ãã©ã°
+		$create_mo = 1$
+
+		$IF LENGTH(TSK.STKSZ[tskid]) && TSK.STKSZ[tskid] != 0$
+			$TSK.STKSZ[tskid] = VALUE(CONCAT(+TSK.STKSZ[tskid],"U"),+TSK.STKSZ[tskid])$
+		$ELSE$
+			$TSK.STKSZ[tskid] = VALUE(CONCAT(+DEFAULT_TASKSTKSZ,"U"),+DEFAULT_TASKSTKSZ)$
+		$END$
+
+$		// stkszã0ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_USTKSZï¼ããã
+$		// å°ããå ´å
+		$IF TSK.STKSZ[tskid] == 0 || (TARGET_MIN_USTKSZ &&
+							TSK.STKSZ[tskid] < TARGET_MIN_USTKSZ)$
+			$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskStackSize(%1%) of OsTask(%2%) is too small"), TSK.STKSZ[tskid], tskid)$$END$
+		$END$
+
+		$IF EQ(TSK.STK[tskid],"NULL")$
+$			// stkãNULLã®å ´åã®å¦ç
+
+$			// ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ç¢ºä¿
+			$IF TSK.EXTENDED[tskid]$
+				$ALLOC_USTACK(tskid, TSK.STKSZ[tskid])$
+			$ELSE$
+				$TSK.TINIB_USTK[tskid] = CONCAT("_kernel_shared_ustack_", +TSK.PRIORITY[tskid])$
+				$TSK.SHARED_USTK_ID[tskid] = TSK.PRIORITY[tskid]$
+$ 				// åºæ¬ã¿ã¹ã¯ç¨ã®å
+±æã¹ã¿ãã¯ã®ãµã¤ãºãæ±ãã
+				$IF !LENGTH(shared_ustack_size[TSK.PRIORITY[tskid]])
+						|| shared_ustack_size[TSK.PRIORITY[tskid]] < TSK.STKSZ[tskid]$
+					$shared_ustack_size[TSK.PRIORITY[tskid]] = TSK.STKSZ[tskid]$
+				$END$
+			$END$
+		$ELSE$
+$			// stkãNULLã§ãªãã®å ´åã®å¦ç
+
+$			// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã®å¶ç´ãæºããã¦ããªãå ´å
+			$IF CHECK_USTKSZ_ALIGN
+							&& (TSK.STKSZ[tskid] & (CHECK_USTKSZ_ALIGN - 1))$
+				$ERROR TSK.TEXT_LINE[tskid]$$FORMAT(_("OsTaskStackSize(%1%) of OsTask(%2%) is not aligned"), TSK.STKSZ[tskid], tskid)$$END$
+			$END$
+
+			$TSK.TINIB_USTKSZ[tskid] = TSK.STKSZ[tskid]$
+			$TSK.TINIB_USTK[tskid] = TSK.STK[tskid]$
+
+$			// å
+±æããã¦ã¼ã¶ã¹ã¿ãã¯é åã®æ¤åº
+			$FOREACH moid MO_USTACK_LIST2$
+				$IF MO.OSAPID[moid] == TSK.OSAPID[tskid] && 
+						EQ(MO.BASE[moid], TSK.STK[tskid]) && 
+							EQ(MO.SIZE[moid], TSK.STKSZ[tskid])$
+					$create_mo = 0$
+					$TSK.USTACK_MO[tskid] = moid$
+				$END$
+			$END$
+		$END$
+
+		$IF LENGTH(TSK.SHARED_USTK_ID[tskid])$
+			$IF LENGTH(shared_ustack_mo[TSK.SHARED_USTK_ID[tskid]])$
+				$create_mo = 0$
+				$TSK.USTACK_MO[tskid] = shared_ustack_mo[TSK.SHARED_USTK_ID[tskid]]$
+			$END$
+		$END$
+
+		$IF create_mo$
+$			// ã¡ã¢ãªãªãã¸ã§ã¯ãæ
+å ±ã®çæ
+			$nummo = nummo + 1$
+			$MO.TYPE[nummo] = TOPPERS_USTACK$
+			$MO.TSKID[nummo] = tskid$
+			$MO.STKORDER[nummo] = tskid$
+			$IF !EQ(TSK.STK[tskid],"NULL")$
+				$MO.BASE[nummo] = TSK.STK[tskid]$
+				$MO.LINKER[nummo] = 0$
+				$MO.SIZE[nummo] = TSK.TINIB_USTKSZ[tskid]$
+				$MO_USTACK_LIST2 = APPEND(MO_USTACK_LIST2, nummo)$
+			$ELSE$
+				$MO.LINKER[nummo] = 1$
+				$MO.MEMREG[nummo] = STANDARD_RAM$
+				$IF LENGTH(TSK.SHARED_USTK_ID[tskid])$
+					$MO.SECTION[nummo] = SECTION_SHARED_USTACK(TSK.SHARED_USTK_ID[tskid])$
+					$shared_ustack_mo[TSK.SHARED_USTK_ID[tskid]] = nummo$
+				$ELSE$
+					$MO.SECTION[nummo] = SECTION_USTACK(tskid)$
+					$MO.SIZE[nummo] = TSK.STKSZ[tskid]$
+				$END$
+				$MO_USTACK_LIST = APPEND(MO_USTACK_LIST, nummo)$
+			$END$
+			$MO.OSAPID[nummo] = TSK.OSAPID[tskid]$
+			$MO.MEMATR[nummo] = TARGET_MEMATR_USTACK$
+
+			$domptn = DEFAULT_ACPTN[MO.OSAPID[nummo]]$
+			$MO.ACPTN1[nummo] = domptn$
+			$MO.ACPTN2[nummo] = domptn$
+			$MO.TEXT_LINE[nummo] = TSK.TEXT_LINE[tskid]$
+			$TSK.USTACK_MO[tskid] = nummo$
+		$END$
+	$END$
+$END$
+
+$ =====================================================================
+$ HRP2ããã®ç§»æ¤ããã¾ã§
+$ =====================================================================
+
+$ OSAPCBã®åºå
+$IF LENGTH(OSAP.ID_LIST)$
+	OSAPCB osapcb_table[TNUM_OSAP];$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(OSAPCB, osapcb_table);$NL$
+$END$
+
+$FOREACH tskid TSK.ID_LIST$
+	$IF LENGTH(TSK.SHARED_USTK_ID[tskid])$
+		$TSK.TINIB_USTKSZ[tskid] = shared_ustack_size[TSK.PRIORITY[tskid]]$
+		$MO.SIZE[TSK.USTACK_MO[tskid]] = TSK.TINIB_USTKSZ[tskid]$
+	$END$
+$END$
+
+$FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
+	$IF LENGTH(shared_ustack_size[tskpri])$
+		$shared_ustack_size[tskpri] = CONCAT(USTACK_ALIGN_SIZE(shared_ustack_size[tskpri]), "U")$
+		$ALLOC_SHARED_USTACK(CONCAT("_kernel_shared_ustack_", +tskpri), tskpri, shared_ustack_size[tskpri])$
+	$END$
+$END$
+
+$NL$
+
+$ TCBã®åºå
+$IF LENGTH(TSK.ID_LIST)$
+	TCB tcb_table[TNUM_TASK_INC_RT];$NL$
+	$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(TCB, tcb_table);$NL$
+$END$
+
+$
+$ ã«ã¦ã³ã¿ã®åºå
+$
+$NL$
+ /****** Object COUNTER ******/$NL$
+$NL$
+
+$IF LENGTH(CNT.ID_LIST)$
+	const CNTINIB cntinib_table[TNUM_COUNTER] = {$NL$
+	$JOINEACH cntid CNT.ID_LIST ",\n"$
+		$TAB${ $+CNT.MAXALLOWED[cntid]$U,$SPC$
+		($+CNT.MAXALLOWED[cntid]$U * 2U) + 1U,$SPC$
+		$+CNT.TICKSPERBASE[cntid]$U,$SPC$
+		$+CNT.MINCYCLE[cntid]$U,$SPC$
+		&(osapcb_table[$CNT.OSAPID[cntid]$]),$SPC$
+		$FORMAT("0x%08xU", +CNT.ACSBTMP[cntid])$ }
+	$END$
+	$NL$
+	};$NL$
+	$NL$
+
+	CNTCB cntcb_table[TNUM_COUNTER];$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(const CNTINIB, cntinib_table);$NL$
+	TOPPERS_EMPTY_LABEL(CNTCB, cntcb_table);$NL$
+$END$
+
+$ ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãã¤ã³ã¿ãã¼ãã«å®ç¾©ã®åºå
+$IF LENGTH(HWCNT.ID_LIST)$
+	const HWCNTINIB hwcntinib_table[TNUM_HARDCOUNTER] = $NL$
+	{$NL$
+	$JOINEACH cntid HWCNT.ID_LIST ",\n"$
+		$TAB${$NL$
+			$TAB$$TAB$&init_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&start_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&stop_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&set_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&get_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&cancel_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&trigger_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&int_clear_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&int_cancel_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$&increment_hwcounter_$cntid$,$NL$
+			$TAB$$TAB$$CNT.NSPERTICK[cntid]$		/* $CNT.SECONDSPERTICK[cntid]$ * 1000000000 */ $NL$
+		$TAB$}
+	$END$
+	$NL$};$NL$
+
+$ELSE$
+	TOPPERS_EMPTY_LABEL(const HWCNTINIB, hwcntinib_table);$NL$
+$END$
+$NL$
+
+
+$
+$ ã¢ã©ã¼ã ã®åºå
+$
+$NL$
+ /****** Object ALARM ******/$NL$
+$NL$
+
+$FOREACH almid ALM.ID_LIST$
+
+$	// ã¿ã¹ã¯èµ·åç¨ã®ã¢ã¯ã·ã§ã³é¢æ°
+	$IF EQ(ALM.ALMATR[almid], "ACTIVATETASK")$
+		static void$NL$
+		_activate_alarm_$+almid$(void);$NL$
+		static void$NL$
+		_activate_alarm_$+almid$(void)$NL$
+		{$NL$
+		$TAB$(void) activate_task_action(&(osapcb_table[$ALM.OSAPID[almid]$]), $ALM.TSKID[almid]$);$NL$
+		}$NL$
+
+$	// ã¤ãã³ãã»ããç¨ã®ã¢ã¯ã·ã§ã³é¢æ°
+	$ELIF EQ(ALM.ALMATR[almid], "SETEVENT")$
+		static void$NL$
+		_setevent_alarm_$+almid$(void);$NL$
+		static void$NL$
+		_setevent_alarm_$+almid$(void)$NL$
+		{$NL$
+		$TAB$(void) set_event_action(&(osapcb_table[$ALM.OSAPID[almid]$]), $ALM.TSKID[almid]$, $ALM.EVTID[almid]$);$NL$
+		}$NL$
+
+$	// IncrementCounterç¨ã®ã¢ã¯ã·ã§ã³é¢æ°
+	$ELIF EQ(ALM.ALMATR[almid], "INCREMENTCOUNTER")$
+		static void$NL$
+		_incrementcounter_alarm_$+almid$(void);$NL$
+		static void$NL$
+		_incrementcounter_alarm_$+almid$(void)$NL$
+		{$NL$
+		$TAB$(void) incr_counter_action(&(osapcb_table[$ALM.OSAPID[almid]$]), $ALM.INCID[almid]$);$NL$
+		}$NL$
+	$END$
+
+	$NL$
+$END$
+
+$ ã¢ã©ã¼ã ã³ã³ãã­ã¼ã«ãã­ãã¯
+
+$IF LENGTH(ALM.ID_LIST)$
+	const ALMINIB alminib_table[TNUM_ALARM] = {$NL$
+	$JOINEACH almid ALM.ID_LIST ",\n"$
+		$TAB${ &(cntcb_table[$ALM.CNTID[almid]$]),$SPC$
+		$IF EQ(ALM.ALMATR[almid], "ACTIVATETASK")$
+$			// ã¿ã¹ã¯èµ·åç¨
+			&_activate_alarm_$+almid$,$SPC$
+		$ELIF EQ(ALM.ALMATR[almid], "SETEVENT")$
+$			// ã¤ãã³ãã»ããç¨
+			&_setevent_alarm_$+almid$,$SPC$
+		$ELIF EQ(ALM.ALMATR[almid], "INCREMENTCOUNTER")$
+$			// IncrementCounterç¨
+			&_incrementcounter_alarm_$+almid$,$SPC$
+		$END$
+
+		$FORMAT("0x%08xU", +ALM.ASTPTN[almid])$,$SPC$
+		$IF ALM.ASTPTN[almid]$
+			$+ALM.ALARMTIME[almid]$U,$SPC$
+			$+ALM.CYCLETIME[almid]$U,$SPC$
+$			// èªåèµ·åå±æ§ä»¥å¤ã®å±æ§ãç®¡çããªã
+			$+ALM.AUTOSTARTTYPE[almid]$U,$SPC$
+		$ELSE$
+			0U, 0U, 0U,$SPC$
+		$END$
+		&(osapcb_table[$ALM.OSAPID[almid]$]),$SPC$
+		$FORMAT("0x%08xU", +ALM.ACSBTMP[almid])$$SPC$}
+	$END$
+	$NL$
+	};$NL$
+	$NL$
+
+	ALMCB	almcb_table[TNUM_ALARM];$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(const ALMINIB, alminib_table);$NL$
+	TOPPERS_EMPTY_LABEL(ALMCB, almcb_table);$NL$
+$END$
+
+
+$
+$ ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®åºå
+$
+$NL$
+ /****** Object SCHEDULETABLE ******/$NL$
+$NL$
+
+$ åã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®åæºäºç¹ã®ã¢ã¯ã·ã§ã³é¢æ°ã¨æºäºç¹ç®¡çãã­ãã¯ã®çæ
+$FOREACH schtblid SCHTBL.ID_LIST$
+	/* Object SCHEDULETABLE($schtblid$) */$NL$
+	$NL$
+	$FOREACH exppt_index RANGE(0, LENGTH(SCHTBL.EXPPTINDEX_LIST[schtblid]) - 1)$
+		$expptid = AT(SCHTBL.EXPPTINDEX_LIST[schtblid], exppt_index)$
+		static void$NL$
+		_expire_scheduletable_$+schtblid$_$exppt_index$(void);$NL$
+		static void$NL$
+		_expire_scheduletable_$+schtblid$_$exppt_index$(void)$NL$
+		{$NL$
+$		// ã¿ã¹ã¯èµ·å
+		$FOREACH expptactid EXPPTACT.ID_LIST$
+			$IF EXPPTACT.EXPPTID[expptactid] == expptid && EQ(EXPPTACT.EXPIREATR[expptactid], "ACTIVATETASK")$
+				$TAB$(void) activate_task_action(&(osapcb_table[$SCHTBL.OSAPID[EXPPTACT.SCHTBLID[expptactid]]$]), $EXPPTACT.TSKID[expptactid]$);$NL$
+			$END$
+		$END$
+$		// ã¤ãã³ãã»ãã
+		$FOREACH expptactid EXPPTACT.ID_LIST$
+			$IF EXPPTACT.EXPPTID[expptactid] == expptid && EQ(EXPPTACT.EXPIREATR[expptactid], "SETEVENT")$
+				$TAB$(void) set_event_action(&(osapcb_table[$SCHTBL.OSAPID[EXPPTACT.SCHTBLID[expptactid]]$]), $EXPPTACT.TSKID[expptactid]$, $EXPPTACT.EVTID[expptactid]$);$NL$
+			$END$
+		$END$
+		}$NL$
+	$END$
+	$NL$
+	static const SCHTBLEXPPTCB schtblexppt_table_$+schtblid$[$LENGTH(SCHTBL.EXPPTINDEX_LIST[schtblid])$] = {$NL$
+	$JOINEACH exppt_index RANGE(0, LENGTH(SCHTBL.EXPPTINDEX_LIST[schtblid]) - 1) ",\n"$
+		$expptid = AT(SCHTBL.EXPPTINDEX_LIST[schtblid], exppt_index)$
+		$TAB${ $+EXPPT.OFFSET[expptid]$U, &_expire_scheduletable_$+schtblid$_$exppt_index$ }
+	$END$
+	$NL$
+	};$NL$
+	$NL$
+$END$
+$NL$
+
+$ ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«é¢é£ã®ãã¼ã¿ãã­ãã¯ã®å®£è¨
+$IF LENGTH(SCHTBL.ID_LIST)$
+	const SCHTBLINIB schtblinib_table[TNUM_SCHEDULETABLE] = {$NL$
+	$JOINEACH schtblid SCHTBL.ID_LIST ",\n"$
+		$TAB${ &(cntcb_table[$SCHTBL.CNTID[schtblid]$]),$SPC$
+		$+SCHTBL.DURATIONTICK[schtblid]$U,$SPC$
+		$FORMAT("0x%08xU", +SCHTBL.ASTPTN[schtblid])$,$SPC$
+		$IF SCHTBL.ASTPTN[schtblid]$
+			$+SCHTBL.AUTOSTARTTYPE[schtblid]$U,$SPC$
+			$+SCHTBL.STARTTICK[schtblid]$U, $SPC$
+		$ELSE$
+			0U, 0U,$SPC$
+		$END$
+		schtblexppt_table_$+schtblid$,$SPC$
+		$IF SCHTBL.REPEAT[schtblid]$
+			TRUE,$SPC$
+		$ELSE$
+			FALSE,$SPC$
+		$END$
+		$LENGTH(SCHTBL.EXPPTINDEX_LIST[schtblid])$U,$SPC$
+		&(osapcb_table[$SCHTBL.OSAPID[schtblid]$]),$SPC$
+		$FORMAT("0x%08xU", +SCHTBL.ACSBTMP[schtblid])$ }
+	$END$
+	$NL$
+	};$NL$
+	$NL$
+	SCHTBLCB schtblcb_table[TNUM_SCHEDULETABLE];$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(const SCHTBLINIB, schtblinib_table);$NL$
+	TOPPERS_EMPTY_LABEL(SCHTBLCB, schtblcb_table);$NL$
+$END$
+
+$NL$
+
+
+$
+$ ãªã½ã¼ã¹ã®åºå
+$
+$NL$
+ /****** Object RESOURCE ******/$NL$
+$NL$
+
+$IF LENGTH(STDRES.ID_LIST)$
+	const RESINIB resinib_table[TNUM_STD_RESOURCE] = {$NL$
+	$JOINEACH resid STDRES.ID_LIST ",\n"$
+		$IF RES.CEILPRI[resid] > 0$
+$           ã¿ã¹ã¯ã®ã¿ãæ±ããªã½ã¼ã¹ã®å ´å
+			$TAB${ $TMAX_TPRI - RES.CEILPRI[resid]$,$SPC$
+		$ELSE$
+$           ISRãæ±ããªã½ã¼ã¹ã®å ´å
+			$TAB${ $RES.CEILPRI[resid]$,$SPC$
+		$END$
+		$FORMAT("0x%08xU", +RES.ACSBTMP[resid])$ }
+	$END$
+	$NL$
+	};$NL$
+	$NL$
+
+	RESCB rescb_table[TNUM_STD_RESOURCE];$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(const RESINIB, resinib_table);$NL$
+	TOPPERS_EMPTY_LABEL(RESCB, rescb_table);$NL$
+$END$
+
+$NL$
+
+
+$
+$ ãªãã¸ã§ã¯ãåæåã«ã¼ãã³
+$
+$NL$
+void$NL$
+object_initialize(void)$NL$
+{$NL$
+$TAB$osap_initialize();$NL$
+$TAB$interrupt_initialize();$NL$
+$IF LENGTH(STDRES.ID_LIST)$
+$TAB$resource_initialize();$NL$
+$END$
+$TAB$task_initialize();$NL$
+$ //OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®åæåã³ã¼ããè¿½å ãã
+$FOREACH killer RANGE(tmin_os_restarttask, LENGTH(TSK.ID_LIST))$
+	$TAB$/* initialize the Os-genereted Restart Task */$NL$
+	$TAB$tcb_table[$killer - 1$].p_tinib = &(tinib_table[$killer - 1$]);$NL$ 
+$END$ 
+$IF LENGTH(CNT.ID_LIST)$
+$TAB$counter_initialize();$NL$
+$END$
+$IF LENGTH(ALM.ID_LIST)$
+$TAB$alarm_initialize();$NL$
+$END$
+$IF LENGTH(SCHTBL.ID_LIST)$
+$TAB$schtbl_initialize();$NL$
+$END$
+$IF LENGTH(IOC.ID_LIST)$
+$TAB$ioc_initialize();$NL$
+$END$
+}$NL$
+$NL$
+
+$
+$ ãªãã¸ã§ã¯ãçµäºå¦çã«ã¼ãã³
+$
+$NL$
+void$NL$
+object_terminate(void)$NL$
+{$NL$
+$IF LENGTH(CNT.ID_LIST)$
+$TAB$counter_terminate();$NL$
+$END$
+}$NL$
+$NL$
+
+$
+$  å²è¾¼ã¿ç®¡çæ©è½
+$
+$NL$
+/*$NL$
+$SPC$*  Interrupt Management Functions$NL$
+$SPC$*/$NL$
+$NL$
+
+$ ISRç¨ã®å²è¾¼ã¿ãã³ãã©
+$FOREACH isrid ISR2.ID_LIST$
+    $IF !OSAP.TRUSTED[ISR.OSAPID[isrid]] && ISFUNCTION("GENERATE_USER_INTHDR")$
+        $GENERATE_USER_INTHDR(isrid)$
+    $ELSE$
+	void$NL$
+	$ISR.INT_ENTRY[isrid]$(void)$NL$
+	{$NL$
+	$TAB$i_begin_int($+ISR.INTNO[isrid]$U);$NL$
+	$TAB$LOG_ISR_ENTER($isrid$);$NL$
+	$TAB$ISRNAME($isrid$)();$NL$
+	$TAB$LOG_ISR_LEAVE($isrid$);$NL$
+	$TAB$i_end_int($+ISR.INTNO[isrid]$U);$NL$
+	}$NL$
+    $END$
+$END$
+$NL$
+
+$ ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿å²è¾¼ã¿å¦ç
+/* HardWare Counter Interrupt Handler(C2ISR) */$NL$
+$FOREACH cntid HWCNT.ID_LIST$
+	ISR($CNT.ISRID[cntid]$)$NL$
+	{$NL$
+		$TAB$notify_hardware_counter($cntid$);$NL$
+	}$NL$
+$END$
+$NL$
+
+/*$NL$
+$SPC$*  Stack Area for Non-task Context$NL$
+$SPC$*/$NL$
+$NL$
+
+$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åãµã¤ãºè¨ç®
+$FOREACH isrid ISR2.ID_LIST$
+$ 	// NULL(0)ã0ãæå®ããå ´åï¼ããã©ã«ãå¤è¨­å®
+	$IF ISR.STKSZ[isrid] == 0$
+		$ISR.STKSZ[isrid] = DEFAULT_ISRSTKSZ$
+	$END$
+
+$	// éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åè¨ç®ã®çºï¼åªå
+åº¦æ¯æå¤§å¤ã®åè¨æºå
+	$IF LENGTH(ISR.STKSZ[isrid]) && (!LENGTH(isr_shared_stack_size[ISR.INTPRI[isrid]])
+			|| isr_shared_stack_size[ISR.INTPRI[isrid]] < ISR.STKSZ[isrid])$
+		$isr_shared_stack_size[ISR.INTPRI[isrid]] = ISR.STKSZ[isrid]$
+	$END$
+$END$
+
+$	// MINIMUM_OSTKSZã¯ï¼éã¿ã¹ã¯ã³ã³ãã­ã¹ãã¹ã¿ãã¯ãµã¤ãºã®æå°å¤ã¨ãã¦ï¼ä¾å­é¨ã«è¨­ç½®
+$total_stksz = MINIMUM_OSTKSZ$
+
+$ ISRã¹ã¿ãã¯é åã®ãµã¤ãºãåè¨
+$FOREACH isrpri RANGE(-MAX_PRI_ISR2, -MIN_PRI_ISR2)$
+	$IF LENGTH(isr_shared_stack_size[isrpri])$
+		$total_stksz = total_stksz + isr_shared_stack_size[isrpri]$
+	$END$
+$END$
+
+$IF USE_HOOK$
+$ 	// ã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ãè¨­å®
+$ 	// NULL(0)ã0ãæå®ããå ´åï¼ããã©ã«ãå¤è¨­å®
+	$IF LENGTH(HSTK.ID_LIST) && HSTK.STKSZ[1] != 0$
+		$total_stksz = total_stksz + HSTK.STKSZ[1]$
+	$ELSE$
+		$total_stksz = total_stksz + DEFAULT_HOOKSTKSZ$
+	$END$
+$END$
+
+$IF OS.STACKMONITORING[1]$
+$ ã¹ã¿ãã¯æ®éãã§ãã¯æ¹å¼ç¨ã®ã¹ã¿ãã¯æ®éãµã¤ãºè¨ç®
+$FOREACH isrid ISR.ID_LIST$
+	$ISR.STKSZ_2[isrid] = ISR.STKSZ[isrid]$
+	$IF (EQ(ISR.CATEGORY[isrid], "CATEGORY_2"))$
+		$FOREACH isrpri RANGE(-ISR.INTPRI[isrid], -MIN_PRI_ISR2)$
+			$IF ISR.INTPRI[isrid] < isrpri$
+				$IF	LENGTH(isr_shared_stack_size[isrpri])$
+					$ISR.STKSZ_2[isrid] = ISR.STKSZ_2[isrid] + isr_shared_stack_size[isrpri]$
+				$END$
+			$END$
+		$END$
+	$END$
+$END$
+
+$ ããã¯æå¹æï¼ã¹ã¿ãã¯æ®éãã§ãã¯æ¹å¼ç¨ã¹ã¿ãã¯ãµã¤ãºãå ç®
+$IF USE_HOOK$
+	$FOREACH isrid2 ISR2.ID_LIST$
+		$IF LENGTH(HSTK.ID_LIST) && HSTK.STKSZ[1] != 0$
+			$ISR.STKSZ_2[isrid2] = ISR.STKSZ_2[isrid2] + HSTK.STKSZ[1]$
+		$ELSE$
+			$ISR.STKSZ_2[isrid2] = ISR.STKSZ_2[isrid2] +DEFAULT_HOOKSTKSZ$
+		$END$
+	$END$
+$END$
+$END$
+
+$ å²è¾¼ã¿ç®¡çæ©è½ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+$IF !OMIT_INITIALIZE_INTERRUPT$
+
+$	// å²è¾¼ã¿è¦æ±ã©ã¤ã³æ°
+	#define TNUM_INTNO	UINT_C($LENGTH(ISR.ID_LIST)$)$NL$
+	const InterruptNumberType tnum_intno = TNUM_INTNO;$NL$
+	$NL$
+
+$	// å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã¼ãã«
+	$IF LENGTH(ISR.ID_LIST)$
+		const INTINIB intinib_table[TNUM_INTNO] = {$NL$
+		$JOINEACH isrid ISR.ID_LIST ",\n"$
+			$TAB${ ($+ISR.INTNO[isrid]$U),$ISR.INTATR[isrid]$, ($-ISR.INTPRI[isrid]$), 
+			$IF OS.STACKMONITORING[1]$
+				$FORMAT("0x%xU",+ISR.STKSZ_2[isrid])$ 
+			$END$
+			}
+		$END$$NL$
+		};$NL$
+	$ELSE$
+		TOPPERS_EMPTY_LABEL(const INTINIB, intinib_table);$NL$
+	$END$
+	$NL$
+$END$
+
+$
+$ ISRã®åºå
+$
+$NL$
+ /****** Object ISR ******/$NL$
+$NL$
+$NL$
+
+$IF LENGTH(ISR2.ID_LIST)$
+	$FOREACH isrid ISR2.ID_LIST$
+        $ALLOC_SSTACK(CONCAT("_kernel_sstack_", isrid), +DEFAULT_TASKSYSTEMSTKSZ)$
+        $ALLOC_USTACK_ISR(isrid, +DEFAULT_TASKSTKSZ)$
+$			// ã¡ã¢ãªãªãã¸ã§ã¯ãæ
+å ±ã®çæ
+        $nummo = nummo + 1$
+        $MO.TYPE[nummo] = TOPPERS_USTACK$
+        $MO.TSKID[nummo] = isrid$
+        $MO.STKORDER[nummo] = isrid$
+        $MO.LINKER[nummo] = 1$
+        $MO.MEMREG[nummo] = STANDARD_RAM$
+        $MO.SECTION[nummo] = SECTION_USTACK(isrid)$
+        $MO.SIZE[nummo] = ISR.TINIB_USTKSZ[isrid]$
+        $MO_USTACK_LIST = APPEND(MO_USTACK_LIST, nummo)$
+        $MO.OSAPID[nummo] = ISR.OSAPID[isrid]$
+        $MO.MEMATR[nummo] = TARGET_MEMATR_USTACK$
+
+        $domptn = DEFAULT_ACPTN[MO.OSAPID[nummo]]$
+        $MO.ACPTN1[nummo] = domptn$
+        $MO.ACPTN2[nummo] = domptn$
+        $MO.TEXT_LINE[nummo] = ISR.TEXT_LINE[isrid]$
+        $ISR.USTACK_MO[isrid] = nummo$
+    $END$
+    $NL$
+	const ISRINIB isrinib_table[TNUM_ISR2] = {$NL$
+	$JOINEACH isrid ISR2.ID_LIST ",\n"$
+		$TAB${$NL$
+		$TAB$$TAB$&(intinib_table[$isrid$]),$SPC$
+		&(osapcb_table[$ISR.OSAPID[isrid]$]), $FORMAT("0x%08xU", +ISR.ACSBTMP[isrid])$,$NL$
+		$TAB$$TAB$$+DEFAULT_TASKSYSTEMSTKSZ$, (StackType)((uint8 *)$CONCAT("_kernel_sstack_", isrid)$ + $+DEFAULT_TASKSYSTEMSTKSZ$),$NL$
+		$TAB$$TAB$$+DEFAULT_TASKSTKSZ$, (StackType)((uint8 *)$ISR.TINIB_USTK[isrid]$ + $+DEFAULT_TASKSTKSZ$),$NL$
+		$TAB$$TAB$$ISR.TINIB_USTK[isrid]$, $ISR.TINIB_USTK[isrid]$ + $+DEFAULT_TASKSTKSZ$$NL$
+		$TAB$}
+	$END$
+	$NL$
+	};$NL$
+	$NL$
+
+	ISRCB isrcb_table[TNUM_ISR2];$NL$
+	$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(const ISRINIB, isrinib_table);$NL$
+	TOPPERS_EMPTY_LABEL(ISRCB, isrcb_table);$NL$
+$END$
+
+$
+$  Trusted Function
+$
+
+$NL$
+ /******** Trusted Function ********/
+$NL$
+
+$  Trusted Function åæåãã­ãã¯ã®çæ
+$IF LENGTH(TFN.ID_LIST)$
+	const TFINIB tfinib_table[TNUM_TFN] = {$NL$
+	$JOINEACH tfnid TFN.ID_LIST ",\n"$
+$		// ä¿¡é ¼é¢æ°ã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ãè¨­å®
+$ 		// NULL(0)ã0ãæå®ããå ´åï¼ããã©ã«ãè¨­å®
+		$IF !LENGTH(TFN.STKSZ[tfnid]) || TFN.STKSZ[tfnid] == 0$
+			$TFN.STKSZ[tfnid] = DEFAULT_TRUSTEDFUNCTIONSTKSZ$
+		$END$
+		$TAB${ &$TFN.FUNC[tfnid]$, $+TFN.STKSZ[tfnid]$U }
+	$END$$NL$
+	};$NL$
+	$NL$
+$ELSE$
+	TOPPERS_EMPTY_LABEL(const TFINIB, tfinib_table);$NL$
+$END$
+
+$
+$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+$
+$IF !LENGTH(OSTK.ID_LIST)$
+$	// OSTKããªãå ´åã®è¨ç®ããã¹ã¿ãã¯åè¨å¤ã®è¨­å®
+$	// éã¹ã¿ãã¯ã³ã³ãã­ã¹ãã¹ã¿ãã¯ãµã¤ãº = ISRå
+±æå¾ãµã¤ãº + MINIMUM_OSTKSZ
+	$ALLOC_SSTACK("_kernel_ostack", FORMAT("0x%xU", +total_stksz), "static")$
+	#define TOPPERS_OSTKSZ		$FORMAT("ROUND_STK_T(0x%xU)", +total_stksz)$$NL$
+	#define TOPPERS_OSTK		(_kernel_ostack)$NL$
+$ELSE$
+$ 	// ã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ãè¨­å®
+$ 	// NULL(0)ã0ãæå®ããå ´åï¼ããã©ã«ãå¤è¨­å®
+	$IF !LENGTH(OSTK.STKSZ[1]) || OSTK.STKSZ[1] == 0$
+		$OSTK.STKSZ[1] = DEFAULT_OSSTKSZ$
+	$END$
+
+$ 	// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´å
+	$IF !EQ(OSTK.STK[1], "NULL") && CHECK_STKSZ_ALIGN
+							&& OSTK.STKSZ[1] & (CHECK_STKSZ_ALIGN - 1)$
+		$ERROR OSTK.TEXT_LINE[1]$$FORMAT(_("OsOsStackSize(%1%) is not aligned"), OSTK.STKSZ[1])$$END$
+	$END$
+
+$ 	// stkszãå¿
+è¦ãªã¹ã¿ãã¯ãµã¤ãºããå°ããå ´å
+	$IF OSTK.STKSZ[1] < total_stksz$
+		$ERROR OSTK.TEXT_LINE[1]$$FORMAT(_("OsOsStackSize(%1%) is necessary 0x%2$x and more)"), OSTK.STKSZ[1], +total_stksz)$$END$
+	$END$
+
+	$IF EQ(OSTK.STK[1], "NULL")$
+$		// ã¹ã¿ãã¯é åã®èªåå²ä»ã
+		$ALLOC_SSTACK("_kernel_ostack", OSTK.STKSZ[1], "")$
+		#define TOPPERS_OSTKSZ		ROUND_STK_T($OSTK.STKSZ[1]$)$NL$
+		#define TOPPERS_OSTK		(_kernel_ostack)$NL$
+	$ELSE$
+		#define TOPPERS_OSTKSZ		($OSTK.STKSZ[1]$)$NL$
+		#define TOPPERS_OSTK		($OSTK.STK[1]$)$NL$
+	$END$
+$END$
+$NL$
+
+$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+const MemorySizeType	_ostksz = TOPPERS_OSTKSZ;$NL$
+StackType * const		_ostk = (StackType *) TOPPERS_OSTK;$NL$
+$NL$
+#ifdef TOPPERS_OSTKPT$NL$
+$IF ISFUNCTION("DEFINE_CONST_VAR")$
+	$DEFINE_CONST_VAR("StackType * const", "_ostkpt")$ = TOPPERS_OSTKPT(TOPPERS_OSTK, TOPPERS_OSTKSZ);$NL$
+$ELSE$
+	StackType * const	_ostkpt = TOPPERS_OSTKPT(TOPPERS_OSTK, TOPPERS_OSTKSZ);$NL$
+$END$
+#endif /* TOPPERS_OSTKPT */$NL$
+$NL$
+
+$ =====================================================================
+$ IOCæ
+å ±ã®çæ
+$ =====================================================================
+$INCLUDE "kernel/ioc.tf"$
+
+
+$FILE "Os_Lcfg.h"$
+#ifndef TOPPERS_MACRO_ONLY$NL$
+
+$
+$  å²è¾¼ã¿ç®¡çæ©è½
+$
+$NL$
+/*$NL$
+$SPC$*  Interrupt Management Functions$NL$
+$SPC$*/$NL$
+$NL$
+
+$FOREACH isrid ISR.ID_LIST$
+$	//å²è¾¼ã¿é¢æ°ã§ãããã¨ãç¤ºãã³ã³ãã¤ã«ãªãã·ã§ã³ãä»ããé¢æ°ãå®ç¾©ããã¦ããå ´åã
+	$IF EQ(ISR.CATEGORY[isrid], "CATEGORY_1") && ISFUNCTION("EXTERN_C1ISR_HANDLER")$
+		$EXTERN_C1ISR_HANDLER(ISR.INT_ENTRY[isrid])$$NL$
+	$ELSE$
+		extern void $ISR.INT_ENTRY[isrid]$(void);$NL$
+	$END$
+$END$
+
+$ ISRç¨ã®å²è¾¼ã¿ãã³ãã©
+$FOREACH isrid ISR2.ID_LIST$
+	extern ISR($isrid$);$NL$
+$END$
+$NL$
+
+#ifdef TOPPERS_ENABLE_TRACE$NL$
+extern const char8 *atk2_appid_str(AppModeType id);$NL$
+extern const char8 *atk2_tskid_str(TaskType id);$NL$
+extern const char8 *atk2_isrid_str(ISRType id);$NL$
+extern const char8 *atk2_cntid_str(CounterType id);$NL$
+extern const char8 *atk2_almid_str(AlarmType id);$NL$
+extern const char8 *atk2_resid_str(ResourceType id);$NL$
+extern const char8 *atk2_schtblid_str(ScheduleTableType id);$NL$
+extern const char8 *atk2_evtid_str(TaskType task, EventMaskType event);$NL$
+extern const char8 *atk2_osapid_str(ApplicationType id);$NL$
+extern const char8 *atk2_iocid_str(IocType id);$NL$
+extern const char8 *atk2_tfnid_str(TrustedFunctionIndexType id);$NL$
+#endif /* TOPPERS_ENABLE_TRACE */$NL$
+$NL$
+
+$ ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®å¤é¨åç
+§å®£è¨ã®åºå
+$FOREACH cntid HWCNT.ID_LIST$
+	extern void init_hwcounter_$cntid$(TickType maxval, TimeType nspertick);$NL$
+	extern void start_hwcounter_$cntid$(void);$NL$
+	extern void stop_hwcounter_$cntid$(void);$NL$
+	extern void set_hwcounter_$cntid$(TickType exprtick);$NL$
+	extern TickType get_hwcounter_$cntid$(void);$NL$
+	extern void cancel_hwcounter_$cntid$(void);$NL$
+	extern void trigger_hwcounter_$cntid$(void);$NL$
+	extern void int_clear_hwcounter_$cntid$(void);$NL$
+	extern void int_cancel_hwcounter_$cntid$(void);$NL$
+	extern void increment_hwcounter_$cntid$(void);$NL$
+$END$
+$NL$
+
+ /******** Trusted Function ********/
+$NL$
+
+$ TFNã®externå®£è¨
+$FOREACH tfnid TFN.ID_LIST$
+extern TRUSTEDFUNCTION($TFN.FUNC[tfnid]$, FunctionIndex, FunctionParams);$NL$
+$END$
+$NL$
+
+$IF ISFUNCTION("EXTERN_INT_HANDLER")$
+	$EXTERN_INT_HANDLER()$
+$END$
+
+#endif /* TOPPERS_MACRO_ONLY */$NL$
+
+#endif /* TOPPERS_OS_LCFG_H */$NL$
+
+
+$FILE "Os_Lcfg.c"$
+#ifdef TOPPERS_ENABLE_TRACE$NL$
+const char8 *$NL$
+atk2_appid_str(AppModeType id)$NL$
+{$NL$
+$IF LENGTH(APP.ID_LIST)$
+	$TAB$const char8	*appid_str;$NL$
+	$TAB$switch (id) {$NL$
+	$FOREACH appid APP.ID_LIST$
+		$TAB$case $appid$:$NL$
+		$TAB$$TAB$appid_str = "$appid$";$NL$
+		$TAB$$TAB$break;$NL$
+	$END$
+	$TAB$default:$NL$
+	$TAB$$TAB$appid_str = "";$NL$
+	$TAB$$TAB$break;$NL$
+	$TAB$}$NL$
+	$TAB$return(appid_str);$NL$
+$ELSE$
+	$TAB$return("");$NL$
+$END$
+}$NL$
+
+const char8 *$NL$
+atk2_tskid_str(TaskType id)$NL$
+{$NL$
+$TAB$const char8	*tskid_str;$NL$
+$TAB$switch (id) {$NL$
+$FOREACH tskid TSK.ID_LIST$
+$	//OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ä»¥å¤ã®ã¿ã¹ã¯IDãåºåãã
+	$IF tskid < tmin_os_restarttask$
+		$TAB$case $tskid$:$NL$
+		$TAB$$TAB$tskid_str = "$tskid$";$NL$
+		$TAB$$TAB$break;$NL$
+	$END$
+$END$
+$TAB$case INVALID_TASK:$NL$
+$TAB$$TAB$tskid_str = "INVALID_TASK";$NL$
+$TAB$$TAB$break;$NL$
+$TAB$default:$NL$
+$TAB$$TAB$tskid_str = "";$NL$
+$TAB$$TAB$break;$NL$
+$TAB$}$NL$
+$TAB$return(tskid_str);$NL$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_isrid_str(ISRType id)$NL$
+{$NL$
+$TAB$const char8	*isrid_str;$NL$
+$TAB$switch (id) {$NL$
+$FOREACH isrid ISR.ID_LIST$
+	$TAB$case $isrid$:$NL$
+	$TAB$$TAB$isrid_str = "$isrid$";$NL$
+	$TAB$$TAB$break;$NL$
+$END$
+$TAB$case INVALID_ISR:$NL$
+$TAB$$TAB$isrid_str = "INVALID_ISR";$NL$
+$TAB$$TAB$break;$NL$
+$TAB$default:$NL$
+$TAB$$TAB$isrid_str = "";$NL$
+$TAB$$TAB$break;$NL$
+$TAB$}$NL$
+$TAB$return(isrid_str);$NL$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_cntid_str(CounterType id)$NL$
+{$NL$
+$IF LENGTH(CNT.ID_LIST)$
+	$TAB$const char8	*cntid_str;$NL$
+	$TAB$switch (id) {$NL$
+	$FOREACH cntid CNT.ID_LIST$
+		$TAB$case $cntid$:$NL$
+		$TAB$$TAB$cntid_str = "$cntid$";$NL$
+		$TAB$$TAB$break;$NL$
+	$END$
+	$TAB$default:$NL$
+	$TAB$$TAB$cntid_str = "";$NL$
+	$TAB$$TAB$break;$NL$
+	$TAB$}$NL$
+	$TAB$return(cntid_str);$NL$
+$ELSE$
+	$TAB$return("");$NL$
+$END$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_almid_str(AlarmType id)$NL$
+{$NL$
+$IF LENGTH(ALM.ID_LIST)$
+	$TAB$const char8	*almid_str;$NL$
+	$TAB$switch (id) {$NL$
+	$FOREACH almid ALM.ID_LIST$
+		$TAB$case $almid$:$NL$
+		$TAB$$TAB$almid_str = "$almid$";$NL$
+		$TAB$$TAB$break;$NL$
+	$END$
+	$TAB$default:$NL$
+	$TAB$$TAB$almid_str = "";$NL$
+	$TAB$$TAB$break;$NL$
+	$TAB$}$NL$
+	$TAB$return(almid_str);$NL$
+$ELSE$
+	$TAB$return("");$NL$
+$END$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_resid_str(ResourceType id)$NL$
+{$NL$
+$IF LENGTH(RES.ID_LIST)$
+	$TAB$const char8	*resid_str;$NL$
+	$TAB$switch (id) {$NL$
+	$FOREACH resid RES.ID_LIST$
+		$TAB$case $resid$:$NL$
+		$TAB$$TAB$resid_str = "$resid$";$NL$
+		$TAB$$TAB$break;$NL$
+	$END$
+	$TAB$default:$NL$
+	$TAB$$TAB$resid_str = "";$NL$
+	$TAB$$TAB$break;$NL$
+	$TAB$}$NL$
+	$TAB$return(resid_str);$NL$
+$ELSE$
+	$TAB$return("");$NL$
+$END$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_schtblid_str(ScheduleTableType id)$NL$
+{$NL$
+$IF LENGTH(SCHTBL.ID_LIST)$
+	$TAB$const char8	*schtblid_str;$NL$
+	$TAB$switch (id) {$NL$
+	$FOREACH schtblid SCHTBL.ID_LIST$
+		$TAB$case $schtblid$:$NL$
+		$TAB$$TAB$schtblid_str = "$schtblid$";$NL$
+		$TAB$$TAB$break;$NL$
+	$END$
+	$TAB$default:$NL$
+	$TAB$$TAB$schtblid_str = "";$NL$
+	$TAB$$TAB$break;$NL$
+	$TAB$}$NL$
+	$TAB$return(schtblid_str);$NL$
+$ELSE$
+	$TAB$return("");$NL$
+$END$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_evtid_str(TaskType task, EventMaskType event)$NL$
+{$NL$
+$TAB$const char8	*evtid_str;$NL$
+$IF LENGTH(TSK.ID_LIST)$
+	$TAB$switch (task) {$NL$
+	$FOREACH tskid TSK.ID_LIST$
+$		//OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ä»¥å¤ã®ã¿ã¹ã¯IDãåºåãã
+		$IF tskid < tmin_os_restarttask$
+			$TAB$case $tskid$:$NL$
+			$IF LENGTH(TSK.EVT_LIST[tskid])$
+				$TAB$$TAB$switch (event) {$NL$
+				$FOREACH evtid TSK.EVT_LIST[tskid]$
+					$TAB$$TAB$case $evtid$:$NL$
+					$TAB$$TAB$$TAB$evtid_str = "$evtid$";$NL$
+					$TAB$$TAB$$TAB$break;$NL$
+				$END$
+				$TAB$$TAB$default:$NL$
+				$TAB$$TAB$$TAB$evtid_str = NULL;$NL$
+				$TAB$$TAB$$TAB$break;$NL$
+				$TAB$$TAB$}$NL$
+			$ELSE$
+				$TAB$$TAB$evtid_str = NULL;$NL$
+			$END$
+			$TAB$$TAB$break;$NL$
+		$END$
+	$END$
+	$TAB$default:$NL$
+	$TAB$$TAB$evtid_str = NULL;$NL$
+	$TAB$$TAB$break;$NL$
+	$TAB$}$NL$
+$END$
+$TAB$if (evtid_str == NULL) {$NL$
+$FOREACH evtid EVT.ID_LIST$
+	$TAB$$TAB$if (event == $evtid$) {$NL$
+	$TAB$$TAB$$TAB$evtid_str = "$evtid$";$NL$
+	$TAB$$TAB$}$NL$
+$END$
+$TAB$}$NL$
+$TAB$return(evtid_str);$NL$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_osapid_str(ApplicationType id)$NL$
+{$NL$
+$TAB$const char8	*osapid_str;$NL$
+$TAB$switch (id) {$NL$
+$FOREACH osapid OSAP.ID_LIST$
+	$TAB$case $osapid$:$NL$
+	$TAB$$TAB$osapid_str = "$osapid$";$NL$
+	$TAB$$TAB$break;$NL$
+$END$
+$TAB$case INVALID_OSAPPLICATION:$NL$
+$TAB$$TAB$osapid_str = "INVALID_OSAPPLICATION";$NL$
+$TAB$$TAB$break;$NL$
+$TAB$default:$NL$
+$TAB$$TAB$osapid_str = "";$NL$
+$TAB$$TAB$break;$NL$
+$TAB$}$NL$
+$TAB$return(osapid_str);$NL$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_iocid_str(IocType id)$NL$
+{$NL$
+$TAB$const char8	*iocid_str;$NL$
+$TAB$switch (id) {$NL$
+$FOREACH iocid IOC.ID_LIST$
+	$TAB$case $iocid$:$NL$
+	$TAB$$TAB$iocid_str = "$iocid$";$NL$
+	$TAB$$TAB$break;$NL$
+$END$
+$TAB$default:$NL$
+$TAB$$TAB$iocid_str = "";$NL$
+$TAB$$TAB$break;$NL$
+$TAB$}$NL$
+$TAB$return(iocid_str);$NL$
+}$NL$
+
+$NL$
+const char8 *$NL$
+atk2_tfnid_str(TrustedFunctionIndexType id)$NL$
+{$NL$
+$IF LENGTH(TFN.ID_LIST)$
+	$TAB$const char8	*tfnid_str;$NL$
+	$TAB$switch (id) {$NL$
+	$FOREACH tfnid TFN.ID_LIST$
+	$TAB$case $tfnid$:$NL$
+	$TAB$$TAB$tfnid_str = "$tfnid$";$NL$
+	$TAB$$TAB$break;$NL$
+	$END$
+	$TAB$default:$NL$
+	$TAB$$TAB$tfnid_str = "";$NL$
+	$TAB$$TAB$break;$NL$
+	$TAB$}$NL$
+	$TAB$return(tfnid_str);$NL$
+$ELSE$
+	$TAB$return("");$NL$
+$END$
+}$NL$
+#endif /* TOPPERS_ENABLE_TRACE */$NL$
+
+
+$ =====================================================================
+$ ä»¥ä¸ã¯HRP2ããã®ç§»æ¤
+$ =====================================================================
+
+$
+$  ã¡ã¢ãªãªãã¸ã§ã¯ãç®¡çæ©è½
+$
+
+$
+$  çµ±ååã®ã¡ã¢ãªãªãã¸ã§ã¯ãã®æ
+å ±ã®å å·¥
+$
+$ çµ±ååã®ã¡ã¢ãªãªãã¸ã§ã¯ãã®æ
+å ±ã«ï¼ä»¥ä¸ã®æ
+å ±ãè¿½å ãªããã¯ä¿®æ­£ãå 
+$ ããï¼
+$
+$ MO.MEMATR[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§
+$	TA_NOWRITEå±æ§ã®ã¡ã¢ãªãªã¼ã¸ã§ã³ã«é
+ç½®ãããå ´åã¯ï¼TA_MEMINIã¨
+$	TA_MEMPRSVãã¯ãªã¢ãã
+$ MO.ACPTN1[moid]ï¼éå¸¸æä½1ï¼æ¸è¾¼ã¿ï¼ã®ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³
+$	MO.MEMATR[moid]ã«TA_NOWRITEãè¨­å®ããã¦ããå ´åã¯0ã«ããï¼
+$ MO.CLASS[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ããé
+ç½®ããããã®åé¡ææ¨ï¼ãªã³ã«ã
+$				  é
+ç½®ããå ´åã®ã¿ï¼
+$	0ï¼æ¨æºã®ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ï¼ACPTN1ã¨ACPTN2ãæ¨æº
+$	  ï¼ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯é åãããã«å«ããï¼
+$	1ï¼æ¨æºã®ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ï¼ACPTN1ã¾ãã¯ACPTN2ãæ¨æºã§ãªã
+$	2ï¼æ¨æºã§ãªãã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§
+$ MO.SRPW[moid]ï¼å
+±æãªã¼ãå°æã©ã¤ãé åãï¼ï¼ãªã³ã«ãé
+ç½®ããå ´åã®ã¿ï¼
+$ MEMATR_MASKï¼ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ãæ¨æºã§ããããå¤å®ããæã®ãã¹ã¯
+$
+$IF !LENGTH(MEMATR_MASK)$
+	$MEMATR_MASK = ~TA_SDATA$
+$END$
+$FOREACH moid RANGE(1, nummo)$
+	$domptn = DEFAULT_ACPTN[MO.OSAPID[moid]]$
+
+	$IF (MO.MEMATR[moid] & TA_NOWRITE) != 0$
+		$MO.ACPTN1[moid] = TACP_KERNEL$
+	$END$
+
+	$IF (MO.MEMATR[moid] & (TA_NOREAD | TA_EXEC)) == TA_NOREAD$
+		$MO.ACPTN2[moid] = TACP_KERNEL$
+	$END$
+
+	$IF MO.MEMATR[moid] & TA_NOREAD$
+		$MO.ACPTN_R[moid] = TACP_KERNEL$
+	$ELSE$
+		$MO.ACPTN_R[moid] = MO.ACPTN2[moid]$
+	$END$
+
+	$MO.ACPTN_W[moid] = MO.ACPTN1[moid]$
+
+	$IF MO.MEMATR[moid] & TA_EXEC$
+		$MO.ACPTN_X[moid] = MO.ACPTN2[moid]$
+	$ELSE$
+		$MO.ACPTN_X[moid] = TACP_KERNEL$
+	$END$
+
+	$IF MO.LINKER[moid]$
+		$MO.SRPW[moid] = 0$
+		$IF (REG.REGATR[MO.MEMREG[moid]] & TA_NOWRITE) != 0$
+			$MO.MEMATR[moid] = MO.MEMATR[moid] & ~(TA_MEMINI|TA_MEMPRSV)$
+			$IF (MO.MEMATR[moid] & TA_EXEC) != 0
+						&& (MO.MEMATR[moid] & MEMATR_MASK) != MEMATR_TEXT
+				|| (MO.MEMATR[moid] & TA_EXEC) == 0
+						&& (MO.MEMATR[moid] & MEMATR_MASK) != MEMATR_RODATA$
+				$MO.CLASS[moid] = 2$
+			$ELIF MO.ACPTN2[moid] != domptn$
+				$MO.CLASS[moid] = 1$
+$				// ROMã§å
+±æãªã¼ãï¼å®è¡ï¼ã®å ´åã¯ãã¡ã¤ã³ãªãã«ãã
+$				// æ¬¡ã®IFæã¯å¿
+ãçãªã®ã§ROMã®å ´åã¯CLASS==1ã¯å­å¨ããªã
+				$IF MO.ACPTN2[moid] == TACP_SHARED$
+					$MO.OSAPID[moid] = TDOM_NONE$
+					$MO.CLASS[moid] = 0$
+				$END$
+			$ELSE$
+				$MO.CLASS[moid] = 0$
+			$END$
+		$ELSE$
+			$IF MO.TYPE[moid] == TOPPERS_USTACK$
+				$MO.CLASS[moid] = 0$
+			$ELIF (MO.MEMATR[moid] & TA_MEMINI) != 0
+						&& (MO.MEMATR[moid] & MEMATR_MASK) != MEMATR_DATA
+				|| (MO.MEMATR[moid] & TA_MEMPRSV) != 0
+						&& (MO.MEMATR[moid] & MEMATR_MASK) != MEMATR_PRSV
+				|| (MO.MEMATR[moid] & (TA_MEMINI|TA_MEMPRSV)) == 0
+						&& (MO.MEMATR[moid] & MEMATR_MASK) != MEMATR_BSS$
+				$MO.CLASS[moid] = 2$
+
+			$ELIF MO.ACPTN1[moid] != domptn$
+$				// ããã«æ¥ããã¨ã¯ãªã
+				$MO.CLASS[moid] = 1$
+			$ELIF MO.ACPTN2[moid] != domptn$
+				$MO.CLASS[moid] = 1$
+				$IF MO.ACPTN2[moid] == TACP_SHARED$
+					$MO.SRPW[moid] = 1$
+				$END$
+			$ELSE$
+				$MO.CLASS[moid] = 0$
+			$END$
+		$END$
+
+$		// æ¸ãè¾¼ã¿ã§ããªãé åã¯SRPWã«ããªã
+		$IF (MO.MEMATR[moid] & TA_NOWRITE) == 0$
+			$IF MO.ACPTN1[moid] == domptn && MO.ACPTN2[moid] != domptn && MO.ACPTN2[moid] == TACP_SHARED$
+				$MO.SRPW[moid] = 1$
+			$END$
+		$END$
+	$END$
+$END$
+
+$
+$  çµ±ååã®ã¡ã¢ãªãªãã¸ã§ã¯ããã½ã¼ãããããã®é
+åãä½ã
+$
+$ MO.ORDER[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ããã½ã¼ãããããã®1æ¬¡ææ¨
+$ MO.MEMATR1[moid]ï¼ã½ã¼ãããéã«ï¼ACPTN1ï¼ACPTN2ããå
+ã«ç¨ããå±æ§
+$ MO.MEMATR2[moid]ï¼ã½ã¼ãããéã«ï¼ACPTN1ï¼ACPTN2ããå¾ã«ç¨ããå±æ§
+$
+$FOREACH moid RANGE(1, nummo)$
+$	// ã¾ãï¼STANDARD_ROMãæåã«ãï¼ãã®å¾ã¯ã¡ã¢ãªãªã¼ã¸ã§ã³çªå·ã®é ã«
+$	// ã½ã¼ãããï¼
+	$IF MO.LINKER[moid]$
+		$IF MO.MEMREG[moid] == STANDARD_ROM$
+			$memreg = 0$
+		$ELSE$
+			$memreg = MO.MEMREG[moid]$
+		$END$
+	$ELSE$
+$		// ãªã³ã«ãé
+ç½®ããªããã®ã¯ï¼æå¾ã«ããï¼
+		$memreg = LENGTH(REG.ORDER_LIST) + 1$
+	$END$
+	$order = memreg$
+
+$	// æ¬¡ã«ï¼é
+ç½®ã¿ã¤ãã«ãã£ã¦ã½ã¼ãããï¼
+	$IF MO.TYPE[moid] == TOPPERS_USTACK$
+$		// ã¦ã¼ã¶ã¹ã¿ãã¯é åã®é
+ç½®ã¿ã¤ãã®æ±ºå®ï¼
+		$type = 1$
+	$ELIF MO.ACPTN1[moid] == 0 && MO.ACPTN2[moid] == TACP_SHARED
+									&& (MO.MEMATR[moid] & TA_SDATA) != 0$
+$		// å
+±æãªã¼ãã»ã©ã¤ãä¸å¯ã®ã·ã§ã¼ããã¼ã¿é åã®é
+ç½®ã¿ã¤ãã®æ±ºå®ï¼
+$		// ã«ã¼ãã«ãã¡ã¤ã³ã®å
+±æãªã¼ãå°æã©ã¤ãé åãããã«å«ã¾ããï¼
+		$type = 4$
+	$ELIF MO.LINKER[moid] && MO.SRPW[moid]$
+$		// å
+±æãªã¼ãå°æã©ã¤ãé åã®é
+ç½®ã¿ã¤ãã®æ±ºå®ï¼
+		$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+			$type = 5$
+		$ELSE$
+			$type = 3$
+		$END$
+	$ELIF MO.OSAPID[moid] == TDOM_KERNEL$
+$		// ã«ã¼ãã«ãã¡ã¤ã³ã®é
+ç½®ã¿ã¤ãã®æ±ºå®ï¼
+		$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+			$type = 6$
+		$ELSE$
+			$type = 0$
+		$END$
+	$ELIF MO.OSAPID[moid] == TDOM_NONE$
+$		// ç¡æå±ã®é
+ç½®ã¿ã¤ãã®æ±ºå®ï¼
+		$IF MO.LINKER[moid] && MO.CLASS[moid] == 0$
+			$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+				$type = 7$
+			$ELSE$
+				$type = 8$
+			$END$
+		$ELSE$
+			$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+				$type = 6$
+			$ELSE$
+				$type = 2$
+			$END$
+		$END$
+	$ELSE$
+$		// ã¦ã¼ã¶ãã¡ã¤ã³ã®é
+ç½®ã¿ã¤ãã®æ±ºå®ï¼
+		$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+			$type = 6$
+		$ELSE$
+			$type = 2$
+		$END$
+	$END$
+	$order = (order << 4) + type$
+
+$	// æ¬¡ã«ï¼ä¿è­·ãã¡ã¤ã³ã«ãã£ã¦ã½ã¼ãããï¼
+$	// ã¦ã¼ã¶ãã¡ã¤ã³ã®æ°ã32åä»¥ä¸ã§ãããã¨ãä»®å®ãã¦ããï¼
+	$IF MO.OSAPID[moid] == TDOM_KERNEL$
+		$domain = 0$
+	$ELIF MO.OSAPID[moid] == TDOM_NONE$
+		$domain = 63$
+	$ELSE$	
+		$domain = MO.OSAPID[moid]$
+	$END$
+	$order = (order << 6) + domain$
+
+$	// æ¬¡ã«ï¼ã¡ã¢ãªãªãã¸ã§ã¯ããé
+ç½®ããããã®åé¡ææ¨ã«ãã£ã¦é
+ç½®ããï¼
+	$class = 0$
+	$IF MO.LINKER[moid] && MO.TYPE[moid] != TOPPERS_USTACK$
+		$IF (REG.REGATR[MO.MEMREG[moid]] & TA_NOWRITE) != 0$
+			$IF MO.OSAPID[moid] == TDOM_NONE$
+$				// TA_NOWRITEå±æ§ã®ã¡ã¢ãªãªã¼ã¸ã§ã³ã®ç¡æå±ã¯ï¼CLASSã®éé 
+$				// ã«é
+ç½®ããï¼
+				$class = 2 - MO.CLASS[moid]$
+			$ELSE$
+$				// ã«ã¼ãã«ãã¡ã¤ã³ã¨ã¦ã¼ã¶ãã¡ã¤ã³ã¯ï¼CLASSã®é ã«é
+ç½®ããï¼
+				$class = MO.CLASS[moid]$
+			$END$
+		$ELSE$
+			$IF MO.OSAPID[moid] == TDOM_KERNEL || MO.OSAPID[moid] == TDOM_NONE$
+$				// TA_NOWRITEå±æ§ã§ãªãã¡ã¢ãªãªã¼ã¸ã§ã³ã®ã«ã¼ãã«ãã¡ã¤ã³
+$				// ã¨ç¡æå±ã¯ï¼CLASSã®éé ã«é
+ç½®ããï¼
+				$class = 2 - MO.CLASS[moid]$
+			$ELSE$
+$				// ã¦ã¼ã¶ãã¡ã¤ã³ã¯ï¼CLASSã®é ã«é
+ç½®ããï¼
+				$class = MO.CLASS[moid]$
+			$END$
+		$END$
+	$END$
+	$order = (order << 2) + class$
+
+$	// çµæãMO.ORDER[moid]ã«æ ¼ç´ãã
+	$MO.ORDER[moid] = order$
+
+$	// MO.MEMATR1[moid]ã¨MO.MEMATR2[moid]ãè¨­å®ãã
+	$IF MO.LINKER[moid]$
+		$IF (REG.REGATR[MO.MEMREG[moid]] & TA_NOWRITE) != 0$
+			$MO.MEMATR1[moid] = MO.MEMATR[moid] & ~TA_EXEC$
+			$MO.MEMATR2[moid] = MO.MEMATR[moid] & TA_EXEC$
+$			// TA_EXECãè¨­å®ããã¦ããæ¹ãåã«é
+ç½®ãã
+			$MO.MEMATR2[moid] = MO.MEMATR2[moid] ^ TA_EXEC$
+		$ELSE$
+			$MO.MEMATR1[moid] = MO.MEMATR[moid] & ~(TA_MEMINI|TA_MEMPRSV)$
+			$MO.MEMATR2[moid] = MO.MEMATR[moid] & (TA_MEMINI|TA_MEMPRSV)$
+$			// TA_MEMINIãè¨­å®ããã¦ããæ¹ãåã«é
+ç½®ãã
+			$MO.MEMATR2[moid] = MO.MEMATR2[moid] ^ TA_MEMINI$
+		$END$
+	$END$
+$END$
+
+$
+$  ã¡ã¢ãªãªãã¸ã§ã¯ããã½ã¼ãããããã®æ¯è¼é¢æ°
+$
+$IF !ISFUNCTION("MO_COMPARE")$
+$FUNCTION MO_COMPARE$
+$	ã¾ãã¯ï¼MO.ORDERã§æ¯è¼ããï¼
+	$RESULT = MO.ORDER[ARGV[1]] - MO.ORDER[ARGV[2]]$
+	$IF (RESULT == 0) && MO.LINKER[ARGV[1]]$
+$		// MO.ORDERãåãã§ï¼ãªã³ã«ã®é
+ç½®å¯¾è±¡ã®å ´åã¯ï¼ããã«ã½ã¼ãããï¼
+		$_moid1 = ARGV[1]$
+		$_moid2 = ARGV[2]$
+		$IF MO.TYPE[_moid1] == TOPPERS_USTACK$
+$			// ã¦ã¼ã¶ã¹ã¿ãã¯é åã®å ´å
+$			// MO.STKORDERã§ã½ã¼ãããï¼
+			$RESULT = MO.STKORDER[_moid1] - MO.STKORDER[_moid2]$
+		$ELIF MO.MEMATR1[_moid1] != MO.MEMATR1[_moid2]$
+$			// MO.MEMATR1ãç°ãªãã°ï¼ããã§ã½ã¼ãããï¼
+			$RESULT = MO.MEMATR1[_moid1] - MO.MEMATR1[_moid2]$
+		$ELIF MO.ACPTN1[_moid1] != MO.ACPTN1[_moid2]$
+$			// MO.ACPTN1ãç°ãªãã°ï¼ããã§ã½ã¼ãããï¼
+			$RESULT = MO.ACPTN1[_moid1] - MO.ACPTN1[_moid2]$
+		$ELIF MO.ACPTN2[_moid1] != MO.ACPTN2[_moid2]$
+$			// MO.ACPTN2ãç°ãªãã°ï¼ããã§ã½ã¼ãããï¼
+			$RESULT = MO.ACPTN2[_moid1] - MO.ACPTN2[_moid2]$
+		$ELIF MO.MEMATR2[_moid1] != MO.MEMATR2[_moid2]$
+$			// MO.MEMATR2ãç°ãªãã°ï¼ããã§ã½ã¼ãããï¼
+			$RESULT = MO.MEMATR2[_moid1] - MO.MEMATR2[_moid2]$
+		$ELSE$
+			$RESULT = 0$
+		$END$
+	$END$
+$END$
+$END$
+
+$
+$  ã¡ã¢ãªãªãã¸ã§ã¯ãã®ã½ã¼ã
+$
+$ æåã«MO.ORDERã§ã½ã¼ããã¦ãããã¨ã§ï¼MO_COMPAREãä½¿ã£ãã½ã¼ããå¹ç
+$ åããããã¨ãæå¾
+ãã¦ããï¼
+$
+$MO_ORDER = SORT(RANGE(1, nummo), "MO.ORDER")$
+$MO_ORDER = LSORT(MO_ORDER, "MO_COMPARE")$
+
+$
+$  ã¡ã¢ãªãªãã¸ã§ã¯ãã®çµ±åå¦ç
+$
+$ MO.SEFLAG[moid]ï¼ä»¥ä¸ã®ãããã®ãããæ¯è«çåã«è¨­å®ããï¼
+$	0x01ï¼ã»ã¯ã·ã§ã³ã®å
+é ­
+$	0x02ï¼ã»ã¯ã·ã§ã³ã®æå¾
+$	0x04ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­
+$	0x08ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®æå¾
+$	0x10ï¼ã¡ã¢ãªä¿è­·åä½ã®å
+é ­
+$	0x20ï¼ã¡ã¢ãªä¿è­·åä½ã®æå¾
+$	0x40ï¼ã¡ã¢ãªãªã¼ã¸ã§ã³ã®å
+é ­
+$	0x80ï¼ã¡ã¢ãªãªã¼ã¸ã§ã³ã®æå¾
+$	0x100ï¼å
+±æãªã¼ãå°ç¨ã©ã¤ãé åå
+¨ä½ã®å
+é ­
+$	0x200ï¼å
+±æãªã¼ãå°ç¨ã©ã¤ãé åå
+¨ä½ã®æå¾
+$	0x400ï¼ã·ã§ã¼ããã¼ã¿ã»ã¯ã·ã§ã³ã®å
+é ­
+$ MO.MOEND[moid]ï¼çµ±åå¾ã®ã¡ã¢ãªãªãã¸ã§ã¯ãã®æå¾ã®moidï¼çµ±åå¾ã®
+$							ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ã®moidã«å¯¾ãã¦è¨­å®ï¼
+$ MO_SECTION_LISTï¼ã»ã¯ã·ã§ã³ã®å
+é ­ã®ãªã¹ã
+$ MO_START_LISTï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ã®ãªã¹ã
+$ MO_START_LIST_NOLINKERï¼ãªã³ã«ãé
+ç½®ããªãã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ã®ãªã¹ã
+$ MO_MPROTECT_LISTï¼ã¡ã¢ãªä¿è­·åä½ã®å
+é ­ã®ãªã¹ã
+$
+$MO_SECTION_LIST = {}$
+$MO_START_LIST = {}$
+$MO_START_LIST_NOLINKER = {}$
+$MO_MPROTECT_LIST = {}$
+$i = 0$
+$FOREACH moid MO_ORDER$
+	$IF i == 0$
+		$MO.SEFLAG[moid] = 0x15$
+		$mostart = moid$
+		$IF MO.LINKER[moid]$
+			$MO.SEFLAG[moid] = MO.SEFLAG[moid] | 0x40$
+		$END$
+	$ELSE$
+		$IF MO.ORDER[moid] != MO.ORDER[prev_moid]
+				|| (MO.TYPE[moid] & TOPPERS_ATTSEC) == 0
+				|| (MO.TYPE[prev_moid] & TOPPERS_ATTSEC) == 0
+				|| (MO.MEMATR[moid] & ~(TA_MEMINI|TA_MEMPRSV))
+						!= (MO.MEMATR[prev_moid] & ~(TA_MEMINI|TA_MEMPRSV))
+				|| MO.ACPTN1[moid] != MO.ACPTN1[prev_moid]
+				|| MO.ACPTN2[moid] != MO.ACPTN2[prev_moid]$
+			$MO.SEFLAG[moid] = 0x15$
+			$MO.SEFLAG[prev_moid] = MO.SEFLAG[prev_moid] | 0x2a$
+			$MO.MOEND[mostart] = prev_moid$
+			$mostart = moid$
+		$ELIF MO.MEMATR[moid] != MO.MEMATR[prev_moid]$
+			$MO.SEFLAG[moid] = 0x05$
+			$MO.SEFLAG[prev_moid] = MO.SEFLAG[prev_moid] | 0x0a$
+			$MO.MOEND[mostart] = prev_moid$
+			$mostart = moid$
+		$ELSE$
+			$MO.SEFLAG[moid] = 0$
+		$END$
+
+		$IF MO.LINKER[prev_moid] && MO.LINKER[moid]
+					&& MO.MEMREG[prev_moid] != MO.MEMREG[moid]$
+			$MO.SEFLAG[moid] = MO.SEFLAG[moid] | 0x40$
+			$MO.SEFLAG[prev_moid] = MO.SEFLAG[prev_moid] | 0x80$
+		$ELIF MO.LINKER[prev_moid] && !MO.LINKER[moid]$
+			$MO.SEFLAG[prev_moid] = MO.SEFLAG[prev_moid] | 0x80$
+		$END$
+
+		$IF !(MO.LINKER[prev_moid] && MO.SRPW[prev_moid])
+					&& (MO.LINKER[moid] && MO.SRPW[moid])$
+			$MO.SEFLAG[moid] = MO.SEFLAG[moid] | 0x100$
+		$END$
+		$IF (MO.LINKER[prev_moid] && MO.SRPW[prev_moid])
+					&& !(MO.LINKER[moid] && MO.SRPW[moid])$
+			$MO.SEFLAG[prev_moid] = MO.SEFLAG[prev_moid] | 0x200$
+		$END$
+		$IF !(MO.LINKER[prev_moid] && (MO.MEMATR[prev_moid] & TA_SDATA) != 0)
+					&& (MO.LINKER[moid] && (MO.MEMATR[moid] & TA_SDATA) != 0)$
+			$MO.SEFLAG[moid] = MO.SEFLAG[moid] | 0x400$
+		$END$
+	$END$
+
+$	// MO_SECTION_LISTï¼MO_START_LISTï¼MO_MPROTECT_LISTã¸ã®è¿½å 
+	$IF (MO.SEFLAG[moid] & 0x01) != 0$
+		$MO_SECTION_LIST = APPEND(MO_SECTION_LIST, moid)$
+	$END$
+	$IF (MO.SEFLAG[moid] & 0x04) != 0$
+		$MO_START_LIST = APPEND(MO_START_LIST, moid)$
+		$IF (!MO.LINKER[moid])$
+			$MO_START_LIST_NOLINKER = APPEND(MO_START_LIST_NOLINKER, moid)$
+		$END$
+	$END$
+	$IF (MO.SEFLAG[moid] & 0x10) != 0$
+		$MO_MPROTECT_LIST = APPEND(MO_MPROTECT_LIST, moid)$
+	$END$
+
+	$prev_moid = moid$
+	$i = i + 1$
+$END$
+$MO.SEFLAG[prev_moid] = MO.SEFLAG[prev_moid] | 0x2a$
+$MO.MOEND[mostart] = prev_moid$
+$IF MO.LINKER[prev_moid]$
+	$MO.SEFLAG[prev_moid] = MO.SEFLAG[prev_moid] | 0x80$
+$END$
+$IF MO.LINKER[prev_moid] && MO.SRPW[prev_moid]$
+	$MO.SEFLAG[prev_moid] = MO.SEFLAG[prev_moid] | 0x200$
+$END$
+
+$
+$  ã¡ã¢ãªãªãã¸ã§ã¯ãã®ã©ãã«ã®çæ
+$
+$ MO.SLABEL[moid]ï¼ã»ã¯ã·ã§ã³ã®ã©ãã«
+$ MO.ILABEL[moid]ï¼åæåãã¼ã¿é åã®ã©ãã«
+$ MO.MLABEL[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ã©ãã«
+$ MO.PLABEL[moid]ï¼ã¡ã¢ãªä¿è­·åä½ã®ã©ãã«
+$ DATASEC_LISTï¼dataã»ã¯ã·ã§ã³ã®ãªã¹ã
+$ BSSSEC_LISTï¼bssã»ã¯ã·ã§ã³ã®ãªã¹ã
+$
+$DATASEC_LIST = {}$
+$BSSSEC_LIST = {}$
+$FOREACH moid MO_ORDER$
+	$IF MO.LINKER[moid]$
+		$IF MO.MEMREG[moid] == STANDARD_ROM || MO.MEMREG[moid] == STANDARD_RAM$
+			$reglabel = ""$
+		$ELSE$
+			$reglabel = FORMAT("%s_", REG.REGNAME[MO.MEMREG[moid]])$
+		$END$
+		$domlabel = OSAP.LABEL[MO.OSAPID[moid]]$
+
+		$ilabel = ""$
+		$plabel = ""$
+		$IF (REG.REGATR[MO.MEMREG[moid]] & TA_NOWRITE) != 0$
+			$IF (MO.MEMATR[moid] & TA_EXEC) != 0$
+				$typelabel = "text"$
+			$ELSE$
+				$typelabel = "rodata"$
+			$END$
+			$acptn12 = FORMAT("%x", +MO.ACPTN2[moid])$
+		$ELSE$
+			$IF (MO.MEMATR[moid] & TA_MEMINI) != 0$
+				$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+					$typelabel = "sdata"$
+				$ELSE$
+					$typelabel = "data"$
+				$END$
+				$IF (MO.SEFLAG[moid] & 0x01) != 0$
+					$DATASEC_LIST = APPEND(DATASEC_LIST, moid)$
+				$END$
+				$ilabel = FORMAT("%si%s_%s", reglabel, typelabel, domlabel)$
+			$ELIF (MO.MEMATR[moid] & TA_MEMPRSV) != 0$
+				$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+					$typelabel = "sprsv"$
+				$ELSE$
+					$typelabel = "prsv"$
+				$END$
+			$ELSE$
+				$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+					$typelabel = "sbss"$
+				$ELSE$
+					$typelabel = "bss"$
+				$END$
+				$IF (MO.SEFLAG[moid] & 0x01) != 0$
+					$BSSSEC_LIST = APPEND(BSSSEC_LIST, moid)$
+				$END$
+			$END$
+			$acptn12 = FORMAT("%x_%x", +MO.ACPTN1[moid], +MO.ACPTN2[moid])$
+			$IF (MO.MEMATR[moid] & TA_SDATA) != 0$
+				$plabel = FORMAT("%ssram_%s", reglabel, domlabel)$
+			$ELSE$
+				$plabel = FORMAT("%sram_%s", reglabel, domlabel)$
+			$END$
+		$END$
+		$label = FORMAT("%s%s_%s", reglabel, typelabel, domlabel)$
+		$IF MO.TYPE[moid] == TOPPERS_USTACK$
+			$MO.SLABEL[moid] = REGEX_REPLACE(MO.SECTION[moid], "\\.", "")$
+			$MO.MLABEL[moid] = REGEX_REPLACE(MO.SECTION[moid], "\\.", "")$
+			$MO.PLABEL[moid] = ""$
+		$ELIF MO.CLASS[moid] == 0$
+			$MO.SLABEL[moid] = label$
+			$IF !EQ(ilabel, "")$
+				$MO.ILABEL[moid] = ilabel$
+			$END$
+			$MO.MLABEL[moid] = FORMAT("%s__std", label)$
+			$IF !EQ(plabel, "")$
+				$MO.PLABEL[moid] = plabel$
+			$END$
+		$ELIF MO.CLASS[moid] == 1$
+			$MO.SLABEL[moid] = FORMAT("%s_%s", label, acptn12)$
+			$IF !EQ(ilabel, "")$
+				$MO.ILABEL[moid] = FORMAT("%s_%s", ilabel, acptn12)$
+			$END$
+			$MO.MLABEL[moid] = FORMAT("%s__%s", label,	acptn12)$
+			$IF !EQ(plabel, "")$
+				$MO.PLABEL[moid] = FORMAT("%s_%s", plabel, acptn12)$
+			$END$
+		$ELSE$
+			$MO.SLABEL[moid] = FORMAT("%s_%s_%x", label,
+												acptn12, +MO.MEMATR[moid])$
+			$IF !EQ(ilabel, "")$
+				$MO.ILABEL[moid] = FORMAT("%s_%s_%x", ilabel,
+												acptn12, +MO.MEMATR[moid])$
+			$END$
+			$MO.MLABEL[moid] = FORMAT("%s__%s_%x", label,
+								acptn12, +MO.MEMATR[moid])$
+			$IF !EQ(plabel, "")$
+				$MO.PLABEL[moid] = FORMAT("%s_%s_%x", plabel,
+						acptn12, MO.MEMATR[moid] & ~(TA_MEMINI|TA_MEMPRSV))$
+			$END$
+		$END$
+	$END$
+$END$
+
+$		
+$ =====================================================================
+$ ä»®ã®ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ã®çæ
+$ =====================================================================
+$FILE "kernel_mem2.c"$
+#include "kernel_int.h"$NL$
+#include "Os_Lcfg.h"$NL$
+
+#ifndef TOPPERS_EMPTY_LABEL$NL$
+#define TOPPERS_EMPTY_LABEL(x, y) x y[0]$NL$
+#endif$NL$
+
+/*$NL$
+$SPC$*  Include Directives (#include)$NL$
+$SPC$*/$NL$
+$NL$
+$INCLUDES$
+$NL$
+
+$
+$  ä»®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+$
+$IF !OMIT_STANDARD_MEMINIB$
+
+$	// ã¢ãã¬ã¹0ãç½®ãé å
+	$tsize_meminib = 1$
+	$FOREACH moid MO_START_LIST$
+$		// ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­çªå°ãç½®ãé å
+		$tsize_meminib = tsize_meminib + 1$
+		$IF !MO.LINKER[moid]$
+$			// ãªã³ã«ãé
+ç½®ããªãã¡ã¢ãªãªãã¸ã§ã¯ãã¯æçµçªå°ãå¿
+è¦
+			$tsize_meminib = tsize_meminib + 1$
+		$ELIF (MO.SEFLAG[MO.MOEND[moid]] & 0x80) != 0$
+$			// ã¡ã¢ãªãªã¼ã¸ã§ã³ã®æå¾ã®ã¡ã¢ãªãªãã¸ã§ã¯ãã¯æçµçªå°ãå¿
+è¦
+			$tsize_meminib = tsize_meminib + 1$
+		$END$
+	$END$
+
+	const uint32 tnum_meminib = $tsize_meminib$U;$NL$
+	$NL$
+
+	void *const memtop_table[$tsize_meminib$] = {
+	$IF LENGTH(MO_START_LIST_NOLINKER)$
+		$NL$
+		$JOINEACH moid MO_START_LIST_NOLINKER ",\n"$
+			$TAB$(void *)($MO.BASE[moid]$)  /* $MO.ACPTN_R[moid]$, $MO.ACPTN_W[moid]$, $MO.ACPTN_X[moid]$ */
+		$END$$NL$
+	$ELSE$
+		$SPC$0$SPC$
+	$END$
+	};$NL$
+	$NL$
+
+	const MEMINIB meminib_table[$tsize_meminib$] =
+	$SPC${{ TA_NULL, 0U, 0U, 0U }};$NL$
+	$NL$
+$END$
+
+$
+$  dataã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+$
+$IF !OMIT_STANDARD_DATASECINIB$
+	/*$NL$
+	$SPC$*	Data Section Management Functions$NL$
+	$SPC$*/$NL$
+	$NL$
+
+$	// dataã»ã¯ã·ã§ã³ã®æ°
+	#define TNUM_DATASEC	$IF !OMIT_IDATA$$LENGTH(DATASEC_LIST)$$ELSE$0$END$$NL$
+	$NL$
+
+	$IF ISFUNCTION("DEFINE_CONST_VAR")$
+		$DEFINE_CONST_VAR("const uint32", "tnum_datasec")$ = TNUM_DATASEC;$NL$
+	$ELSE$
+		const uint32 tnum_datasec = TNUM_DATASEC;$NL$
+	$END$
+	$NL$
+
+$	// dataã»ã¯ã·ã§ã³åæåãã­ãã¯
+	$IF !OMIT_IDATA && LENGTH(DATASEC_LIST)$
+		$IF ISFUNCTION("DEFINE_CONST_VAR")$
+			$DEFINE_CONST_VAR("const DATASECINIB", "datasecinib_table[TNUM_DATASEC]")$ =
+		$ELSE$
+			const DATASECINIB datasecinib_table[TNUM_DATASEC] =
+		$END$
+		$SPC${{ 0U, 0U, 0U }};$NL$
+	$ELSE$
+		TOPPERS_EMPTY_LABEL(const DATASECINIB, datasecinib_table);$NL$
+		$NL$
+	$END$$NL$
+$END$
+
+$
+$  bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+$
+$IF !OMIT_STANDARD_BSSSECINIB$
+	/*$NL$
+	$SPC$*	BSS Section Management Functions$NL$
+	$SPC$*/$NL$
+	$NL$
+
+$	// bssã»ã¯ã·ã§ã³ã®æ°
+	#define TNUM_BSSSEC	$LENGTH(BSSSEC_LIST)$$NL$
+	$NL$
+
+	const uint32 tnum_bsssec = TNUM_BSSSEC;$NL$
+	$NL$
+
+$	// bssã»ã¯ã·ã§ã³åæåãã­ãã¯
+	$IF LENGTH(BSSSEC_LIST)$
+		const BSSSECINIB bsssecinib_table[TNUM_BSSSEC] = {{0U, 0U}};$NL$
+	$ELSE$
+		TOPPERS_EMPTY_LABEL(const BSSSECINIB, bsssecinib_table);$NL$
+	$END$$NL$
+$END$
+
+$ =====================================================================
+$ HRP2ããã®ç§»æ¤ããã¾ã§
+$ =====================================================================
+
+$ ã¿ã¼ã²ããä¾å­é¨ã§å¿
+è¦ãªMPUINFOBãåºåãã
+$GENERATE_TARGET_MPUINFOB()$
+
+$ ã¿ã¹ã¯ã¹ã¿ãã¯é åãexternå®£è¨ãã(kernel_common.tf)
+$GENERATE_EXPORT_TSK_STK()$
+
+$ ã¿ã¹ã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_TSK()$
+
+$ ã¿ã¹ã¯ç®¡çãã­ãã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_TCB()$
+
+$ OSAPç®¡çãã­ãã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_OSAPCB()$
+
+$ ã¿ã¹ã¯åæåãã­ãã¯ãåºåãã(kernel_common.tf)
+$GENERATE_TINIB_TABLE()$
+
+$ OSã¢ããªã±ã¼ã·ã§ã³åæåãã­ãã¯ãåºåãã(kernel_common.tf)
+$GENERATE_OSAPINIB_TABLE()$
+
+$ =====================================================================
+$  ãã¹3, ãã¹4ã«æ¸¡ãæ
+å ±ã®çæ
+$ =====================================================================
+
+$FILE "cfg2_out.tf"$
+$$ cfg2_out.tf$NL$
+$NL$
+
+$ STANDARD_ROMï¼STANDARD_RAMã®åºå
+$$STANDARD_ROM = $STANDARD_ROM$$$$NL$
+$$STANDARD_RAM = $STANDARD_RAM$$$$NL$
+$NL$
+
+$ REG_ORDERã®åºå
+$$REG_ORDER = { $REG_ORDER$ }$$$NL$
+$NL$
+
+$ REG.*ã®åºå
+$FOREACH reg REG.ORDER_LIST$
+	$$REG.REGNAME[$reg$] = $REG.REGION[reg]$$$$NL$
+	$$REG.REGATR[$reg$] = VALUE($ESCSTR(REG.REGATR[reg])$,
+									$SPC$$+REG.REGATR[reg]$)$$$NL$
+	$$REG.BASE[$reg$] = VALUE($ESCSTR(REG.BASE[reg])$,
+									$SPC$$+REG.BASE[reg]$)$$$NL$
+	$$REG.SIZE[$reg$] = VALUE($ESCSTR(REG.SIZE[reg])$,
+									$SPC$$+REG.SIZE[reg]$)$$$NL$
+	$NL$
+$END$
+
+$ MO_ORDERï¼MO_SECTION_LISTï¼MO_START_LISTï¼MO_START_LIST_NOLINKERï¼
+$ MO_MPROTECT_LISTã®åºå
+$$MO_ORDER = { $MO_ORDER$ }$$$NL$
+$NL$
+$$MO_SECTION_LIST = { $MO_SECTION_LIST$ }$$$NL$
+$NL$
+$$MO_START_LIST = { $MO_START_LIST$ }$$$NL$
+$NL$
+$$MO_START_LIST_NOLINKER = { $MO_START_LIST_NOLINKER$ }$$$NL$
+$NL$
+$$MO_MPROTECT_LIST = { $MO_MPROTECT_LIST$ }$$$NL$
+$NL$
+
+$ tsize_meminibã®åºå
+$IF !OMIT_STANDARD_MEMINIB$
+	$$tsize_meminib = $tsize_meminib$$$$NL$
+	$NL$
+$END$
+
+$ MO_SECTION_LISTï¼DATASEC_LISTï¼BSSSEC_LISTã®åºå
+$$MO_SECTION_LIST = { $MO_SECTION_LIST$ }$$$NL$
+$NL$
+$$DATASEC_LIST = { $DATASEC_LIST$ }$$$NL$
+$NL$
+$$BSSSEC_LIST = { $BSSSEC_LIST$ }$$$NL$
+$NL$
+
+$ MO.*ã®åºå
+$FOREACH moid MO_ORDER$
+	$$MO.TYPE[$moid$] = VALUE($ESCSTR(MO.TYPE[moid])$,
+									$SPC$$+MO.TYPE[moid]$)$$$NL$
+	$IF MO.TYPE[moid] == TOPPERS_ATTMOD$
+		$$MO.MODULE[$moid$] = $ESCSTR(MO.MODULE[moid])$$$$NL$
+	$ELIF MO.TYPE[moid] == TOPPERS_ATTMEM$
+		$$MO.BASE[$moid$] = $ESCSTR(MO.BASE[moid])$$$$NL$
+		$$MO.SIZE[$moid$] = VALUE($ESCSTR(MO.SIZE[moid])$,
+									$SPC$$+MO.SIZE[moid]$)$$$NL$
+		$IF LENGTH(MO.PADDR[moid])$
+			$$MO.PADDR[$moid$] = VALUE($ESCSTR(MO.PADDR[moid])$,
+									$SPC$$+MO.PADDR[moid]$)$$$NL$
+		$END$
+	$ELIF MO.TYPE[moid] == TOPPERS_USTACK$
+		$$MO.TSKID[$moid$] = VALUE($ESCSTR(MO.TSKID[moid])$,
+									$SPC$$+MO.TSKID[moid]$)$$$NL$
+		$IF !MO.LINKER[moid]$
+			$$MO.BASE[$moid$] = $ESCSTR(MO.BASE[moid])$$$$NL$
+			$$MO.SIZE[$moid$] = VALUE($ESCSTR(MO.SIZE[moid])$,
+									$SPC$$+MO.SIZE[moid]$)$$$NL$
+		$ELSE$
+			$$MO.SIZE[$moid$] = VALUE($ESCSTR(MO.SIZE[moid])$,
+									$SPC$$+MO.SIZE[moid]$)$$$NL$
+		$END$
+		$IF LENGTH(MO.STKORDER[moid])$
+			$$MO.STKORDER[$moid$] = $+MO.STKORDER[moid]$$$$NL$
+		$END$
+	$END$
+	$$MO.LINKER[$moid$] = $MO.LINKER[moid]$$$$NL$
+	$$MO.OSAPID[$moid$] = VALUE($ESCSTR(MO.OSAPID[moid])$,
+									$SPC$$+MO.OSAPID[moid]$)$$$NL$
+	$IF MO.LINKER[moid]$
+		$$MO.MEMREG[$moid$] = $MO.MEMREG[moid]$$$$NL$
+		$$MO.SECTION[$moid$] = $ESCSTR(MO.SECTION[moid])$$$$NL$
+		$$MO.CLASS[$moid$] = $MO.CLASS[moid]$$$$NL$
+		$$MO.SRPW[$moid$] = $MO.SRPW[moid]$$$$NL$
+		$$MO.MEMATR1[$moid$] = $MO.MEMATR1[moid]$$$$NL$
+		$$MO.MEMATR2[$moid$] = $MO.MEMATR2[moid]$$$$NL$
+	$END$
+	$$MO.MEMATR[$moid$] = VALUE($ESCSTR(MO.MEMATR[moid])$,
+									$SPC$$+MO.MEMATR[moid]$)$$$NL$
+	$$MO.ACPTN1[$moid$] = VALUE($ESCSTR(MO.ACPTN1[moid])$,
+									$SPC$$+MO.ACPTN1[moid]$)$$$NL$
+	$$MO.ACPTN2[$moid$] = VALUE($ESCSTR(MO.ACPTN2[moid])$,
+									$SPC$$+MO.ACPTN2[moid]$)$$$NL$
+	$$MO.ACPTN_R[$moid$] = VALUE($ESCSTR(MO.ACPTN_R[moid])$,
+									$SPC$$+MO.ACPTN_R[moid]$)$$$NL$
+	$$MO.ACPTN_W[$moid$] = VALUE($ESCSTR(MO.ACPTN_W[moid])$,
+									$SPC$$+MO.ACPTN_W[moid]$)$$$NL$
+	$$MO.ACPTN_X[$moid$] = VALUE($ESCSTR(MO.ACPTN_X[moid])$,
+									$SPC$$+MO.ACPTN_X[moid]$)$$$NL$
+	$IF LENGTH(MO.TEXT_LINE[moid])$
+		$$MO.TEXT_LINE[$moid$] = VALUE($ESCSTR(MO.TEXT_LINE[moid])$,
+									$SPC$$+MO.TEXT_LINE[moid]$)$$$NL$
+	$END$
+	$IF LENGTH(MO.ILABEL[moid])$
+		$$MO.ILABEL[$moid$] = $ESCSTR(MO.ILABEL[moid])$$$$NL$
+	$END$
+	$$MO.ORDER[$moid$] = $MO.ORDER[moid]$$$$NL$
+	$$MO.SEFLAG[$moid$] = 0x$FORMAT("%x", +MO.SEFLAG[moid])$$$$NL$
+	$IF LENGTH(MO.MOEND[moid])$
+		$$MO.MOEND[$moid$] = $MO.MOEND[moid]$$$$NL$
+	$END$
+	$$MO.SLABEL[$moid$] = $ESCSTR(MO.SLABEL[moid])$$$$NL$
+	$$MO.ILABEL[$moid$] = $ESCSTR(MO.ILABEL[moid])$$$$NL$
+	$$MO.MLABEL[$moid$] = $ESCSTR(MO.MLABEL[moid])$$$$NL$
+	$$MO.PLABEL[$moid$] = $ESCSTR(MO.PLABEL[moid])$$$$NL$
+	$NL$
+$END$
+
+$$OSAP.ID_LIST = {
+$JOINEACH osapid OSAP.ID_LIST ","$
+	VALUE("$osapid$", $+osapid$)
+$END$
+}$$$NL$
+$NL$
+$FOREACH osapid OSAP.ID_LIST$
+	$$OSAP.BTMP[$+osapid$] = $OSAP.BTMP[osapid]$$$$NL$
+	$$OSAP.RESTARTTASK[$+osapid$] = VALUE($ESCSTR(OSAP.RESTARTTASK[osapid])$, $+OSAP.RESTARTTASK[osapid]$)$$$NL$
+	$$DEFAULT_ACPTN[$+osapid$] = VALUE($ESCSTR(DEFAULT_ACPTN[osapid])$,
+									$SPC$$+DEFAULT_ACPTN[osapid]$)$$$NL$
+$END$
+$NL$
+$$DEFAULT_ACPTN[TDOM_KERNEL] = $DEFAULT_ACPTN[TDOM_KERNEL]$$$$NL$
+$$DEFAULT_ACPTN[TDOM_NONE] = $DEFAULT_ACPTN[TDOM_NONE]$$$$NL$
+$NL$
+
+$$TSK.ID_LIST = {
+$JOINEACH tskid TSK.ID_LIST ","$
+	VALUE("$tskid$", $+tskid$)
+$END$
+}$$$NL$
+$NL$
+$FOREACH tskid TSK.ID_LIST$
+	$$TSK.OSAPID[$+tskid$] = VALUE("$TSK.OSAPID[tskid]$", $+TSK.OSAPID[tskid]$)$$$NL$
+	$$TSK.ACSBTMP[$+tskid$] = $TSK.ACSBTMP[tskid]$$$$NL$
+	$$TSK.ASTPTN[$+tskid$] = $TSK.ASTPTN[tskid]$$$$NL$
+	$IF LENGTH(TSK.INRESPRI[tskid])$
+		$$TSK.INRESPRI[$+tskid$] = $TSK.INRESPRI[tskid]$$$$NL$
+	$END$
+	$$TSK.TINIB_USTKSZ[$+tskid$] = $ESCSTR(TSK.TINIB_USTKSZ[tskid])$$$$NL$
+	$$TSK.TINIB_USTK  [$+tskid$] = $ESCSTR(TSK.TINIB_USTK  [tskid])$$$$NL$
+	$$TSK.TINIB_SSTKSZ[$+tskid$] = $ESCSTR(TSK.TINIB_SSTKSZ[tskid])$$$$NL$
+	$$TSK.TINIB_SSTK  [$+tskid$] = $ESCSTR(TSK.TINIB_SSTK  [tskid])$$$$NL$
+	$IF LENGTH(TSK.SHARED_USTK_ID[tskid])$
+		$$TSK.SHARED_USTK_ID[$+tskid$] = $TSK.SHARED_USTK_ID[tskid]$$$$NL$
+	$END$
+	$IF LENGTH(TSK.SHARED_SSTK_ID[tskid])$
+		$$TSK.SHARED_SSTK_ID[$+tskid$] = $TSK.SHARED_SSTK_ID[tskid]$$$$NL$
+	$END$
+	$IF LENGTH(TSK.USTACK_MO[tskid])$
+		$$TSK.USTACK_MO[$+tskid$]    = VALUE($ESCSTR(TSK.USTACK_MO[tskid])$,
+											$SPC$$+TSK.USTACK_MO[tskid]$)$$$NL$
+	$END$
+$	//OSæå®ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®æ
+å ±ã®ãã¡ï¼ãã¹3,ãã¹4ã§ã§ä½¿ç¨ãããã®ãåºåãã
+	$$TSK.PRIORITY[$+tskid$] = $TSK.PRIORITY[tskid]$$$$NL$
+	$$TSK.ACTIVATION[$+tskid$] = VALUE($ESCSTR(TSK.ACTIVATION[tskid])$,$TSK.ACTIVATION[tskid]$)$$$NL$
+	$$TSK.RESTARTTASK[$+tskid$] = $ESCSTR(TSK.RESTARTTASK[tskid])$$$$NL$
+	$NL$
+$END$
+
+$$tnum_os_restarttask = VALUE($ESCSTR(tnum_os_restarttask)$, $+tnum_os_restarttask$)$$$NL$
+$$tmin_os_restarttask = VALUE($ESCSTR(tmin_os_restarttask)$, $+tmin_os_restarttask$)$$$NL$
+$NL$
+
+$FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
+	$IF LENGTH(shared_ustack_size[tskpri])$
+		$$shared_ustack_size[$tskpri$] = $ESCSTR(shared_ustack_size[tskpri])$$$$NL$
+	$END$
+	$IF LENGTH(shared_sstack_size[tskpri])$
+		$$shared_sstack_size[$tskpri$] = $ESCSTR(shared_sstack_size[tskpri])$$$$NL$
+	$END$
+$END$
+
+$NL$
+$$HWCNT.ID_LIST = {
+$JOINEACH hwcntid HWCNT.ID_LIST ","$
+	VALUE("$hwcntid$", $+hwcntid$)
+$END$
+}$$$NL$
+
+$NL$
+
+$ LNKSEC.*ã®åºå
+$$numls = $numls$$$$NL$
+$NL$
+$FOREACH lsid RANGE(1, numls)$
+	$$LNKSEC.MEMREG[$lsid$] = $LNKSEC.MEMREG[lsid]$$$$NL$
+	$$LNKSEC.SECTION[$lsid$] = $ESCSTR(LNKSEC.SECTION[lsid])$$$$NL$
+	$NL$
+$END$
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel_common.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel_common.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel_common.tf	(revision 172)
@@ -0,0 +1,368 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by Spansion LLC, USA
+$  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2015 by Witz Corporation
+$  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+$  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+$  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+$  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: kernel_common.tf 427 2015-12-07 12:26:47Z witz-itoyo $
+$
+
+$ =====================================================================
+$ TSK.STKã¨TSK.SSTKãæ´å½¢
+$ =====================================================================
+
+$FOREACH tskid TSK.ID_LIST$
+$   // çç¥ãããå ´åã¯NULLã«ãã
+	$IF !LENGTH(TSK.STK[tskid])$
+		$TSK.STK[tskid] = "NULL"$
+	$END$
+
+$   // çç¥ãããå ´åã¯NULLã«ãã
+	$IF !LENGTH(TSK.SSTK[tskid])$
+		$TSK.SSTK[tskid] = "NULL"$
+	$END$
+$END$
+
+$ =====================================================================
+$  ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­ã¨æ«å°¾ã®ã¢ãã¬ã¹ã®åãåºã
+$ =====================================================================
+
+$IF !ISFUNCTION("START_SYMBOL")$
+$FUNCTION START_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("__start_", ARGV[1]))$
+$END$
+$END$
+
+$IF !ISFUNCTION("LIMIT_SYMBOL")$
+$FUNCTION LIMIT_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("__limit_", ARGV[1]))$
+$END$
+$END$
+
+$ =====================================================================
+$  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
+$ =====================================================================
+
+$FUNCTION COPY_LMA$
+	$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$
+$END$
+
+$
+$  ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãexternå®£è¨ãã
+$
+$FUNCTION GENERATE_EXPORT_TSK_STK$
+	$FOREACH tskid TSK.ID_LIST$
+		$IF OSAP.TRUSTED[TSK.OSAPID[tskid]] || tmin_os_restarttask <= tskid$
+			$extern_sstk = EQ(TSK.STK[tskid], "NULL") && !LENGTH(TSK.SHARED_SSTK_ID[tskid])$
+			$extern_ustk = 0$
+		$ELSE$
+			$extern_sstk = EQ(TSK.SSTK[tskid], "NULL") && !LENGTH(TSK.SHARED_SSTK_ID[tskid])$
+			$extern_ustk = EQ(TSK.STK[tskid], "NULL") && !LENGTH(TSK.SHARED_USTK_ID[tskid])$
+		$END$
+
+		$IF extern_sstk$
+			$IF !EQ(TSK.RESTARTTASK[tskid],"")$
+				extern StackType _kernel_sstack_restart_$TSK.RESTARTTASK[tskid]$[COUNT_STK_T($TSK.TINIB_SSTKSZ[tskid]$)];$NL$
+			$ELSE$
+				extern StackType _kernel_sstack_$tskid$[COUNT_STK_T($TSK.TINIB_SSTKSZ[tskid]$)];$NL$
+			$END$
+		$END$
+		$IF extern_ustk$
+			extern StackType _kernel_ustack_$tskid$[COUNT_STK_T($TSK.TINIB_USTKSZ[tskid]$)];$NL$
+		$END$
+	$END$
+	$FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
+		$IF LENGTH(shared_ustack_size[tskpri])$
+			extern StackType _kernel_shared_ustack_$tskpri$[COUNT_STK_T(ROUND_STK_T($shared_ustack_size[tskpri]$))];$NL$
+		$END$
+		$IF LENGTH(shared_sstack_size[tskpri])$
+			extern StackType _kernel_shared_sstack_$tskpri$[COUNT_STK_T(ROUND_STK_T($shared_sstack_size[tskpri]$))];$NL$
+		$END$
+	$END$
+	$NL$
+$END$
+
+$
+$ ã¿ã¹ã¯ã®externå®£è¨
+$
+$FUNCTION EXTERN_TSK$
+$ 	//ã¿ã¹ã¯ã®externå®£è¨
+	$FOREACH tskid TSK.ID_LIST$
+		$IF tskid < tmin_os_restarttask$
+			extern TASK($tskid$);$NL$
+		$END$
+	$END$
+	$NL$
+$END$
+
+$
+$ ã¿ã¹ã¯åæåãã­ãã¯ã®åºå
+$
+$FUNCTION GENERATE_TINIB_TABLE$
+	/* Task Initialization Block */$NL$
+	$IF LENGTH(TSK.ID_LIST)$
+		const TINIB tinib_table[TNUM_TASK_INC_RT] = {$NL$
+		$JOINEACH tskid TSK.ID_LIST ",\n"$
+			$TAB${$NL$
+$			//OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®å ´åã¯ï¼ãã®åæåãã­ãã¯ãOSã«ãã£ã¦çæããããã®ã§ãããã¨ãç¤ºãã³ã¡ã³ããåºåãã
+			$IF tmin_os_restarttask <= tskid$
+				$TAB$$TAB$/* this TINIB is genereted by OS */$NL$
+			$END$
+$			//OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®å ´åã¯ï¼ã¿ã¹ã¯ã®å
+é ­ã¢ãã¬ã¹ãNULLã«ãã
+			$IF tmin_os_restarttask <= tskid$
+				$TAB$$TAB$NULL,$NL$
+			$ELSE$
+				$TAB$$TAB$&TASKNAME($tskid$),$NL$
+			$END$
+$			// ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ï¼ã¹ã¿ãã¯é å
+			$IF USE_TSKINICTXB$
+				$GENERATE_TSKINICTXB(tskid)$
+			$ELSE$
+				$TAB$$TAB$$TSK.TINIB_SSTKSZ[tskid]$,$NL$
+				$TAB$$TAB$(void *) $TSK.TINIB_SSTK[tskid]$,$NL$
+				$TAB$$TAB$$TSK.TINIB_USTKSZ[tskid]$,$NL$
+				$TAB$$TAB$(void *) $TSK.TINIB_USTK[tskid]$,$NL$
+			$END$
+
+			$TAB$$TAB$&(osapcb_table[$TSK.OSAPID[tskid]$]),$NL$
+			$TAB$$TAB$$FORMAT("0x%08xU", +TSK.ACSBTMP[tskid])$,$NL$
+			$TAB$$TAB$$TMAX_TPRI - TSK.PRIORITY[tskid]$,$NL$
+			$IF EQ(TSK.SCHEDULE[tskid], "NON") $
+				$TAB$$TAB$$+TPRI_MAXTASK$,$NL$
+			$ELSE$
+				$IF LENGTH(TSK.INRESPRI[tskid])$
+					$TAB$$TAB$$TMAX_TPRI - TSK.INRESPRI[tskid]$,$NL$
+				$ELSE$
+					$TAB$$TAB$$TMAX_TPRI - TSK.PRIORITY[tskid]$,$NL$
+				$END$
+			$END$
+
+			$TAB$$TAB$($+TSK.ACTIVATION[tskid]$U) - 1U,$NL$
+			$IF !OMIT_STKMPUINFOB$
+				$TAB$$TAB$$FORMAT("0x%08xU", +TSK.ASTPTN[tskid])$,$NL$
+				$GENERATE_STKMPUINFOB(tskid)$
+			$ELSE$
+				$TAB$$TAB$$FORMAT("0x%08xU", +TSK.ASTPTN[tskid])$$NL$
+			$END$
+			$TAB$}
+		$END$
+		$NL$
+		};$NL$
+	$ELSE$
+		TOPPERS_EMPTY_LABEL(const TINIB, tinib_table);$NL$
+	$END$
+	$NL$
+$END$
+
+$
+$  OSã¢ããªã±ã¼ã·ã§ã³åæåãã­ãã¯ã®åºå
+$
+$FUNCTION GENERATE_OSAPINIB_TABLE$
+	$IF LENGTH(OSAP.ID_LIST)$
+		const OSAPINIB osapinib_table[TNUM_OSAP] = {$NL$
+		$JOINEACH osapid OSAP.ID_LIST ",\n"$
+			$TAB${$NL$
+			$IF EQ(OSAP.RESTARTTASK[osapid], "NO_RESTART_TASK")$
+				$TAB$$TAB$NULL,$NL$
+			$ELSE$
+				$IF EQ(OSAP.RESTARTTASK[osapid], "OS_GEN_RESTARTTASK")$
+$					//OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®å ´å
+					$TAB$$TAB$&tcb_table[$(+OSAP.RESTARTTASK[osapid]-1)$],$NL$
+				$ELSE$
+$					//ã¦ã¼ã¶ããçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®å ´å
+					$TAB$$TAB$&tcb_table[$(OSAP.RESTARTTASK[osapid])$],$NL$
+				$END$
+			$END$
+			$IF OSAP.TRUSTED[osapid]$
+				$TAB$$TAB$TA_TRUSTED,$NL$
+			$ELSE$
+				$TAB$$TAB$TA_NONTRUSTED,$NL$
+			$END$
+
+			$IF !OMIT_OSAPMPUINFOB$
+				$TAB$$TAB$$FORMAT("0x%08xU", +OSAP.BTMP[osapid])$,$NL$
+				$GENERATE_OSAPINIB_MPUINFOB(osapid)$
+			$ELSE$
+				$TAB$$TAB$$FORMAT("0x%08xU", +OSAP.BTMP[osapid])$$NL$
+			$END$
+
+			$TAB$}
+		$END$
+		$NL$
+		};$NL$
+		$NL$
+	$ELSE$
+		TOPPERS_EMPTY_LABEL(const OSAPINIB, osapinib_table);$NL$
+	$END$
+$END$
+
+$
+$  ã¡ã¢ãªãªãã¸ã§ã¯ãã®ãã¼ã¹ã¢ãã¬ã¹é ã®ãªã¹ããã
+$  éä¿¡é ¼OSAPããã¢ã¯ã»ã¹ã§ããªãé åãé¤ãããªã¹ã
+$  ãMO_MEMTOP_ORDER_MEMINIBã«å
+¥ãã
+$
+$FUNCTION SET_MEMTOP_ORDER$
+	$prev = 0$
+	$FOREACH moid SORT(MO_SECTION_LIST, "MO.BASEADDR")$
+	
+		$IF (MO.ACPTN_R[moid] != TACP_KERNEL || MO.ACPTN_W[moid] != TACP_KERNEL || MO.ACPTN_X[moid] != TACP_KERNEL)$
+			$IF !prev || (MO.LIMITADDR[prev] <= MO.BASEADDR[moid] && MO.LIMITADDR[prev] != 0)$
+				$MO_MEMTOP_ORDER_MEMINIB = APPEND(MO_MEMTOP_ORDER_MEMINIB, moid)$
+				$prev = moid$
+			$ELSE$
+$				// åãOSAPã«æå±ããã¦ã¼ã¶ã¹ã¿ãã¯ã®é ååä½µ
+				$IF MO.TYPE[moid] == TOPPERS_USTACK &&
+					MO.TYPE[prev] == TOPPERS_USTACK &&
+					MO.OSAPID[prev] == MO.OSAPID[moid]$
+$					// ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ä½µåå¦ç
+					$MO.TSKID[prev] = 0$
+					$MO.TSKID[moid] = 0$
+					$MO.BASE[moid] = MO.BASE[prev]$
+					$MO.BASEADDR[moid] = MO.BASEADDR[prev]$
+					$IF MO.LIMITADDR[prev] < MO.LIMITADDR[moid]
+													&& MO.LIMITADDR[prev] != 0$
+						$MO.SIZE[prev] = MO.LIMITADDR[moid] - MO.BASEADDR[prev]$
+						$MO.LIMITADDR[prev] = MO.LIMITADDR[moid]$
+					$ELSE$
+						$MO.SIZE[moid] = MO.SIZE[prev]$
+						$MO.LIMITADDR[moid] = MO.LIMITADDR[prev]$
+					$END$
+				$END$
+			$END$
+		$END$
+	$END$
+$END$
+
+$
+$  é£æ¥ããã¡ã¢ãªãªãã¸ã§ã¯ãã®ã¡ã¢ãªä¿è­·å±æ§ãç­ããå ´åã¯çµ±åãã
+$
+$FUNCTION MERGE_MEMINIB$
+	$merged_moid = 0$
+	$FOREACH moid MO_MEMTOP_ORDER_MEMINIB$
+		$IF merged_moid &&
+			(CFG_PASS4 ||
+			 MO.LINKER[merged_moid] && MO.LINKER[moid] &&
+			 MO.MEMREG[merged_moid] == MO.MEMREG[moid]) &&
+			((MO.MERGED_LIMITADDR[merged_moid] == MO.BASEADDR[moid] &&
+			MO.ACPTN_R[merged_moid] == MO.ACPTN_R[moid] &&
+			MO.ACPTN_W[merged_moid] == MO.ACPTN_W[moid] &&
+			MO.ACPTN_X[merged_moid] == MO.ACPTN_X[moid]) ||
+			MO.LIMITADDR[moid] == MO.BASEADDR[moid])$
+
+			$MO.MERGED_LIMITADDR[merged_moid] = MO.LIMITADDR[moid]$
+			$MO.MERGED_LIMIT[merged_moid] = MO.LIMIT[moid]$
+		$ELSE$
+			$merged_moid = moid$
+			$new_list = APPEND(new_list, merged_moid)$
+			$MO.MERGED_LIMITADDR[moid] = MO.LIMITADDR[moid]$
+			$MO.MERGED_LIMIT[moid] = MO.LIMIT[moid]$
+		$END$
+	$END$
+	$MO_MEMTOP_ORDER_MEMINIB = new_list$
+$END$
+
+$
+$ OSAPCBå¤é¨åç
+§å®£è¨çæ
+$
+$FUNCTION EXTERN_OSAPCB$
+$ 	//OSAPCBã®externå®£è¨
+	extern OSAPCB osapcb_table[];$NL$
+	$NL$
+$END$
+
+$
+$ TCBå¤é¨åç
+§å®£è¨çæ
+$
+$FUNCTION EXTERN_TCB$
+$ 	//TCBã®externå®£è¨
+	extern TCB tcb_table[];$NL$
+	$NL$
+$END$
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel_def.csv
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel_def.csv	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel_def.csv	(revision 172)
@@ -0,0 +1,71 @@
+TOPPERS_SUPPORT_ATT_MOD,#defined(TOPPERS_SUPPORT_ATT_MOD)
+SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
+TDOM_KERNEL,TDOM_KERNEL
+TDOM_NONE,TDOM_NONE
+TACP_KERNEL,TACP_KERNEL
+TACP_SHARED,TACP_SHARED
+TOPPERS_ATTSEC,TOPPERS_ATTSEC
+TOPPERS_ATTMEM,TOPPERS_ATTMEM
+TOPPERS_USTACK,TOPPERS_USTACK
+OMIT_STANDARD_MEMINIB,#defined(OMIT_STANDARD_MEMINIB)
+OMIT_IDATA,#defined(OMIT_IDATA)
+OMIT_STANDARD_DATASECINIB,#defined(OMIT_STANDARD_DATASECINIB)
+OMIT_STANDARD_BSSSECINIB,#defined(OMIT_STANDARD_BSSSECINIB)
+TARGET_REGATR,#defined(TARGET_REGATR),,TARGET_REGATR
+TARGET_MEMATR,#defined(TARGET_MEMATR),,TARGET_MEMATR
+TARGET_MIN_SSTKSZ,#defined(TARGET_MIN_SSTKSZ),,TARGET_MIN_SSTKSZ
+TARGET_MIN_USTKSZ,#defined(TARGET_MIN_USTKSZ),,TARGET_MIN_USTKSZ
+CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
+CHECK_USTKSZ_ALIGN,#defined(CHECK_USTKSZ_ALIGN),,CHECK_USTKSZ_ALIGN
+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_USTACK_ALIGN,#defined(CHECK_USTACK_ALIGN),,CHECK_USTACK_ALIGN
+CHECK_USTACK_NONNULL,#defined(CHECK_USTACK_NONNULL)
+TOPPERS_LABEL_ASM,#defined(TOPPERS_LABEL_ASM)
+sizeof_StackType,sizeof(StackType)
+sizeof_MemorySizeType,sizeof(MemorySizeType)
+sizeof_void_ptr,sizeof(void*)
+sizeof_FunctionRefType,sizeof(FunctionRefType)
+sizeof_TINIB,sizeof(TINIB)
+sizeof_HWCNTINIB,sizeof(HWCNTINIB)
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ustk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,ustk)"
+offsetof_TINIB_sstksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,sstksz)"
+offsetof_TINIB_sstk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,sstk)"
+offsetof_HWCNTINIB_init,"offsetof(HWCNTINIB,init)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_action,"offsetof(ALMINIB,action)"
+sizeof_TFINIB,sizeof(TFINIB)
+sizeof_TrustedFunctionRefType,sizeof(TrustedFunctionRefType)
+TA_NULL,TA_NULL
+TA_NOWRITE,TA_NOWRITE
+TA_NOREAD,TA_NOREAD
+TA_EXEC,TA_EXEC
+TA_MEMINI,TA_MEMINI
+TA_MEMPRSV,TA_MEMPRSV
+TA_SDATA,TA_SDATA
+TA_UNCACHE,TA_UNCACHE
+TA_IODEV,TA_IODEV
+ENABLE,ENABLE
+DISABLE,DISABLE
+AUTO,AUTO
+TMIN_TPRI,TMIN_TPRI
+TMAX_TPRI,TMAX_TPRI
+TPRI_MAXTASK,TPRI_MAXTASK
+TMAX_NTOSAPP,TMAX_NTOSAPP
+OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
+USE_TSKINICTXB,#defined(USE_TSKINICTXB)
+OMIT_CHECK_CYCLIC_CHAIN,#defined(OMIT_CHECK_CYCLIC_CHAIN)
+MINIMUM_OSTKSZ,MINIMUM_OSTKSZ
+DEFAULT_TASKSTKSZ,DEFAULT_TASKSTKSZ
+DEFAULT_TASKSYSTEMSTKSZ,DEFAULT_TASKSYSTEMSTKSZ
+DEFAULT_ISRSTKSZ,DEFAULT_ISRSTKSZ
+DEFAULT_ISRSYSTEMSTKSZ,DEFAULT_ISRSYSTEMSTKSZ
+DEFAULT_HOOKSTKSZ,DEFAULT_HOOKSTKSZ
+DEFAULT_TRUSTEDFUNCTIONSTKSZ,DEFAULT_TRUSTEDFUNCTIONSTKSZ
+DEFAULT_OSSTKSZ,DEFAULT_OSSTKSZ
+OMIT_STKMPUINFOB,#defined(OMIT_STKMPUINFOB)
+OMIT_OSAPMPUINFOB,#defined(OMIT_OSAPMPUINFOB)
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel_impl.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel_impl.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel_impl.h	(revision 172)
@@ -0,0 +1,419 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: kernel_impl.h 485 2015-12-17 08:21:50Z witz-itoyo $
+ */
+
+/*
+ *		ATK2å
+é¨åãæ¨æºããããã¡ã¤ã«
+ *
+ *  ãã®ããããã¡ã¤ã«ã¯ï¼ã«ã¼ãã«ãæ§æãããã­ã°ã©ã ã®ã½ã¼ã¹ãã¡ã¤ã«
+ *  ã§å¿
+ãã¤ã³ã¯ã«ã¼ãããã¹ãæ¨æºããããã¡ã¤ã«ã§ãã
+ *
+ *  ã¢ã»ã³ããªè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ãããã®ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ãããæ
+ *  ã¯ï¼TOPPERS_MACRO_ONLYãå®ç¾©ãã¦ãã
+ *  ããã«ããï¼ãã¯ã­å®ç¾©ä»¥å¤ãé¤ãããã«ãªã£ã¦ãã
+ */
+
+#ifndef TOPPERS_KERNEL_IMPL_H
+#define TOPPERS_KERNEL_IMPL_H
+
+/*
+ *  ã«ã¼ãã«å
+é¨ç¨ãªãã¼ã ãä½¿ç¨ããããã®å®ç¾©
+ */
+#ifndef TOPPERS_SVC_FUNCCALL
+#define TOPPERS_SVC_FUNCCALL
+#endif
+
+/*
+ *  ã¢ããªã±ã¼ã·ã§ã³ã¨å
+±éã®ããããã¡ã¤ã«
+ */
+#define OMIT_INCLUDE_OS_LCFG
+#include "Os.h"
+
+/* ç¡å¹ãã¤ã³ã¿ */
+#ifndef NULL
+#define NULL		NULL_PTR
+#endif /* NULL */
+
+/*
+ *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
+ */
+#ifndef CAST
+#define CAST(type, val)		((type) (val))
+#endif /* CAST */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/* æé©åããããï¼ä¾å­é¨åå®ç¾©ã§ããå */
+#ifndef OMIT_DATA_TYPE
+/*
+ *  ã«ã¼ãã«å
+é¨ã®ãã¼ã¿å
+ */
+typedef uint32	InterruptNumberType;            /* å²è¾¼ã¿çªå· */
+typedef uint32	AttributeType;                  /* ãªãã¸ã§ã¯ãã®å±æ§ */
+typedef sint32	PriorityType;                   /* åªå
+åº¦ */
+#endif /* OMIT_DATA_TYPE */
+
+typedef void (*FunctionRefType)(void);          /* ãã­ã°ã©ã ã®èµ·åçªå° */
+
+/*
+ *  ã¨ã©ã¼ããã¯OFFæï¼ãµã¼ãã¹IDåå¾ã¨ãã©ã¡ã¼ã¿åå¾ãOFFã«ãªã
+ */
+#ifdef CFG_USE_ERRORHOOK
+
+#ifdef CFG_USE_PARAMETERACCESS
+extern _ErrorHook_Par	_errorhook_par1;
+extern _ErrorHook_Par	_errorhook_par2;
+extern _ErrorHook_Par	_errorhook_par3;
+#endif /* CFG_USE_PARAMETERACCESS */
+
+#endif /* CFG_USE_ERRORHOOK */
+
+/*
+ *  OSå
+é¨ããã®ShutdownOSã®å¼ã³åºã
+ */
+extern void internal_shutdownos(StatusType ercd);
+
+#ifdef CFG_USE_SHUTDOWNHOOK
+extern void internal_call_shtdwnhk(StatusType ercd);
+#endif /* CFG_USE_SHUTDOWNHOOK */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ASSERTãã¯ã­
+ */
+#ifndef NDEBUG
+#define ASSERT(exp) do {								\
+		if (!(exp)) {									\
+			fatal_file_name = __FILE__;					\
+			fatal_line_num = __LINE__;					\
+			internal_shutdownos(E_OS_SYS_ASSERT_FATAL);	\
+		}												\
+} while (0)
+
+#define ASSERT_NO_REACHED do {						\
+		fatal_file_name = __FILE__;					\
+		fatal_line_num = __LINE__;					\
+		internal_shutdownos(E_OS_SYS_ASSERT_FATAL);	\
+} while (0)
+
+#else /* NDEBUG */
+#define ASSERT(exp)
+#define ASSERT_NO_REACHED
+#endif /* NDEBUG */
+
+/*
+ *  ã¿ã¼ã²ããä¾å­æ
+å ±ã®å®ç¾©
+ */
+#include "target_config.h"
+
+/*
+ *  ãã¹ã¦ã®é¢æ°ãã³ã³ãã¤ã«ããããã®å®ç¾©
+ */
+#ifdef ALLFUNC
+#include "allfunc.h"
+#endif /* ALLFUNC */
+
+/*
+ *  ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãå¤ã®å®ç¾©
+ */
+#define APPMODE_NONE	((AppModeType) 0)   /* ã¢ã¼ããªã */
+
+/*
+ *  å®è¡ä¸­ã®ã³ã³ãã­ã¹ãï¼callevel_statã®ä¸ä½12ãããï¼ã®å¤ã®å®ç¾©
+ *  TCL_NULLã®æã«ï¼æ¬æ¥ã®å¼åºä¸ã³ã³ãã­ã¹ããå¤å¥ã§ããªããªããã¨ã«æ³¨æ
+ */
+#define TCL_NULL			UINT_C(0x0000)                          /* ã·ã¹ãã ãµã¼ãã¹ãå¼ã³åºããªã */
+#define TCL_TASK			UINT_C(0x0001)                          /* ã¿ã¹ã¯ */
+#define TCL_ISR2			UINT_C(0x0002)                          /* C2ISR */
+#define TCL_PROTECT			UINT_C(0x0004)                          /* ProtectionHook */
+#define TCL_PREPOST			UINT_C(0x0008)                          /* PreTaskHookï¼PostTaskHook */
+#define TCL_STARTUP			UINT_C(0x0010)                          /* StartupHook */
+#define TCL_SHUTDOWN		UINT_C(0x0020)                          /* ShutdownHook */
+#define TCL_ERROR			UINT_C(0x0040)                          /* ErrorHook */
+/* OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ã®ããã¯ãã¹ã¯ */
+#define TCLMASK				UINT_C(0x0fff)                          /* ã³ã¼ã«ã¬ãã«ãç¤ºããããã®ãã¹ã¯ */
+
+/*
+ *  ã·ã¹ãã ç¶æ
+ (callevel_statã®ä¸ä½4ããã)ã®å¤ã®å®ç¾©
+ */
+#define TSYS_NULL			UINT_C(0x0000)      /* ã·ã¹ãã ç¶æ
+ã¯ãªã¢ */
+#define TSYS_DISALLINT		UINT_C(0x1000)      /* DisableAllInterruptsçºè¡ä¸­ */
+#define TSYS_SUSALLINT		UINT_C(0x2000)      /* SuspendAllInterruptsçºè¡ä¸­ */
+#define TSYS_SUSOSINT		UINT_C(0x4000)      /* SuspendOSInterruptsçºè¡ä¸­ */
+#define TSYS_ISR1			UINT_C(0x8000)      /* C1ISRèµ·åæ¸ã¿ */
+#define TSYSMASK			UINT_C(0xf000)      /* ã·ã¹ãã ç¶æ
+ãç¤ºããããã®ãã¹ã¯ */
+
+
+#ifdef CFG_USE_STACKMONITORING
+#ifndef STACK_MAGIC_NUMBER
+/*
+ *  ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°ç¨ãã¸ãã¯ãã³ãã¼ã®å®ç¾©
+ *  ã¿ã¼ã²ããä¾å­é¨ã®å®ç¾©ã¯åªå
+ããã
+ */
+#define STACK_MAGIC_NUMBER	0x4E434553      /* NCESã®ASCIIã³ã¼ã(0x4E434553) */
+#endif /* STACK_MAGIC_NUMBER */
+
+#ifndef TOPPERS_ISTK_MAGIC_REGION
+/* å²è¾¼ã¿ã¹ã¿ãã¯ç¨ãã¸ãã¯ãã³ãã¼é ååå¾ãã¯ã­ */
+#define TOPPERS_ISTK_MAGIC_REGION(stk, stksz)	(stk)
+#endif /* TOPPERS_ISTK_MAGIC_REGION */
+
+#ifndef TOPPERS_SSTK_MAGIC_REGION
+/* ä¿¡é ¼ã¿ã¹ã¯ã¹ã¿ãã¯ç¨ãã¸ãã¯ãã³ãã¼é ååå¾ãã¯ã­ */
+#ifndef USE_TSKINICTXB
+#define TOPPERS_SSTK_MAGIC_REGION(p_tinib)	((StackType *) ((p_tinib)->sstk))
+#endif /* USE_TSKINICTXB */
+#endif /* TOPPERS_SSTK_MAGIC_REGION */
+
+#endif /* CFG_USE_STACKMONITORING */
+
+#define TFN_EXIT_TASK	(TMAX_SVCID - TARGET_SVC_NUM)
+#define exit_task		(_kernel_exit_task)
+
+/*
+ *  ããã¯ç¨®å¥ã®å®ç¾©
+ */
+#define STARTUP_HOOK	UINT_C(0)
+#define SHUTDOWN_HOOK	UINT_C(1)
+#define ERROR_HOOK		UINT_C(2)
+
+/*
+ *  callevel_statã®ãããæä½
+ */
+#define ENTER_CALLEVEL(bit)		(callevel_stat |= (bit))
+#define LEAVE_CALLEVEL(bit)		(callevel_stat &= (uint16) ~(uint32) (bit))
+
+
+/*
+ *  åã·ã¹ãã ãµã¼ãã¹ãå¼ã³åºããå¦çåä½
+ */
+#define CALLEVEL_ACTIVATETASK				(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_TERMINATETASK				(TCL_TASK)
+#define CALLEVEL_CHAINTASK					(TCL_TASK)
+#define CALLEVEL_SCHEDULE					(TCL_TASK)
+#define CALLEVEL_GETTASKID					(TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT | TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST | TCL_PROTECT)
+#define CALLEVEL_GETTASKSTATE				(TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT | TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST)
+#define CALLEVEL_GETRESOURCE				(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_RELEASERESOURCE			(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_SETEVENT					(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_CLEAREVENT					(TCL_TASK)
+#define CALLEVEL_GETEVENT					(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST)
+#define CALLEVEL_WAITEVENT					(TCL_TASK)
+#define CALLEVEL_GETALARMBASE				(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST)
+#define CALLEVEL_GETALARM					(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST)
+#define CALLEVEL_SETRELALARM				(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_SETABSALARM				(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_CANCELALARM				(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_GETACTIVEAPPMODE			(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST | TCL_STARTUP | TCL_SHUTDOWN)
+#define CALLEVEL_SHUTDOWNOS					(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_STARTUP)
+#define CALLEVEL_GETISRID					(TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT | TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PROTECT)
+#define CALLEVEL_INCREMENTCOUNTER			(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_GETCOUNTERVALUE			(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_GETELAPSEDVALUE			(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_STARTSCHEDULETABLEREL		(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_STARTSCHEDULETABLEABS		(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_STOPSCHEDULETABLE			(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_NEXTSCHEDULETABLE			(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_GETSCHEDULETABLESTATUS		(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_GETAPPLICATIONID			(TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT | TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST | TCL_STARTUP | TCL_SHUTDOWN | TCL_PROTECT)
+#define CALLEVEL_CALLTRUSTEDFUNCTION		(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_CHECKISRMEMORYACCESS		(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PROTECT)
+#define CALLEVEL_CHECKTASKMEMORYACCESS		(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PROTECT)
+#define CALLEVEL_CHECKOBJECTACCESS			(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PROTECT)
+#define CALLEVEL_CHECKOBJECTOWNERSHIP		(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PROTECT)
+#define CALLEVEL_GETAPPLICATIONSTATE		(TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT | TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST | TCL_STARTUP | TCL_SHUTDOWN | TCL_PROTECT)
+#define CALLEVEL_DISABLEINTERRUPTSOURCE		(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST | TCL_STARTUP | TCL_SHUTDOWN | TCL_PROTECT | TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT)
+#define CALLEVEL_ENABLEINTERRUPTSOURCE		(TCL_TASK | TCL_ISR2 | TCL_ERROR | TCL_PREPOST | TCL_STARTUP | TCL_SHUTDOWN | TCL_PROTECT | TSYS_DISALLINT | TSYS_SUSALLINT | TSYS_SUSOSINT)
+#define CALLEVEL_GETFAULTYCONTEXT			(TCL_PROTECT)
+#define CALLEVEL_IOCSEND					(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_IOCWRITE					(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_IOCRECEIVE					(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_IOCREAD					(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_IOCEMPTYQUEUE				(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_ALLOWACCESS				(TCL_TASK | TCL_ISR2)
+#define CALLEVEL_TERMINATEAPPLICATION		(TCL_TASK | TCL_ISR2)
+
+/*
+ *  ãã®ä»ã®å®æ°å¤ï¼æ¨æºå²è¾¼ã¿ã¢ãã«ï¼
+ */
+#define TIPM_ENAALL		UINT_C(0)   /* å²è¾¼ã¿åªå
+åº¦ãã¹ã¯å
+¨è§£é¤ */
+
+/*
+ *  ãªãã¸ã§ã¯ãå±æ§ã®å®ç¾©ï¼æ¨æºå²è¾¼ã¿ã¢ãã«ï¼
+ */
+#define ENABLE		UINT_C(0x01)
+#define DISABLE		UINT_C(0x00)
+
+
+/*
+ *  OSå
+é¨ç¨ç¡å¹ãªã·ã¹ãã ãµã¼ãã¹ID
+ */
+#define OSServiceId_Invalid		((OSServiceIdType) 0xff)
+
+/*
+ *  ããããã¡ã¤ã«ãæããªãã¢ã¸ã¥ã¼ã«ã®é¢æ°ã»å¤æ°ã®å®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+#ifdef TOPPERS_StartOS
+/*
+ *  ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®æ°
+ */
+extern const AppModeType	tnum_appmode;
+
+#endif /* TOPPERS_StartOS */
+
+/*
+ *  OSå®è¡å¶å¾¡ã®ããã®å¤æ°ï¼osctl_manage.cï¼
+ */
+extern uint16				callevel_stat;  /* å®è¡ä¸­ã®ã³ã³ãã­ã¹ã */
+extern AppModeType			appmodeid;      /* ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãID */
+
+/*
+ *  ã«ã¼ãã«åä½ç¶æ
+ãã©ã°
+ */
+extern boolean				kerflg;
+
+/*
+ *  ç¹æ¨©ã¢ã¼ãã§åä½ä¸­ããç¤ºããã©ã°
+ */
+extern boolean				run_trusted;
+
+extern boolean				pre_protection_supervised;
+
+/*
+ *  ã¨ã©ã¼ããã¯å¼ã³åºãã®ããã®å®£è¨ï¼osctl.cï¼
+ */
+#ifdef CFG_USE_ERRORHOOK
+extern void internal_call_errorhook(StatusType ercd, OSServiceIdType svcid);
+#endif /* CFG_USE_ERRORHOOK */
+
+/*
+ *  ãã¹ãã¿ã¹ã¯ããã¯/ãã¬ã¿ã¹ã¯ããã¯
+ *  ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ©è½ã®åæå/ãã­ãã¯ã·ã§ã³ããã¯å¼ã³åºãã®ããã®å®£è¨ï¼osctl.cï¼
+ */
+#ifdef CFG_USE_POSTTASKHOOK
+extern void call_posttaskhook(void);
+#endif /* CFG_USE_POSTTASKHOOK */
+
+#ifdef CFG_USE_PRETASKHOOK
+extern void call_pretaskhook(void);
+#endif /* CFG_USE_PRETASKHOOK */
+
+#ifdef CFG_USE_STACKMONITORING
+extern void init_stack_magic_region(void);
+#endif /* CFG_USE_STACKMONITORING */
+
+extern void call_protectionhk_main(StatusType protection_error);
+
+/*
+ *  åã¢ã¸ã¥ã¼ã«ã®åæåï¼Os_Lcfg.cï¼
+ */
+extern void object_initialize(void);
+
+/*
+ *  åã¢ã¸ã¥ã¼ã«ã®çµäºå¦çï¼Os_Lcfg.cï¼
+ */
+extern void object_terminate(void);
+
+/*
+ *  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åï¼Os_Lcfg.cï¼
+ */
+extern const MemorySizeType	_ostksz;        /* ã¹ã¿ãã¯é åã®ãµã¤ãºï¼ä¸¸ããå¤ï¼ */
+extern StackType * const	_ostk;          /* ã¹ã¿ãã¯é åã®å
+é ­çªå° */
+#ifdef TOPPERS_OSTKPT
+extern StackType * const	_ostkpt;        /* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæå¤ */
+#endif /* TOPPERS_OSTKPT */
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_KERNEL_IMPL_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel_int.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel_int.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel_int.h	(revision 172)
@@ -0,0 +1,142 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: kernel_int.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		Os_Lcfg.cï¼ããã³cfg1_out.cï¼ç¨ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_KERNEL_INT_H
+#define TOPPERS_KERNEL_INT_H
+
+/*
+ *  ã«ã¼ãã«æ¨æºããããã¡ã¤ã«
+ */
+#include "kernel_impl.h"
+
+/*
+ *  ã«ã¼ãã«ã®åããããã¡ã¤ã«
+ */
+#include "task.h"
+#include "counter.h"
+#include "alarm.h"
+#include "interrupt.h"
+#include "resource.h"
+#include "scheduletable.h"
+#include "memory.h"
+#include "ioc_impl.h"
+
+/*
+ *  ã¡ã¤ã³ã«ã¼ãã³åå®ç¾©ç¨ã®ãã¯ã­
+ */
+#define TASKNAME(TaskName)	TaskMain ## TaskName
+#define ISRNAME(ISRName)	ISRMain ## ISRName
+
+/*
+ *  ãªãã¸ã§ã¯ãã®å±æ§ã®å®ç¾©ï¼ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã§ã®ã¿ä½¿ç¨ï¼
+ */
+
+/*
+ *  ã¤ãã³ããã¹ã¯å¤
+ */
+#define AUTO		UINT_C(0x00)    /* ã¤ãã³ããã¹ã¯å¤=AUTO */
+
+#define TA_NOWRITE		UINT_C(0x01)    /* æ¸è¾¼ã¿ã¢ã¯ã»ã¹ç¦æ­¢ */
+#define TA_NOREAD		UINT_C(0x02)    /* èª­åºãã¢ã¯ã»ã¹ç¦æ­¢ */
+#define TA_EXEC			UINT_C(0x04)    /* å®è¡ã¢ã¯ã»ã¹è¨±å¯ */
+#define TA_MEMINI		UINT_C(0x08)    /* ã¡ã¢ãªã®åæåãè¡ã */
+#define TA_MEMPRSV		UINT_C(0x10)    /* ã¡ã¢ãªã®åæåãè¡ããªã */
+#define TA_SDATA		UINT_C(0x20)    /* ã·ã§ã¼ããã¼ã¿é åã«é
+ç½® */
+#define TA_UNCACHE		UINT_C(0x40)    /* ã­ã£ãã·ã¥ä¸å¯ */
+#define TA_IODEV		UINT_C(0x80)    /* å¨è¾ºããã¤ã¹ã®é å */
+
+#ifdef TOPPERS_TARGET_SUPPORT_ATT_MOD
+#define TOPPERS_SUPPORT_ATT_MOD         /* ATT_MODããµãã¼ãããã¦ãã */
+#endif /* TOPPERS_TARGET_SUPPORT_ATT_MOD */
+
+/*
+ * OSã¢ããªã±ã¼ã·ã§ã³IDï¼HRP2ã®ä¿è­·ãã¡ã¤ã³IDï¼
+ */
+#define TDOM_KERNEL		(-1)            /* ã«ã¼ãã«ãã¡ã¤ã³ */
+#define TDOM_NONE		(-2)            /* ç¡æå±ï¼ä¿è­·ãã¡ã¤ã³ã«å±ããªãï¼*/
+
+#define TA_NULL			UINT_C(0)       /* ãªãã¸ã§ã¯ãå±æ§ãæå®ããªã */
+
+/*
+ * OSã¢ããªã±ã¼ã·ã§ã³é¢ä¿ã®ãã¯ã­
+ */
+#define TMAX_NTOSAPP		32          /* éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã®æå¤§æ° */
+
+#endif /* TOPPERS_KERNEL_INT_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel_mem.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel_mem.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel_mem.tf	(revision 172)
@@ -0,0 +1,710 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by Spansion LLC, USA
+$  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2015 by Witz Corporation
+$  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+$  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+$  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+$  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: kernel_mem.tf 425 2015-12-07 08:06:19Z witz-itoyo $
+$
+
+$  ãã¹2ï¼ãã¹3ããã®æ
+å ±ã®èª­è¾¼ã¿
+$
+$INCLUDE "cfg2_out.tf"$
+$INCLUDE "cfg3_out.tf"$
+$INCLUDE "kernel/kernel_common.tf"$
+
+$
+$  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
+$
+$COPY_LMA()$
+
+$ =====================================================================
+$ kernel_mem.cã®å
+±éé¨åã®çæ
+$ =====================================================================
+
+$FILE "kernel_mem.c"$
+/* kernel_mem.c */$NL$
+#include "kernel/kernel_int.h"$NL$
+#include "Os_Lcfg.h"$NL$
+#include "kernel_mem.h"$NL$
+#ifndef TOPPERS_EMPTY_LABEL$NL$
+#define TOPPERS_EMPTY_LABEL(x, y) x y[0]$NL$
+#endif$NL$
+$NL$
+
+/*$NL$
+$SPC$*  Include Directives (#include)$NL$
+$SPC$*/$NL$
+$NL$
+$INCLUDES$
+$NL$
+
+$ =====================================================================
+$ ã·ã³ãã«ã¨ä»®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®èª­è¾¼ã¿ã¨åå¦ç
+$ =====================================================================
+
+$
+$ ã·ã³ãã«ã¨ä»®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®èª­è¾¼ã¿
+$
+$ MO.BASEADDR[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­çªå°
+$ MO.LIMITADDR[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ä¸éçªå°
+$ MO.POFFSET[moid]ï¼ç©çã¢ãã¬ã¹ã¨ã®ãªãã»ãã
+$ MO_MEMTOP_LISTï¼ãµã¤ãºã0ã§ãªãã¡ã¢ãªãªãã¸ã§ã¯ãã®ãªã¹ã
+
+$IF !OMIT_STANDARD_MEMINIB$
+	$MO_MEMTOP_LIST = {}$
+	$memtop_table = SYMBOL("memtop_table")$
+	$offset = 0$
+	$FOREACH moid MO_START_LIST$
+		$IF MO.LINKER[moid]$
+			$MO.BASEADDR[moid] = START_SYMBOL(MO.MLABEL[moid])$
+			$MO.LIMITADDR[moid] = LIMIT_SYMBOL(MO.MLABEL[moid])$
+			$MO.POFFSET[moid] = 0$
+		$ELSE$
+			$MO.BASEADDR[moid] = PEEK(memtop_table + offset, sizeof_void_ptr)$
+			$offset = offset + sizeof_void_ptr$
+			$MO.LIMITADDR[moid] = (MO.BASEADDR[moid] + MO.SIZE[moid]) & ((1 << sizeof_void_ptr * 8) - 1)$
+			$IF LENGTH(MO.PADDR[moid])$
+				$MO.POFFSET[moid] = MO.PADDR[moid] - MO.BASEADDR[moid]$
+			$ELSE$
+				$MO.POFFSET[moid] = 0$
+			$END$
+		$END$
+
+		$IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+			$IF MO.BASEADDR[moid] < MO.LIMITADDR[moid]
+											|| MO.LIMITADDR[moid] == 0$
+				$MO_MEMTOP_LIST = APPEND(MO_MEMTOP_LIST, moid)$
+			$ELIF MO.TYPE[moid] == TOPPERS_ATTMEM$
+				$ERROR MO.TEXT_LINE[moid]$ 
+					$FORMAT(_("%1% `%2%\' is too large"),
+								"size", MO.SIZE[moid])$
+				$END$
+			$ELSE$
+				$ERROR MO.TEXT_LINE[moid]$
+					$FORMAT(_("illegal memory object size"))$
+				$END$
+			$END$
+$			// ã¿ã¼ã²ããä¾å­ã®ã¨ã©ã¼ãã§ãã¯ NOS0813
+			$IF ISFUNCTION("HOOK_ERRORCHECK_MEM_PASS4") && 
+   			    (MO.TYPE[moid] == TOPPERS_ATTMEM)$
+				$HOOK_ERRORCHECK_MEM_PASS4(moid)$
+			$END$
+		$END$
+	$END$
+$END$
+
+$
+$ ã¡ã¢ãªãªãã¸ã§ã¯ãã®éãªãã®ãã§ãã¯
+$
+$ MO.SUPPRESSLIMIT[moid]ï¼æ¬¡ã®ã¡ã¢ãªãªãã¸ã§ã¯ãã¨é£æ¥ãã¦ãã
+$ MO.MERGED[moid]ï¼ä½µåãããã¦ã¼ã¶ã¹ã¿ãã¯é åã®ä½µåå
+
+$ MO.MERGELAST[moid]ï¼ä½µåãããæå¾ã®ã¦ã¼ã¶ã¹ã¿ãã¯é åï¼ä½µåå
+ã®ã¡ã¢
+$                     ãªãªãã¸ã§ã¯ãã«è¨­å®ï¼
+$ MO_MEMTOP_ORDERï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ãã¼ã¹ã¢ãã¬ã¹é ã®ãªã¹ã
+
+$MO_MEMTOP_ORDER = {}$
+$prev = 0$
+$FOREACH moid SORT(MO_MEMTOP_LIST, "MO.BASEADDR")$
+$	// ã¦ã¼ã¶ã¹ã¿ãã¯é åã¯ä½µåãããåã®æ
+å ±ãç¨ãã¦ã¿ã¹ã¯ã¹ã¿ãã¯ã®MPUæ
+å ±çæ
+	$IF MO.TYPE[moid] == TOPPERS_USTACK$
+		$MO.NOMERGE_BASEADDR[moid] = MO.BASEADDR[moid]$
+		$MO.NOMERGE_LIMITADDR[moid] = MO.LIMITADDR[moid]$
+	$END$
+	$IF !prev || (MO.LIMITADDR[prev] <= MO.BASEADDR[moid]
+											&& MO.LIMITADDR[prev] != 0)$
+$		// ã¡ã¢ãªãªãã¸ã§ã¯ãã®é åã«éãªãããªãå ´å
+		$IF prev && MO.LIMITADDR[prev] == MO.BASEADDR[moid]$
+$			// ã¡ã¢ãªãªãã¸ã§ã¯ãã®é åãé£ç¶ãã¦ããå ´å
+			$IF MO.TYPE[moid] == TOPPERS_USTACK
+					&& MO.TYPE[prev] == TOPPERS_USTACK
+					&& MO.OSAPID[prev] == MO.OSAPID[moid]$
+$				// ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ä½µåå¦çï¼é£ç¶ãã¦ããå ´åï¼
+				$MO.BASE[moid] = MO.BASE[prev]$
+				$MO.BASEADDR[moid] = MO.BASEADDR[prev]$
+				$MO.SIZE[prev] = MO.LIMITADDR[moid] - MO.BASEADDR[prev]$
+				$MO.LIMITADDR[prev] = MO.LIMITADDR[moid]$
+				$MO.SIZE[moid] = MO.SIZE[prev]$
+				$MO.MERGED[moid] = prev$
+				$MO.MERGELAST[prev] = moid$
+			$ELSE$
+				$MO.SUPPRESSLIMIT[prev] = 1$
+				$MO_MEMTOP_ORDER = APPEND(MO_MEMTOP_ORDER, moid)$
+				$prev = moid$
+			$END$
+		$ELSE$
+$			// ã¡ã¢ãªãªãã¸ã§ã¯ãã®é åãé£ç¶ãã¦ããªãå ´å 
+			$MO_MEMTOP_ORDER = APPEND(MO_MEMTOP_ORDER, moid)$
+			$prev = moid$
+		$END$
+	$ELSE$
+$		// ã¡ã¢ãªãªãã¸ã§ã¯ãã®é åã«éãªããããå ´å
+		$IF MO.TYPE[moid] == TOPPERS_USTACK && !MO.LINKER[moid]
+			&& MO.TYPE[prev] == TOPPERS_USTACK && !MO.LINKER[prev]
+			&& MO.OSAPID[prev] == MO.OSAPID[moid]$
+$			// ã¦ã¼ã¶ã¹ã¿ãã¯é åã®ä½µåå¦çï¼éãªããããå ´åï¼ 
+			$MO.TSKID[prev] = 0$
+			$MO.TSKID[moid] = 0$
+			$MO.BASE[moid] = MO.BASE[prev]$
+			$MO.BASEADDR[moid] = MO.BASEADDR[prev]$
+			$IF MO.LIMITADDR[prev] < MO.LIMITADDR[moid]
+											&& MO.LIMITADDR[prev] != 0$
+				$MO.SIZE[prev] = MO.LIMITADDR[moid] - MO.BASEADDR[prev]$
+				$MO.LIMITADDR[prev] = MO.LIMITADDR[moid]$
+			$ELSE$
+				$MO.LIMITADDR[moid] = MO.LIMITADDR[prev]$
+			$END$
+			$MO.SIZE[moid] = MO.SIZE[prev]$
+			$MO.MERGED[moid] = prev$
+			$MO.MERGELAST[prev] = moid$
+		$ELSE$
+$			// ã¡ã¢ãªãªãã¸ã§ã¯ãã®é åã«éãªããããå ´å
+			$IF !(MO.TYPE[moid] == TOPPERS_USTACK && MO.TYPE[prev] == TOPPERS_USTACK)$
+$				// ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®åºå
+				$IF MO.TYPE[moid] == TOPPERS_ATTMEM$
+					$ERROR MO.TEXT_LINE[moid]$
+						$FORMAT(_("memory object overlaps with another memory object"))$
+					$END$
+				$ELIF MO.TYPE[prev] == TOPPERS_ATTMEM$
+					$ERROR MO.TEXT_LINE[prev]$
+						$FORMAT(_("memory object overlaps with another memory object"))$
+					$END$
+				$ELIF MO.TYPE[moid] == TOPPERS_USTACK$
+					$ERROR MO.TEXT_LINE[moid]$
+						$FORMAT(_("user stack area overlaps with another memory object"))$
+					$END$
+				$ELIF MO.TYPE[prev] == TOPPERS_USTACK$
+					$ERROR MO.TEXT_LINE[prev]$
+						$FORMAT(_("user stack area overlaps with another memory object"))$
+					$END$
+				$ELSE$
+					$ERROR MO.TEXT_LINE[moid]$
+						$FORMAT(_("memory objects overlap"))$
+					$END$
+				$END$
+			$END$
+		$END$
+	$END$
+$END$
+$IF MO.LIMITADDR[prev] == 0$
+	$MO.SUPPRESSLIMIT[prev] = 1$
+$END$
+
+$ =====================================================================
+$ ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+$ =====================================================================
+
+$IF ISFUNCTION("GENERATE_MEMINIB_TABLE")$
+$	// ã¿ã¼ã²ããä¾å­é¨ã®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯çæå¦çãå¼ã¶
+	$GENERATE_MEMINIB_TABLE()$
+$ELIF !OMIT_STANDARD_MEMINIB$
+$	// ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã«åºåããã¨ã³ããªã®æ±ºå®
+$
+$	// tnum_meminibï¼ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã«åºåããã¨ã³ããªæ°
+$	// genzeroï¼ã¢ãã¬ã¹0ã«å¯¾å¿ããã¨ã³ããªãåºåãã
+	$tnum_meminib = 0$
+	$prev = 0$
+	$FOREACH moid MO_MEMTOP_ORDER$
+		$IF !prev && MO.BASEADDR[moid] != 0$
+			$genzero = 1$
+			$tnum_meminib = tnum_meminib + 1$
+		$END$
+		$IF LENGTH(MO.SUPPRESSLIMIT[moid])$
+			$tnum_meminib = tnum_meminib + 1$
+		$ELSE$
+			$tnum_meminib = tnum_meminib + 2$
+		$END$
+		$prev = moid$
+	$END$
+
+$	// tsize_meminibã®å¦¥å½æ§ãã§ãã¯
+	$IF tsize_meminib < tnum_meminib$
+		$ERROR$$FORMAT(_("illegal memory object initialization block size"))$$END$
+	$END$
+
+$	// tnum_meminibã®çæ
+	const uint32 tnum_meminib = $tnum_meminib$U;$NL$
+	$NL$
+
+$	// memtop_tableã®çæ
+	void *const memtop_table[$tsize_meminib$] = {$NL$
+	$IF LENGTH(genzero)$
+		$TAB$0,$NL$
+	$END$
+	$JOINEACH moid MO_MEMTOP_ORDER ",\n"$
+		$IF MO.LINKER[moid]$
+			$TAB$&__start_$MO.MLABEL[moid]$
+			$SPC$/* $FORMAT("%x", MO.BASEADDR[moid])$ */
+			$IF !LENGTH(MO.SUPPRESSLIMIT[moid])$
+				 ,$NL$$TAB$&__limit_$MO.MLABEL[ALT(MO.MERGELAST[moid],moid)]$ 
+				$SPC$/* $FORMAT("%x", MO.LIMITADDR[moid])$ */
+			$END$
+		$ELSE$
+			$TAB$(void *)($MO.BASE[moid]$)
+			$SPC$/* $FORMAT("%x", MO.BASEADDR[moid])$ */
+			$IF !LENGTH(MO.SUPPRESSLIMIT[moid])$
+				,$NL$$TAB$(void *)(((uint8 *)($MO.BASE[moid]$)) + ($MO.SIZE[moid]$))
+				$SPC$/* $FORMAT("%x", MO.LIMITADDR[moid])$ */
+			$END$
+		$END$
+	$END$
+	$IF tnum_meminib < tsize_meminib$
+		$FOREACH i RANGE(tnum_meminib + 1, tsize_meminib)$
+			,$NL$$TAB$NULL
+		$END$
+	$END$$NL$
+	};$NL$
+	$NL$
+
+$	// meminib_tableã®çæ
+	const MEMINIB meminib_table[$tsize_meminib$] = {$NL$
+	$IF LENGTH(genzero)$
+		$TAB${ TA_NULL, TACP_KERNEL, TACP_KERNEL, TACP_KERNEL },$NL$
+	$END$
+	$JOINEACH moid MO_MEMTOP_ORDER ",\n"$
+		$TAB${
+		$IF MO.TYPE[moid] == TOPPERS_USTACK$
+			$SPC$TOPPERS_USTACK|($MO.MEMATR[moid]$),
+		$ELSE$
+			$IF MO.TYPE[moid] == TOPPERS_ATTMEM$
+				$SPC$TOPPERS_ATTMEM|($FORMAT("0x%xU", +MO.MEMATR[moid])$),
+			$ELSE$
+				$SPC$TOPPERS_ATTSEC|($FORMAT("0x%xU", +MO.MEMATR[moid])$),
+			$END$
+		$END$
+		$SPC$$MO.ACPTN_R[moid]$,
+		$SPC$$MO.ACPTN_W[moid]$,
+		$SPC$$MO.ACPTN_X[moid]$
+		$SPC$}
+		$IF !LENGTH(MO.SUPPRESSLIMIT[moid])$
+			,$NL$$TAB${ TA_NULL, TACP_KERNEL, TACP_KERNEL, TACP_KERNEL }
+		$END$
+	$END$
+	$IF tnum_meminib < tsize_meminib$
+		$FOREACH i RANGE(tnum_meminib + 1, tsize_meminib)$
+			,$NL$$TAB${ 0U, 0U, 0U, 0U }
+		$END$
+	$END$$NL$
+	};$NL$
+	$NL$
+$END$
+
+$
+$  dataã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+$
+$IF !OMIT_IDATA && LENGTH(DATASEC_LIST) && !LENGTH(DATASEC_LIST_OPTIMIZED)$
+$	// ãµã¤ãºã0ã§ãªãdataã»ã¯ã·ã§ã³ã®ãªã¹ãï¼MO_DATASEC_LISTï¼ãä½æ
+$	// ãã¹3ã§ä½æãã¦ããªãå ´åã«ã¯ï¼ããã§ä½æããï¼
+	$MO_DATASEC_LIST = {}$
+	$FOREACH moid DATASEC_LIST$
+		$IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+			$MO_DATASEC_LIST = APPEND(MO_DATASEC_LIST, moid)$
+		$END$
+	$END$
+$END$
+
+$IF !OMIT_STANDARD_DATASECINIB$
+	/*$NL$
+	$SPC$*	Data Section Management Functions$NL$
+	$SPC$*/$NL$
+	$NL$
+
+	$IF !OMIT_IDATA && LENGTH(DATASEC_LIST)$
+$	    // dataã»ã¯ã·ã§ã³åæåãã­ãã¯ã§ä½¿ãã·ã³ãã«ã®externå®£è¨
+        $FOREACH moid MO_DATASEC_LIST$
+            extern uint8 __start_$MO.SLABEL[moid]$;$NL$
+            extern uint8 __end_$MO.SLABEL[moid]$;$NL$
+            extern uint8 __start_$MO.ILABEL[moid]$;$NL$
+        $END$$NL$
+
+$	    // dataã»ã¯ã·ã§ã³ã®æ°
+        #define TNUM_DATASEC		$IF !OMIT_IDATA$$LENGTH(MO_DATASEC_LIST)$U$ELSE$0$END$$NL$
+        #define TNUM_DATASEC_TBL	$IF !OMIT_IDATA$$LENGTH(DATASEC_LIST)$U$ELSE$0$END$$NL$
+        $NL$
+
+        $IF ISFUNCTION("DEFINE_CONST_VAR")$
+            $DEFINE_CONST_VAR("const uint32", "tnum_datasec")$ = TNUM_DATASEC;$NL$
+        $ELSE$
+            const uint32 tnum_datasec = TNUM_DATASEC;$NL$
+        $END$
+        $NL$
+
+		$IF ISFUNCTION("DEFINE_CONST_VAR")$
+			$DEFINE_CONST_VAR("const DATASECINIB", "datasecinib_table[TNUM_DATASEC_TBL]")$ = {
+		$ELSE$
+			const DATASECINIB datasecinib_table[TNUM_DATASEC_TBL] = {
+		$END$
+		$IF LENGTH(MO_DATASEC_LIST)$
+			$NL$
+			$JOINEACH moid MO_DATASEC_LIST ",\n"$
+				$TAB${ &__start_$MO.SLABEL[moid]$, &__end_$MO.SLABEL[moid]$, 
+				&__start_$MO.ILABEL[moid]$ }
+			$END$$NL$
+		$ELSE$
+			{ 0U, 0U, 0U }
+		$END$
+		};$NL$
+	$ELSE$
+        const uint32 tnum_datasec = 0;$NL$
+		TOPPERS_EMPTY_LABEL(const DATASECINIB, datasecinib_table);$NL$
+	$END$$NL$
+$END$
+
+$
+$  bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+$
+$IF LENGTH(BSSSEC_LIST) && !LENGTH(BSSSEC_LIST_OPTIMIZED)$
+$	// ãµã¤ãºã0ã§ãªãbssã»ã¯ã·ã§ã³ã®ãªã¹ãï¼MO_BSSSEC_LISTï¼ãä½æ
+	$MO_BSSSEC_LIST = {}$
+	$FOREACH moid BSSSEC_LIST$
+		$IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+			$MO_BSSSEC_LIST = APPEND(MO_BSSSEC_LIST, moid)$
+		$END$
+	$END$
+$END$
+
+$IF !OMIT_STANDARD_BSSSECINIB$
+	/*$NL$
+	$SPC$*	BSS Section Management Functions$NL$
+	$SPC$*/$NL$
+	$NL$
+
+	$IF LENGTH(BSSSEC_LIST)$
+$	    // bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã§ä½¿ãã·ã³ãã«ã®externå®£è¨
+        $FOREACH moid MO_BSSSEC_LIST$
+            extern uint8 __start_$MO.SLABEL[moid]$;$NL$
+            extern uint8 __end_$MO.SLABEL[moid]$;$NL$
+        $END$$NL$
+
+$		// bssã»ã¯ã·ã§ã³ã®æ°
+		const uint32 tnum_bsssec = $LENGTH(MO_BSSSEC_LIST)$U;$NL$
+		$NL$
+
+$		// bssã»ã¯ã·ã§ã³åæåãã­ãã¯
+		const BSSSECINIB bsssecinib_table[$LENGTH(BSSSEC_LIST)$] = {
+		$IF LENGTH(MO_BSSSEC_LIST)$
+			$NL$
+			$JOINEACH moid MO_BSSSEC_LIST ",\n"$
+				$TAB${ &__start_$MO.SLABEL[moid]$, &__end_$MO.SLABEL[moid]$ }
+			$END$$NL$
+		$ELSE$
+			{ 0, 0 }
+		$END$
+		};$NL$
+	$ELSE$
+		const uint32 tnum_bsssec = 0U;$NL$
+		TOPPERS_EMPTY_LABEL(const BSSSECINIB, bsssecinib_table);$NL$
+	$END$$NL$
+$END$
+
+$ ã¿ã¼ã²ããä¾å­é¨ã§å¿
+è¦ãªMPUINFOBãåºåãã
+$GENERATE_TARGET_MPUINFOB()$
+
+$FOREACH moid MO_MEMTOP_LIST$
+$	// ã¦ã¼ã¶ã¹ã¿ãã¯é åã¯ä½µåãããåã®æ
+å ±ãç¨ãã¦ã¿ã¹ã¯ã¹ã¿ãã¯ã®MPUæ
+å ±çæ
+	$IF MO.TYPE[moid] == TOPPERS_USTACK$
+$		// ä½µåãããæ
+å ±ãéé¿ãã¦ï¼ã¿ã¹ã¯åæåãã­ãã¯çæå¾ã«å¾©å¸°
+		$tmp = MO.BASEADDR[moid]$
+		$MO.BASEADDR[moid] = MO.NOMERGE_BASEADDR[moid]$
+		$MO.NOMERGE_BASEADDR[moid] = tmp$
+		$tmp = MO.LIMITADDR[moid]$
+		$MO.LIMITADDR[moid] = MO.NOMERGE_LIMITADDR[moid]$
+		$MO.NOMERGE_LIMITADDR[moid] = tmp$
+	$END$
+$END$
+
+$ ã¿ã¹ã¯åæåãã­ãã¯ãåºåãã(kernel_common.tf)
+$GENERATE_TINIB_TABLE()$
+
+$FOREACH moid MO_MEMTOP_LIST$
+$	// ä½µåãããæ
+å ±ãå¾©å¸°
+	$IF MO.TYPE[moid] == TOPPERS_USTACK$
+		$MO.BASEADDR[moid] = MO.NOMERGE_BASEADDR[moid]$
+		$MO.LIMITADDR[moid] = MO.NOMERGE_LIMITADDR[moid]$
+	$END$
+$END$
+
+$ OSã¢ããªã±ã¼ã·ã§ã³åæåãã­ãã¯ãåºåãã(kernel_common.tf)
+$GENERATE_OSAPINIB_TABLE()$
+
+$FILE "kernel_mem.h"$
+/* kernel_mem.h */$NL$
+#ifndef TOPPERS_KERNEL_MEM_H$NL$
+#define TOPPERS_KERNEL_MEM_H$NL$
+/*$NL$
+$SPC$*  Include Directives (#include)$NL$
+$SPC$*/$NL$
+$NL$
+$INCLUDES$
+$NL$
+$NL$
+
+$IF !ISFUNCTION("GENERATE_MEMINIB_TABLE") && !OMIT_STANDARD_MEMINIB$
+$	// memtop_tableã§åç
+§ããã©ãã«ã®å®£è¨ã®çæ
+	$FOREACH moid MO_MEMTOP_ORDER$
+		$IF MO.LINKER[moid]$
+			extern uint8 __start_$MO.MLABEL[moid]$;$NL$
+			$IF !LENGTH(MO.SUPPRESSLIMIT[moid])$
+				extern uint8 __limit_$MO.MLABEL[ALT(MO.MERGELAST[moid],moid)]$;
+				$NL$
+			$END$
+		$END$
+	$END$$NL$
+$END$
+
+$ ã¿ã¹ã¯ã¹ã¿ãã¯é åãexternå®£è¨ãã(kernel_common.tf)
+$GENERATE_EXPORT_TSK_STK()$
+
+$ ã¿ã¹ã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_TSK()$
+
+$ OSAPç®¡çãã­ãã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_OSAPCB()$
+
+$ ã¿ã¹ã¯ç®¡çãã­ãã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_TCB()$
+
+#endif /* TOPPERS_KERNEL_MEM_H */$NL$
+
+$ =====================================================================
+$ ãªãã¸ã§ã¯ãç®¡çé åç­ã«é¢ããã¨ã©ã¼ãã§ãã¯
+$ =====================================================================
+
+$
+$ ã¡ã¢ãªé åãå«ãã¡ã¢ãªãªãã¸ã§ã¯ãã®ãµã¼ã
+$
+$FUNCTION SEARCH_MO$
+	$_base = ARGV[1]$
+	$_limit = (ARGV[1] + ARGV[2]) & ((1 << sizeof_void_ptr * 8) - 1)$
+	$IF _limit < _base && _limit != 0$
+		$RESULT = 0$
+	$ELSE$
+		$i = 1$
+		$j = LENGTH(MO_MEMTOP_ORDER)$
+		$found = 0$
+
+		$WHILE !found && i <= j$
+			$k = (i + j) / 2$
+			$_moid = AT(MO_MEMTOP_ORDER,k-1)$
+			$IF _base < MO.BASEADDR[_moid]$
+				$j = k - 1$
+			$ELIF _base >= MO.LIMITADDR[_moid] && MO.LIMITADDR[_moid] != 0$
+				$i = k + 1$
+			$ELSE$
+				$found = _moid$
+			$END$
+		$END$
+		$IF found && _limit > MO.LIMITADDR[found] && MO.LIMITADDR[found] != 0$
+			$found = 0$
+		$END$
+		$RESULT = found$
+	$END$
+$END$
+
+$
+$ ã¡ã¢ãªé åãã«ã¼ãã«å°ç¨ã®ã¡ã¢ãªãªãã¸ã§ã¯ãã«å«ã¾ãã¦ãããã®ãã§ãã¯
+$
+$FUNCTION CHECK_MEMOBJ_KERNEL$
+	$moid = SEARCH_MO(ARGV[1], ARGV[2])$
+	$IF moid && MO.ACPTN1[moid] == TACP_KERNEL
+				&& MO.ACPTN2[moid] == TACP_KERNEL$
+		$RESULT = 0$
+	$ELSE$		
+		$RESULT = 1$
+	$END$
+$END$
+
+$
+$ ã·ã¹ãã ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã¨ã¦ã¼ã¶ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯é åãï¼
+$ ã«ã¼ãã«å°ç¨ã®ã¡ã¢ãªãªãã¸ã§ã¯ãã«å«ã¾ãã¦ãããã®ãã§ãã¯
+$
+$IF !USE_TSKINICTXB$
+	$tinib = SYMBOL("tinib_table")$
+	$FOREACH tskid TSK.ID_LIST$
+		$sstk = PEEK(tinib + offsetof_TINIB_sstk, sizeof_void_ptr)$
+		$sstksz = PEEK(tinib + offsetof_TINIB_sstksz, sizeof_MemorySizeType)$
+		$IF CHECK_MEMOBJ_KERNEL(sstk, sstksz)$
+			$IF TSK.OSAPID[tskid] == TDOM_KERNEL$
+				$ERROR TSK.TEXT_LINE[tskid]$
+					$FORMAT(_("stack area of `%1%\' is not included in any kernel memory object"), tskid)$
+				$END$
+			$ELSE$
+				$ERROR TSK.TEXT_LINE[tskid]$
+					$FORMAT(_("system stack area of `%1%\' is not included in any kernel memory object"), tskid)$
+				$END$
+			$END$
+		$END$
+		$tinib = tinib + sizeof_TINIB$
+	$END$
+$END$
+
+$
+$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åãï¼ã«ã¼ãã«å°ç¨ã®ã¡ã¢ãªãªãã¸ã§
+$ ã¯ãã«å«ã¾ãã¦ãããã®ãã§ãã¯
+$
+$istk = PEEK(SYMBOL("_ostk"), sizeof_void_ptr)$
+$istksz = PEEK(SYMBOL("_ostksz"), sizeof_StackType)$
+$IF CHECK_MEMOBJ_KERNEL(istk, istksz)$
+	$ERROR OSTK.TEXT_LINE[1]$ 
+		$FORMAT(_("interrupt context stack area is not included in any kernel memory object"))$
+	$END$
+$END$
+
+$ =====================================================================
+$ ã¢ã©ã¤ã³ã¡ã³ãã¨NULLã§ãªããã«é¢ããã¨ã©ã¼ãã§ãã¯
+$ =====================================================================
+
+$
+$  ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯
+$
+$IF CHECK_STACK_ALIGN || CHECK_STACK_NONNULL$
+	$tinib = SYMBOL("tinib_table")$
+	$FOREACH tskid TSK.ID_LIST$
+$		// ã¿ã¹ã¯ã®ã·ã¹ãã ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ NOS1309
+		$IF USE_TSKINICTXB$
+			$sstk = GET_SSTK_TSKINICTXB(tinib)$
+		$ELSE$
+			$sstk = PEEK(tinib + offsetof_TINIB_sstk, sizeof_void_ptr)$
+		$END$
+		$IF CHECK_STACK_ALIGN && (sstk & (CHECK_STACK_ALIGN - 1)) != 0$
+			$IF TSK.OSAPID[tskid] == TDOM_KERNEL$
+				$ERROR TSK.TEXT_LINE[tskid]$
+					$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
+					"stk", TSK.STK[tskid], tskid, "OsTask")$$END$
+			$ELSE$
+				$ERROR TSK.TEXT_LINE[tskid]$
+					$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
+					"sstk", TSK.SSTK[tskid], tskid, "OsTask")$$END$
+			$END$
+		$END$
+		$IF CHECK_STACK_NONNULL && sstk == 0$
+			$IF TSK.OSAPID[tskid] == TDOM_KERNEL$
+				$ERROR TSK.TEXT_LINE[tskid]$
+					$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
+					"stk", TSK.STK[tskid], tskid, "OsTask")$$END$
+			$ELSE$
+				$ERROR TSK.TEXT_LINE[tskid]$
+					$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
+					"sstk", TSK.SSTK[tskid], tskid, "OsTask")$$END$
+			$END$
+		$END$
+
+$		// ã¿ã¹ã¯ã®ã¦ã¼ã¶ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ NOS1304
+		$IF !OSAP.TRUSTED[TSK.OSAPID[tskid]]$
+			$IF USE_TSKINICTXB$
+				$ustk = GET_USTK_TSKINICTXB(tinib)$
+			$ELSE$
+				$ustk = PEEK(tinib + offsetof_TINIB_ustk, sizeof_void_ptr)$
+			$END$
+			$IF CHECK_USTACK_ALIGN && (ustk & (CHECK_USTACK_ALIGN - 1)) != 0$
+				$ERROR TSK.TEXT_LINE[tskid]$
+					$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
+					"stk", TSK.STK[tskid], tskid, "OsTask")$$END$
+			$END$
+			
+$		//OSãçæãããªã¹ã¿ã¼ãã¿ã¹ã¯ã®å ´åã¯ã¦ã¼ã¶ã¹ã¿ãã¯ã®å
+é ­çªå°ãNULLã§ãè¯ã
+			$IF (CHECK_USTACK_NONNULL && ustk == 0) && tskid < tmin_os_restarttask$
+				$ERROR TSK.TEXT_LINE[tskid]$
+					$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
+					"stk", TSK.STK[tskid], tskid, "OsTask")$$END$
+			$END$
+		$END$
+
+		$tinib = tinib + sizeof_TINIB$
+	$END$
+
+$	// éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ NOS1301
+	$istk = PEEK(SYMBOL("_ostk"), sizeof_void_ptr)$
+	$IF CHECK_STACK_ALIGN && (istk & (CHECK_STACK_ALIGN - 1)) != 0$
+		$ERROR OSTK.TEXT_LINE[1]$
+			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
+			"istk", OSTK.STK[1], "OsOsStack")$$END$
+	$END$
+	$IF CHECK_STACK_NONNULL && istk == 0$
+		$ERROR OSTK.TEXT_LINE[1]$
+			$FORMAT(_("%1% `%2%\' in %3% is null"),
+			"istk", OSTK.STK[1], "OsOsStack")$$END$
+	$END$
+$END$
Index: /atk2-sc3-1.4.0-ntisr/kernel/kernel_opt.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/kernel_opt.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/kernel_opt.tf	(revision 172)
@@ -0,0 +1,335 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2011-2013 by Spansion LLC, USA
+$  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2011-2015 by Witz Corporation
+$  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+$  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+$  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+$  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: kernel_opt.tf 425 2015-12-07 08:06:19Z witz-itoyo $
+$
+
+$
+$  ãã¹2ããã®æ
+å ±ã®èª­è¾¼ã¿
+$
+$INCLUDE "cfg2_out.tf"$
+$INCLUDE "kernel/kernel_common.tf"$
+
+$
+$  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
+$
+$COPY_LMA()$
+
+$ =====================================================================
+$ kernel_mem3.cã®å
+±éé¨åã®çæ
+$ =====================================================================
+
+$FILE "kernel_mem3.c"$
+/* kernel_mem3.c */$NL$
+#include "kernel/kernel_int.h"$NL$
+#include "Os_Lcfg.h"$NL$
+#ifndef TOPPERS_EMPTY_LABEL$NL$
+#define TOPPERS_EMPTY_LABEL(x, y) x y[0]$NL$
+#endif$NL$
+$NL$
+
+/*$NL$
+$SPC$*  Include Directives (#include)$NL$
+$SPC$*/$NL$
+$NL$
+$INCLUDES$
+$NL$
+
+$ =====================================================================
+$ ã·ã³ãã«ã¨ä»®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®èª­è¾¼ã¿
+$ =====================================================================
+
+$
+$ ã·ã³ãã«ã¨ä»®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®èª­è¾¼ã¿
+$
+$ MO.BASEADDR[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­çªå°
+$ MO.LIMITADDR[moid]ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®ä¸éçªå°
+
+$IF !OMIT_STANDARD_MEMINIB$
+	$MO_MEMTOP_LIST = {}$
+	$memtop_table = SYMBOL("memtop_table")$
+	$offset = 0$
+	$FOREACH moid MO_START_LIST$
+		$IF MO.LINKER[moid]$
+			$MO.BASEADDR[moid] = START_SYMBOL(MO.MLABEL[moid])$
+			$MO.LIMITADDR[moid] = LIMIT_SYMBOL(MO.MLABEL[moid])$
+		$ELSE$
+			$MO.BASEADDR[moid] = PEEK(memtop_table + offset, sizeof_void_ptr)$
+			$offset = offset + sizeof_void_ptr$
+			$MO.LIMITADDR[moid] = (MO.BASEADDR[moid] + MO.SIZE[moid]) & ((1 << sizeof_void_ptr * 8) - 1)$
+		$END$
+	$END$
+$END$
+
+$ =====================================================================
+$ ä»®ã®ã¡ã¢ãªæ§æã»åæåãã¡ã¤ã«ã®çæ
+$ =====================================================================
+
+$
+$  ä»®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+$
+$IF ISFUNCTION("GENERATE_MEMINIB_TABLE")$
+$	// ã¿ã¼ã²ããä¾å­é¨ã®ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯çæå¦çãå¼ã¶
+	$GENERATE_MEMINIB_TABLE()$
+$ELIF !OMIT_STANDARD_MEMINIB$
+	$IF LENGTH(OPTIMIZE_MEMINIB)$
+$		// ã¢ãã¬ã¹0ãç½®ãé å
+		$tsize_meminib = 1$
+		$FOREACH moid MO_START_LIST$
+$			// ãµã¤ãºã0ã§ãªãã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­çªå°ãç½®ãé å
+			$IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+				$tsize_meminib = tsize_meminib + 1$
+			$END$
+			$IF !MO.LINKER[moid]$
+$				// ãªã³ã«ãé
+ç½®ããªãã¡ã¢ãªãªãã¸ã§ã¯ãã¯æçµçªå°ãå¿
+è¦
+				$tsize_meminib = tsize_meminib + 1$
+			$ELIF (MO.SEFLAG[MO.MOEND[moid]] & 0x80) != 0$
+$				// ã¡ã¢ãªãªã¼ã¸ã§ã³ã®æå¾ã®ã¡ã¢ãªãªãã¸ã§ã¯ãã¯æçµçªå°ãå¿
+è¦
+				$tsize_meminib = tsize_meminib + 1$
+			$END$
+		$END$
+
+$		// ã¿ã¼ã²ããä¾å­ã§tsize_meminibãè£æ­£ããå ´å
+		$IF ISFUNCTION("CALC_TSIZE_MEMINIB")$
+			$CALC_TSIZE_MEMINIB()$
+		$END$
+	$END$
+
+	const uint32 tnum_meminib = $tsize_meminib$U;$NL$
+	$NL$
+
+	void *const memtop_table[$tsize_meminib$] = {
+	$IF LENGTH(MO_START_LIST_NOLINKER)$
+		$NL$
+		$JOINEACH moid MO_START_LIST_NOLINKER ",\n"$
+			$TAB$(void *)($MO.BASE[moid]$)
+		$END$$NL$
+	$ELSE$
+		$SPC$0$SPC$
+	$END$
+	};$NL$
+	$NL$
+
+	const MEMINIB meminib_table[$tsize_meminib$] =
+	$SPC${{ TA_NULL, 0U, 0U, 0U }};$NL$
+	$NL$
+$END$
+
+$
+$  ä»®dataã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+$
+$IF LENGTH(OPTIMIZE_DATASEC_LIST) && !OMIT_IDATA && LENGTH(DATASEC_LIST)$
+$	// ä»®dataã»ã¯ã·ã§ã³åæåãã­ãã¯ã®ãµã¤ãºã®é©æ­£åå¦ç
+$	// ãµã¤ãºã0ã§ãªãdataã»ã¯ã·ã§ã³ã®ãªã¹ãï¼MO_DATASEC_LISTï¼ãä½æ
+	$MO_DATASEC_LIST = {}$
+	$FOREACH moid DATASEC_LIST$
+		$IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+			$MO_DATASEC_LIST = APPEND(MO_DATASEC_LIST, moid)$
+		$END$
+	$END$
+
+$	// ãã¹4ã«å¼ãæ¸¡ãæ
+å ±
+	$DATASEC_LIST = MO_DATASEC_LIST$
+	$DATASEC_LIST_OPTIMIZED = 1$
+$END$
+
+$
+$	// dataã»ã¯ã·ã§ã³ã®æ°ã¨dataã»ã¯ã·ã§ã³åæåãã­ãã¯
+$
+$IF !OMIT_STANDARD_DATASECINIB$
+	/*$NL$
+	$SPC$*	Data Section Management Functions$NL$
+	$SPC$*/$NL$
+	$NL$
+
+$	// dataã»ã¯ã·ã§ã³ã®æ°
+	#define TNUM_DATASEC	$IF !OMIT_IDATA$$LENGTH(DATASEC_LIST)$$ELSE$0$END$$NL$
+	$NL$
+
+	$IF ISFUNCTION("DEFINE_CONST_VAR")$
+		$DEFINE_CONST_VAR("const uint32", "tnum_datasec")$ = TNUM_DATASEC;$NL$
+	$ELSE$
+		const uint32 tnum_datasec = TNUM_DATASEC;$NL$
+	$END$
+	$NL$
+
+$	// dataã»ã¯ã·ã§ã³åæåãã­ãã¯
+	$IF !OMIT_IDATA  && LENGTH(DATASEC_LIST)$
+		$IF ISFUNCTION("DEFINE_CONST_VAR")$
+			$DEFINE_CONST_VAR("const DATASECINIB", "datasecinib_table[TNUM_DATASEC]")$ =
+		$ELSE$
+			const DATASECINIB datasecinib_table[TNUM_DATASEC] =
+		$END$
+		$SPC${{ 0U, 0U, 0U }};$NL$
+	$ELSE$
+		TOPPERS_EMPTY_LABEL(const DATASECINIB, datasecinib_table);$NL$
+		$NL$
+	$END$$NL$
+$END$
+
+$
+$  ä»®bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã®çæ
+$
+$IF LENGTH(OPTIMIZE_BSSSEC_LIST) && LENGTH(BSSSEC_LIST)$
+$	// ä»®bssã»ã¯ã·ã§ã³åæåãã­ãã¯ã®ãµã¤ãºã®é©æ­£åå¦ç
+$	// ãµã¤ãºã0ã§ãªãbssã»ã¯ã·ã§ã³ã®ãªã¹ãï¼MO_BSSSEC_LISTï¼ãä½æ
+	$MO_BSSSEC_LIST = {}$
+	$FOREACH moid BSSSEC_LIST$
+		$IF MO.BASEADDR[moid] != MO.LIMITADDR[moid]$
+			$MO_BSSSEC_LIST = APPEND(MO_BSSSEC_LIST, moid)$
+		$END$
+	$END$
+
+$	// ãã¹4ã«å¼ãæ¸¡ãæ
+å ±
+	$BSSSEC_LIST = MO_BSSSEC_LIST$
+	$BSSSEC_LIST_OPTIMIZED = 1$
+$END$
+
+$
+$	// bssã»ã¯ã·ã§ã³ã®æ°ã¨bssã»ã¯ã·ã§ã³åæåãã­ãã¯
+$
+$IF !OMIT_STANDARD_BSSSECINIB$
+	/*$NL$
+	$SPC$*	BSS Section Management Functions$NL$
+	$SPC$*/$NL$
+	$NL$
+
+$	// bssã»ã¯ã·ã§ã³åæåãã­ãã¯
+	$IF LENGTH(BSSSEC_LIST)$
+		const uint32 tnum_bsssec = $LENGTH(BSSSEC_LIST)$U;$NL$
+		const BSSSECINIB bsssecinib_table[$LENGTH(BSSSEC_LIST)$] =
+		$SPC${{ 0U, 0U }};$NL$
+	$ELSE$
+		const uint32 _kernel_tnum_bsssec = 0U;$NL$
+		TOPPERS_EMPTY_LABEL(const BSSSECINIB, bsssecinib_table);$NL$
+	$END$$NL$
+$END$
+
+$ ã¿ã¼ã²ããä¾å­é¨ã§å¿
+è¦ãªMPUINFOBãåºåãã
+$GENERATE_TARGET_MPUINFOB()$
+
+$ ã¿ã¹ã¯ã¹ã¿ãã¯é åãexternå®£è¨ãã(kernel_common.tf)
+$GENERATE_EXPORT_TSK_STK()$
+
+$ ã¿ã¹ã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_TSK()$
+
+$ OSAPç®¡çãã­ãã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_OSAPCB()$
+
+$ ã¿ã¹ã¯ç®¡çãã­ãã¯ãexternå®£è¨ãã(kernel_common.tf)
+$EXTERN_TCB()$
+
+$ ã¿ã¹ã¯åæåãã­ãã¯ãåºåãã(kernel_common.tf)
+$GENERATE_TINIB_TABLE()$
+
+$ OSã¢ããªã±ã¼ã·ã§ã³åæåãã­ãã¯ãåºåãã(kernel_common.tf)
+$GENERATE_OSAPINIB_TABLE()$
+
+$ =====================================================================
+$  ãã¹4ã«æ¸¡ãæ
+å ±ã®çæ
+$ =====================================================================
+
+$FILE "cfg3_out.tf"$
+$$ cfg3_out.tf$NL$
+$NL$
+
+$ tsize_meminibã®åºå
+$IF !OMIT_STANDARD_MEMINIB$
+	$$tsize_meminib = $tsize_meminib$$$$NL$
+	$NL$
+$END$
+
+$ DATASEC_LISTï¼MO_DATASEC_LISTï¼DATASEC_LIST_OPTIMIZEDã®åºå
+$$DATASEC_LIST = { $DATASEC_LIST$ }$$$NL$
+$IF LENGTH(DATASEC_LIST_OPTIMIZED)$
+	$$MO_DATASEC_LIST = { $MO_DATASEC_LIST$ }$$$NL$
+	$$DATASEC_LIST_OPTIMIZED = $DATASEC_LIST_OPTIMIZED$$$$NL$
+$END$
+$NL$
+
+$ BSSSEC_LISTï¼MO_BSSSEC_LISTï¼BSSSEC_LIST_OPTIMIZEDã®åºå
+$$BSSSEC_LIST = { $BSSSEC_LIST$ }$$$NL$
+$IF LENGTH(BSSSEC_LIST_OPTIMIZED)$
+	$$MO_BSSSEC_LIST = { $MO_BSSSEC_LIST$ }$$$NL$
+	$$BSSSEC_LIST_OPTIMIZED = $BSSSEC_LIST_OPTIMIZED$$$$NL$
+$END$
+$NL$
Index: /atk2-sc3-1.4.0-ntisr/kernel/memory.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/memory.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/memory.c	(revision 172)
@@ -0,0 +1,515 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: memory.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "interrupt.h"
+#include "memory.h"
+
+/*
+ *		ã¡ã¢ãªãªãã¸ã§ã¯ãç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+/*
+ *  ãã¬ã¼ã¹ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+
+#ifndef LOG_CHKISRMEMACS_ENTER
+#define LOG_CHKISRMEMACS_ENTER(ISRID, Address, Size)
+#endif /* LOG_CHKISRMEMACS_ENTER */
+
+#ifndef LOG_CHKISRMEMACS_LEAVE
+#define LOG_CHKISRMEMACS_LEAVE(ercd)
+#endif /* LOG_CHKISRMEMACS_LEAVE */
+
+#ifndef LOG_CHKTSKMEMACS_ENTER
+#define LOG_CHKTSKMEMACS_ENTER(TaskID, Address, Size)
+#endif /* LOG_CHKTSKMEMACS_ENTER */
+
+#ifndef LOG_CHKTSKMEMACS_LEAVE
+#define LOG_CHKTSKMEMACS_LEAVE(ercd)
+#endif /* LOG_CHKTSKMEMACS_LEAVE */
+
+
+/*
+ *  å
+é¨é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef USE_TSKINICTXB
+
+LOCAL_INLINE AccessType check_address_sstack(const MemoryStartAddressType base, MemorySizeType size, const TINIB *p_tinib);
+LOCAL_INLINE AccessType check_address_ustack(const MemoryStartAddressType base, MemorySizeType size, const TINIB *p_tinib);
+
+#endif /* USE_TSKINICTXB */
+
+/*
+ *  ã¿ã¹ã¯ã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ *  æå®ããã ã¿ã¹ã¯ ã® æå®ãããã¡ã¢ãªé åã®ã¢ã¯ã»ã¹æ¨©ããã§ãã¯ãã
+ */
+#ifdef TOPPERS_CheckTaskMemoryAccess
+
+AccessType
+CheckTaskMemoryAccess(TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size)
+{
+	AccessType	access;
+	StatusType	ercd;
+	TCB			*p_tcb;
+	boolean		over_region;
+
+	LOG_CHKTSKMEMACS_ENTER(TaskID, Address, Size);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKTASKMEMORYACCESS);
+	CHECK_ID(TaskID < tnum_task);
+	CHECK_VALUE(Size > 0U);
+
+	p_tcb = get_tcb(TaskID);
+
+	access = check_task_memory(p_tcb, Address, Size, &over_region);
+	CHECK_ILLEGAL_ADDRESS(over_region == FALSE);
+
+  exit_finish:
+	LOG_CHKTSKMEMACS_LEAVE(access);
+	return(access);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+	_errorhook_par2.adr = Address;
+	_errorhook_par3.sz = Size;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckTaskMemoryAccess);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	access = AP_NoAccess;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckTaskMemoryAccess */
+
+/*
+ *  ISRã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ *  æå®ããã ISR ã® æå®ãããã¡ã¢ãªé åã®ã¢ã¯ã»ã¹æ¨©ããã§ãã¯ãã
+ */
+#ifdef TOPPERS_CheckISRMemoryAccess
+
+AccessType
+CheckISRMemoryAccess(ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size)
+{
+	AccessType	access;
+	StatusType	ercd;
+	ISRCB		*p_isrcb;
+	boolean		over_region;
+
+	LOG_CHKISRMEMACS_ENTER(ISRID, Address, Size);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKISRMEMORYACCESS);
+	CHECK_ID(ISRID < tnum_isr2);
+	CHECK_VALUE(Size > 0U);
+
+	p_isrcb = get_isrcb(ISRID);
+
+	access = check_isr_memory(p_isrcb, Address, Size, &over_region);
+	CHECK_ILLEGAL_ADDRESS(over_region == FALSE);
+
+  exit_finish:
+	LOG_CHKISRMEMACS_LEAVE(access);
+	return(access);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.isrid = ISRID;
+	_errorhook_par2.adr = Address;
+	_errorhook_par3.sz = Size;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckISRMemoryAccess);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	access = AP_NoAccess;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckISRMemoryAccess */
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯é¢æ°
+ */
+
+/*
+ *  ã¹ã¿ãã¯ã¢ã¯ã»ã¹ãã§ãã¯æ¬ä½
+ */
+#ifdef TOPPERS_check_address_stack
+
+AccessType
+check_address_stack(const MemoryStartAddressType base, MemorySizeType size, const MemoryStartAddressType mobase, MemorySizeType mosize)
+{
+	AccessType result;
+	if (within_memobj(base, size, mobase, mosize) != FALSE) {
+		result = AP_Readable | AP_Writable | AP_StackSpace;
+	}
+	else {
+		result = NO_ACCESS;
+	}
+	return(result);
+}
+
+#endif /* TOPPERS_check_address_stack */
+
+#ifndef USE_TSKINICTXB
+
+LOCAL_INLINE AccessType
+check_address_sstack(const MemoryStartAddressType base, MemorySizeType size, const TINIB *p_tinib)
+{
+	return(check_address_stack(base, size, p_tinib->sstk, p_tinib->sstksz));
+}
+
+LOCAL_INLINE AccessType
+check_address_ustack(const MemoryStartAddressType base, MemorySizeType size, const TINIB *p_tinib)
+{
+	return(check_address_stack(base, size, p_tinib->ustk, p_tinib->ustksz));
+}
+
+#endif /* USE_TSKINICTXB */
+
+
+#ifndef OMIT_STANDARD_MEMINIB
+/*
+ *  ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®æ¤ç´¢
+ */
+#ifdef TOPPERS_search_meminib
+
+uint32
+search_meminib(MemoryStartAddressType addr)
+{
+	uint32 left, right, i;
+
+	left = 0U;
+	right = tnum_meminib - 1U;
+	while (left < right) {
+		i = (left + right + 1U) / 2U;
+		if (addr < (MemoryStartAddressType const) memtop_table[i]) {
+			right = i - 1U;
+		}
+		else {
+			left = i;
+		}
+	}
+	return(left);
+}
+
+#endif /* TOPPERS_search_meminib */
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯
+ *   ã¡ã¢ãªãã­ãã¯ã·ã§ã³åä½(OSã¢ããªã±ã¼ã·ã§ã³) ã§ã®ãã§ãã¯ãè¡ã
+ *
+ *  ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã®å ´åã¯ï¼ããã¯ã°ã©ã¦ã³ãããã§ãã¯ãã
+ *    ç¾å®è£
+ã§ã¯å
+¨é åã¢ã¯ã»ã¹å¯è½
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã®å ´åã¯ï¼ã¡ã¢ãªãªãã¸ã§ã¯ãã®å±æ§ãè¿å´ãã
+ */
+#ifdef TOPPERS_check_osap_memory
+
+AccessType
+check_osap_memory(OSAPCB *p_osapcb, const MemoryStartAddressType adr, MemorySizeType size)
+{
+	AccessType				access = AP_NoAccess;
+	const MEMINIB			*p_meminib;
+	uint32					pos;
+	uint32					btptn;
+	MemoryStartAddressType	sadr = adr;
+	MemoryStartAddressType	eadr = (MemoryStartAddressType) ((MemorySizeType) sadr + size);
+
+	if (p_osapcb->p_osapinib->osap_trusted != FALSE) {
+		access = probe_trusted_osap_mem(sadr, eadr);
+	}
+	else {
+
+		pos = search_meminib(sadr);
+		p_meminib = &(meminib_table[pos]);
+		if ((pos + 1U) < tnum_meminib) {
+			if (((uint8 *) eadr - 1) < (uint8 * const) memtop_table[pos + 1U]) {
+				btptn = p_osapcb->p_osapinib->btptn;
+				access |= ((p_meminib->acptnr & btptn) != 0U) ? AP_Readable   : AP_NoAccess;
+				access |= ((p_meminib->acptnw & btptn) != 0U) ? AP_Writable   : AP_NoAccess;
+				access |= ((p_meminib->acptnx & btptn) != 0U) ? AP_Executable : AP_NoAccess;
+			}
+		}
+	}
+	return(access);
+}
+
+#endif /* TOPPERS_check_osap_memory */
+
+/*
+ *  ISRã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯ã·ã¹ãã ãµã¼ãã¹(ã«ã¼ãã«å
+é¨ç¨)
+ */
+#ifdef TOPPERS_check_isr_memory
+
+AccessType
+check_isr_memory(ISRCB *p_isrcb, const MemoryStartAddressType adr, MemorySizeType size, boolean *over_region)
+{
+	AccessType				access = AP_NoAccess;
+	uint32					pos;
+	MemoryStartAddressType	sadr = adr;
+	MemorySizeType			memsize;
+
+	pos = search_meminib(sadr);
+	memsize = (MemorySizeType) (((uint8 *) (((pos + 1U) < tnum_meminib) ?
+											((uint8 * const) memtop_table[pos + 1U]) : 0U)) - (const uint8 *) adr);
+
+	/* ãªã¼ã¸ã§ã³ãè·¨ã£ããå¤å® */
+	if (size > memsize) {
+		*over_region = TRUE;
+	}
+	else {
+		*over_region = FALSE;
+		access = check_address_stack(adr, size, _ostk, _ostksz);
+	}
+
+	/* æ©è½ã¬ãã«2ã§ã¯C2ISRã¯ä¿¡é ¼ãããªãã®ã§ï¼å
+¨ã¢ã¯ã»ã¹å¯è½ã«ãã */
+	access |= (AP_Readable | AP_Writable | AP_Executable);
+
+	return(access);
+}
+
+#endif /* TOPPERS_check_isr_memory */
+
+/*
+ *  ã¿ã¹ã¯ã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯ã·ã¹ãã ãµã¼ãã¹(ã«ã¼ãã«å
+é¨ç¨)
+ */
+#ifdef TOPPERS_check_task_memory
+
+AccessType
+check_task_memory(const TCB *p_tcb, const MemoryStartAddressType adr, MemorySizeType size, boolean *over_region)
+{
+	AccessType				access = AP_NoAccess;
+	const MEMINIB			*p_meminib;
+	uint32					pos;
+	uint32					btptn;
+	MemoryStartAddressType	sadr = adr;
+	MemorySizeType			memsize;
+
+	pos = search_meminib(sadr);
+	memsize = (MemorySizeType) (((uint8 *) (((pos + 1U) < tnum_meminib) ?
+											((uint8 * const) memtop_table[pos + 1U]) : 0U)) - (const uint8 *) adr);
+
+	/* ãªã¼ã¸ã§ã³ãè·¨ã£ããå¤å® */
+	if (size > memsize) {
+		*over_region = TRUE;
+	}
+	else {
+		*over_region = FALSE;
+	}
+
+	if (p_tcb->p_tinib->p_osapcb->p_osapinib->osap_trusted != FALSE) {
+		access = check_address_sstack(adr, size, p_tcb->p_tinib);
+
+		/* ä¿¡é ¼ã¿ã¹ã¯ã®å ´åã¯å
+¨ã¢ã¯ã»ã¹å¯è½ */
+		access |= (AP_Readable | AP_Writable | AP_Executable);
+	}
+	else if (*over_region == FALSE) {
+		p_meminib = &(meminib_table[pos]);
+		if ((p_meminib->mematr & TOPPERS_USTACK) == 0U) {
+			btptn = p_tcb->p_tinib->p_osapcb->p_osapinib->btptn;
+			access |= ((p_meminib->acptnr & btptn) != 0U) ? AP_Readable   : AP_NoAccess;
+			access |= ((p_meminib->acptnw & btptn) != 0U) ? AP_Writable   : AP_NoAccess;
+			access |= ((p_meminib->acptnx & btptn) != 0U) ? AP_Executable : AP_NoAccess;
+		}
+		else {
+			access = check_address_ustack(adr, size, p_tcb->p_tinib);
+		}
+	}
+	else {
+		/* ä¸è¨ä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã(æ»ãå¤ï¼AP_NoAccess) */
+	}
+
+	return(access);
+}
+
+#endif /* TOPPERS_check_task_memory */
+#endif /* OMIT_STANDARD_MEMINIB */
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹æ¨©ã®ãã§ãã¯
+ */
+#ifdef TOPPERS_probe_memory_access
+
+AccessType
+probe_memory_access(const MemoryStartAddressType base, MemorySizeType size)
+{
+	AccessType				access;
+	boolean					dummy;
+	MemoryStartAddressType	base_adr = base;
+
+	if (run_trusted != FALSE) {
+		/* ç¹æ¨©ã¢ã¼ãã®å ´åã¯ï¼ããã¯ã°ã©ã¦ã³ãããã§ãã¯ãã */
+		access = probe_trusted_osap_mem(base, (MemoryStartAddressType) ((uint8 *) base_adr + size));
+	}
+	else {
+		access = check_task_memory(p_runtsk, base, size, &dummy);
+	}
+	return(access);
+}
+
+#endif /* TOPPERS_probe_memory_access */
+
+/*
+ *  ã¡ã¢ãªã¸ã®æ¸è¾¼ã¿æ¨©ã®ãã§ãã¯
+ */
+#ifdef TOPPERS_probe_memory_read
+
+boolean
+probe_memory_read(const MemoryStartAddressType base, MemorySizeType size)
+{
+	return((probe_memory_access(base, size) & AP_Readable) == AP_Readable);
+}
+
+#endif /* TOPPERS_probe_memory_read */
+
+/*
+ *  ã¡ã¢ãªã¸ã®æ¸è¾¼ã¿æ¨©ã®ãã§ãã¯
+ */
+#ifdef TOPPERS_probe_memory_write
+
+boolean
+probe_memory_write(const MemoryStartAddressType base, MemorySizeType size)
+{
+	return((probe_memory_access(base, size) & AP_Writable) == AP_Writable);
+}
+
+#endif /* TOPPERS_probe_memory_write */
+
+/*
+ *  ã¡ã¢ãªã«å¯¾ããèª­æ¸ãæ¨©ã®ãã§ãã¯
+ */
+#ifdef TOPPERS_probe_memory_read_write
+
+boolean
+probe_memory_read_write(const MemoryStartAddressType base, MemorySizeType size)
+{
+	return((probe_memory_access(base, size) & (AP_Readable | AP_Writable)) == (AP_Readable | AP_Writable));
+}
+
+#endif /* TOPPERS_probe_memory_read_write */
+
+/*
+ *  DATAã»ã¯ã·ã§ã³ã¨BSSã»ã¯ã·ã§ã³ã®åæå
+ */
+#ifdef TOPPERS_initialize_sections
+#ifndef OMIT_INITIALIZE_SECTIONS
+
+void
+initialize_sections(void)
+{
+	uint32				i;
+	uint8				*p_src, *p_dst;
+	const DATASECINIB	*p_datasecinib;
+	const BSSSECINIB	*p_bsssecinib;
+
+	for (i = 0U; i < tnum_datasec; i++) {
+		p_datasecinib = &(datasecinib_table[i]);
+		p_src = (uint8 *) p_datasecinib->start_idata;
+		for (p_dst = (uint8 *) p_datasecinib->start_data;
+			 ((const MemoryStartAddressType) p_dst) < (const MemoryStartAddressType) p_datasecinib->end_data; p_dst++) {
+			*p_dst = *p_src;
+			p_src++;
+		}
+	}
+	for (i = 0U; i < tnum_bsssec; i++) {
+		p_bsssecinib = &(bsssecinib_table[i]);
+		for (p_dst = (uint8 *) p_bsssecinib->start_bss;
+			 ((const MemoryStartAddressType) p_dst) < (const MemoryStartAddressType) p_bsssecinib->end_bss; p_dst++) {
+			*p_dst = 0U;
+		}
+	}
+}
+
+#endif /* OMIT_INITIALIZE_SECTIONS */
+#endif /* TOPPERS_initialize_sections */
Index: /atk2-sc3-1.4.0-ntisr/kernel/memory.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/memory.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/memory.h	(revision 172)
@@ -0,0 +1,253 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: memory.h 485 2015-12-17 08:21:50Z witz-itoyo $
+ */
+
+/*
+ *		ã¡ã¢ãªã¢ã¯ã»ã¹é¢é£æ©è½
+ */
+
+#ifndef TOPPERS_MEMORY_H
+#define TOPPERS_MEMORY_H
+
+#include "interrupt.h"
+#include "task.h"
+
+/*
+ *  ã¡ã¢ãªå±æ§ï¼ã«ã¼ãã«å
+é¨ã§ç¨ããï¼
+ */
+#define TOPPERS_ATTSEC	UINT_C(0x0100)  /* ATT_SEC/ATT_MODã§ç»é²ãããã¡ã¢ãªãªãã¸ã§ã¯ã */
+#define TOPPERS_ATTMEM	UINT_C(0x0200)  /* ATT_MEMã§ç»é²ãããã¡ã¢ãªãªãã¸ã§ã¯ã */
+#define TOPPERS_USTACK	UINT_C(0x0400)  /* ã¿ã¹ã¯/C2ISRã®ã¦ã¼ã¶ã¹ã¿ãã¯é å */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef	uint32 AccessPatternType;      /* ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³ */
+
+/*
+ *  ã¢ã¯ã»ã¹è¨±å¯ãã¿ã¼ã³
+ */
+#define TACP_KERNEL		((uint32) 0U)               /* ã«ã¼ãã«ãã¡ã¤ã³ã ãã«ã¢ã¯ã»ã¹ãè¨±å¯ */
+#define TACP_SHARED		(~(uint32) 0U)              /* ãã¹ã¦ã®ãã¡ã¤ã³ããã¢ã¯ã»ã¹ãè¨±å¯ */
+
+#ifndef OMIT_STANDARD_MEMINIB
+
+/*
+ *  ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯
+ */
+typedef struct memory_initialization_block {
+	AttributeType		mematr;         /* ã¡ã¢ãªãªãã¸ã§ã¯ãå±æ§ */
+	AccessPatternType	acptnr;         /* ãªã¼ãè¨±å¯ OSã¢ããªã±ã¼ã·ã§ã³ ããããã¿ã¼ã³ */
+	AccessPatternType	acptnw;         /* ã©ã¤ãè¨±å¯ OSã¢ããªã±ã¼ã·ã§ã³ ããããã¿ã¼ã³ */
+	AccessPatternType	acptnx;         /* å®è¡è¨±å¯   OSã¢ããªã±ã¼ã·ã§ã³ ããããã¿ã¼ã³ */
+} MEMINIB;
+
+/*
+ *  ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®æ°ï¼kernel_mem.cï¼
+ */
+extern const uint32		tnum_meminib;
+
+/*
+ *  ã¡ã¢ãªãªãã¸ã§ã¯ãã®å
+é ­çªå°ã®é åï¼kernel_mem.cï¼
+ */
+extern void * const	memtop_table[];
+
+/*
+ *  ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®é åï¼kernel_mem.cï¼
+ */
+extern const MEMINIB	meminib_table[];
+
+/*
+ *  ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ã®æ¤ç´¢
+ *
+ *  ã¡ã¢ãªãªãã¸ã§ã¯ãåæåãã­ãã¯ããï¼addrãå«ãã¡ã¢ãªãªãã¸ã§ã¯ã
+ *  ãæ¤ç´¢ãï¼ãã®ã¤ã³ããã¯ã¹ãè¿ã
+ */
+
+extern uint32 search_meminib(MemoryStartAddressType addr);
+
+#endif /* OMIT_STANDARD_MEMINIB */
+
+/*
+ *  ã¡ã¢ãªé åãã¡ã¢ãªãªãã¸ã§ã¯ãã«å«ã¾ãã¦ãããã®ãã§ãã¯
+ *
+ *  å
+é ­çªå°ãbaseã§ãµã¤ãºãsizeã®ã¡ã¢ãªé åãï¼å
+é ­çªå°ãmobaseã§ãµã¤
+ *  ãºãmosizeã®ã¡ã¢ãªãªãã¸ã§ã¯ãã«å«ã¾ãã¦ããå ´åã«TRUEï¼ããã§ãªã
+ *  å ´åã«FALSEãè¿ã
+ */
+
+LOCAL_INLINE boolean
+within_memobj(MemoryStartAddressType base, MemorySizeType size, MemoryStartAddressType mobase, MemorySizeType mosize)
+{
+	return((mobase <= base) && (size <= mosize)
+		   && (((MemorySizeType) base - (MemorySizeType) mobase) <= (mosize - size)));
+}
+
+/*
+ *  ã¹ã¿ãã¯ã¢ã¯ã»ã¹ãã§ãã¯æ¬ä½
+ */
+extern AccessType check_address_stack(const MemoryStartAddressType base, MemorySizeType size, const MemoryStartAddressType mobase, MemorySizeType mosize);
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯
+ */
+extern AccessType check_osap_memory(OSAPCB *p_osapcb, const MemoryStartAddressType adr, MemorySizeType size);
+
+/*
+ *  ISRã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯ã·ã¹ãã ãµã¼ãã¹(ã«ã¼ãã«å
+é¨ç¨)
+ */
+extern AccessType check_isr_memory(ISRCB *p_isrcb, const MemoryStartAddressType adr, MemorySizeType size, boolean *over_region);
+
+/*
+ *  ã¿ã¹ã¯ã¡ã¢ãªã¢ã¯ã»ã¹ãã§ãã¯ã·ã¹ãã ãµã¼ãã¹(ã«ã¼ãã«å
+é¨ç¨)
+ */
+extern AccessType check_task_memory(const TCB *p_tcb, const MemoryStartAddressType adr, MemorySizeType size, boolean *over_region);
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹æ¨©ã®ãã§ãã¯
+ */
+extern AccessType probe_memory_access(const MemoryStartAddressType base, MemorySizeType size);
+
+/*
+ *  ã¡ã¢ãªã¸ã®èª­è¾¼ã¿æ¨©ã®ãã§ãã¯
+ */
+extern boolean probe_memory_read(const MemoryStartAddressType base, MemorySizeType size);
+
+/*
+ *  ã¡ã¢ãªã¸ã®æ¸è¾¼ã¿æ¨©ã®ãã§ãã¯
+ */
+extern boolean probe_memory_write(const MemoryStartAddressType base, MemorySizeType size);
+
+/*
+ *  ã¡ã¢ãªã«å¯¾ããèª­æ¸ãæ¨©ã®ãã§ãã¯
+ */
+extern boolean probe_memory_read_write(const MemoryStartAddressType base, MemorySizeType size);
+
+/*
+ *  DATAã»ã¯ã·ã§ã³ã¨BSSã»ã¯ã·ã§ã³ã®åæå
+ */
+extern void initialize_sections(void);
+
+/*
+ *  ã¡ã¢ãªã¢ã¯ã»ã¹æ¨©ãã§ãã¯ã®ããã®ãã¯ã­
+ */
+#ifndef PROBE_MEM_WRITE
+#define PROBE_MEM_WRITE(p_var, type) \
+	(boolean) ((probe_memory_write((MemoryStartAddressType) (p_var), sizeof(type)) != FALSE) && (ALIGNED_TYPE(p_var, type) != FALSE))
+#endif /* PROBE_MEM_WRITE */
+
+#ifndef PROBE_MEM_RW
+#define PROBE_MEM_RW(p_var, type) \
+	(boolean) ((probe_memory_read_write((MemoryStartAddressType) (p_var), sizeof(type)) != FALSE) && (ALIGNED_TYPE(p_var, type) != FALSE))
+#endif /* PROBE_MEM_RW */
+
+/*
+ *  dataã»ã¯ã·ã§ã³åæåãã­ãã¯
+ */
+typedef struct {
+	void	*start_data;        /* dataã»ã¯ã·ã§ã³ã®å
+é ­çªå° */
+	void	*end_data;          /* dataã»ã¯ã·ã§ã³ã®çµäºçªå° */
+	void	*start_idata;       /* åæåãã¼ã¿é åã®å
+é ­çªå° */
+} DATASECINIB;
+
+/*
+ *  dataã»ã¯ã·ã§ã³ã®æ°ã¨åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_mem_2.cï¼
+ */
+extern const uint32			tnum_datasec;
+extern const DATASECINIB	datasecinib_table[];
+
+/*
+ *  bssã»ã¯ã·ã§ã³åæåãã­ãã¯
+ */
+typedef struct {
+	void	*start_bss;         /* bssã»ã¯ã·ã§ã³ã®å
+é ­çªå° */
+	void	*end_bss;           /* bssã»ã¯ã·ã§ã³ã®çµäºçªå° */
+} BSSSECINIB;
+
+/*
+ *  bssã»ã¯ã·ã§ã³ã®æ°ã¨åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_mem_2.cï¼
+ */
+extern const uint32		tnum_bsssec;
+extern const BSSSECINIB	bsssecinib_table[];
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_MEMORY_H_ */
Index: /atk2-sc3-1.4.0-ntisr/kernel/osap.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/osap.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/osap.c	(revision 172)
@@ -0,0 +1,1175 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: osap.c 483 2015-12-17 06:27:31Z ertl-ishikawa $
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "osap.h"
+#include "task.h"
+#include "interrupt.h"
+#include "counter.h"
+#include "alarm.h"
+#include "resource.h"
+#include "scheduletable.h"
+
+/*
+ *		OSã¢ããªã±ã¼ã·ã§ã³ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+/*
+ *  ãã¬ã¼ã¹ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_GETOSAPID_ENTER
+#define LOG_GETOSAPID_ENTER()
+#endif /* LOG_GETOSAPID_ENTER */
+
+#ifndef LOG_GETOSAPID_LEAVE
+#define LOG_GETOSAPID_LEAVE(id)
+#endif /* LOG_GETOSAPID_LEAVE */
+
+#ifndef LOG_GETAST_ENTER
+#define LOG_GETAST_ENTER(Application)
+#endif /* LOG_GETAST_ENTER */
+
+#ifndef LOG_GETAST_LEAVE
+#define LOG_GETAST_LEAVE(ercd, p_value)
+#endif /* LOG_GETAST_LEAVE */
+
+#ifndef LOG_CALTFN_ENTER
+#define LOG_CALTFN_ENTER(FunctionIndex)
+#endif /* LOG_CALTFN_ENTER */
+
+#ifndef LOG_CALTFN_LEAVE
+#define LOG_CALTFN_LEAVE(FunctionIndex)
+#endif /* LOG_CALTFN_LEAVE */
+
+#ifndef LOG_TFN_ENTER
+#define LOG_TFN_ENTER(FunctionIndex)
+#endif /* LOG_TFN_ENTER */
+
+#ifndef LOG_TFN_LEAVE
+#define LOG_TFN_LEAVE(FunctionIndex, ercd)
+#endif /* LOG_TFN_LEAVE */
+
+#ifndef LOG_CHKTSKACS_ENTER
+#define LOG_CHKTSKACS_ENTER(ApplID, TaskID)
+#endif /* LOG_CHKTSKACS_ENTER */
+
+#ifndef LOG_CHKTSKACS_LEAVE
+#define LOG_CHKTSKACS_LEAVE(access)
+#endif /* LOG_CHKTSKACS_LEAVE */
+
+#ifndef LOG_CHKISRACS_ENTER
+#define LOG_CHKISRACS_ENTER(ApplID, ISRID)
+#endif /* LOG_CHKISRACS_ENTER */
+
+#ifndef LOG_CHKISRACS_LEAVE
+#define LOG_CHKISRACS_LEAVE(access)
+#endif /* LOG_CHKISRACS_LEAVE */
+
+#ifndef LOG_CHKALMACS_ENTER
+#define LOG_CHKALMACS_ENTER(ApplID, AlarmID)
+#endif /* LOG_CHKALMACS_ENTER */
+
+#ifndef LOG_CHKALMACS_LEAVE
+#define LOG_CHKALMACS_LEAVE(access)
+#endif /* LOG_CHKALMACS_LEAVE */
+
+#ifndef LOG_CHKRESACS_ENTER
+#define LOG_CHKRESACS_ENTER(ApplID, ResID)
+#endif /* LOG_CHKRESACS_ENTER */
+
+#ifndef LOG_CHKRESACS_LEAVE
+#define LOG_CHKRESACS_LEAVE(access)
+#endif /* LOG_CHKRESACS_LEAVE */
+
+#ifndef LOG_CHKCNTACS_ENTER
+#define LOG_CHKCNTACS_ENTER(ApplID, CounterID)
+#endif /* LOG_CHKCNTACS_ENTER */
+
+#ifndef LOG_CHKCNTACS_LEAVE
+#define LOG_CHKCNTACS_LEAVE(access)
+#endif /* LOG_CHKCNTACS_LEAVE */
+
+#ifndef LOG_CHKSCHTBLACS_ENTER
+#define LOG_CHKSCHTBLACS_ENTER(ApplID, ScheduleTableID)
+#endif /* LOG_CHKSCHTBLACS_ENTER */
+
+#ifndef LOG_CHKSCHTBLACS_LEAVE
+#define LOG_CHKSCHTBLACS_LEAVE(access)
+#endif /* LOG_CHKSCHTBLACS_LEAVE */
+
+#ifndef LOG_CHKTSKOWN_ENTER
+#define LOG_CHKTSKOWN_ENTER(TaskID)
+#endif /* LOG_CHKTSKOWN_ENTER */
+
+#ifndef LOG_CHKTSKOWN_LEAVE
+#define LOG_CHKTSKOWN_LEAVE(owner)
+#endif /* LOG_CHKTSKOWN_LEAVE */
+
+#ifndef LOG_CHKISROWN_ENTER
+#define LOG_CHKISROWN_ENTER(ISRID)
+#endif /* LOG_CHKISROWN_ENTER */
+
+#ifndef LOG_CHKISROWN_LEAVE
+#define LOG_CHKISROWN_LEAVE(owner)
+#endif /* LOG_CHKISROWN_LEAVE */
+
+#ifndef LOG_CHKALMOWN_ENTER
+#define LOG_CHKALMOWN_ENTER(AlarmID)
+#endif /* LOG_CHKALMOWN_ENTER */
+
+#ifndef LOG_CHKALMOWN_LEAVE
+#define LOG_CHKALMOWN_LEAVE(owner)
+#endif /* LOG_CHKALMOWN_LEAVE */
+
+#ifndef LOG_CHKCNTOWN_ENTER
+#define LOG_CHKCNTOWN_ENTER(CounterID)
+#endif /* LOG_CHKCNTOWN_ENTER */
+
+#ifndef LOG_CHKCNTOWN_LEAVE
+#define LOG_CHKCNTOWN_LEAVE(owner)
+#endif /* LOG_CHKCNTOWN_LEAVE */
+
+#ifndef LOG_CHKSCHTBLOWN_ENTER
+#define LOG_CHKSCHTBLOWN_ENTER(ScheduleTableID)
+#endif /* LOG_CHKSCHTBLOWN_ENTER */
+
+#ifndef LOG_CHKSCHTBLOWN_LEAVE
+#define LOG_CHKSCHTBLOWN_LEAVE(owner)
+#endif /* LOG_CHKSCHTBLOWN_LEAVE */
+
+#ifndef LOG_ALLOWACCESS_ENTER
+#define LOG_ALLOWACCESS_ENTER()
+#endif /* LOG_ALLOWACCESS_ENTER */
+
+#ifndef LOG_ALLOWACCESS_LEAVE
+#define LOG_ALLOWACCESS_LEAVE(ercd)
+#endif /* LOG_ALLOWACCESS_LEAVE */
+
+#ifndef LOG_TERMINATEAPPLICATION_ENTER
+#define LOG_TERMINATEAPPLICATION_ENTER(Application, RestartOption)
+#endif /* LOG_TERMINATEAPPLICATION_ENTER */
+
+#ifndef LOG_TERMINATEAPPLICATION_LEAVE
+#define LOG_TERMINATEAPPLICATION_LEAVE(ercd)
+#endif /* LOG_TERMINATEAPPLICATION_LEAVE */
+
+#ifdef TOPPERS_force_term_osap
+/* å
+é¨é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */
+static void force_term_osap_main(void);
+#endif /* TOPPERS_force_term_osap */
+
+#ifdef TOPPERS_osap_initialize
+/*
+ *  å®è¡ä¸­ã®OSã¢ããªã±ã¼ã·ã§ã³
+ */
+OSAPCB *p_runosap;
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³ç®¡çãã­ãã¯åæå
+ */
+void
+osap_initialize(void)
+{
+	ApplicationType	i;
+	OSAPCB			*p_osapcb;
+
+	p_runosap = NULL;
+	for (i = 0U; i < tnum_osap; i++) {
+		p_osapcb = &osapcb_table[i];
+		p_osapcb->p_osapinib = &osapinib_table[i];
+		p_osapcb->osap_stat = APPLICATION_ACCESSIBLE;
+	}
+}
+
+#endif /* TOPPERS_osap_initialize */
+
+/*
+ *  å®è¡ç¶æ
+ã®OSã¢ããªã±ã¼ã·ã§ã³ IDåå¾
+ */
+#ifdef TOPPERS_GetApplicationID
+
+ApplicationType
+GetApplicationID(void)
+{
+	ApplicationType id;
+	StatusType		ercd;
+
+	LOG_GETOSAPID_ENTER();
+
+	CHECK_CALLEVEL(CALLEVEL_GETAPPLICATIONID);
+
+	id = (p_runosap == NULL) ? INVALID_OSAPPLICATION : OSAPID(p_runosap);
+
+  exit_finish:
+	LOG_GETOSAPID_LEAVE(id);
+	return(id);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+	call_errorhook(ercd, OSServiceId_GetApplicationID);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	id = INVALID_OSAPPLICATION;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_GetApplicationID */
+
+/*
+ *  ã¢ããªã±ã¼ã·ã§ã³ãå©ç¨å¯è½ãªç¶æ
+ã«ããã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_GetApplicationState
+
+StatusType
+GetApplicationState(ApplicationType Application, ApplicationStateRefType Value)
+{
+	StatusType	ercd = E_OK;
+	OSAPCB		*p_osapcb;
+
+	LOG_GETAST_ENTER(Application);
+
+	CHECK_CALLEVEL(CALLEVEL_GETAPPLICATIONSTATE);
+	CHECK_PARAM_POINTER(Value);
+	CHECK_MEM_WRITE(Value, ApplicationStateType);
+	CHECK_ID(Application < tnum_osap);
+
+	p_osapcb = get_osapcb(Application);
+	*Value = p_osapcb->osap_stat;
+
+  exit_no_errorhook:
+	LOG_GETAST_LEAVE(ercd, Value);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.applid = Application;
+	_errorhook_par2.p_appstat = Value;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetApplicationState);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_GetApplicationState */
+
+#ifdef TOPPERS_CallTrustedFunction
+
+StatusType
+CallTrustedFunction(TrustedFunctionIndexType FunctionIndex,
+					TrustedFunctionParameterRefType FunctionParams)
+{
+	StatusType		ercd = E_OK;
+	const TFINIB	*p_tfinib;
+	boolean			saved_run_trusted;
+#ifdef CFG_USE_PROTECTIONHOOK
+	boolean			saved_calltfn;
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+	LOG_CALTFN_ENTER(FunctionIndex);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CALLTRUSTEDFUNCTION);
+
+	/* ãã¡ã³ã¯ã·ã§ã³IDã®ãã§ãã¯ */
+	CHECK_SERVICEID(FunctionIndex < tnum_tfn);
+
+	/* ä½¿ç¨ããã¹ã¿ãã¯ã®ãã§ãã¯ */
+	p_tfinib = &(tfinib_table[FunctionIndex]);
+	ercd = trustedfunc_stack_check(p_tfinib->tf_stksz);
+	CHECK_NO_ERCD(ercd == E_OK);
+
+	saved_run_trusted = run_trusted;
+	run_trusted = TRUE;
+
+#ifdef CFG_USE_PROTECTIONHOOK
+	/* ä¿¡é ¼é¢æ°å¼ã³åºãä¸­ãã©ã°è¨­å® */
+	if (callevel_stat == TCL_TASK) {
+		saved_calltfn = p_runtsk->calltfn;
+		p_runtsk->calltfn = TRUE;
+	}
+	else {
+		saved_calltfn = p_runisr->calltfn;
+		p_runisr->calltfn = TRUE;
+	}
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+	LOG_TFN_ENTER(FunctionIndex);
+	/* ä¿¡é ¼é¢æ°å®è¡ */
+	ercd = p_tfinib->trs_func(FunctionIndex, FunctionParams);
+	LOG_TFN_LEAVE(FunctionIndex, ercd);
+
+#ifdef CFG_USE_STACKMONITORING
+	if ((callevel_stat & TCL_ISR2) != TCL_NULL) {
+		if ((*TOPPERS_ISTK_MAGIC_REGION(_ostk, _ostksz)) != STACK_MAGIC_NUMBER) {
+			x_nested_lock_os_int();
+			pre_protection_supervised = TRUE;
+			call_protectionhk_main(E_OS_STACKFAULT);
+			ASSERT_NO_REACHED;
+		}
+	}
+	else {
+		if ((*TOPPERS_SSTK_MAGIC_REGION(p_runtsk->p_tinib)) != STACK_MAGIC_NUMBER) {
+			x_nested_lock_os_int();
+			pre_protection_supervised = TRUE;
+			call_protectionhk_main_stkchg(E_OS_STACKFAULT);
+			ASSERT_NO_REACHED;
+		}
+	}
+#endif /* CFG_USE_STACKMONITORING */
+
+#ifdef CFG_USE_PROTECTIONHOOK
+	/* ä¿¡é ¼é¢æ°å¼ã³åºãä¸­ãã©ã°æ»ã */
+	if (callevel_stat == TCL_TASK) {
+		p_runtsk->calltfn = saved_calltfn;
+	}
+	else {
+		p_runisr->calltfn = saved_calltfn;
+	}
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+	run_trusted = saved_run_trusted;
+
+	/* ä¿¡é ¼é¢æ°ãã¨ã©ã¼ã«ãªã£ãå ´åãã¨ã©ã¼ããã¯ãå¼ã³åºã */
+	CHECK_NO_ERCD(ercd == E_OK);
+
+  exit_no_errorhook:
+	LOG_CALTFN_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tfnid = FunctionIndex;
+	_errorhook_par2.tfnpr = FunctionParams;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CallTrustedFunction);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_CallTrustedFunction */
+
+/*
+ *  ã¢ã¯ã»ã¹ãã§ãã¯é¢æ°
+ */
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³ã®ãªãã¸ã§ã¯ãã®ã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+
+/*
+ *  ãããããããã§ãã¯ãã¯ã­
+ *   ãã®ãã¡ã¤ã«å
+ã®ã¿ã§ä½¿ç¨ããããï¼ããã§å®ç¾©ãã¦ãã
+ */
+
+#define	CHECK_OSAP_ACS(p_osapinib, btmp)	(ObjectAccessType) ((((p_osapinib)->osap_trusted) != FALSE) || \
+																(((p_osapinib)->btptn & (btmp)) != 0U))
+
+/*
+ *  ã¿ã¹ã¯ç¨ã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckTaskAccess
+
+ObjectAccessType
+CheckTaskAccess(ApplicationType ApplID, TaskType TaskID)
+{
+	ObjectAccessType	access;
+	StatusType			ercd;
+	TCB					*p_tcb;
+
+	LOG_CHKTSKACS_ENTER(ApplID, TaskID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTACCESS);
+	CHECK_ID(ApplID < tnum_osap);
+	CHECK_ID(TaskID < tnum_task);
+
+	p_tcb = get_tcb(TaskID);
+
+	access = CHECK_OSAP_ACS(get_osapinib(ApplID), p_tcb->p_tinib->acsbtmp);
+
+  exit_finish:
+	LOG_CHKTSKACS_LEAVE(access);
+	return(access);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.applid = ApplID;
+	_errorhook_par2.tskid = TaskID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckTaskAccess);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	access = NO_ACCESS;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckTaskAccess */
+
+/*
+ *  ISRç¨ã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckISRAccess
+
+ObjectAccessType
+CheckISRAccess(ApplicationType ApplID, ISRType ISRID)
+{
+	ObjectAccessType	access;
+	StatusType			ercd;
+	ISRCB				*p_isrcb;
+
+	LOG_CHKISRACS_ENTER(ApplID, ISRID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTACCESS);
+	CHECK_ID(ApplID < tnum_osap);
+	CHECK_ID(ISRID < tnum_isr2);
+
+	p_isrcb = get_isrcb(ISRID);
+
+	access = CHECK_OSAP_ACS(get_osapinib(ApplID), p_isrcb->p_isrinib->acsbtmp);
+
+  exit_finish:
+	LOG_CHKISRACS_LEAVE(access);
+	return(access);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.applid = ApplID;
+	_errorhook_par2.isrid = ISRID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckISRAccess);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	access = NO_ACCESS;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckISRAccess */
+
+/*
+ *  ã¢ã©ã¼ã ç¨ã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckAlarmAccess
+
+ObjectAccessType
+CheckAlarmAccess(ApplicationType ApplID, AlarmType AlarmID)
+{
+	ObjectAccessType	access;
+	StatusType			ercd;
+	ALMCB				*p_almcb;
+
+	LOG_CHKALMACS_ENTER(ApplID, AlarmID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTACCESS);
+	CHECK_ID(ApplID < tnum_osap);
+	CHECK_ID(AlarmID < tnum_alarm);
+
+	p_almcb = get_almcb(AlarmID);
+
+	access = CHECK_OSAP_ACS(get_osapinib(ApplID), p_almcb->p_alminib->acsbtmp);
+
+  exit_finish:
+	LOG_CHKALMACS_LEAVE(access);
+	return(access);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.applid = ApplID;
+	_errorhook_par2.almid = AlarmID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckAlarmAccess);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	access = NO_ACCESS;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckAlarmAccess */
+
+/*
+ *  ãªã½ã¼ã¹ç¨ã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckResourceAccess
+
+ObjectAccessType
+CheckResourceAccess(ApplicationType ApplID, ResourceType ResID)
+{
+	ObjectAccessType	access;
+	StatusType			ercd;
+	RESCB				*p_rescb;
+
+	LOG_CHKRESACS_ENTER(ApplID, ResID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTACCESS);
+	CHECK_ID(ApplID < tnum_osap);
+	CHECK_ID(ResID < tnum_stdresource);
+
+	p_rescb = get_rescb(ResID);
+	access = CHECK_OSAP_ACS(get_osapinib(ApplID), p_rescb->p_resinib->acsbtmp);
+
+  exit_finish:
+	LOG_CHKRESACS_LEAVE(access);
+	return(access);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.applid = ApplID;
+	_errorhook_par2.resid = ResID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckResourceAccess);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	access = NO_ACCESS;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckResourceAccess */
+
+/*
+ *  ã«ã¦ã³ã¿ç¨ã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckCounterAccess
+
+ObjectAccessType
+CheckCounterAccess(ApplicationType ApplID, CounterType CounterID)
+{
+	ObjectAccessType	access;
+	StatusType			ercd;
+	CNTCB				*p_cntcb;
+
+	LOG_CHKCNTACS_ENTER(ApplID, CounterID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTACCESS);
+	CHECK_ID(ApplID < tnum_osap);
+	CHECK_ID(CounterID < tnum_counter);
+
+	p_cntcb = get_cntcb(CounterID);
+
+	access = CHECK_OSAP_ACS(get_osapinib(ApplID), p_cntcb->p_cntinib->acsbtmp);
+
+  exit_finish:
+	LOG_CHKCNTACS_LEAVE(access);
+	return(access);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.applid = ApplID;
+	_errorhook_par2.cntid = CounterID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckCounterAccess);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	access = NO_ACCESS;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckCounterAccess */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¨ã¢ã¯ã»ã¹æ¨©éãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckScheduleTableAccess
+
+ObjectAccessType
+CheckScheduleTableAccess(ApplicationType ApplID, ScheduleTableType ScheduleTableID)
+{
+	ObjectAccessType	access;
+	StatusType			ercd;
+	SCHTBLCB			*p_schtblcb;
+
+	LOG_CHKSCHTBLACS_ENTER(ApplID, ScheduleTableID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTACCESS);
+	CHECK_ID(ApplID < tnum_osap);
+	CHECK_ID(ScheduleTableID < tnum_scheduletable);
+
+	p_schtblcb = get_schtblcb(ScheduleTableID);
+
+	access = CHECK_OSAP_ACS(get_osapinib(ApplID), p_schtblcb->p_schtblinib->acsbtmp);
+
+  exit_finish:
+	LOG_CHKSCHTBLACS_LEAVE(access);
+	return(access);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.applid = ApplID;
+	_errorhook_par2.schtblid = ScheduleTableID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckScheduleTableAccess);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	access = NO_ACCESS;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckScheduleTableAccess */
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³ã®ãªãã¸ã§ã¯ãã®ææãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+
+/*
+ *  ã¿ã¹ã¯ç¨ãªãã¸ã§ã¯ãææãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckTaskOwnership
+
+ApplicationType
+CheckTaskOwnership(TaskType TaskID)
+{
+	ApplicationType	owner;
+	StatusType		ercd;
+	TCB				*p_tcb;
+
+	LOG_CHKTSKOWN_ENTER(TaskID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTOWNERSHIP);
+	CHECK_ID(TaskID < tnum_task);
+
+	p_tcb = get_tcb(TaskID);
+	owner = OSAPID(p_tcb->p_tinib->p_osapcb);
+
+  exit_finish:
+	LOG_CHKTSKOWN_LEAVE(owner);
+	return(owner);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckTaskOwnership);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	owner = INVALID_OSAPPLICATION;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckTaskOwnership */
+
+/*
+ *  ISRç¨ãªãã¸ã§ã¯ãææãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckISROwnership
+
+ApplicationType
+CheckISROwnership(ISRType ISRID)
+{
+	ApplicationType	owner;
+	StatusType		ercd;
+	ISRCB			*p_isrcb;
+
+	LOG_CHKISROWN_ENTER(ISRID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTOWNERSHIP);
+	CHECK_ID(ISRID < tnum_isr2);
+
+	p_isrcb = get_isrcb(ISRID);
+	owner = OSAPID(p_isrcb->p_isrinib->p_osapcb);
+
+  exit_finish:
+	LOG_CHKISROWN_LEAVE(owner);
+	return(owner);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.isrid = ISRID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckISROwnership);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	owner = INVALID_OSAPPLICATION;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckISROwnership */
+
+/*
+ *  ã¢ã©ã¼ã ç¨ãªãã¸ã§ã¯ãææãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckAlarmOwnership
+
+ApplicationType
+CheckAlarmOwnership(AlarmType AlarmID)
+{
+	ApplicationType	owner;
+	StatusType		ercd;
+	ALMCB			*p_almcb;
+
+	LOG_CHKALMOWN_ENTER(AlarmID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTOWNERSHIP);
+	CHECK_ID(AlarmID < tnum_alarm);
+
+	p_almcb = get_almcb(AlarmID);
+	owner = OSAPID(p_almcb->p_alminib->p_osapcb);
+
+  exit_finish:
+	LOG_CHKALMOWN_LEAVE(owner);
+	return(owner);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.almid = AlarmID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckAlarmOwnership);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	owner = INVALID_OSAPPLICATION;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckAlarmOwnership */
+
+/*
+ *  ã«ã¦ã³ã¿ç¨ãªãã¸ã§ã¯ãææãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckCounterOwnership
+
+ApplicationType
+CheckCounterOwnership(CounterType CounterID)
+{
+	ApplicationType	owner;
+	StatusType		ercd;
+	CNTCB			*p_cntcb;
+
+	LOG_CHKCNTOWN_ENTER(CounterID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTOWNERSHIP);
+	CHECK_ID(CounterID < tnum_counter);
+
+	p_cntcb = get_cntcb(CounterID);
+	owner = OSAPID(p_cntcb->p_cntinib->p_osapcb);
+
+  exit_finish:
+	LOG_CHKCNTOWN_LEAVE(owner);
+	return(owner);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.cntid = CounterID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckCounterOwnership);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	owner = INVALID_OSAPPLICATION;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckCounterOwnership */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¨ãªãã¸ã§ã¯ãææãã§ãã¯ã·ã¹ãã ãµã¼ãã¹
+ */
+#ifdef TOPPERS_CheckScheduleTableOwnership
+
+ApplicationType
+CheckScheduleTableOwnership(ScheduleTableType ScheduleTableID)
+{
+	ApplicationType	owner;
+	StatusType		ercd;
+	SCHTBLCB		*p_schtblcb;
+
+	LOG_CHKSCHTBLOWN_ENTER(ScheduleTableID);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHECKOBJECTOWNERSHIP);
+	CHECK_ID(ScheduleTableID < tnum_scheduletable);
+
+	p_schtblcb = get_schtblcb(ScheduleTableID);
+	owner = OSAPID(p_schtblcb->p_schtblinib->p_osapcb);
+
+  exit_finish:
+	LOG_CHKSCHTBLOWN_LEAVE(owner);
+	return(owner);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.schtblid = ScheduleTableID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_CheckScheduleTableOwnership);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	owner = INVALID_OSAPPLICATION;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_CheckScheduleTableOwnership */
+
+/*
+ *  èªOSAPãå©ç¨å¯è½ãªç¶æ
+ã«ãã
+ */
+#ifdef TOPPERS_AllowAccess
+
+StatusType
+AllowAccess(void)
+{
+	StatusType ercd = E_OK;
+
+	LOG_ALLOWACCESS_ENTER();
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_ALLOWACCESS);
+	/* ããã«æ¥ãå ´åp_runosap(èªOSAP)ãNULLã§ã¯ãªã */
+	CHECK_STATE(p_runosap->osap_stat == APPLICATION_RESTARTING);
+
+	x_nested_lock_os_int();
+
+	p_runosap->osap_stat = APPLICATION_ACCESSIBLE;
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_ALLOWACCESS_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+	call_errorhook(ercd, OSServiceId_AllowAccess);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_AllowAccess */
+
+/*
+ *  æå®OSAPãçµäº/åèµ·åãã
+ */
+#ifdef TOPPERS_TerminateApplication
+
+StatusType
+TerminateApplication(ApplicationType Application, RestartType RestartOption)
+{
+	StatusType	ercd = E_OK;
+	OSAPCB		*p_osapcb;
+
+	LOG_TERMINATEAPPLICATION_ENTER(Application, RestartOption);
+
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_TERMINATEAPPLICATION);
+	CHECK_ID((Application < tnum_osap) && (get_osapinib(Application)->osap_trusted == FALSE));
+	p_osapcb = get_osapcb(Application);
+	CHECK_VALUE((RestartOption == NO_RESTART) || ((RestartOption == RESTART) &&
+												  (p_osapcb->p_osapinib->p_restart_tcb->p_tinib->task != NULL)));
+
+	CHECK_ACCESS((run_trusted != FALSE) || (p_osapcb == p_runosap));
+
+	x_nested_lock_os_int();
+
+	S_D_CHECK_STATE((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+					((p_osapcb->osap_stat == APPLICATION_RESTARTING) &&
+					 (p_osapcb == p_runosap) && (RestartOption == NO_RESTART)));
+
+	force_term_osap(p_osapcb, RestartOption);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_TERMINATEAPPLICATION_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.applid = Application;
+	_errorhook_par2.restartoption = RestartOption;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_TerminateApplication);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_TerminateApplication */
+
+/*
+ *  æå®OSAPãçµäº/åèµ·åããå
+é¨é¢æ°
+ */
+#ifdef TOPPERS_force_term_osap
+
+static void
+force_term_osap_main(void)
+{
+	OSAPCB *p_osapcb;
+
+	p_osapcb = p_runosap;
+
+	force_term_osap_counter(p_osapcb);
+	force_term_osap_task(p_osapcb);
+
+	if (p_osapcb->osap_stat == APPLICATION_RESTARTING) {
+		(void) make_active(p_osapcb->p_osapinib->p_restart_tcb);
+	}
+	/* ä»®ã®ãªã¹ã¿ã¼ãã¿ã¹ã¯ã¯å½¹ç®ãçµãããããã­ã¥ã¼ã®å¦çãå®æ½ */
+	search_schedtsk();
+
+	/* ã¿ã¹ã¯ã³ã³ãã­ã¹ãã®è¨­å® */
+	callevel_stat = TCL_TASK;
+
+	if (sus_os_cnt > 0U) {
+		sus_os_cnt = 0U;
+		x_nested_unlock_os_int();
+	}
+	/* èªOSAPããå¼ã³åºãã®ããï¼å¼ã³åºãå
+ã«æ»ããªã */
+	exit_and_dispatch_nohook();
+}
+
+/*
+ *  ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®pcã«force_term_osap_mainã®ã¢ãã¬ã¹ãæ ¼ç´ãã
+ */
+void
+force_term_osap(OSAPCB *p_osapcb, RestartType RestartOption)
+{
+	TCB				*p_tcb;
+	PriorityType	remove_task_pri;
+
+	/* osap_statã®æ´æ° */
+	if (RestartOption == RESTART) {
+		p_osapcb->osap_stat = APPLICATION_RESTARTING;
+		if (p_osapcb->p_osapinib->p_restart_tcb->p_tinib->task == NULL) {
+			/* ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®è¨­å®ããªãã«ããããããï¼*/
+			/* RESTARTãªãã·ã§ã³ãè¨­å®ããå ´åã¯ã·ã£ãããã¦ã³ãå®æ½ãã */
+			internal_shutdownos(E_OS_PROTECTION_FATAL);
+		}
+	}
+	else {
+		p_osapcb->osap_stat = APPLICATION_TERMINATED;
+	}
+
+	force_term_osap_alarm(p_osapcb);
+	force_term_osap_schtbl(p_osapcb);
+    /*ISRãåæ­¢*/
+	force_term_osap_isr(p_osapcb);
+
+	p_tcb = p_osapcb->p_osapinib->p_restart_tcb;
+
+	/* ãªã¹ã¿ã¼ãã¿ã¹ã¯ãæ¢ã«READYç¶æ
+ã®å ´åã¯ã¬ãã£ã­ã¥ã¼ããåé¤ãã */
+	if (p_tcb->tstat == READY) {
+		/* ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®çµäº */
+		p_tcb->actcnt = 0U;
+#ifdef CFG_USE_PROTECTIONHOOK
+		p_tcb->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+		/* curpriã¨inipriãç°ãªãå¤ã§ã¬ãã£ã­ã¥ã¼ã«ç¹ããã¦ããå ´åã¸ã®å¯¾å¿ */
+		remove_task_pri = p_tcb->curpri;
+
+		/* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+		release_taskresources(p_tcb);
+
+		/* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+		cancel_taskcounters(p_tcb);
+
+		/* å¯¾è±¡ã¿ã¹ã¯ãSUSPENDç¶æ
+ã¨ãï¼ã¬ãã£ã­ã¥ã¼ããåé¤ãã */
+		p_tcb->tstat = SUSPENDED;
+		if (p_tcb != p_schedtsk) {
+			remove_task_from_queue(p_tcb, remove_task_pri);
+			/* p_schedtskãã­ã¥ã¼ã®å
+é ­ã«éé¿ */
+			move_schedtsk();
+		}
+	}
+	else if (p_schedtsk != NULL) {
+		/* p_schedtskãNULLã§ãªããã°ï¼ã­ã¥ã¼ã®å
+é ­ã«éé¿ */
+		move_schedtsk();
+	}
+	else {
+		/* p_schedtskãNULLã®å ´åã¯ä½ãããªã */
+	}
+
+	/* ãªã¹ã¿ã¼ãã¿ã¹ã¯ã®pcã«force_term_osap_mainã®ã¢ãã¬ã¹ãæ ¼ç´ */
+	activate_force_term_osap_main(p_tcb);
+
+	/* curpriãæé«åªå
+åº¦ã«å¤æ´ */
+	p_tcb->curpri = TPRI_MAXTASK;
+
+	/* p_schedtskã«p_restart_tcbãæ ¼ç´ */
+	p_schedtsk = p_tcb;
+
+#if 0
+	if ((callevel_stat & TCL_ISR2) != TCL_NULL) {
+		/* C2ISRããå¼ã³åºãããå ´åã¯,C2ISRã®åºå£å¦çã§ */
+		/* ãã£ã¹ããããè¡ãããï¼ããã§ã¯å®æ½ããªã    */
+	}
+	else if (p_osapcb != p_runosap) {
+		/* ä»ã®OSAPãçµäº/åèµ·åããå ´åã¯,ãã£ã¹ããããè¡ã */
+		dispatch();
+	}
+	else {
+		/* èªOSAPãçµäº/åèµ·åããå ´åã¯,å¼ã³åºãå
+ã«æ»ããªã */
+		exit_and_dispatch_nohook();
+	}
+#else
+	if (p_osapcb != p_runosap) {
+		/* ä»ã®OSAPãçµäº/åèµ·åããå ´å */
+        if ((callevel_stat & TCL_ISR2) != TCL_NULL) {
+            /* C2ISRããå¼ã³åºãããå ´åã¯,C2ISRã®åºå£å¦çã§ */
+            /* ãã£ã¹ããããè¡ãããï¼ããã§ã¯å®æ½ããªã    */
+        }
+        else {
+            /*ã¿ã¹ã¯ããå¼ã³åºãããå ´åã¯ãªã¹ã¿ã¼ãã¿ã¹ã¯ã«ãã£ã¹ããã*/
+            dispatch();
+        }
+    }
+	else {
+		/* èªOSAPãçµäº/åèµ·åããå ´åã¯,å¼ã³åºãå
+ã«æ»ããªã */
+        if (p_runisr != NULL) {
+            if (sus_os_cnt > 0U) {
+                sus_os_cnt = 0U;
+            }
+		    exit_and_dispatch_isr();
+        }
+        else {    
+		    exit_and_dispatch_nohook();
+        }
+	}
+#endif
+}
+
+#endif /* TOPPERS_force_term_osap */
Index: /atk2-sc3-1.4.0-ntisr/kernel/osap.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/osap.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/osap.h	(revision 172)
@@ -0,0 +1,197 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: osap.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		OSã¢ããªã±ã¼ã·ã§ã³ç®¡çæ©è½
+ */
+
+#ifndef TOPPERS_OSAP_H
+#define TOPPERS_OSAP_H
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³ã®å±æ§
+ */
+#define TA_NONTRUSTED			(FALSE)
+#define TA_TRUSTED				(TRUE)
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³IDããOSAPINIBãåãåºãããã®ãã¯ã­
+ */
+#define get_osapinib(osapid)	(&(osapinib_table[(osapid)]))
+
+/*
+ *  OSAPIDããOSAPCBãåãåºãããã®ãã¯ã­
+ */
+#define get_osapcb(osapid)		(&(osapcb_table[(osapid)]))
+
+/*
+ *  OSAPCBããOSã¢ããªã±ã¼ã·ã§ã³IDãåãåºãããã®ãã¯ã­
+ */
+#define OSAPID(p_osapcb)	((ApplicationType) ((p_osapcb) - osapcb_table))
+
+#ifndef TOPPERS_MACRO_ONLY
+
+typedef struct os_application_control_block OSAPCB;
+#include "task.h"
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³åæåãã­ãã¯
+ *
+ *  OSã¢ããªã±ã¼ã·ã§ã³ã«é¢ããæ
+å ±ãï¼OSã¢ããªã±ã¼ã·ã§ã³å¶å¾¡ãã­ãã¯ã¨
+ *  ãã¦å®ç¾©ãã
+ *  ä»ã®ãªãã¸ã§ã¯ãã¯ï¼ROMã«ç½®ãåæåãã­ãã¯ã¨RAMã«ç½®ãå¶å¾¡ãã­ãã¯
+ *  ã§æ§æããã¦ãããï¼OSã¢ããªã±ã¼ã·ã§ã³ã«é¢ããæ
+å ±ã¯å®è¡æã«å¤æ´ã
+ *  ãããã¨ããªãããï¼åæåãã­ãã¯ãå¶å¾¡ãã­ãã¯ã¨ãã¦ä½¿ç¨ãã
+ *
+ *  ATK2-SC3ã§ã¯ï¼ã¡ã¢ãªãã­ãã¯ã·ã§ã³æ©è½ã®ããã®æ
+å ±ãæããããï¼
+ *  ã¡ã¢ãªãã­ãã¯ã·ã§ã³å®è£
+ã¯CPUã«ä¾å­ããããï¼ã¡ã¢ãªãã­ãã¯ã·ã§ã³
+ *  æ
+å ±ã®æ¬ä½ã¯æ©ç¨®ä¾å­é¨ã«æããã
+ */
+typedef struct os_application_initialization_block {
+	TCB		*p_restart_tcb;                             /* OSAPã®ãªã¹ã¿ã¼ãã¿ã¹ã¯ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	boolean	osap_trusted;                               /* OSã¢ããªã±ã¼ã·ã§ã³ã®å±æ§ */
+	uint32	btptn;                                      /* éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã®ããããã¿ã¼ã³ */
+#ifndef OMIT_OSAPMPUINFOB
+	OSAPMPUINFOB osap_mpu;                              /* OSã¢ããªã±ã¼ã·ã§ã³ã®MPUæ
+å ± */
+#endif
+
+} OSAPINIB;
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³ç®¡çãã­ãã¯
+ */
+struct os_application_control_block {
+	const OSAPINIB			*p_osapinib;                /* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	ApplicationStateType	osap_stat;                  /* OSAPç¶æ
+ */
+};
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³æ°ãä¿æããå¤æ°ã®å®£è¨ï¼Os_Lcfg.cï¼
+ */
+extern const ApplicationType			tnum_osap;      /* OSã¢ããªã±ã¼ã·ã§ã³ã®æ° */
+
+extern const TrustedFunctionIndexType	tnum_tfn;       /* ä¿¡é ¼é¢æ°ã®æ° */
+
+typedef StatusType (*TrustedFunctionRefType)(TrustedFunctionIndexType FunctionIndex,
+											 TrustedFunctionParameterRefType FunctionParams);
+
+/*
+ *  ä¿¡é ¼é¢æ°åæåãã­ãã¯
+ */
+typedef struct trusted_function_initialization_block {
+	TrustedFunctionRefType	trs_func;   /* ä¿¡é ¼é¢æ°ã®èµ·åçªå° */
+	MemorySizeType			tf_stksz;   /* ã¹ã¿ãã¯ãµã¤ãº */
+} TFINIB;
+
+/*
+ *  OSAPCBã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern OSAPCB			osapcb_table[];
+
+/*
+ *  å®è¡ä¸­ã®OSã¢ããªã±ã¼ã·ã§ã³
+ */
+extern OSAPCB			*p_runosap;
+
+/*
+ *  OSAPINIBã®å¤é¨åç
+§ï¼kernel_mem.cï¼
+ */
+extern const OSAPINIB	osapinib_table[];
+
+/*
+ *  TFINIBã®å¤é¨åç
+§ï¼Os_Lcfg.cï¼
+ */
+extern const TFINIB		tfinib_table[];
+
+/*
+ *  æå®OSAPãçµäº/åèµ·åããé¢æ°(ãã­ãã¯ã·ã§ã³ããã¯ãããå¼ã°ãã)
+ */
+extern void force_term_osap(OSAPCB *p_osapcb, RestartType RestartOption);
+
+/*
+ *  OSã¢ããªã±ã¼ã·ã§ã³ç®¡çã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+extern void osap_initialize(void);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_OSAP_H_ */
Index: /atk2-sc3-1.4.0-ntisr/kernel/osctl.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/osctl.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/osctl.c	(revision 172)
@@ -0,0 +1,435 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: osctl.c 432 2015-12-09 11:54:28Z nces-okajima $
+ */
+
+/*
+ *		OSå¶å¾¡ã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "interrupt.h"
+#include "task.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+
+#ifndef LOG_ERRHOOK_ENTER
+#define LOG_ERRHOOK_ENTER(ercd)
+#endif /* LOG_ERRHOOK_ENTER */
+
+#ifndef LOG_ERRHOOK_LEAVE
+#define LOG_ERRHOOK_LEAVE()
+#endif /* LOG_ERRHOOK_LEAVE */
+
+#ifndef LOG_PROHOOK_ENTER
+#define LOG_PROHOOK_ENTER(ercd)
+#endif /* LOG_PROHOOK_ENTER */
+
+#ifndef LOG_PROHOOK_LEAVE
+#define LOG_PROHOOK_LEAVE(pret)
+#endif /* LOG_PROHOOK_LEAVE */
+
+#ifndef LOG_SHUTHOOK_ENTER
+#define LOG_SHUTHOOK_ENTER(ercd)
+#endif /* LOG_SHUTHOOK_ENTER */
+
+#ifndef LOG_SHUTHOOK_LEAVE
+#define LOG_SHUTHOOK_LEAVE()
+#endif /* LOG_SHUTHOOK_LEAVE */
+
+#ifndef LOG_STUTOS_ENTER
+#define LOG_STUTOS_ENTER(ercd)
+#endif /* LOG_STUTOS_ENTER */
+
+#ifndef LOG_STUTOS_LEAVE
+#define LOG_STUTOS_LEAVE()
+#endif /* LOG_STUTOS_LEAVE */
+
+#ifdef CFG_USE_ERRORHOOK
+/*
+ *  ã¨ã©ã¼ããã¯ã«æ¸¡ãæ
+å ±ãæ ¼ç´ããå¤æ°
+ */
+#ifdef TOPPERS_internal_call_errorhook
+
+#ifdef CFG_USE_GETSERVICEID
+DEFINE_VAR_SEC_NOBITS(OSServiceIdType, _errorhook_svcid, ".srpw_bss_kernel");
+#endif /* CFG_USE_GETSERVICEID */
+
+#ifdef CFG_USE_PARAMETERACCESS
+_ErrorHook_Par	_errorhook_par1;
+_ErrorHook_Par	_errorhook_par2;
+_ErrorHook_Par	_errorhook_par3;
+DEFINE_VAR_SEC_NOBITS(_ErrorHook_Par, errorhook_par1, ".srpw_bss_kernel");
+DEFINE_VAR_SEC_NOBITS(_ErrorHook_Par, errorhook_par2, ".srpw_bss_kernel");
+DEFINE_VAR_SEC_NOBITS(_ErrorHook_Par, errorhook_par3, ".srpw_bss_kernel");
+#endif /* CFG_USE_PARAMETERACCESS */
+
+/*
+ *  ã¨ã©ã¼ããã¯ã®å¼ã³åºã
+ */
+void
+internal_call_errorhook(StatusType ercd, OSServiceIdType svcid)
+{
+
+	boolean	saved_run_trusted = run_trusted;
+
+	if ((callevel_stat & (TCL_ERROR | TSYS_ISR1)) == TCL_NULL) {
+
+#ifdef CFG_USE_GETSERVICEID
+		_errorhook_svcid = svcid;
+#endif /* CFG_USE_GETSERVICEID */
+
+#ifdef CFG_USE_PARAMETERACCESS
+		errorhook_par1 = _errorhook_par1;
+		errorhook_par2 = _errorhook_par2;
+		errorhook_par3 = _errorhook_par3;
+#endif /* CFG_USE_PARAMETERACCESS */
+
+		ENTER_CALLEVEL(TCL_ERROR);
+		run_trusted = TRUE;
+
+		LOG_ERRHOOK_ENTER(ercd);
+		ErrorHook(ercd);
+		LOG_ERRHOOK_LEAVE();
+		LEAVE_CALLEVEL(TCL_ERROR);
+
+	}
+
+	run_trusted = saved_run_trusted;
+}
+
+#endif /* TOPPERS_internal_call_errorhook */
+
+#endif /* CFG_USE_ERRORHOOK */
+
+#ifdef CFG_USE_POSTTASKHOOK
+/*
+ *  ãã¹ãã¿ã¹ã¯ããã¯ã®å¼ã³åºã
+ */
+#ifdef TOPPERS_call_posttaskhook
+
+void
+call_posttaskhook(void)
+{
+	boolean saved_run_trusted;
+
+	ENTER_CALLEVEL(TCL_PREPOST);
+	saved_run_trusted = run_trusted;
+	run_trusted = TRUE;
+
+	PostTaskHook();
+
+	run_trusted = saved_run_trusted;
+
+	LEAVE_CALLEVEL(TCL_PREPOST);
+
+}
+
+#endif /* TOPPERS_call_posttaskhook */
+
+#endif /* CFG_USE_POSTTASKHOOK */
+
+#ifdef CFG_USE_PRETASKHOOK
+/*
+ *  ãã¬ã¿ã¹ã¯ããã¯ã®å¼ã³åºã
+ */
+#ifdef TOPPERS_call_pretaskhook
+
+void
+call_pretaskhook(void)
+{
+	boolean saved_run_trusted;
+
+	ENTER_CALLEVEL(TCL_PREPOST);
+	saved_run_trusted = run_trusted;
+	run_trusted = TRUE;
+
+	PreTaskHook();
+
+	run_trusted = saved_run_trusted;
+
+	LEAVE_CALLEVEL(TCL_PREPOST);
+
+}
+
+#endif /* TOPPERS_call_pretaskhook */
+
+#endif /* CFG_USE_PRETASKHOOK */
+
+#ifdef CFG_USE_STACKMONITORING
+
+#ifdef TOPPERS_init_stack_magic_region
+
+/*
+ *  ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ©è½ã®åæå
+ *  ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ©è½ã®ããã®ãã¸ãã¯ãã³ãã¼é åã®åæå
+ */
+void
+init_stack_magic_region(void)
+{
+	StackType *p_stack_magic_region;
+
+	/*
+	 *  ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ©è½ã®ããï¼ã¹ã¿ãã¯æé·æ¹åèæ
+®ãã
+	 *  éã¿ã¹ã¯ã¹ã¿ãã¯ã®ãã¸ãã¯ãã³ãã¼é åã®åæå
+	 */
+	p_stack_magic_region = TOPPERS_ISTK_MAGIC_REGION(_ostk, _ostksz);
+	*p_stack_magic_region = STACK_MAGIC_NUMBER;
+}
+
+#endif /* TOPPERS_init_stack_magic_region */
+
+#endif /* CFG_USE_STACKMONITORING */
+
+/*
+ *  ãã­ãã¯ã·ã§ã³ããã¯ã®å¼ã³åºã
+ *  å¼æ°ã®æä¸ä½ãããã¯ï¼å¼ã³åºãç®æãç¤ºãå½¹å²ããã
+ */
+#ifdef TOPPERS_call_protectionhk_main
+
+void
+call_protectionhk_main(StatusType protection_error)
+{
+#ifdef CFG_USE_PROTECTIONHOOK
+
+	boolean					saved_run_trusted;
+
+	ProtectionReturnType	pret;
+
+	/* ãã­ãã¯ã·ã§ã³ããã¯å®è¡ä¸­ã«ä¿è­·éåãçºçããå ´å */
+	if ((callevel_stat & TCL_PROTECT) == TCL_PROTECT) {
+		internal_shutdownos(E_OS_PROTECTION_FATAL);
+	}
+
+	/* ä»¥ä¸ ãã­ãã¯ã·ã§ã³ããã¯ãå¼åºãå¦ç */
+
+	ENTER_CALLEVEL(TCL_PROTECT);
+	saved_run_trusted = run_trusted;
+
+	run_trusted = TRUE;
+	LOG_PROHOOK_ENTER(protection_error);
+	pret = ProtectionHook(protection_error);
+	LOG_PROHOOK_LEAVE(pret);
+	run_trusted = saved_run_trusted;
+
+	LEAVE_CALLEVEL(TCL_PROTECT);
+
+	/* ä»¥ä¸ ProtectionHook å®è¡å¾ã®å¦ç */
+	switch (pret) {
+	case PRO_SHUTDOWN:
+		internal_shutdownos(protection_error);
+		break;
+	case PRO_TERMINATETASKISR:
+#if 0
+		if ((p_runtsk == NULL) || (pre_protection_supervised != FALSE)) {
+			/* ä¿¡é ¼é åããã®ããã¯æã¯ã·ã£ãããã¦ã³ */
+			internal_shutdownos(E_OS_PROTECTION_FATAL);
+		}
+		else {
+			/* ã¿ã¹ã¯ã®å ´å */
+			force_terminate_task(p_runtsk);
+		}
+#else /* 0 */
+		if ((p_runisr != NULL) || (pre_protection_supervised == FALSE)) {
+			/* éä¿¡é ¼ISRã®å ´å */
+			force_terminate_isr(p_runisr);
+		}
+		else if ((p_runtsk != NULL) || (pre_protection_supervised == FALSE)) {
+			/* éä¿¡é ¼ã¿ã¹ã¯ã®å ´å */
+			force_terminate_task(p_runtsk);
+		}
+		else {
+			/* ä¿¡é ¼é åããã®ããã¯æã¯ã·ã£ãããã¦ã³ */
+			internal_shutdownos(E_OS_PROTECTION_FATAL);
+		}
+#endif /* 0 */
+		break;
+	case PRO_IGNORE:
+		if (protection_error != E_OS_PROTECTION_EXCEPTION) {
+			internal_shutdownos(E_OS_PROTECTION_FATAL);
+		}
+		break;
+	case PRO_TERMINATEAPPL:
+		if ((p_runosap == NULL) || (pre_protection_supervised != FALSE)) {
+			internal_shutdownos(E_OS_PROTECTION_FATAL);
+		}
+		else {
+			force_term_osap(p_runosap, NO_RESTART);
+		}
+		break;
+	case PRO_TERMINATEAPPL_RESTART:
+		if ((p_runosap == NULL) || (pre_protection_supervised != FALSE)) {
+			internal_shutdownos(E_OS_PROTECTION_FATAL);
+		}
+		else {
+			force_term_osap(p_runosap, RESTART);
+		}
+		break;
+	default:
+		/* ProtectionHookããä¸æ­£ãªå¤ãè¿ã£ãå ´å */
+		internal_shutdownos(E_OS_PROTECTION_FATAL);
+		break;
+	}
+
+#else /* CFG_USE_PROTECTIONHOOK */
+
+	/*
+	 *  ãã­ãã¯ã·ã§ã³ããã¯ãã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³æã«ç¡å¹ã¨
+	 *  ããã¦ããå ´åï¼OSã¯ä¿è­·éåæå¦çã¨ãã¦OSã·ã£ãããã¦ã³ã
+	 *  è¡ã
+	 *  ãã®ã¨ãï¼OSã·ã£ãããã¦ã³ã®ãã©ã¡ã¼ã¿ã¨ãã¦ï¼
+	 *  éåã®åºå¥ãç¤ºãã¨ã©ã¼ã³ã¼ããæå®ãã
+	 */
+	internal_shutdownos(protection_error);
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+}
+
+#endif /* TOPPERS_call_protectionhk_main */
+
+/*
+ *  OSå
+é¨ããã®ShutdownOSã®å¼ã³åºã
+ */
+#ifdef TOPPERS_internal_shutdownos
+
+void
+internal_shutdownos(StatusType ercd)
+{
+	LOG_STUTOS_ENTER(ercd);
+
+	x_nested_lock_os_int();
+
+#ifdef CFG_USE_SHUTDOWNHOOK
+	call_shutdownhook(ercd);
+#endif /* CFG_USE_SHUTDOWNHOOK */
+
+	/* åã¢ã¸ã¥ã¼ã«ã®çµäºå¦ç */
+	object_terminate();
+
+	/* å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ç§»è¡ */
+	x_lock_all_int();
+
+	LOG_STUTOS_LEAVE();
+
+	/* ã¿ã¼ã²ããä¾å­ã®çµäºå¦ç */
+	target_exit();
+
+	/*
+	 * ã¿ã¼ã²ããä¾å­é¨ããå¦çãè¿ã£ã¦ããå ´åï¼
+	 * ç¡éã«ã¼ããè¡ã
+	 */
+	while (1) {
+	}
+
+}
+
+#endif /* TOPPERS_internal_shutdownos */
+
+#ifdef TOPPERS_internal_call_shtdwnhk
+
+#ifdef CFG_USE_SHUTDOWNHOOK
+
+void
+internal_call_shtdwnhk(StatusType ercd)
+{
+
+	/*
+	 *  ã·ã£ãããã¦ã³ããã¯ä¸­ã®ã·ã£ãããã¦ã³ã§ã¯ã·ã£ãããã¦ã³ããã¯
+	 *  ã¯å¼ã³åºããªã
+	 */
+	if ((callevel_stat & TCL_SHUTDOWN) == TCL_NULL) {
+
+		p_runosap = NULL;
+
+		/*
+		 *  ShutdownHook ã®å¼ã³åºã
+		 */
+		ENTER_CALLEVEL(TCL_SHUTDOWN);
+		run_trusted = TRUE;
+		LOG_SHUTHOOK_ENTER(ercd);
+		ShutdownHook(ercd);
+		LOG_SHUTHOOK_LEAVE();
+		LEAVE_CALLEVEL(TCL_SHUTDOWN);
+
+	}
+}
+#endif /* CFG_USE_SHUTDOWNHOOK */
+
+#endif /* TOPPERS_internal_call_shtdwnhk */
Index: /atk2-sc3-1.4.0-ntisr/kernel/osctl_manage.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/osctl_manage.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/osctl_manage.c	(revision 172)
@@ -0,0 +1,383 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: osctl_manage.c 464 2015-12-10 11:16:08Z witz-itoyo $
+ */
+
+/*
+ *		OSç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "interrupt.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_GETAAM_ENTER
+#define LOG_GETAAM_ENTER()
+#endif /* LOG_GETAAM_ENTER */
+
+#ifndef LOG_GETAAM_LEAVE
+#define LOG_GETAAM_LEAVE(mode)
+#endif /* LOG_GETAAM_LEAVE */
+
+#ifndef LOG_STAOS_ENTER
+#define LOG_STAOS_ENTER(mode)
+#endif /* LOG_STAOS_ENTER */
+
+#ifndef LOG_STAOS_LEAVE
+#define LOG_STAOS_LEAVE()
+#endif /* LOG_STAOS_LEAVE */
+
+#ifndef LOG_STAHOOK_ENTER
+#define LOG_STAHOOK_ENTER()
+#endif /* LOG_STAHOOK_ENTER */
+
+#ifndef LOG_STAHOOK_LEAVE
+#define LOG_STAHOOK_LEAVE()
+#endif /* LOG_STAHOOK_LEAVE */
+
+#ifdef TOPPERS_StartOS
+
+/*
+ *  OSå®è¡å¶å¾¡ã®ããã®å¤æ°
+ */
+uint16		callevel_stat = 0U;             /* å®è¡ä¸­ã®ã³ã³ãã­ã¹ã */
+AppModeType	appmodeid;                      /* ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãID */
+
+/*
+ *  ã«ã¼ãã«åä½ç¶æ
+ãã©ã°
+ */
+boolean		kerflg = FALSE;
+
+/*
+ *  ç¹æ¨©ã¢ã¼ãã§åä½ä¸­ããç¤ºããã©ã°
+ */
+boolean		run_trusted;
+
+boolean		pre_protection_supervised;
+
+#ifdef NTC2ISR
+StatusType  saved_ostkpt;
+#endif /* NTC2ISR */
+
+/*
+ *  ãã¡ã¤ã«åï¼è¡çªå·ã®åç
+§ç¨ã®å¤æ°
+ */
+const char8	*fatal_file_name = NULL;                    /* ãã¡ã¤ã«å */
+sint32		fatal_line_num = 0;                         /* è¡çªå· */
+
+/*
+ *  OSã®èµ·å
+ */
+
+void
+StartOS(AppModeType Mode)
+{
+
+	LOG_STAOS_ENTER(Mode);
+	if (kerflg != FALSE) {
+		/* OSèµ·åä¸­ã¯ã¨ã©ã¼ããã¯ãå¼ã¶ */
+#ifdef CFG_USE_ERRORHOOK
+		x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+		_errorhook_par1.mode = Mode;
+#endif /* CFG_USE_PARAMETERACCESS */
+		call_errorhook(E_OS_ACCESS, OSServiceId_StartOS);
+		x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+	}
+	else {
+
+		/* å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ç§»è¡ */
+		x_lock_all_int();
+
+#ifdef CFG_USE_STACKMONITORING
+		/*
+		 *  ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ©è½ã®åæå
+		 *  ã¹ã¿ãã¯ã¢ãã¿ãªã³ã°æ©è½ã®ããã®ãã¸ãã¯ãã³ãã¼é åã®åæå
+		 */
+		init_stack_magic_region();
+#endif /* CFG_USE_STACKMONITORING */
+
+		/* ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®è¨­å® */
+		appmodeid = Mode;
+
+		/* ã¿ã¼ã²ããä¾å­ã®åæå */
+		target_initialize();
+
+		/* åã¢ã¸ã¥ã¼ã«ã®åæå */
+		object_initialize();
+
+		callevel_stat = TCL_NULL;
+
+		/* ã«ã¼ãã«åä½ä¸­ */
+		kerflg = TRUE;
+
+		run_trusted = TRUE;
+
+		/*
+		 *  Modeãä¸æ­£ã§ãã£ãå ´åï¼OSã·ã£ãããã¦ã³ãè¡ã
+		 *  ãã®æï¼ã¹ã¿ã¼ãã¢ããããã¯ã¯å¼ã³åºãããªã
+		 */
+		if (Mode >= tnum_appmode) {
+			/*
+			 *  internal_shutdownosãå¼ã¶åã«OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã¸
+			 *  å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+è§£é¤
+			 */
+			x_nested_lock_os_int();
+			x_unlock_all_int();
+			internal_shutdownos(E_OS_MODE);
+		}
+
+#ifdef CFG_USE_STARTUPHOOK
+		/* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã«ãï¼å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+è§£é¤ */
+		x_nested_lock_os_int();
+		x_unlock_all_int();
+
+		/*
+		 *  StartupHook ã®å¼ã³åºã
+		 */
+		ENTER_CALLEVEL(TCL_STARTUP);
+		LOG_STAHOOK_ENTER();
+		StartupHook();
+		LOG_STAHOOK_LEAVE();
+		LEAVE_CALLEVEL(TCL_STARTUP);
+
+		/* å
+ã®å²è¾¼ã¿ãã¹ã¯åªå
+åº¦ã¨å
+¨å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã« */
+		x_lock_all_int();
+		x_nested_unlock_os_int();
+#endif /* CFG_USE_STARTUPHOOK */
+
+
+		ENTER_CALLEVEL(TCL_TASK);
+		LOG_STAOS_LEAVE();
+		start_dispatch();
+		ASSERT_NO_REACHED;
+	}
+}
+
+#endif /* TOPPERS_StartOS */
+
+/*
+ *  ç¾å¨ã®ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®åå¾
+ */
+#ifdef TOPPERS_GetActiveApplicationMode
+
+AppModeType
+GetActiveApplicationMode(void)
+{
+	AppModeType	appmode;
+	StatusType	ercd;
+
+	LOG_GETAAM_ENTER();
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_GETACTIVEAPPMODE);
+
+	appmode = appmodeid;
+
+  exit_finish:
+	LOG_GETAAM_LEAVE(appmode);
+	return(appmode);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+	/*
+	 *  ã¨ã©ã¼çºçæã¯INVALID_APPMODETYPEãè¿ããï¼ã¨ã©ã¼ãçºçããã®ãå®è¡ä¸­ã®
+	 *  C2ISRãå­å¨ããªãã®ãåºå¥ããããï¼ã¨ã©ã¼ããã¯ãå¼ã¶
+	 */
+	call_errorhook(ercd, OSServiceId_GetActiveApplicationMode);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	appmode = INVALID_APPMODETYPE;
+	goto exit_finish;
+}
+
+#endif /* TOPPERS_GetActiveApplicationMode */
+
+/*
+ *  OSã®çµäº
+ */
+#ifdef TOPPERS_ShutdownOS
+
+void
+ShutdownOS(StatusType Error)
+{
+	StatusType ercd = Error;
+
+	/*
+	 *  å¼åºãå
+æå± OSã¢ããªã±ã¼ã·ã§ã³ã®ä¿¡é ¼/éä¿¡é ¼ã®ãã§ãã¯
+	 *  å¼åºãå
+ãä¿¡é ¼é¢æ°ï¼ããã¯ã§ããå ´åã¯
+	 *  ShutdownOS() ãå®è¡ãã
+	 */
+	if (run_trusted == FALSE) {
+		/* éä¿¡é ¼ããå¼ã°ããå ´åã¯ã¨ã©ã¼ããã¯ãå¼ã¶ */
+#ifdef CFG_USE_ERRORHOOK
+		x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+		_errorhook_par1.error = Error;
+#endif /* CFG_USE_PARAMETERACCESS */
+		call_errorhook(E_OS_ACCESS, OSServiceId_ShutdownOS);
+		x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+	}
+	else {
+
+		/*
+		 *  ä¸æ­£ãªå¦çåä½ããå¼ã³åºããå ´åãï¼ErrorãE_OS_SHUTDOWN_FATALã¨ãã¦
+		 *  ShutdownOSãå¼ã³åºãããã®ã¨ãã¦ï¼ã·ã£ãããã¦ã³å¦çãè¡ã
+		 */
+		if (((callevel_stat & TCLMASK) | (CALLEVEL_SHUTDOWNOS)) != (CALLEVEL_SHUTDOWNOS)) {
+			ercd = E_OS_SHUTDOWN_FATAL;
+		}
+
+		/*
+		 *  OSã§å®ç¾©ããã¦ããªãã¨ã©ã¼ã³ã¼ããæå®ãããå ´åï¼ErrorãE_OS_SHUTDOWN_FATALã¨ãã¦
+		 *  ShutdownOSãå¼ã³åºãããã®ã¨ãã¦ï¼ã·ã£ãããã¦ã³å¦çãè¡ã
+		 */
+		if (ercd > ERRCODE_NUM) {
+			ercd = E_OS_SHUTDOWN_FATAL;
+		}
+
+		internal_shutdownos(ercd);
+	}
+}
+#endif /* TOPPERS_ShutdownOS */
+
+/*
+ *  ä¿è­·éåãèµ·ãããå¦çåä½ã®åå¾
+ */
+#ifdef TOPPERS_GetFaultyContext
+
+FaultyContextType
+GetFaultyContext(void)
+{
+	FaultyContextType faultycontext = FC_INVALID;
+
+#ifdef CFG_USE_PROTECTIONHOOK
+	if ((callevel_stat & CALLEVEL_GETFAULTYCONTEXT) != 0U) {
+
+		/* C1ISRä»¥å¤ã§çºç */
+		if ((callevel_stat & TSYS_ISR1) == 0U) {
+			if ((callevel_stat & (TCL_ERROR | TCL_PREPOST | TCL_STARTUP | TCL_SHUTDOWN)) != 0U) {
+				/* ããã¯ä¸­ã«çºç */
+				faultycontext = FC_SYSTEM_HOOK;
+			}
+			else if ((callevel_stat & TCL_ISR2) != 0U) {
+				if (p_runisr->calltfn != FALSE) {
+					/* C2ISRããå¼åºããä¿¡é ¼é¢æ°ä¸­ã«çºç */
+					faultycontext = FC_TRUSTED_FUNC;
+				}
+				else {
+					faultycontext = FC_C2ISR;
+				}
+			}
+			else if ((callevel_stat & TCL_TASK) != 0U) {
+				if (p_runtsk->calltfn != FALSE) {
+					/* ã¿ã¹ã¯ããå¼åºããä¿¡é ¼é¢æ°ä¸­ã«çºç */
+					faultycontext = FC_TRUSTED_FUNC;
+				}
+				else {
+					faultycontext = FC_TASK;
+				}
+			}
+			else {
+				/* ä¸è¨ä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã(æ»ãå¤ï¼FC_INVALID) */
+			}
+		}
+	}
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+	return(faultycontext);
+}
+#endif /* TOPPERS_GetFaultyContext */
Index: /atk2-sc3-1.4.0-ntisr/kernel/resource.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/resource.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/resource.c	(revision 172)
@@ -0,0 +1,261 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: resource.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ãªã½ã¼ã¹ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "interrupt.h"
+#include "resource.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_GETRES_ENTER
+#define LOG_GETRES_ENTER(resid)
+#endif /* LOG_GETRES_ENTER */
+
+#ifndef LOG_GETRES_LEAVE
+#define LOG_GETRES_LEAVE(ercd)
+#endif /* LOG_GETRES_LEAVE */
+
+#ifndef LOG_RELRES_ENTER
+#define LOG_RELRES_ENTER(resid)
+#endif /* LOG_RELRES_ENTER */
+
+#ifndef LOG_RELRES_LEAVE
+#define LOG_RELRES_LEAVE(ercd)
+#endif /* LOG_RELRES_LEAVE */
+
+/*
+ *  ãªã½ã¼ã¹ç®¡çæ©è½ã®åæå
+ */
+#ifdef TOPPERS_resource_initialize
+
+void
+resource_initialize(void)
+{
+	ResourceType	i;
+	RESCB			*p_rescb;
+
+	for (i = 0U; i < tnum_stdresource; i++) {
+		p_rescb = &(rescb_table[i]);
+		p_rescb->p_resinib = &(resinib_table[i]);
+		p_rescb->lockflg = FALSE;
+	}
+}
+
+#endif /* TOPPERS_resource_initialize */
+
+/*
+ *  ãªã½ã¼ã¹ã®ç²å¾
+ */
+#ifdef TOPPERS_GetResource
+
+StatusType
+GetResource(ResourceType ResID)
+{
+	StatusType		ercd = E_OK;
+	PriorityType	ceilpri, curpri;
+	RESCB			*p_rescb;
+
+	LOG_GETRES_ENTER(ResID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_GETRESOURCE);
+	CHECK_ID(ResID < tnum_stdresource);
+	p_rescb = get_rescb(ResID);
+	CHECK_RIGHT(p_rescb->p_resinib->acsbtmp);
+
+	ceilpri = p_rescb->p_resinib->ceilpri;
+	if (callevel_stat == TCL_TASK) {
+		CHECK_ACCESS(p_runtsk->p_tinib->inipri >= ceilpri);
+
+		x_nested_lock_os_int();
+		D_CHECK_ACCESS(p_rescb->lockflg == FALSE);
+		curpri = p_runtsk->curpri;
+		p_rescb->prevpri = curpri;
+		p_rescb->lockflg = TRUE;
+		p_rescb->p_prevrescb = p_runtsk->p_lastrescb;
+		p_runtsk->p_lastrescb = p_rescb;
+		if (ceilpri < curpri) {
+			p_runtsk->curpri = ceilpri;
+			if (ceilpri <= TPRI_MINISR) {
+				x_set_ipm(ceilpri);
+			}
+		}
+	}
+	else {
+		CHECK_ACCESS(GET_INTPRI(p_runisr) >= ceilpri);
+
+		x_nested_lock_os_int();
+		D_CHECK_ACCESS(p_rescb->lockflg == FALSE);
+		curpri = x_get_ipm();
+		p_rescb->prevpri = curpri;
+		p_rescb->lockflg = TRUE;
+		p_rescb->p_prevrescb = p_runisr->p_lastrescb;
+		p_runisr->p_lastrescb = p_rescb;
+		if (ceilpri < curpri) {
+			x_set_ipm(ceilpri);
+		}
+	}
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_GETRES_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.resid = ResID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetResource);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_GetResource */
+
+/*
+ *  ãªã½ã¼ã¹ã®è¿å´
+ */
+#ifdef TOPPERS_ReleaseResource
+
+StatusType
+ReleaseResource(ResourceType ResID)
+{
+	StatusType	ercd = E_OK;
+	RESCB		*p_rescb;
+
+	LOG_RELRES_ENTER(ResID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_RELEASERESOURCE);
+	CHECK_ID(ResID < tnum_stdresource);
+	p_rescb = get_rescb(ResID);
+	CHECK_RIGHT(p_rescb->p_resinib->acsbtmp);
+
+	if (callevel_stat == TCL_TASK) {
+		CHECK_NOFUNC(p_runtsk->p_lastrescb == p_rescb);
+
+		x_nested_lock_os_int();
+		if (p_rescb->prevpri <= TPRI_MINISR) {
+			x_set_ipm(p_rescb->prevpri);
+		}
+		else {
+			if (p_runtsk->curpri <= TPRI_MINISR) {
+				x_set_ipm((PriorityType) TIPM_ENAALL);
+			}
+		}
+		p_runtsk->curpri = p_rescb->prevpri;
+		p_runtsk->p_lastrescb = p_rescb->p_prevrescb;
+		p_rescb->lockflg = FALSE;
+		if (p_runtsk->curpri > nextpri) {
+			preempt();
+			dispatch();
+		}
+	}
+	else {
+		CHECK_NOFUNC(p_runisr->p_lastrescb == p_rescb);
+
+		x_nested_lock_os_int();
+		x_set_ipm(p_rescb->prevpri);
+		p_runisr->p_lastrescb = p_rescb->p_prevrescb;
+		p_rescb->lockflg = FALSE;
+	}
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_RELRES_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.resid = ResID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_ReleaseResource);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_ReleaseResource */
Index: /atk2-sc3-1.4.0-ntisr/kernel/resource.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/resource.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/resource.h	(revision 172)
@@ -0,0 +1,129 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: resource.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ãªã½ã¼ã¹ç®¡çæ©è½
+ */
+
+#ifndef TOPPERS_RESOURCE_H
+#define TOPPERS_RESOURCE_H
+
+/*
+ *  ãªã½ã¼ã¹ç®¡çåæåãã­ãã¯ï¼Os_Lcfg.cï¼
+ */
+typedef struct resource_initialization_block {
+	PriorityType ceilpri;
+
+	uint32 acsbtmp;                         /* ã¢ã¯ã»ã¹è¨±å¯OSã¢ããªã±ã¼ã·ã§ã³ ãããããã */
+} RESINIB;
+
+/*
+ *  ãªã½ã¼ã¹ç®¡çãã­ãã¯ï¼Os_Lcfg.cï¼
+ */
+typedef struct resource_control_block {
+	const RESINIB					*p_resinib;     /* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	PriorityType					prevpri;        /* ãªã½ã¼ã¹ç²å¾åã®åªå
+åº¦ */
+	struct resource_control_block	*p_prevrescb;   /* åã«ç²å¾ãããªã½ã¼ã¹ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	boolean							lockflg;        /* ãªã½ã¼ã¹ãåå¾ããã¦ããã°TRUE */
+} RESCB;
+
+/*
+ *  ãªã½ã¼ã¹æ°ãä¿æããå¤æ°ã®å®£è¨ï¼Os_Lcfg.cï¼
+ */
+extern const ResourceType	tnum_stdresource;           /* å
+é¨ãªã½ã¼ã¹ãé¤ããªã½ã¼ã¹æ° */
+
+/*
+ *  ãªã½ã¼ã¹åæåãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern const RESINIB		resinib_table[];
+
+/*
+ *  ãªã½ã¼ã¹ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern RESCB				rescb_table[];
+
+/*
+ *  ãªã½ã¼ã¹ç®¡çæ©è½ã®åæå
+ */
+extern void resource_initialize(void);
+
+/*
+ *  ãªã½ã¼ã¹ID ãã ãªã½ã¼ã¹ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define get_rescb(resid)	(&(rescb_table[(resid)]))
+
+#endif /* TOPPERS_RESOURCE_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/scheduletable.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/scheduletable.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/scheduletable.c	(revision 172)
@@ -0,0 +1,821 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: scheduletable.c 485 2015-12-17 08:21:50Z witz-itoyo $
+ */
+
+/*
+ *		ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "scheduletable.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_STASCHTBLREL_ENTER
+#define LOG_STASCHTBLREL_ENTER(schtblid, offset)
+#endif /* LOG_STASCHTBLREL_ENTER */
+
+#ifndef LOG_STASCHTBLREL_LEAVE
+#define LOG_STASCHTBLREL_LEAVE(ercd)
+#endif /* LOG_STASCHTBLREL_LEAVE */
+
+#ifndef LOG_STASCHTBLABS_ENTER
+#define LOG_STASCHTBLABS_ENTER(schtblid, start)
+#endif /* LOG_STASCHTBLABS_ENTER */
+
+#ifndef LOG_STASCHTBLABS_LEAVE
+#define LOG_STASCHTBLABS_LEAVE(ercd)
+#endif /* LOG_STASCHTBLABS_LEAVE */
+
+#ifndef LOG_STPSCHTBL_ENTER
+#define LOG_STPSCHTBL_ENTER(schtblid)
+#endif /* LOG_STPSCHTBL_ENTER */
+
+#ifndef LOG_STPSCHTBL_LEAVE
+#define LOG_STPSCHTBL_LEAVE(ercd)
+#endif /* LOG_STPSCHTBL_LEAVE */
+
+#ifndef LOG_NXTSCHTBL_ENTER
+#define LOG_NXTSCHTBL_ENTER(from, to)
+#endif /* LOG_NXTSCHTBL_ENTER */
+
+#ifndef LOG_NXTSCHTBL_LEAVE
+#define LOG_NXTSCHTBL_LEAVE(ercd)
+#endif /* LOG_NXTSCHTBL_LEAVE */
+
+#ifndef LOG_GETSCHTBLST_ENTER
+#define LOG_GETSCHTBLST_ENTER(schtblid)
+#endif /* LOG_GETSCHTBLST_ENTER */
+
+#ifndef LOG_GETSCHTBLST_LEAVE
+#define LOG_GETSCHTBLST_LEAVE(ercd, p_status)
+#endif /* LOG_GETSCHTBLST_LEAVE */
+
+#ifndef LOG_SCHTBL_ENTER
+#define LOG_SCHTBL_ENTER(p_schtblcb)
+#endif /* LOG_SCHTBL_ENTER */
+
+#ifndef LOG_SCHTBL_LEAVE
+#define LOG_SCHTBL_LEAVE(p_schtblcb)
+#endif /* LOG_SCHTBL_LEAVE */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãªãã¸ã§ã¯ãã®åæå
+ */
+#ifdef TOPPERS_schtbl_initialize
+
+void
+schtbl_initialize(void)
+{
+	ScheduleTableType	i;
+	SCHTBLCB			*p_schtblcb;
+	CNTCB				*p_cntcb;
+	TickType			staval;
+
+	for (i = 0U; i < tnum_scheduletable; i++) {
+		p_schtblcb = &(schtblcb_table[i]);
+		p_schtblcb->p_schtblinib = &(schtblinib_table[i]);
+
+		/*
+		 *  STOPPEDç¶æ
+ã«ããæï¼p_nextschtblcbï¼p_prevschtblcbãåæåãã
+		 *  RUNNINGï¼NEXTç¶æ
+ã«ããæï¼expptindexãåæåãã
+		 */
+		p_schtblcb->p_nextschtblcb = NULL;
+		p_schtblcb->p_prevschtblcb = NULL;
+		(p_schtblcb->cntexpinfo).expirefunc = &schtbl_expire;
+
+		if ((p_schtblcb->p_schtblinib->autosta & ((AppModeType) 1 << appmodeid)) != APPMODE_NONE) {
+			if (is_implschtbl(i)) {
+				p_schtblcb->status = SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS;
+			}
+			else {
+				p_schtblcb->status = SCHEDULETABLE_RUNNING;
+			}
+			p_schtblcb->expptindex = EXPPTINDEX_INITIAL;
+
+			p_cntcb = p_schtblcb->p_schtblinib->p_cntcb;
+			staval = p_schtblcb->p_schtblinib->staval;
+			if (p_schtblcb->p_schtblinib->actatr == ABSOLUTE) {
+				/*
+				 *  çµ¶å¯¾æéã®èµ·å
+				 *  æºäºæéã0ã®å ´åï¼æ¬¡ã®å¨æã®0ã®ã¿ã¤ãã³ã°ã¨ãªã
+				 *  ï¼get_abstickã«èæ
+®æ¸ã¿ï¼
+				 */
+				(p_schtblcb->cntexpinfo).expiretick = get_abstick(p_cntcb, staval);
+			}
+			else {
+				/* ç¸å¯¾æéã®èµ·å */
+				(p_schtblcb->cntexpinfo).expiretick = get_reltick(p_cntcb, staval);
+			}
+
+			insert_cnt_expr_que(&(p_schtblcb->cntexpinfo), p_cntcb);
+		}
+		else {
+			p_schtblcb->status = SCHEDULETABLE_STOPPED;
+
+			queue_initialize(&(p_schtblcb->cntexpinfo.cntexpque));
+		}
+	}
+}
+
+#endif /* TOPPERS_schtbl_initialize */
+
+/*
+ *  æå®ããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®éå§(ç¸å¯¾æé)
+ */
+#ifdef TOPPERS_StartScheduleTableRel
+
+StatusType
+StartScheduleTableRel(ScheduleTableType ScheduleTableID, TickType Offset)
+{
+	StatusType	ercd = E_OK;
+	SCHTBLCB	*p_schtblcb;
+	CNTCB		*p_cntcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_STASCHTBLREL_ENTER(ScheduleTableID, Offset);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_STARTSCHEDULETABLEREL);
+	CHECK_ID(ScheduleTableID < tnum_scheduletable);
+	CHECK_ID(ScheduleTableID >= tnum_implscheduletable);
+
+	p_schtblcb = get_schtblcb(ScheduleTableID);
+	CHECK_RIGHT(p_schtblcb->p_schtblinib->acsbtmp);
+
+	p_cntcb = p_schtblcb->p_schtblinib->p_cntcb;
+	CHECK_VALUE((Offset != 0U) &&
+				((p_cntcb->p_cntinib->maxval - p_schtblcb->p_schtblinib->p_exppt->offset) >= Offset));
+
+	p_osapcb = p_schtblcb->p_schtblinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* èµ·åããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+	S_D_CHECK_STATE(p_schtblcb->status == SCHEDULETABLE_STOPPED);
+
+	p_schtblcb->status = SCHEDULETABLE_RUNNING;
+	p_schtblcb->expptindex = EXPPTINDEX_INITIAL;
+	p_schtblcb->cntexpinfo.expiretick = get_reltick(p_cntcb, Offset);
+
+	insert_cnt_expr_que(&(p_schtblcb->cntexpinfo), p_cntcb);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_STASCHTBLREL_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.schtblid = ScheduleTableID;
+	_errorhook_par2.offset = Offset;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_StartScheduleTableRel);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_StartScheduleTableRel */
+
+/*
+ *  æå®ããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®éå§(çµ¶å¯¾æé)
+ */
+#ifdef TOPPERS_StartScheduleTableAbs
+
+StatusType
+StartScheduleTableAbs(ScheduleTableType ScheduleTableID, TickType Start)
+{
+	StatusType	ercd = E_OK;
+	SCHTBLCB	*p_schtblcb;
+	CNTCB		*p_cntcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_STASCHTBLABS_ENTER(ScheduleTableID, Start);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_STARTSCHEDULETABLEABS);
+	CHECK_ID(ScheduleTableID < tnum_scheduletable);
+
+	p_schtblcb = get_schtblcb(ScheduleTableID);
+	CHECK_RIGHT(p_schtblcb->p_schtblinib->acsbtmp);
+
+	p_cntcb = p_schtblcb->p_schtblinib->p_cntcb;
+	CHECK_VALUE(p_cntcb->p_cntinib->maxval >= Start);
+
+	p_osapcb = p_schtblcb->p_schtblinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* èµ·åããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+	S_D_CHECK_STATE(p_schtblcb->status == SCHEDULETABLE_STOPPED);
+
+	/* æé»åæã®å ´åï¼åæåä½ç¶æ
+ã§åä½ãã */
+	if (is_implschtbl(ScheduleTableID)) {
+		p_schtblcb->status = SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS;
+	}
+	else {
+		p_schtblcb->status = SCHEDULETABLE_RUNNING;
+	}
+	p_schtblcb->expptindex = EXPPTINDEX_INITIAL;
+	p_schtblcb->cntexpinfo.expiretick = get_abstick(p_cntcb, Start);
+
+	insert_cnt_expr_que(&(p_schtblcb->cntexpinfo), p_cntcb);
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_STASCHTBLABS_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.schtblid = ScheduleTableID;
+	_errorhook_par2.start = Start;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_StartScheduleTableAbs);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_StartScheduleTableAbs */
+
+/*
+ *  æå®ããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®åæ­¢
+ */
+#ifdef TOPPERS_StopScheduleTable
+
+StatusType
+StopScheduleTable(ScheduleTableType ScheduleTableID)
+{
+	StatusType	ercd = E_OK;
+	SCHTBLCB	*p_schtblcb, *p_nextcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_STPSCHTBL_ENTER(ScheduleTableID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_STOPSCHEDULETABLE);
+	CHECK_ID(ScheduleTableID < tnum_scheduletable);
+
+	p_schtblcb = get_schtblcb(ScheduleTableID);
+
+	CHECK_RIGHT(p_schtblcb->p_schtblinib->acsbtmp);
+
+	p_osapcb = p_schtblcb->p_schtblinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* èµ·åããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+	S_D_CHECK_NOFUNC(p_schtblcb->status != SCHEDULETABLE_STOPPED);
+
+	/*
+	 *  æå®ãããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãSCHEDULETABLE_NEXTã®å ´å,
+	 *  èªåãNextã«ããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ããï¼èªåãå¤ã
+	 */
+	if (p_schtblcb->status == SCHEDULETABLE_NEXT) {
+		p_schtblcb->p_prevschtblcb->p_nextschtblcb = NULL;
+		p_schtblcb->p_prevschtblcb = NULL;
+	}
+	else {
+		/*
+		 *  Nextã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãå­å¨ããå ´å,
+		 *  Nextã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®äºç´ãã­ã£ã³ã»ã«ãã
+		 */
+		p_nextcb = p_schtblcb->p_nextschtblcb;
+		if (p_nextcb != NULL) {
+			p_nextcb->status = SCHEDULETABLE_STOPPED;
+			p_nextcb->p_prevschtblcb = NULL;
+			p_schtblcb->p_nextschtblcb = NULL;
+		}
+
+		/* ã«ã¦ã³ã¿æºäºã­ã¥ã¼ããæ¢ã«ç»é²ããæºäºå¦çãåé¤ */
+		delete_cnt_expr_que(&(p_schtblcb->cntexpinfo),
+							p_schtblcb->p_schtblinib->p_cntcb);
+	}
+
+	p_schtblcb->status = SCHEDULETABLE_STOPPED;
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_STPSCHTBL_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.schtblid = ScheduleTableID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_StopScheduleTable);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+#endif /* TOPPERS_StopScheduleTable */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®åæ¿ã
+ */
+#ifdef TOPPERS_NextScheduleTable
+
+StatusType
+NextScheduleTable(ScheduleTableType ScheduleTableID_From,
+				  ScheduleTableType ScheduleTableID_To)
+{
+	StatusType	ercd = E_OK;
+	SCHTBLCB	*p_curcb, *p_nextcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_NXTSCHTBL_ENTER(ScheduleTableID_From, ScheduleTableID_To);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_NEXTSCHEDULETABLE);
+	CHECK_ID(ScheduleTableID_From < tnum_scheduletable);
+	CHECK_ID(ScheduleTableID_To < tnum_scheduletable);
+	CHECK_ID((ScheduleTableID_From < tnum_implscheduletable) ==
+			 (ScheduleTableID_To < tnum_implscheduletable));
+
+	p_curcb = get_schtblcb(ScheduleTableID_From);
+	p_nextcb = get_schtblcb(ScheduleTableID_To);
+
+	CHECK_RIGHT(p_curcb->p_schtblinib->acsbtmp);
+	CHECK_RIGHT(p_nextcb->p_schtblinib->acsbtmp);
+
+	CHECK_ID(p_curcb->p_schtblinib->p_cntcb == p_nextcb->p_schtblinib->p_cntcb);
+
+	x_nested_lock_os_int();
+	p_osapcb = p_curcb->p_schtblinib->p_osapcb;
+	/* èµ·åããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	p_osapcb = p_nextcb->p_schtblinib->p_osapcb;
+	/* èµ·åããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	/* ScheduleTableID_Fromã®ç¶æ
+ãã§ãã¯ */
+	S_D_CHECK_NOFUNC((p_curcb->status & (SCHEDULETABLE_STOPPED | SCHEDULETABLE_NEXT)) == 0U);
+
+	/* ScheduleTableID_Toã®ç¶æ
+ãã§ãã¯ */
+	S_D_CHECK_STATE(p_nextcb->status == SCHEDULETABLE_STOPPED);
+
+	/*
+	 *  Currentã«å¯¾ãã¦æ¢ã«Nextãå­å¨ããå ´å,
+	 *  ããã¾ã§ã®Nextã«å¯¾ãã¦ã­ã£ã³ã»ã«ãã
+	 */
+	if (p_curcb->p_nextschtblcb != NULL) {
+		p_curcb->p_nextschtblcb->status = SCHEDULETABLE_STOPPED;
+		p_curcb->p_nextschtblcb->p_prevschtblcb = NULL;
+	}
+
+	p_curcb->p_nextschtblcb = p_nextcb;
+	p_nextcb->status = SCHEDULETABLE_NEXT;
+	p_nextcb->p_prevschtblcb = p_curcb;
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_NXTSCHTBL_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.schtblid_from = ScheduleTableID_From;
+	_errorhook_par2.schtblid_to = ScheduleTableID_To;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_NextScheduleTable);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_NextScheduleTable */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¶æ
+ã®åå¾
+ */
+#ifdef TOPPERS_GetScheduleTableStatus
+
+StatusType
+GetScheduleTableStatus(ScheduleTableType ScheduleTableID,
+					   ScheduleTableStatusRefType ScheduleStatus)
+{
+	StatusType	ercd = E_OK;
+	SCHTBLCB	*p_schtblcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_GETSCHTBLST_ENTER(ScheduleTableID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_GETSCHEDULETABLESTATUS);
+	CHECK_ID(ScheduleTableID < tnum_scheduletable);
+	CHECK_PARAM_POINTER(ScheduleStatus);
+	CHECK_MEM_WRITE(ScheduleStatus, ScheduleTableStatusType);
+
+	p_schtblcb = get_schtblcb(ScheduleTableID);
+	CHECK_RIGHT(p_schtblcb->p_schtblinib->acsbtmp);
+
+	/* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	p_osapcb = p_schtblcb->p_schtblinib->p_osapcb;
+	CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				 (p_osapcb == p_runosap));
+
+	*ScheduleStatus = p_schtblcb->status;
+
+  exit_no_errorhook:
+	LOG_GETSCHTBLST_LEAVE(ercd, ScheduleStatus);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.schtblid = ScheduleTableID;
+	_errorhook_par2.p_schtblstate = ScheduleStatus;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetScheduleTableStatus);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_GetScheduleTableStatus */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«æºäºå¦çé¢æ°
+ */
+#ifdef TOPPERS_schtbl_expire
+
+void
+schtbl_expire(CNTEXPINFO *p_cntexpinfo, const CNTCB *p_cntcb)
+{
+	SCHTBLEXPINFO schtblexpinfo;
+
+	schtblexpinfo.p_schtblcb = (SCHTBLCB *) p_cntexpinfo;
+
+	schtbl_expiry_process(&schtblexpinfo, p_cntcb);
+
+	if (schtblexpinfo.p_schtblcb != NULL) {
+		insert_cnt_expr_que(&(schtblexpinfo.p_schtblcb->cntexpinfo), (CNTCB *) p_cntcb);
+	}
+}
+
+#endif /* TOPPERS_schtbl_expire */
+
+/*
+ *  æºäºå¦çé¢æ°ããåã¿ã¤ãã³ã°å¦çã®å®è¡
+ */
+#ifdef TOPPERS_schtbl_expiry_process
+
+void
+schtbl_expiry_process(SCHTBLEXPINFO *p_schtblexpinfo, const CNTCB *p_cntcb)
+{
+	boolean		loopcont = FALSE;
+	SCHTBLCB	*p_schtblcb;
+
+	/*
+	 *  è¨­å®ããæºäºç¹ã¯ï¼ããæºäºããå¯è½æ§ãããã®ã§ï¼
+	 *  ç¹°ãè¿ãæ
+å ±ã«ãã£ã¦ã«ã¼ãå¦ç
+	 */
+	do {
+		p_schtblcb = p_schtblexpinfo->p_schtblcb;
+
+		if (p_schtblcb->expptindex < p_schtblcb->p_schtblinib->tnum_exppt) {
+			/* åæºäºç¹æ */
+			loopcont = schtbl_exppoint_process(p_schtblcb, p_cntcb);
+		}
+		else if (p_schtblcb->expptindex == p_schtblcb->p_schtblinib->tnum_exppt) {
+			/* å¨æã®æå¾æ */
+			loopcont = schtbl_tail(p_schtblcb, p_schtblexpinfo, p_cntcb);
+		}
+		else {
+			/*
+			 *  å¨æã®éå§æ
+			 *  p_schtblcb->expptindex == EXPPTINDEX_INITIALããããå¾ãªã
+			 */
+			loopcont = schtbl_head(p_schtblcb, p_cntcb);
+		}
+	} while (loopcont != FALSE);
+}
+
+#endif /* TOPPERS_schtbl_expiry_process */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®éå§å¦ç
+ */
+#ifdef TOPPERS_schtbl_head
+
+boolean
+schtbl_head(SCHTBLCB *p_schtblcb, const CNTCB *p_cntcb)
+{
+	boolean				loopcont;
+	const SCHTBLEXPPTCB	*p_exppoint;
+
+	p_exppoint = &(p_schtblcb->p_schtblinib->p_exppt[EXPPTINDEX_TOP]);
+
+	if (p_exppoint->offset == 0U) {
+		/* åæãªãã»ãã0ã®å ´åï¼ä»åæºäºå¦çå
+ã§1åç®ã®æºäºç¹å¦çãè¡ã */
+		loopcont = TRUE;
+	}
+	else {
+		loopcont = FALSE;
+		/* æ¬¡ã«èµ·åãã¹ãæéã®é¸å® */
+		p_schtblcb->cntexpinfo.expiretick = add_tick(p_schtblcb->cntexpinfo.expiretick,
+													 p_exppoint->offset, p_cntcb->p_cntinib->maxval2);
+	}
+
+	p_schtblcb->expptindex = EXPPTINDEX_TOP;
+
+	return(loopcont);
+}
+
+#endif /* TOPPERS_schtbl_head */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®åæºäºç¹å¦ç
+ */
+#ifdef TOPPERS_schtbl_exppoint_process
+
+boolean
+schtbl_exppoint_process(SCHTBLCB *p_schtblcb, const CNTCB *p_cntcb)
+{
+	boolean				loopcont = FALSE;
+	const SCHTBLEXPPTCB	*p_exppoint;
+	const SCHTBLEXPPTCB *pp_exppoint;
+	uint8				index;
+	TickType			currtime;
+	OSAPCB				*p_runosap_saved;
+
+	pp_exppoint = p_schtblcb->p_schtblinib->p_exppt;
+	index = p_schtblcb->expptindex;
+	p_exppoint = &(pp_exppoint[index]);
+
+	/* æºäºå¦çã®å®è¡ */
+	LOG_SCHTBL_ENTER(p_schtblcb);
+	p_runosap_saved = p_runosap;
+	p_runosap = p_schtblcb->p_schtblinib->p_osapcb;
+
+	(p_exppoint->expptfnt)();
+
+	p_runosap = p_runosap_saved;
+
+	LOG_SCHTBL_LEAVE(p_schtblcb);
+	/* ç¾å¨æéã®éé¿ */
+	currtime = p_exppoint->offset;
+	/* æ¬¡ã®æºäºç¹ã¸ */
+	index++;
+	p_schtblcb->expptindex = index;
+
+	if (p_schtblcb->expptindex == p_schtblcb->p_schtblinib->tnum_exppt) {
+		/* ç¾å¨ãå¨æã®æå¾ã®æºäºç¹ã®å ´å */
+		if (p_schtblcb->p_schtblinib->length == currtime) {
+			/*
+			 *  åçºã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æçµé
+å»¶å¤ã0ã®å ´åï¼Nextãå­å¨ãããããããªãããï¼
+			 *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®æå¾ã¿ã¤ãã³ã°å¦çããã
+			 */
+			loopcont = TRUE;
+		}
+		else {
+			/* æçµé
+å»¶å¦çã®ããï¼æºäºæéã®è¨­å® */
+			p_schtblcb->cntexpinfo.expiretick = add_tick(p_schtblcb->cntexpinfo.expiretick,
+														 (p_schtblcb->p_schtblinib->length - currtime), p_cntcb->p_cntinib->maxval2);
+		}
+	}
+	else {
+		p_exppoint = &(pp_exppoint[index]);
+		/* æ¬¡ã®æºäºç¹ã®æºäºæéã®è¨­å® */
+		p_schtblcb->cntexpinfo.expiretick = add_tick(p_schtblcb->cntexpinfo.expiretick,
+													 (p_exppoint->offset - currtime), p_cntcb->p_cntinib->maxval2);
+	}
+
+	return(loopcont);
+}
+
+#endif /* TOPPERS_schtbl_exppoint_process */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®çµç«¯å¦ç
+ */
+#ifdef TOPPERS_schtbl_tail
+
+boolean
+schtbl_tail(SCHTBLCB *p_schtblcb, SCHTBLEXPINFO *p_schtblexpinfo, const CNTCB *p_cntcb)
+{
+	boolean				loopcont = FALSE;
+	SCHTBLCB			*p_nextcb;
+	const SCHTBLEXPPTCB	*p_exppoint;
+
+	/* å¨æã®æå¾ã«ã¦Nextãå­å¨ããããã§ãã¯ */
+	if (p_schtblcb->p_nextschtblcb != NULL) {
+		p_nextcb = p_schtblcb->p_nextschtblcb;
+
+		/*
+		 *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®åãæ¿ã
+		 *
+		 *  æé»åæåå£«ã®åæ¿ãèæ
+®ãï¼ç¶æ
+ã®å¼ç¶ããå¿
+è¦
+		 *  NextScheduleTableã§åææ¹æ³ãã§ãã¯ãã¦ããã®ã§ï¼
+		 *  åææ¹æ³ã®ä¸æ´åããªã
+		 */
+		p_nextcb->status = p_schtblcb->status;
+		p_nextcb->expptindex = EXPPTINDEX_INITIAL;
+
+		/* Nextã®æºäºç¹è¨­å®åºæºã¯ï¼Prevã®æºäºæå»ã¨ãªã */
+		p_nextcb->cntexpinfo.expiretick = p_schtblcb->cntexpinfo.expiretick;
+		p_nextcb->p_prevschtblcb = NULL;
+
+		/* ä»ã¾ã§å®è¡ç¶æ
+ã®ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã«å¯¾ãã¦çµäºå¦ç */
+		p_schtblcb->status = SCHEDULETABLE_STOPPED;
+		p_schtblcb->p_nextschtblcb = NULL;
+
+		/*
+		 *  ä¸æµå´ããNextã®åææºäºç¹ãã«ã¦ã³ã¿æºäºã­ã¥ã¼ã«è¿½å ããæï¼
+		 *  ä½¿ç¨ããã
+		 */
+		p_schtblexpinfo->p_schtblcb = p_nextcb;
+
+		loopcont = TRUE;
+	}
+	else {
+		/* å¨æå¶å¾¡ã®æç¡ãã§ãã¯ */
+		if (p_schtblcb->p_schtblinib->repeat != FALSE) {
+
+			p_schtblcb->expptindex = EXPPTINDEX_TOP;
+			p_exppoint = &(p_schtblcb->p_schtblinib->p_exppt[EXPPTINDEX_TOP]);
+
+			if (p_exppoint->offset == 0U) {
+				/* åæãªãã»ãã0ã®å ´åï¼ä»åæºäºå¦çå
+ã§1åç®ã®æºäºç¹å¦çãè¡ã */
+				loopcont = TRUE;
+			}
+			else {
+				/* æçµé
+å»¶å¦çã®ããï¼æºäºæéã®è¨­å® */
+				p_schtblcb->cntexpinfo.expiretick = add_tick(p_schtblcb->cntexpinfo.expiretick,
+															 p_exppoint->offset, p_cntcb->p_cntinib->maxval2);
+			}
+		}
+		else {
+			/* å¨æèµ·åããªãã®ã§ï¼çµäºå¦ç */
+			p_schtblcb->status = SCHEDULETABLE_STOPPED;
+			p_schtblexpinfo->p_schtblcb = NULL;
+			p_schtblcb->p_prevschtblcb = NULL;
+			p_schtblcb->p_nextschtblcb = NULL;
+		}
+	}
+
+	return(loopcont);
+}
+
+#endif /* TOPPERS_schtbl_tail */
+
+/*
+ *  OSAPæå±ããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®å¼·å¶çµäº
+ */
+#ifdef TOPPERS_force_term_osap_schtbl
+
+void
+force_term_osap_schtbl(OSAPCB *p_osapcb)
+{
+	ScheduleTableType	i;
+	SCHTBLCB			*p_schtblcb;
+	SCHTBLCB			*p_nextcb;
+
+	for (i = 0U; i < tnum_scheduletable; i++) {
+		if (schtblinib_table[i].p_osapcb == p_osapcb) {
+			p_schtblcb = &schtblcb_table[i];
+			/*
+			 *  æå®ãããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãSCHEDULETABLE_NEXTã®å ´å,
+			 *  èªåãNextã«ããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ããï¼èªåãå¤ã
+			 */
+			if (p_schtblcb->status == SCHEDULETABLE_NEXT) {
+				p_schtblcb->p_prevschtblcb->p_nextschtblcb = NULL;
+				p_schtblcb->p_prevschtblcb = NULL;
+				p_schtblcb->status = SCHEDULETABLE_STOPPED;
+			}
+			else if ((p_schtblcb->status == SCHEDULETABLE_RUNNING) ||
+					 (p_schtblcb->status == SCHEDULETABLE_RUNNING_AND_SYNCHRONOUS)) {
+				/*
+				 *  Nextã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãå­å¨ããå ´å,
+				 *  Nextã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®äºç´ãã­ã£ã³ã»ã«ãã
+				 */
+				p_nextcb = p_schtblcb->p_nextschtblcb;
+				if (p_nextcb != NULL) {
+					p_nextcb->status = SCHEDULETABLE_STOPPED;
+					p_nextcb->p_prevschtblcb = NULL;
+					p_schtblcb->p_nextschtblcb = NULL;
+				}
+
+				/* ã«ã¦ã³ã¿æºäºã­ã¥ã¼ããæ¢ã«ç»é²ããæºäºå¦çãåé¤ */
+				delete_cnt_expr_que(&(p_schtblcb->cntexpinfo),
+									p_schtblcb->p_schtblinib->p_cntcb);
+				p_schtblcb->status = SCHEDULETABLE_STOPPED;
+			}
+			else {
+				/* å®æ½ãã¹ããã¨ããªã */
+			}
+		}
+	}
+}
+
+#endif /* TOPPERS_force_term_osap_schtbl */
Index: /atk2-sc3-1.4.0-ntisr/kernel/scheduletable.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/scheduletable.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/scheduletable.h	(revision 172)
@@ -0,0 +1,202 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: scheduletable.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æ©è½
+ */
+
+#ifndef TOPPERS_SCHEDULETABLE_H
+#define TOPPERS_SCHEDULETABLE_H
+
+#include "counter.h"
+
+/*
+ *  æºäºç¹ãã¼ãã«å¶å¾¡ç¨ç¹æ®ãªæºäºç¹ã¤ã³ããã¯ã¹
+ */
+#define EXPPTINDEX_TOP			((uint8) 0x00)
+#define EXPPTINDEX_INITIAL		((uint8) 0xff)
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«IDããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç®¡çãã­ãã¯ãåãåºãããã®ãã¯ã­
+ */
+#define get_schtblcb(schtblid)	(&(schtblcb_table[(schtblid)]))
+
+/*
+ *  æé»åæã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã«é¢ããå®ç¾©
+ */
+#define is_implschtbl(schtblid)	((schtblid) < tnum_implscheduletable)
+
+/*
+ *  åã
+ã®æºäºç¹ãã¼ãã«å
+ */
+typedef struct scheduletable_expire_point_block {
+	TickType		offset;                                 /* ãªãã»ããå¤ */
+	FunctionRefType	expptfnt;                               /* æºäºç¹å¦çé¢æ°ã®ãã¤ã³ã¿ */
+} SCHTBLEXPPTCB;
+
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«åæåãã­ãã¯
+ */
+typedef struct scheduletable_initialization_block {
+	CNTCB				*p_cntcb;                           /* é§åã«ã¦ã³ã¿ç®¡çãã­ãã¯ã®ãã¤ã³ã¿ */
+	TickType			length;                             /* å¨æã®é·ã */
+	AppModeType			autosta;                            /* èµ·åããã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ã */
+	AttributeType		actatr;                             /* èªåèµ·åã®å±æ§ */
+	TickType			staval;                             /* èªåèµ·åãã£ãã¯å¤ */
+	const SCHTBLEXPPTCB	*p_exppt;                           /* æºäºç¹ãã¼ãã«ã®å
+é ­ãã¤ã³ã¿ */
+	boolean				repeat;                             /* å¨æå¶å¾¡ã®æç¡ */
+	uint8				tnum_exppt;                         /* æºäºç¹æ° */
+	OSAPCB				*p_osapcb;                          /* æå±ããOSã¢ããªã±ã¼ã·ã§ã³ã®ç®¡çãã­ãã¯ */
+	uint32				acsbtmp;                            /* ã¢ã¯ã»ã¹è¨±å¯OSã¢ããªã±ã¼ã·ã§ã³ ãããããã */
+} SCHTBLINIB;
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç®¡çãã­ãã¯
+ */
+typedef struct scheduletable_control_block {
+	CNTEXPINFO							cntexpinfo;         /* ã«ã¦ã³ã¿æºäºæ
+å ±(æ§é ä½ã®å
+é ­ã«å
+¥ãå¿
+è¦) */
+	const SCHTBLINIB					*p_schtblinib;      /* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	struct scheduletable_control_block	*p_prevschtblcb;    /* èªåãNextã«ããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	struct scheduletable_control_block	*p_nextschtblcb;    /* Nextã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	ScheduleTableStatusType				status;             /* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¶æ
+ */
+	uint8								expptindex;         /* æºäºç¹ã¤ã³ããã¯ã¹ */
+} SCHTBLCB;
+
+/*
+ *  æºäºå¦çå®è¡ç¨ç®¡çæ
+å ±
+ */
+typedef struct scheduletable_expire_info {
+	SCHTBLCB *p_schtblcb;                                   /* ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç®¡çãã­ãã¯ã®ã¢ãã¬ã¹ */
+} SCHTBLEXPINFO;
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æ°ãä¿æããå¤æ°ã®å®£è¨
+ */
+extern const ScheduleTableType	tnum_scheduletable;         /* å
+¨ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®æ° */
+extern const ScheduleTableType	tnum_implscheduletable;     /* æé»åæã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æ° */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«åæåãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern const SCHTBLINIB			schtblinib_table[];
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern SCHTBLCB					schtblcb_table[];
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãªãã¸ã§ã¯ãã®åæå
+ */
+extern void schtbl_initialize(void);
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«æºäºå¦çé¢æ°
+ */
+extern void schtbl_expire(CNTEXPINFO *p_cntexpinfo, const CNTCB *p_cntcb);
+
+/*
+ *  æºäºå¦çé¢æ°ããåã¿ã¤ãã³ã°å¦çã®å®è¡
+ */
+extern void schtbl_expiry_process(SCHTBLEXPINFO *p_schtblexpinfo, const CNTCB *p_cntcb);
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®éå§å¦ç
+ */
+extern boolean schtbl_head(SCHTBLCB *p_schtblcb, const CNTCB *p_cntcb);
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®åæºäºç¹å¦ç
+ */
+extern boolean schtbl_exppoint_process(SCHTBLCB *p_schtblcb, const CNTCB *p_cntcb);
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®çµç«¯å¦ç
+ */
+extern boolean schtbl_tail(SCHTBLCB *p_schtblcb, SCHTBLEXPINFO *p_schtblexpinfo, const CNTCB *p_cntcb);
+
+/*
+ *  OSAPæå±ããã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®å¼·å¶çµäº
+ */
+extern void force_term_osap_schtbl(OSAPCB *p_osapcb);
+
+#endif /* TOPPERS_SCHEDULETABLE_H */
Index: /atk2-sc3-1.4.0-ntisr/kernel/svc.def
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/svc.def	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/svc.def	(revision 172)
@@ -0,0 +1,161 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2001 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2005-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2011-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2011-2013 by Spansion LLC, USA
+#  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2011-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2011-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2011-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2011-2014 by Witz Corporation
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: svc.def 425 2015-12-07 08:06:19Z witz-itoyo $
+#
+
+#
+#  ãµã¼ãã¹ã³ã¼ã«å®ç¾©ãã¡ã¤ã«
+#
+#  åè¡ã¯ï¼æ©è½çªå·ï¼ãã©ã°ï¼ãµã¼ãã¹ã³ã¼ã«ã®ãã­ãã¿ã¤ãå®£è¨ããæ§æã
+#  ããï¼è¡é ­ãã¹ãã¼ã¹ï¼ç©ºç½ã¾ãã¯TABï¼ã§å§ã¾ãæã¯ï¼æ©è½ã³ã¼ããçç¥
+#  ãããã¨ã¿ãªãï¼ãã ãï¼æåã®ãµã¼ãã¹ã³ã¼ã«ã®æ©è½ã³ã¼ãã¯çç¥ã§ããª
+#  ãï¼è¡æ«ã® '\' ã¯ç¶ç¶è¡ãç¤ºãï¼
+#
+#  æ³¨æäºé 
+ï¼
+#    ãµã¼ãã¹ã³ã¼ã«ã®å¼æ°åã¯ãã¹ã¦å°æå­ã§ãããã¨
+#
+#  ãã©ã°ã®æå³ã¯æ¬¡ã®éãï¼
+#
+#	S : ATK2-SC3ã«ã¼ãã«ããµãã¼ã
+#			é¢æ°ãã­ãã¿ã¤ãå®£è¨ã¨å¼åºãã©ã¤ãã©ãªãçæãã
+#	N : é¢æ°ãã­ãã¿ã¤ãå®£è¨ã¯çæãããï¼å¼åºãã©ã¤ãã©ãªã¯çæããªã
+#	I : ã¦ã¼ã¶ããã¯å¼ã¹ãªã(exit_task)
+#	m : ã¡ã¢ãªãã¢ã¯ã»ã¹ãã â ãã¤ã³ã¿ããã©ã¡ã¼ã¿ã«æã¤å ´å
+#           å¼åºå
+ã®ã¡ã¢ãªãå¤æ´ãããã¨ãã³ã³ãã¤ã©ã«ä¼ãã
+#	n : ãµã¼ãã¹ã³ã¼ã«ã®è¿æ»å¤ã voidå
+#	- : æªãµãã¼ãï¼äºç´
+#
+
+0		Sn		void		StartOS(AppModeType Mode)
+		Sn		void		ShutdownOS(StatusType Error)
+		S		StatusType	ActivateTask(TaskType TaskID)
+		S		StatusType	TerminateTask()
+		S		StatusType	ChainTask(TaskType TaskID)
+		S		StatusType	Schedule()
+		S		StatusType	GetTaskID(TaskRefType TaskID)
+		S		StatusType	GetTaskState(TaskType TaskID, TaskStateRefType State)
+		Sn		void		EnableAllInterrupts()
+		Sn		void		DisableAllInterrupts()
+		Sn		void		ResumeAllInterrupts()
+		Sn		void		SuspendAllInterrupts()
+		Sn		void		ResumeOSInterrupts()
+		Sn		void		SuspendOSInterrupts()
+		S		ISRType		GetISRID()
+		S		StatusType	DisableInterruptSource(ISRType DisableISR)
+		S		StatusType	EnableInterruptSource(ISRType EnableISR)
+		S		StatusType	GetResource(ResourceType ResID)
+		S		StatusType	ReleaseResource(ResourceType ResID)
+		S		StatusType	SetEvent(TaskType TaskID, EventMaskType Mask)
+		S		StatusType	ClearEvent(EventMaskType Mask)
+		S		StatusType	GetEvent(TaskType TaskID, EventMaskRefType Event)
+		S		StatusType	WaitEvent(EventMaskType Mask)
+		S		StatusType	GetAlarmBase(AlarmType AlarmID, AlarmBaseRefType Info)
+		S		StatusType	GetAlarm(AlarmType AlarmID, TickRefType Tick)
+		S		StatusType	SetRelAlarm(AlarmType AlarmID, TickType increment, TickType cycle)
+		S		StatusType	SetAbsAlarm(AlarmType AlarmID, TickType start, TickType cycle)
+		S		StatusType	CancelAlarm(AlarmType AlarmID)
+		S		StatusType	IncrementCounter(CounterType CounterID)
+		S		StatusType	GetCounterValue(CounterType CounterID, TickRefType Value)
+		S		StatusType	GetElapsedValue(CounterType CounterID, TickRefType Value, TickRefType ElapsedValue)
+		S		AccessType	CheckISRMemoryAccess(ISRType ISRID, MemoryStartAddressType Address, MemorySizeType Size)
+		S		AccessType	CheckTaskMemoryAccess(TaskType TaskID, MemoryStartAddressType Address, MemorySizeType Size)
+		S		ObjectAccessType	CheckTaskAccess(ApplicationType ApplID, TaskType TaskID)
+		S		ObjectAccessType	CheckISRAccess(ApplicationType ApplID, ISRType ISRID)
+		S		ObjectAccessType	CheckAlarmAccess(ApplicationType ApplID, AlarmType AlarmID)
+		S		ObjectAccessType	CheckResourceAccess(ApplicationType ApplID, ResourceType ResID)
+		S		ObjectAccessType	CheckCounterAccess(ApplicationType ApplID, CounterType CounterID)
+		S		ObjectAccessType	CheckScheduleTableAccess(ApplicationType ApplID, ScheduleTableType ScheduleTableID)
+		S		ApplicationType	CheckTaskOwnership(TaskType TaskID)
+		S		ApplicationType	CheckISROwnership(ISRType ISRID)
+		S		ApplicationType	CheckAlarmOwnership(AlarmType AlarmID)
+		S		ApplicationType	CheckCounterOwnership(CounterType CounterID)
+		S		ApplicationType	CheckScheduleTableOwnership(ScheduleTableType ScheduleTableID)
+		S		ApplicationType	GetApplicationID()
+		S		StatusType	CallTrustedFunction(TrustedFunctionIndexType FunctionIndex,	TrustedFunctionParameterRefType FunctionParams)
+		S		StatusType  GetApplicationState(ApplicationType Application, ApplicationStateRefType Value)
+		S		AppModeType	GetActiveApplicationMode()
+		S		StatusType StartScheduleTableRel(ScheduleTableType ScheduleTableID, TickType Offset)
+		S		StatusType StartScheduleTableAbs(ScheduleTableType ScheduleTableID, TickType Start)
+		S		StatusType StopScheduleTable(ScheduleTableType ScheduleTableID)
+		S		StatusType NextScheduleTable(ScheduleTableType ScheduleTableID_From, ScheduleTableType ScheduleTableID_To)
+		S		StatusType GetScheduleTableStatus(ScheduleTableType ScheduleTableID, ScheduleTableStatusRefType ScheduleStatus)
+		S		FaultyContextType	GetFaultyContext()
+		S		Std_ReturnType	ioc_send_generic(IocType IocWrapperId, const void *in)
+		S		Std_ReturnType	ioc_write_generic(IocType IocWrapperId, const void *in)
+		S		Std_ReturnType	ioc_receive_generic(IocType IocId, void *out)
+		S		Std_ReturnType	ioc_read_generic(IocType IocId, void *out)
+		S		Std_ReturnType	ioc_empty_queue_generic(IocType IocId)
+		S		StatusType	AllowAccess()
+		S		StatusType	TerminateApplication(ApplicationType Application, RestartType RestartOption)
+		In		void		exit_task()
+
+# ããã¾ã§
+
Index: /atk2-sc3-1.4.0-ntisr/kernel/svc_table.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/svc_table.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/svc_table.c	(revision 172)
@@ -0,0 +1,142 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: svc_table.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#include "kernel_int.h"
+
+void * const svc_table[TMAX_SVCID + 1] = {
+	(void *) &StartOS,
+	(void *) &ShutdownOS,
+	(void *) &ActivateTask,
+	(void *) &TerminateTask,
+	(void *) &ChainTask,
+	(void *) &Schedule,
+	(void *) &GetTaskID,
+	(void *) &GetTaskState,
+	(void *) &EnableAllInterrupts,
+	(void *) &DisableAllInterrupts,
+	(void *) &ResumeAllInterrupts,
+	(void *) &SuspendAllInterrupts,
+	(void *) &ResumeOSInterrupts,
+	(void *) &SuspendOSInterrupts,
+	(void *) &GetISRID,
+	(void *) &DisableInterruptSource,
+	(void *) &EnableInterruptSource,
+	(void *) &GetResource,
+	(void *) &ReleaseResource,
+	(void *) &SetEvent,
+	(void *) &ClearEvent,
+	(void *) &GetEvent,
+	(void *) &WaitEvent,
+	(void *) &GetAlarmBase,
+	(void *) &GetAlarm,
+	(void *) &SetRelAlarm,
+	(void *) &SetAbsAlarm,
+	(void *) &CancelAlarm,
+	(void *) &IncrementCounter,
+	(void *) &GetCounterValue,
+	(void *) &GetElapsedValue,
+	(void *) &CheckISRMemoryAccess,
+	(void *) &CheckTaskMemoryAccess,
+	(void *) &CheckTaskAccess,
+	(void *) &CheckISRAccess,
+	(void *) &CheckAlarmAccess,
+	(void *) &CheckResourceAccess,
+	(void *) &CheckCounterAccess,
+	(void *) &CheckScheduleTableAccess,
+	(void *) &CheckTaskOwnership,
+	(void *) &CheckISROwnership,
+	(void *) &CheckAlarmOwnership,
+	(void *) &CheckCounterOwnership,
+	(void *) &CheckScheduleTableOwnership,
+	(void *) &GetApplicationID,
+	(void *) &CallTrustedFunction,
+	(void *) &GetApplicationState,
+	(void *) &GetActiveApplicationMode,
+	(void *) &StartScheduleTableRel,
+	(void *) &StartScheduleTableAbs,
+	(void *) &StopScheduleTable,
+	(void *) &NextScheduleTable,
+	(void *) &GetScheduleTableStatus,
+	(void *) &GetFaultyContext,
+	(void *) &ioc_send_generic,
+	(void *) &ioc_write_generic,
+	(void *) &ioc_receive_generic,
+	(void *) &ioc_read_generic,
+	(void *) &ioc_empty_queue_generic,
+	(void *) &AllowAccess,
+	(void *) &TerminateApplication,
+	(void *) &exit_task,
+	TARGET_SVC_TABLE
+};
Index: /atk2-sc3-1.4.0-ntisr/kernel/system.csv
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/system.csv	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/system.csv	(revision 172)
@@ -0,0 +1,4 @@
+//ELEMENTS/IMPLEMENTATION-DATA-TYPE,IMPLEMENTATION_DATA_TYPE,PARENT
+SHORT-NAME,SHORT_NAME_PATH,CHILD,PATH
+SHORT-NAME,SHORT_NAME,CHILD
+CATEGORY,CATEGORY,CHILD
Index: /atk2-sc3-1.4.0-ntisr/kernel/task.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/task.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/task.c	(revision 172)
@@ -0,0 +1,651 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: task.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¿ã¹ã¯å¶å¾¡ã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+#include "interrupt.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_TSKSTAT
+#define LOG_TSKSTAT(p_tcb)
+#endif /* LOG_TSKSTAT */
+
+/* å
+é¨é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨ */
+LOCAL_INLINE uint16 bitmap_search(uint16 bitmap);
+LOCAL_INLINE boolean primap_empty(void);
+LOCAL_INLINE PriorityType primap_search(void);
+LOCAL_INLINE void primap_set(PriorityType pri);
+LOCAL_INLINE void primap_clear(PriorityType pri);
+
+#ifdef TOPPERS_task_initialize
+
+/*
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯
+ */
+TCB				*p_runtsk;
+
+/*
+ *  æé«åªå
+é ä½ã¿ã¹ã¯
+ */
+TCB				*p_schedtsk;
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ä¸­ã®æé«åªå
+åº¦
+ */
+PriorityType	nextpri;
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼
+ */
+QUEUE			ready_queue[TNUM_TPRI];
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ãµã¼ãã®ããã®ãããããã
+ */
+uint16			ready_primap;
+
+/*
+ *  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+void
+task_initialize(void)
+{
+	TaskType	i;
+	TCB			*p_tcb;
+
+	p_runtsk = NULL;
+	p_schedtsk = NULL;
+
+	for (i = 0U; i < TNUM_TPRI; i++) {
+		queue_initialize(&(ready_queue[i]));
+	}
+	nextpri = TPRI_MINTASK;
+	ready_primap = 0U;
+
+	for (i = 0U; i < tnum_task; i++) {
+		p_tcb = &(tcb_table[i]);
+		p_tcb->p_tinib = &(tinib_table[i]);
+		p_tcb->actcnt = 0U;
+		p_tcb->tstat = SUSPENDED;
+#ifdef CFG_USE_PROTECTIONHOOK
+		p_tcb->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+		if ((p_tcb->p_tinib->autoact & ((AppModeType) 1 << appmodeid)) != APPMODE_NONE) {
+			(void) make_active(p_tcb);
+		}
+	}
+}
+
+#endif /* TOPPERS_task_initialize */
+
+/*
+ *  ãããããããµã¼ãé¢æ°
+ *
+ *  bitmapå
+ã®1ã®ãããã®å
+ï¼æãä¸ä½ï¼å³ï¼ã®ãã®ããµã¼ããï¼ãã®ãã
+ *  ãçªå·ãè¿ã
+ *  ãããçªå·ã¯ï¼æä¸ä½ãããã0ã¨ããï¼bitmapã«0ãæå®
+ *  ãã¦ã¯ãªããªãï¼ãã®é¢æ°ã§ã¯ï¼bitmapã16ãããã§ãããã¨ãä»®å®ãï¼
+ *  uint16åã¨ãã¦ãã
+ *
+ *  ããããµã¼ãå½ä»¤ãæã¤ãã­ã»ããµã§ã¯ï¼ããããµã¼ãå½ä»¤ãä½¿ãããã«
+ *  æ¸ãç´ããæ¹ãå¹çãè¯ãå ´åããã
+ *  ãã®ãããªå ´åã«ã¯ï¼ã¿ã¼ã²ããä¾å­é¨ã§ããããµã¼ãå½ä»¤ãä½¿ã£ã
+ *  bitmap_searchãå®ç¾©ãï¼OMIT_BITMAP_SEARCHããã¯ã­å®ç¾©ããã°ãã
+ *  ã¾ãï¼ããããµã¼ãå½ä»¤ã®ãµã¼ãæ¹åãéãªã©ã®çç±ã§åªå
+åº¦ã¨ããã
+ *  ã¨ã®å¯¾å¿ãå¤æ´ãããå ´åã«ã¯ï¼PRIMAP_BITããã¯ã­å®ç¾©ããã°ãã
+ *
+ *  ã¾ãï¼æ¨æºã©ã¤ãã©ãªã«ffsããããªãï¼æ¬¡ã®ããã«å®ç¾©ãã¦æ¨æºã©ã¤ã
+ *  ã©ãªãä½¿ã£ãæ¹ãå¹çãè¯ãå¯è½æ§ããã
+ *		#define	bitmap_search(bitmap) (ffs(bitmap) - 1)
+ */
+#ifndef PRIMAP_BIT
+#define PRIMAP_BIT(pri)		((uint16) ((uint16) 1U << (pri)))
+#endif /* PRIMAP_BIT */
+
+#ifndef OMIT_BITMAP_SEARCH
+
+LOCAL_INLINE uint16
+bitmap_search(uint16 bitmap)
+{
+	/*
+	 *  ãããããããµã¼ãé¢æ°ç¨ãã¼ãã«
+	 */
+	const uint8	bitmap_search_table[BITMAP_NUM] = {
+		0U, 1U, 0U, 2U, 0U, 1U, 0U,
+		3U, 0U, 1U, 0U, 2U, 0U, 1U, 0U
+	};
+
+	uint16		n = 0U;
+
+	ASSERT(bitmap != 0U);
+	if ((bitmap & 0x00ffU) == 0U) {
+		bitmap >>= 8U;
+		n += 8U;
+	}
+	if ((bitmap & 0x0fU) == 0U) {
+		bitmap >>= 4U;
+		n += 4U;
+	}
+	return(n + bitmap_search_table[(bitmap & 0x000fU) - 1U]);
+}
+
+#endif /* OMIT_BITMAP_SEARCH */
+
+/*
+ *  åªå
+åº¦ãããããããç©ºãã®ãã§ãã¯
+ */
+LOCAL_INLINE boolean
+primap_empty(void)
+{
+	return(ready_primap == 0U);
+}
+
+/*
+ *  åªå
+åº¦ããããããã®ãµã¼ã
+ */
+LOCAL_INLINE PriorityType
+primap_search(void)
+{
+	return((PriorityType) bitmap_search(ready_primap));
+}
+
+/*
+ *  åªå
+åº¦ããããããã®ã»ãã
+ */
+LOCAL_INLINE void
+primap_set(PriorityType pri)
+{
+	ready_primap |= PRIMAP_BIT(pri);
+}
+
+/*
+ *  åªå
+åº¦ããããããã®ã¯ãªã¢
+ */
+LOCAL_INLINE void
+primap_clear(PriorityType pri)
+{
+	ready_primap &= (uint16) ~PRIMAP_BIT(pri);
+}
+
+/*
+ *  æé«åªå
+é ä½ã¿ã¹ã¯ã®ãµã¼ã
+ */
+#ifdef TOPPERS_search_schedtsk
+
+void
+search_schedtsk(void)
+{
+	if (primap_empty() != FALSE) {
+		p_schedtsk = NULL;
+	}
+	else {
+		p_schedtsk = (TCB *) (queue_delete_next(&(ready_queue[nextpri])));
+		if (queue_empty(&(ready_queue[nextpri])) != FALSE) {
+			primap_clear(nextpri);
+			nextpri = (primap_empty() != FALSE) ?
+					  TPRI_MINTASK : primap_search();
+		}
+	}
+}
+
+#endif /* TOPPERS_search_schedtsk */
+
+/*
+ *  å®è¡ã§ããç¶æ
+ã¸ã®ç§»è¡
+ */
+#ifdef TOPPERS_make_runnable
+
+boolean
+make_runnable(TCB *p_tcb)
+{
+	PriorityType	pri, schedpri;
+	boolean			is_next_schedtsk = TRUE;
+
+	p_tcb->tstat = READY;
+	LOG_TSKSTAT(p_tcb);
+	if (p_schedtsk != NULL) {
+		pri = p_tcb->curpri;
+		schedpri = p_schedtsk->curpri;
+		if (pri >= schedpri) {
+			/*
+			 *  schedtsk ã®æ¹ãåªå
+åº¦ãé«ãå ´åï¼p_tcb ãã¬
+			 *  ãã£ã­ã¥ã¼ã®æå¾ã«å
+¥ãã
+			 */
+			queue_insert_prev(&(ready_queue[pri]), &(p_tcb->task_queue));
+			primap_set(pri);
+			if (pri < nextpri) {
+				nextpri = pri;
+			}
+			is_next_schedtsk = FALSE;
+		}
+		else {
+			/*
+			 *  p_tcb ã®æ¹ãåªå
+åº¦ãé«ãå ´åï¼schedtsk ãã¬ãã£ã­ã¥ã¼
+			 *  ã®å
+é ­ã«å
+¥ãï¼p_tcb ãæ°ãã schedtsk ã¨ãã
+			 */
+			queue_insert_next(&(ready_queue[schedpri]), &(p_schedtsk->task_queue));
+			primap_set(schedpri);
+			nextpri = schedpri;
+		}
+	}
+
+	if (is_next_schedtsk != FALSE) {
+		p_schedtsk = p_tcb;
+	}
+	return(is_next_schedtsk);
+}
+
+#endif /* TOPPERS_make_runnable */
+
+/*
+ *  å®è¡ã§ããç¶æ
+ããä»ã®ç¶æ
+ã¸ã®é·ç§»
+ *
+ *  SC1-MCã§make_non_runnableãå®è£
+ããããã
+ *  SC1ã«ãmake_non_runableãå®è£
+ãï¼SC1ãSC1-MCã®é¢æ°æ§æã«åãã
+ *  ï¼SC1-MCã§ã¯ï¼p_runtskã¨p_schedtskãä¸è´ãã¦ãããã¨ãç¢ºèªããå¦çãå
+¥ããå¿
+è¦ããããï¼
+ *  SC1ã§ã¯ï¼search_schedtskã®ã¿å¼ã³åºãå¦çã¨ããï¼
+ */
+#ifdef TOPPERS_make_non_runnable
+
+void
+make_non_runnable(void)
+{
+	search_schedtsk();
+}
+
+#endif /* TOPPERS_make_non_runnable */
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·å
+ *
+ *  TerminateTask ã ChainTask ã®ä¸­ã§ï¼èªã¿ã¹ã¯ã«å¯¾ãã¦ make_active ã
+ *  å¼ã¶å ´åãããã®ã§æ³¨æãã
+ */
+#ifdef TOPPERS_make_active
+
+boolean
+make_active(TCB *p_tcb)
+{
+	p_tcb->curpri = p_tcb->p_tinib->inipri;
+	if (TSKID(p_tcb) < tnum_exttask) {
+		p_tcb->curevt = EVTMASK_NONE;
+		p_tcb->waievt = EVTMASK_NONE;
+	}
+	p_tcb->p_lastrescb = NULL;
+	p_tcb->p_lastcntcb = NULL;
+
+	activate_context(p_tcb);
+	return(make_runnable(p_tcb));
+}
+
+#endif /* TOPPERS_make_active */
+
+/*
+ *  ã¿ã¹ã¯ã®ããªã¨ã³ãã
+ */
+#ifdef TOPPERS_preempt
+
+void
+preempt(void)
+{
+	PriorityType pri;
+
+	ASSERT(p_runtsk == p_schedtsk);
+	pri = p_runtsk->curpri;
+	queue_insert_next(&(ready_queue[pri]), &(p_runtsk->task_queue));
+	primap_set(pri);
+	search_schedtsk();
+}
+
+#endif /* TOPPERS_preempt */
+
+/*
+ *  å®è¡ä¸­ã®ã¿ã¹ã¯ãSUSPENDEDç¶æ
+ã«ãã
+ *  ãªã½ã¼ã¹è§£æ¾ããç¶æ
+ã§å¼åºãå¿
+è¦ããã
+ */
+#ifdef TOPPERS_suspend
+
+void
+suspend(void)
+{
+	p_runtsk->tstat = SUSPENDED;
+	LOG_TSKSTAT(p_runtsk);
+	make_non_runnable();
+	if (p_runtsk->actcnt > 0U) {
+		p_runtsk->actcnt -= 1U;
+		(void) make_active(p_runtsk);
+	}
+}
+
+#endif /* TOPPERS_suspend */
+
+/*
+ *  ã¿ã¹ã¯ã®å
+¨ãªã½ã¼ã¹è¿å´
+ */
+#ifdef TOPPERS_release_taskresources
+
+void
+release_taskresources(TCB *p_tcb)
+{
+	if (p_tcb->p_lastrescb != NULL) {
+		if (p_tcb->curpri <= TPRI_MINISR) {
+			/* ãªã½ã¼ã¹ãå
+¨é¨è§£æ¾ããã°å²è¾¼ã¿è¨±å¯ã«ãªã */
+			x_set_ipm((PriorityType) TIPM_ENAALL);
+		}
+		/* ãªã½ã¼ã¹ãå
+¨é¨è§£æ¾ããã°å®è¡ä¸­åªå
+åº¦ã«æ»ã */
+		p_tcb->curpri = p_tcb->p_tinib->exepri;
+
+		/* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ä»¥ä¸ã§æ¥ã p_tcb->p_lastrescb != NULL */
+		do {
+			p_tcb->p_lastrescb->lockflg = FALSE;
+			p_tcb->p_lastrescb = p_tcb->p_lastrescb->p_prevrescb;
+		} while (p_tcb->p_lastrescb != NULL);
+	}
+}
+
+#endif /* TOPPERS_release_taskresources */
+
+/*
+ *  ã¿ã¹ã¯ã®ã«ã¦ã³ã¿ã®ç¶æ
+ããã¹ã¦CS_NULLã«æ»ã
+ */
+#ifdef TOPPERS_cancel_taskcounters
+
+void
+cancel_taskcounters(TCB *p_tcb)
+{
+	if (p_tcb->p_lastcntcb != NULL) {
+
+		/* OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ä»¥ä¸ã§æ¥ã */
+		do {
+			p_tcb->p_lastcntcb->cstat = CS_NULL;
+			p_tcb->p_lastcntcb = p_tcb->p_lastcntcb->p_prevcntcb;
+		} while (p_tcb->p_lastcntcb != NULL);
+	}
+}
+#endif /* TOPPERS_cancel_taskcounters */
+
+/*
+ *  ã¿ã¹ã¯ã®ä¸æ­£çµäºæã®ä¿è­·
+ *  TerminateTask()ï¼ChainTask()ãªãã§ã®èªã¿ã¹ã¯ã®çµäº
+ * ï¼ã¿ã¹ã¯ã®é¢æ°ãããªã¿ã¼ã³ï¼ããå ´åã®å¦ç
+ */
+#ifdef TOPPERS_exit_task
+
+void
+exit_task(void)
+{
+	x_nested_lock_os_int();
+
+	/* å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã®å ´åã¯å²è¾¼ã¿ç¦æ­¢ãè§£é¤ãã */
+	release_interrupts(OSServiceId_Invalid);
+
+	/* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åã¯ãªã½ã¼ã¹ãè§£æ¾ãã */
+	release_taskresources(p_runtsk);
+
+#ifdef CFG_USE_ERRORHOOK
+	/* ã¨ã©ã¼ããã¯ãå¼ã¶ */
+	call_errorhook(E_OS_MISSINGEND, OSServiceId_TaskMissingEnd);
+#endif /* CFG_USE_ERRORHOOK */
+
+	suspend();
+
+	/* ãã¹ãã¿ã¹ã¯ããã¯ãæå¹ãªå ´åã¯ãã¹ãã¿ã¹ã¯ããã¯ãå¼ã°ãã */
+	exit_and_dispatch();
+}
+
+#endif /* TOPPERS_exit_task */
+
+#ifdef TOPPERS_remove_task_from_queue
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ããã¿ã¹ã¯ãåé¤ãã
+ */
+void
+remove_task_from_queue(TCB *p_tcb, PriorityType remove_task_pri)
+{
+	queue_delete(&(p_tcb->task_queue));
+	if (queue_empty(&(ready_queue[remove_task_pri])) != FALSE) {
+		primap_clear(remove_task_pri);
+		nextpri = (primap_empty() != FALSE) ?	TPRI_MINTASK : primap_search();
+	}
+}
+
+#endif /* TOPPERS_remove_task_from_queue */
+
+/*
+ *  èªã¿ã¹ã¯ã®å¼·å¶çµäº
+ *    ProtectionHookããã®ã¿å¼åºããã
+ *      ãªã½ã¼ã¹ã®è§£æ¾ï¼å²è¾¼ã¿ç¦æ­¢ã®è§£é¤ãè¡ã£ãå¾
+ *       TerminateTaskç¸å½ã®å¦çãè¡ã
+ *      å¼·å¶ã¿ã¹ã¯çµäºã®å ´åã¯ï¼PostTaskHookãå¼åºããªãã®ã§TerminateTask
+ *      ã¨ã¯ç°ãªãå¦çã¨ãªã
+ *  æ¬é¢æ°ã¯OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼åºããããã¨ãåæã¨ãã
+ */
+#ifdef TOPPERS_force_terminate_task
+
+void
+force_terminate_task(TCB *p_tcb)
+{
+	/*
+	 *  å²è¾¼ã¿ç¦æ­¢ãè§£é¤ãã
+	 *  ã¨ã©ã¼ããã¯ãå¼ã°ãªãããï¼å¼æ°ã«OSServiceId_Invalidããã
+	 */
+	release_interrupts(OSServiceId_Invalid);
+
+	/* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+	release_taskresources(p_tcb);
+	/* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+	cancel_taskcounters(p_tcb);
+
+	suspend();
+
+	exit_and_dispatch_nohook();
+}
+
+#endif /* TOPPERS_force_terminate_task */
+
+/*
+ *  OSAPæå±ããã¿ã¹ã¯ã®å¼·å¶çµäº
+ */
+#ifdef TOPPERS_force_term_osap_task
+
+void
+force_term_osap_task(OSAPCB *p_osapcb)
+{
+	/* OSAPã«æå±ããã¿ã¹ã¯ãå¼·å¶çµäº */
+	TaskType		i;
+	TCB				*p_tcb;
+	PriorityType	remove_task_pri;
+
+	for (i = 0U; i < tnum_task; i++) {
+		p_tcb = &tcb_table[i];
+		if ((tinib_table[i].p_osapcb == p_osapcb) &&
+			(p_tcb != p_runtsk)) {
+			/*
+			 *  OSAPçµäº/åèµ·åããã¿ã¹ã¯ã®å¼·å¶çµäº
+			 */
+			p_tcb->actcnt = 0U;
+#ifdef CFG_USE_PROTECTIONHOOK
+			p_tcb->calltfn = FALSE;
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+			if (p_tcb->tstat == READY) {
+				/* curpriã¨inipriãç°ãªãå¤ã§ã¬ãã£ã­ã¥ã¼ã«ç¹ããã¦ããå ´åã¸ã®å¯¾å¿ */
+				remove_task_pri = p_tcb->curpri;
+
+				/* ãªã½ã¼ã¹ç¢ºä¿ããã¾ã¾ã®å ´åï¼ãªã½ã¼ã¹è§£æ¾ */
+				release_taskresources(p_tcb);
+
+				/* ã«ã¦ã³ã¿ã®ç¶æ
+ãåæåãã */
+				cancel_taskcounters(p_tcb);
+
+				/* å¯¾è±¡ã¿ã¹ã¯ãSUSPENDç¶æ
+ã¨ãï¼ã¬ãã£ã­ã¥ã¼ããåé¤ãã */
+				p_tcb->tstat = SUSPENDED;
+				remove_task_from_queue(p_tcb, remove_task_pri);
+			}
+			else {
+				p_tcb->tstat = SUSPENDED;
+			}
+
+			/*
+			 *  ããã§C2ISRãåãä»ãã.
+			 *  ããã¯ã®ä¸­ããããã«æ¥ãå ´åã¯nested_lock_os_int_cntã2ä»¥ä¸ãªã®ã§ï¼
+			 *  å²è¾¼ã¿ç¦æ­¢è§£é¤ãããªã.
+			 *  SusOSç¶æ
+ã§ãï¼å²è¾¼ã¿åªå
+åº¦ãã¹ã¯ã¯ä¿æãããã¾ã¾ãªã®ã§ï¼
+			 *  C2ISRã¯çºçããªã.
+			 */
+			x_nested_unlock_os_int();
+
+			/* ããã§å²è¾¼ã¿ç¦æ­¢ã¨ãã */
+			x_nested_lock_os_int();
+		}
+	}
+
+	p_tcb = p_runtsk;
+	/* OSAPãå¼·å¶çµäºããããã®ãªã¹ã¿ã¼ãã¿ã¹ã¯ããã³ã¼ã«ããããã */
+	/* ãªã½ã¼ã¹è§£æ¾ãã«ã¦ã³ã¿ã®ç¶æ
+ãåæåããå¿
+è¦ã¯ãªã           */
+	/* å¯¾è±¡ã¿ã¹ã¯ãSUSPENDç¶æ
+ã¨ãã */
+	/* p_schedtskã®æ´æ°ã¯force_term_osap_mainã«æ»ã£ã¦ããå®æ½ãã */
+	p_tcb->tstat = SUSPENDED;
+}
+
+#endif /* TOPPERS_force_term_osap_task */
+
+/*
+ *  p_schedtskãã¬ãã£ã­ã¥ã¼ã®å
+é ­ã«éé¿
+ */
+#ifdef TOPPERS_move_schedtsk
+
+void
+move_schedtsk(void)
+{
+	queue_insert_next(&(ready_queue[p_schedtsk->curpri]), &(p_schedtsk->task_queue));
+	primap_set(p_schedtsk->curpri);
+	nextpri = p_schedtsk->curpri;
+}
+
+#endif /* TOPPERS_move_schedtsk */
Index: /atk2-sc3-1.4.0-ntisr/kernel/task.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/task.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/task.h	(revision 172)
@@ -0,0 +1,427 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: task.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¿ã¹ã¯ç®¡çæ©è½
+ */
+
+#ifndef TOPPERS_TASK_H
+#define TOPPERS_TASK_H
+
+#include "queue.h"
+#include "resource.h"
+
+typedef struct task_control_block TCB;
+#include "osap.h"
+#include "counter.h"
+
+/*
+ *  ã¤ãã³ããã¹ã¯å¤ã®å®ç¾©
+ */
+#define EVTMASK_NONE	((EventMaskType) 0) /* ã¤ãã³ããªã */
+
+/*
+ *  åªå
+åº¦ã®ç¯å²ï¼å¤é¨è¡¨ç¾ï¼
+ */
+#define TMIN_TPRI		UINT_C(0)       /* ã¿ã¹ã¯åªå
+åº¦ã®æå°å¤ï¼æä½å¤ï¼*/
+#define TMAX_TPRI		UINT_C(15)      /* ã¿ã¹ã¯åªå
+åº¦ã®æå¤§å¤ï¼æé«å¤ï¼*/
+
+/*
+ *  åªå
+åº¦ã®æ®µéæ°ã®å®ç¾©
+ */
+#define TNUM_TPRI		((TMAX_TPRI - TMIN_TPRI) + 1U)
+
+/*
+ *  åªå
+åº¦å¤ã®å®ç¾©ï¼å
+é¨è¡¨ç¾ï¼
+ */
+#define TPRI_MINTASK	((PriorityType) (TNUM_TPRI - 1U))               /* æä½ã¿ã¹ã¯åªå
+åº¦ */
+#define TPRI_MAXTASK	((PriorityType) (0))                            /* æé«ã¿ã¹ã¯åªå
+åº¦ */
+
+/*
+ *  ã¿ã¹ã¯IDããTCBãåãåºãããã®ãã¯ã­
+ */
+#define get_tcb(tskid)		(&(tcb_table[(tskid)]))
+
+/*
+ *  TCBããã¿ã¹ã¯IDãåãåºãããã®ãã¯ã­
+ *  p_tcb ãNULLã®å ´åã¯ä½¿ããªã
+ */
+#define TSKID(p_tcb)	((TaskType) ((p_tcb) - tcb_table))
+
+#ifndef OMIT_BITMAP_SEARCH
+#define BITMAP_NUM		15       /* bitmap_search_tableã®ãµã¤ãº */
+#endif /* OMIT_BITMAP_SEARCH */
+
+/*
+ *  ã¿ã¹ã¯æ°ãä¿æããå¤æ°ã®å®£è¨ï¼Os_Lcfg.cï¼
+ */
+extern const TaskType	tnum_task;          /* ã¿ã¹ã¯ã®æ° */
+extern const TaskType	tnum_exttask;       /* æ¡å¼µã¿ã¹ã¯ã®æ° */
+
+
+/*
+ *  ã¿ã¹ã¯åæåãã­ãã¯
+ *
+ *  ã¿ã¹ã¯ã«é¢ããæ
+å ±ãï¼å¤ãå¤ãããªãããã«ROMã«ç½®ããé¨åï¼ã¿ã¹ã¯
+ *  åæåãã­ãã¯ï¼ã¨ï¼å¤ãå¤åããããã«RAMã«ç½®ããªããã°ãªããªãé¨
+ *  åï¼ã¿ã¹ã¯ç®¡çãã­ãã¯ï¼TCBï¼ã«åé¢ãï¼TCBå
+ã«å¯¾å¿ããã¿ã¹ã¯åæå
+ *  ãã­ãã¯ãæããã¤ã³ã¿ãå
+¥ãã
+ *  ã¿ã¹ã¯åæåãã­ãã¯å
+ã«å¯¾å¿ããTCBãæããã¤ã³ã¿ãå
+¥ããæ¹æ³ã®æ¹ãï¼
+ *  RAMã®ç¯ç´ã®è¦³ç¹ããã¯æã¾ãããï¼å®è¡å¹çãæªããªãããã«æ¡ç¨
+ *  ãã¦ããªã
+ *  ä»ã®ãªãã¸ã§ã¯ãã«ã¤ãã¦ãåæ§ã«æ±ã
+ */
+typedef struct task_initialization_block {
+	FunctionRefType	task;       /* ã¿ã¹ã¯ã®èµ·åçªå° */
+
+#ifdef USE_TSKINICTXB
+	TSKINICTXB tskinictxb;           /* ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ */
+#else /* USE_TSKINICTXB */
+	MemorySizeType	sstksz;         /* ã·ã¹ãã ã¹ã¿ãã¯é åã®ãµã¤ãºï¼ä¸¸ããå¤ï¼ */
+	void			*sstk;          /* ã·ã¹ãã ã¹ã¿ãã¯é åã®ããã çªå°(SC3) */
+	MemorySizeType	ustksz;         /* ã¹ã¿ãã¯é åã®ãµã¤ãºï¼ä¸¸ããå¤ï¼ */
+	void			*ustk;          /* ã¹ã¿ãã¯é åã®ããã çªå°(SC3) */
+#endif /* USE_TSKINICTXB */
+	OSAPCB			*p_osapcb;      /* æå±ããOSã¢ããªã±ã¼ã·ã§ã³ã®ç®¡çãã­ãã¯ */
+	uint32			acsbtmp;        /* ã¢ã¯ã»ã¹è¨±å¯OSã¢ããªã±ã¼ã·ã§ã³ ãããããã */
+	PriorityType	inipri;         /* åæåªå
+åº¦ ï¼å
+é¨è¡¨ç¾ï¼*/
+	PriorityType	exepri;         /* å®è¡éå§æã®åªå
+åº¦ ï¼å
+é¨è¡¨ç¾ï¼*/
+	uint8			maxact;         /* å¤éèµ·åè¦æ±ã®æå¤§æ° */
+	AppModeType		autoact;        /* èµ·åããã¢ã¼ã */
+#ifndef OMIT_STKMPUINFOB
+	STKMPUINFOB	stkmpu;             /* ã¹ã¿ãã¯ã®MPUæ
+å ± */
+#endif
+} TINIB;
+
+/*
+ *  ã¿ã¹ã¯ç®¡çãã­ãã¯ï¼Os_Lcfg.cï¼
+ */
+struct task_control_block {
+	QUEUE			task_queue;     /* ã¿ã¹ã¯ã­ã¥ã¼(æ§é ä½ã®å
+é ­ã«å
+¥ãå¿
+è¦) */
+	const TINIB		*p_tinib;       /* åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	PriorityType	curpri;         /* ç¾å¨ã®åªå
+åº¦ï¼å
+é¨è¡¨ç¾ï¼*/
+	TaskStateType	tstat;          /* ã¿ã¹ã¯ç¶æ
+ï¼å
+é¨è¡¨ç¾ï¼*/
+	uint8			actcnt;         /* å¤éèµ·åè¦æ±æ° */
+	EventMaskType	curevt;         /* ã¤ãã³ãã®ç¾å¨å¤ */
+	EventMaskType	waievt;         /* å¾
+ã£ã¦ããã¤ãã³ã */
+	RESCB			*p_lastrescb;   /* æå¾ã«ç²å¾ãããªã½ã¼ã¹ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	CNTCB			*p_lastcntcb;   /* æå¾ã«æä½ããã«ã¦ã³ã¿ç®¡çãã­ãã¯ã¸ã®ãã¤ã³ã¿ */
+	TSKCTXB			tskctxb;        /* ã¿ã¹ã¯ã³ã³ãã­ã¹ããã­ãã¯ */
+#ifdef CFG_USE_PROTECTIONHOOK
+	boolean	calltfn;                /* ä¿¡é ¼é¢æ°å¼ã³åºãä¸­ãã©ã° */
+#endif /* CFG_USE_PROTECTIONHOOK */
+};
+
+/*
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯
+ *
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯ããªãå ´åã«ã¯ï¼NULL ã«ãã
+ */
+extern TCB			*p_runtsk;
+
+/*
+ *  æé«åªå
+é ä½ã¿ã¹ã¯
+ *
+ *  ã¿ã¹ã¯å®è¡ä¸­ã¯ï¼runtsk ã¨ä¸è´ãã
+ *  å®è¡ã§ããç¶æ
+ï¼å®è¡ç¶æ
+ã¾ãã¯å®è¡å¯è½ç¶æ
+ï¼ã®ã¿ã¹ã¯ããªãå ´åã«ã¯ï¼
+ *  NULL ã«ãã
+ */
+extern TCB			*p_schedtsk;
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ä¸­ã®æé«åªå
+åº¦
+ *
+ *  ã¬ãã£ã­ã¥ã¼ã«ã¯å®è¡å¯è½ç¶æ
+ã®ã¿ã¹ã¯ã®ã¿ãå«ãã®ã§ï¼å®è¡å¯è½ç¶æ
+ã®
+ *  ã¿ã¹ã¯ã®ä¸­ã§ã®æé«åªå
+åº¦ãä¿æãã
+ *  ã¬ãã£ã­ã¥ã¼ãç©ºã®æï¼å®è¡å¯è½ç¶æ
+ã®ã¿ã¹ã¯ãç¡ãæï¼ã¯ TPRI_MINTASKã«ãã
+ */
+extern PriorityType	nextpri;
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼
+ *
+ *  ã¬ãã£ã­ã¥ã¼ã¯ï¼å®è¡ã§ããç¶æ
+ã®ã¿ã¹ã¯ãç®¡çããããã®ã­ã¥ã¼ã§ãã
+ *  ã¬ãã£ã­ã¥ã¼ã¯ï¼åªå
+åº¦ãã¨ã®ã¿ã¹ã¯ã­ã¥ã¼ã§æ§æããã¦ãã
+ *  ã¿ã¹ã¯ã®TCBã¯ï¼è©²å½ããåªå
+åº¦ã®ã­ã¥ã¼ã«ç»é²ããã
+ */
+extern QUEUE		ready_queue[TNUM_TPRI];
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ãµã¼ãã®ããã®ãããããã
+ *
+ *  ã¬ãã£ã­ã¥ã¼ã®ãµã¼ããå¹çããè¡ãããã«ï¼åªå
+åº¦ãã¨ã®ã¿ã¹ã¯ã­ã¥ã¼
+ *  ã«ã¿ã¹ã¯ãå
+¥ã£ã¦ãããã©ãããç¤ºããããããããç¨æãã¦ãã
+ *  ãããããããä½¿ããã¨ã§ï¼ã¡ã¢ãªã¢ã¯ã»ã¹ã®åæ°ãæ¸ãããã¨ãã§ãããï¼
+ *  ãããæä½å½ä»¤ãå
+
+å®ãã¦ããªããã­ã»ããµã§ï¼åªå
+åº¦ã®æ®µéæ°ãå°ãªã
+ *  å ´åã«ã¯ï¼ããããããæä½ã®ãªã¼ãã¼ãããã®ããã«ï¼éã«å¹çãè½ã¡
+ *  ãå¯è½æ§ããã
+ *
+ *  åªå
+åº¦ã16æ®µéã§ãããã¨ãä»®å®ãã¦ããããï¼uint16åã¨ãã¦ãã
+ */
+extern uint16		ready_primap;
+
+/*
+ *  ã¿ã¹ã¯åæåãã­ãã¯ã®ã¨ãªã¢ï¼kernel_mem.cï¼
+ */
+extern const TINIB	tinib_table[];
+
+/*
+ *  TCBã®ã¨ãªã¢ï¼Os_Lcfg.cï¼
+ */
+extern TCB			tcb_table[];
+
+/*
+ *  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®åæå
+ */
+extern void task_initialize(void);
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·å
+ *
+ *  å¯¾è±¡ã¿ã¹ã¯ï¼p_tcbã§æå®ããã¿ã¹ã¯ï¼ãèµ·åãã
+ *  ï¼ä¼æ­¢ç¶æ
+ããå®è¡ã§ããç¶æ
+ã«é·ç§»ãããï¼
+ *  ã¿ã¹ã¯ã®èµ·åæã«å¿
+è¦ãªåæåãè¡ã
+ */
+extern boolean make_active(TCB *p_tcb);
+
+/*
+ *  å®è¡ã§ããç¶æ
+ã¸ã®ç§»è¡
+ *
+ *  å¯¾è±¡ã¿ã¹ã¯ï¼p_tcbã§æå®ããã¿ã¹ã¯ï¼ãå®è¡ã§ããç¶æ
+ã«é·ç§»ããã
+ *  å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãï¼æé«åªå
+åº¦ã¿ã¹ã¯ï¼schedtskï¼ã®åªå
+åº¦ãããé«
+ *  ãå ´åã«ã¯ï¼å¯¾è±¡ã¿ã¹ã¯ãæ°ããæé«åªå
+åº¦ã¿ã¹ã¯ã¨ãï¼ããã¾ã§ã®æé«
+ *  åªå
+åº¦ã¿ã¹ã¯ãã¬ãã£ã­ã¥ã¼ã®å
+é ­ã«å
+¥ãã
+ *  ããã§ãªãå ´åã«ã¯ï¼å¯¾è±¡ã¿ã¹ã¯ãã¬ãã£ã­ã¥ã¼ã®æ«å°¾ã«å
+¥ãã
+ *  å¯¾è±¡ã¿ã¹ã¯ãæé«åªå
+åº¦ã¿ã¹ã¯ã¨ããå ´åã«ï¼TRUE ãè¿ã
+ */
+extern boolean make_runnable(TCB *p_tcb);
+
+/*
+ *  å®è¡ã§ããç¶æ
+ããä»ã®ç¶æ
+ã¸ã®é·ç§»
+ */
+extern void make_non_runnable(void);
+
+/*
+ *  æé«åªå
+é ä½ã¿ã¹ã¯ã®ãµã¼ã
+ *
+ *  ã¬ãã£ã­ã¥ã¼ä¸­ã®æé«åªå
+é ä½ã®ã¿ã¹ã¯ããµã¼ããã
+ *  ã¬ãã£ã­ã¥ã¼ãç©ºã®å ´åã«ã¯ï¼ãã®é¢æ°ãå¼ã³åºãã¦ã¯ãªããªã
+ */
+extern void search_schedtsk(void);
+
+/*
+ *  ã¿ã¹ã¯ã®ããªã¨ã³ãã
+ *
+ *  èªã¿ã¹ã¯ãå®è¡å¯è½ç¶æ
+ã«ç§»è¡ããï¼æé«åªå
+åº¦ã¿ã¹ã¯ãå®è¡ç¶æ
+ã«ãã
+ *  ãã®é¢æ°ããæ»ã£ãå¾ã«ï¼dispatch ãå¼ã³åºãã¦ä»ã®ã¿ã¹ã¯ã¸åãæ¿ãã
+ *  ãã¨ãæ³å®ãã¦ãã
+ */
+extern void preempt(void);
+
+/*
+ *  å®è¡ä¸­ã®ã¿ã¹ã¯ãSUSPENDEDç¶æ
+ã«ãã
+ */
+extern void suspend(void);
+
+/*
+ *  ãªã½ã¼ã¹å
+¨è§£æ¾
+ */
+extern void release_taskresources(TCB *p_tcb);
+
+/*
+ *  ã«ã¦ã³ã¿å
+¨åæå
+ */
+extern void cancel_taskcounters(TCB *p_tcb);
+
+/*
+ *  æºäºå¦çå°ç¨ã¿ã¹ã¯ã®èµ·å
+ *
+ *  æ¡ä»¶ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+ */
+extern StatusType activate_task_action(OSAPCB *p_expire_osapcb, TaskType TaskID);
+
+/*
+ *  æºäºå¦çå°ç¨ã¤ãã³ãã®ã»ãã
+ *
+ *  æ¡ä»¶ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+ */
+extern StatusType set_event_action(OSAPCB *p_expire_osapcb, TaskType TaskID, EventMaskType Mask);
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ããã¿ã¹ã¯ãåé¤ãã
+ */
+extern void remove_task_from_queue(TCB *p_tcb, PriorityType remove_task_pri);
+
+/*
+ *  ã¬ãã£ã­ã¥ã¼ã«å
+¥ã£ã¦ããã¿ã¹ã¯ãä¼æ­¢ç¶æ
+ã«ãã
+ */
+extern void suspend_ready_task(TCB *p_tcb, PriorityType remove_task_pri);
+
+/*
+ *  èªã¿ã¹ã¯ã®å¼·å¶çµäº
+ */
+extern void force_terminate_task(TCB *p_tcb);
+
+/*
+ *  ã¿ã¹ã¯ä¸æ­£çµäºæã«å¼ã¶é¢æ°
+ */
+extern void exit_task(void);
+
+/*
+ *  OSAPæå±ããã¿ã¹ã¯ã®å¼·å¶çµäº
+ */
+extern void force_term_osap_task(OSAPCB *p_osapcb);
+
+/*
+ *  p_schedtskãã¬ãã£ã­ã¥ã¼ã®å
+é ­ã«éé¿
+ */
+extern void move_schedtsk(void);
+
+#endif /* TOPPERS_TASK_H_ */
Index: /atk2-sc3-1.4.0-ntisr/kernel/task_manage.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/kernel/task_manage.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/kernel/task_manage.c	(revision 172)
@@ -0,0 +1,497 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: task_manage.c 464 2015-12-10 11:16:08Z witz-itoyo $
+ */
+
+/*
+ *		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«
+ */
+
+#include "kernel_impl.h"
+#include "check.h"
+#include "task.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_TSKSTAT
+#define LOG_TSKSTAT(p_tcb)
+#endif /* LOG_TSKSTAT */
+
+#ifndef LOG_ACTTSK_ENTER
+#define LOG_ACTTSK_ENTER(tskid)
+#endif /* LOG_ACTTSK_ENTER */
+
+#ifndef LOG_ACTTSK_LEAVE
+#define LOG_ACTTSK_LEAVE(ercd)
+#endif /* LOG_ACTTSK_LEAVE */
+
+#ifndef LOG_TERTSK_ENTER
+#define LOG_TERTSK_ENTER()
+#endif /* LOG_TERTSK_ENTER */
+
+#ifndef LOG_TERTSK_LEAVE
+#define LOG_TERTSK_LEAVE(ercd)
+#endif /* LOG_TERTSK_LEAVE */
+
+#ifndef LOG_CHNTSK_ENTER
+#define LOG_CHNTSK_ENTER(tskid)
+#endif /* LOG_CHNTSK_ENTER */
+
+#ifndef LOG_CHNTSK_LEAVE
+#define LOG_CHNTSK_LEAVE(ercd)
+#endif /* LOG_CHNTSK_LEAVE */
+
+#ifndef LOG_SCHED_LEAVE
+#define LOG_SCHED_ENTER()
+#endif /* LOG_SCHED_LEAVE */
+
+#ifndef LOG_SCHED_LEAVE
+#define LOG_SCHED_LEAVE(ercd)
+#endif /* LOG_SCHED_LEAVE */
+
+#ifndef LOG_GETTID_ENTER
+#define LOG_GETTID_ENTER()
+#endif /* LOG_GETTID_ENTER */
+
+#ifndef LOG_GETTID_LEAVE
+#define LOG_GETTID_LEAVE(ercd, p_tskid)
+#endif /* LOG_GETTID_LEAVE */
+
+#ifndef LOG_GETTST_ENTER
+#define LOG_GETTST_ENTER(tskid)
+#endif /* LOG_GETTST_ENTER */
+
+#ifndef LOG_GETTST_LEAVE
+#define LOG_GETTST_LEAVE(ercd, p_state)
+#endif /* LOG_GETTST_LEAVE */
+
+
+/*
+ *  ã¿ã¹ã¯ã®èµ·å
+ */
+#ifdef TOPPERS_ActivateTask
+
+StatusType
+ActivateTask(TaskType TaskID)
+{
+	StatusType	ercd = E_OK;
+	TCB			*p_tcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_ACTTSK_ENTER(TaskID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_ACTIVATETASK);
+	CHECK_ID(TaskID < tnum_task);
+	p_tcb = get_tcb(TaskID);
+	CHECK_RIGHT(p_tcb->p_tinib->acsbtmp);
+
+	p_osapcb = p_tcb->p_tinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* èµ·åããã¿ã¹ã¯æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	if (p_tcb->tstat == SUSPENDED) {
+		if ((make_active(p_tcb) != FALSE) && (callevel_stat == TCL_TASK)) {
+			dispatch();
+		}
+	}
+	else {
+		S_D_CHECK_LIMIT(p_tcb->actcnt < p_tcb->p_tinib->maxact);
+
+		p_tcb->actcnt += 1U;
+	}
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_ACTTSK_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_ActivateTask);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_ActivateTask */
+
+/*
+ *  èªã¿ã¹ã¯ã®çµäº
+ */
+#ifdef TOPPERS_TerminateTask
+
+StatusType
+TerminateTask(void)
+{
+	StatusType ercd = E_OK;
+
+	LOG_TERTSK_ENTER();
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_TERMINATETASK);
+	CHECK_RESOURCE(p_runtsk->p_lastrescb == NULL);
+
+	x_nested_lock_os_int();
+	/*
+	 *  å
+é¨ãªã½ã¼ã¹ã®è§£æ¾ã¯åªå
+åº¦ãä¸ããã ããªã®ã§ï¼ããã§ã¯
+	 *  ä½ãããªãã¦ãã
+	 */
+
+	suspend();
+
+	LOG_TERTSK_LEAVE(E_OK);
+	exit_and_dispatch();
+	ASSERT_NO_REACHED;
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+	call_errorhook(ercd, OSServiceId_TerminateTask);
+	x_nested_unlock_os_int();
+#endif /* CFG_USE_ERRORHOOK */
+
+  exit_no_errorhook:
+	LOG_TERTSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_TerminateTask */
+
+/*
+ *  èªã¿ã¹ã¯ã®çµäºã¨ã¿ã¹ã¯ã®èµ·å
+ */
+#ifdef TOPPERS_ChainTask
+
+StatusType
+ChainTask(TaskType TaskID)
+{
+	/*
+	 *  ããã§ã® ercd ã®åæåã¯æ¬æ¥ã¯ä¸è¦ã§ãããï¼ã³ã³ãã¤ã©ã®è­¦
+	 *  åã¡ãã»ã¼ã¸ãé¿ããããã«åæåãã¦ãã
+	 */
+	StatusType	ercd = E_OK;
+	TCB			*p_tcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_CHNTSK_ENTER(TaskID);
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_CHAINTASK);
+	CHECK_RESOURCE(p_runtsk->p_lastrescb == NULL);
+	CHECK_ID(TaskID < tnum_task);
+	p_tcb = get_tcb(TaskID);
+	CHECK_RIGHT(p_tcb->p_tinib->acsbtmp);
+
+	p_osapcb = p_tcb->p_tinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* èµ·åããã¿ã¹ã¯æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+
+	if (p_tcb == p_runtsk) {
+		make_non_runnable();
+		(void) make_active(p_runtsk);
+	}
+	else {
+		/*
+		 *  ã¨ã©ã¼æã«å¯ä½ç¨ãæ®ããªãããã«ï¼ã¨ã©ã¼ãã§ãã¯ã¯
+		 *  ã¿ã¹ã¯çµäºå¦çã®åã«è¡ãå¿
+è¦ããã
+		 */
+		S_D_CHECK_LIMIT((p_tcb->tstat == SUSPENDED)
+						|| (p_tcb->actcnt < p_tcb->p_tinib->maxact));
+
+		suspend();
+
+		if (p_tcb->tstat == SUSPENDED) {
+			(void) make_active(p_tcb);
+		}
+		else {
+			p_tcb->actcnt += 1U;
+		}
+	}
+
+	LOG_CHNTSK_LEAVE(E_OK);
+	exit_and_dispatch();
+	ASSERT_NO_REACHED;
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_ChainTask);
+#endif /* CFG_USE_ERRORHOOK */
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_CHNTSK_LEAVE(ercd);
+	return(ercd);
+}
+
+#endif /* TOPPERS_ChainTask */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã©ã®å¼ã³åºã
+ */
+#ifdef TOPPERS_Schedule
+
+StatusType
+Schedule(void)
+{
+	/*
+	 *  ããã§ã® ercd ã®åæåã¯æ¬æ¥ã¯ä¸è¦ã§ãããï¼ã³ã³ãã¤ã©ã®è­¦
+	 *  åã¡ãã»ã¼ã¸ãé¿ããããã«åæåãã¦ãã
+	 */
+	StatusType ercd = E_OK;
+
+	LOG_SCHED_ENTER();
+	CHECK_DISABLEDINT();
+	CHECK_CALLEVEL(CALLEVEL_SCHEDULE);
+	CHECK_RESOURCE(p_runtsk->p_lastrescb == NULL);
+
+	x_nested_lock_os_int();
+	if (p_runtsk->p_tinib->inipri > nextpri) {
+		p_runtsk->curpri = p_runtsk->p_tinib->inipri;
+		preempt();
+		dispatch();
+		p_runtsk->curpri = p_runtsk->p_tinib->exepri;
+	}
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_SCHED_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+	call_errorhook(ercd, OSServiceId_Schedule);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_Schedule */
+
+/*
+ *  å®è¡ç¶æ
+ã®ã¿ã¹ã¯IDã®åç
+§
+ */
+#ifdef TOPPERS_GetTaskID
+
+StatusType
+GetTaskID(TaskRefType TaskID)
+{
+	StatusType ercd = E_OK;
+
+	LOG_GETTID_ENTER();
+	CHECK_CALLEVEL(CALLEVEL_GETTASKID);
+	CHECK_PARAM_POINTER(TaskID);
+	CHECK_MEM_WRITE(TaskID, TaskType);
+	*TaskID = (p_runtsk == NULL) ? INVALID_TASK : TSKID(p_runtsk);
+
+  exit_no_errorhook:
+	LOG_GETTID_LEAVE(ercd, TaskID);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.p_tskid = TaskID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetTaskID);
+	x_nested_unlock_os_int();
+	goto exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_GetTaskID */
+
+/*
+ *  ã¿ã¹ã¯ç¶æ
+ã®åç
+§
+ */
+#ifdef TOPPERS_GetTaskState
+
+StatusType
+GetTaskState(TaskType TaskID, TaskStateRefType State)
+{
+	StatusType	ercd = E_OK;
+	TCB			*p_tcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_GETTST_ENTER(TaskID);
+	CHECK_CALLEVEL(CALLEVEL_GETTASKSTATE);
+	CHECK_ID(TaskID < tnum_task);
+	CHECK_PARAM_POINTER(State);
+	CHECK_MEM_WRITE(State, TaskStateType);
+	p_tcb = get_tcb(TaskID);
+	CHECK_RIGHT(p_tcb->p_tinib->acsbtmp);
+
+	p_osapcb = p_tcb->p_tinib->p_osapcb;
+	x_nested_lock_os_int();
+
+	/* èµ·åããã¿ã¹ã¯æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) ||
+				   (p_osapcb == p_runosap));
+	*State = (p_tcb == p_runtsk) ? RUNNING : p_tcb->tstat;
+
+  d_exit_no_errorhook:
+	x_nested_unlock_os_int();
+  exit_no_errorhook:
+	LOG_GETTST_LEAVE(ercd, State);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  exit_errorhook:
+	x_nested_lock_os_int();
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+	_errorhook_par2.p_stat = State;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_GetTaskState);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+}
+
+#endif /* TOPPERS_GetTaskState */
+
+/*
+ *  æºäºå¦çå°ç¨ã¿ã¹ã¯ã®èµ·å
+ *
+ *  æ¡ä»¶ï¼OSå²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼ã°ãã
+ */
+#ifdef TOPPERS_activate_task_action
+
+StatusType
+activate_task_action(OSAPCB *p_expire_osapcb, TaskType TaskID)
+{
+	StatusType	ercd = E_OK;
+	TCB			*p_tcb;
+	OSAPCB		*p_osapcb;
+
+	LOG_ACTTSK_ENTER(TaskID);
+	p_tcb = get_tcb(TaskID);
+
+	p_osapcb = p_tcb->p_tinib->p_osapcb;
+	/* æºäºç¹æå±ã®OSAPåã³èµ·åããã¿ã¹ã¯æå±ã®OSAPã®ç¶æ
+ããã§ãã¯ */
+	D_CHECK_ACCESS((p_osapcb->osap_stat == APPLICATION_ACCESSIBLE) || (p_expire_osapcb == p_osapcb));
+
+	if (p_tcb->tstat == SUSPENDED) {
+		(void) make_active(p_tcb);
+	}
+	else {
+		S_D_CHECK_LIMIT(p_tcb->actcnt < p_tcb->p_tinib->maxact);
+
+		p_tcb->actcnt += 1U;
+	}
+
+  d_exit_no_errorhook:
+	LOG_ACTTSK_LEAVE(ercd);
+	return(ercd);
+
+#ifdef CFG_USE_ERRORHOOK
+  d_exit_errorhook:
+#ifdef CFG_USE_PARAMETERACCESS
+	_errorhook_par1.tskid = TaskID;
+#endif /* CFG_USE_PARAMETERACCESS */
+	call_errorhook(ercd, OSServiceId_ActivateTask);
+	goto d_exit_no_errorhook;
+#endif /* CFG_USE_ERRORHOOK */
+
+}
+
+#endif /* TOPPERS_activate_task_action */
Index: /atk2-sc3-1.4.0-ntisr/library/histogram.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/library/histogram.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/library/histogram.c	(revision 172)
@@ -0,0 +1,284 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2006-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: histogram.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		å®è¡æéåå¸éè¨ã¢ã¸ã¥ã¼ã«
+ */
+
+#include "histogram.h"
+#include "target_timer.h"
+#include "target_test.h"
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®æ°
+ */
+#ifndef TNUM_HIST
+#define TNUM_HIST		10
+#endif /* TNUM_HIST */
+
+/*
+ *  ã¿ã¼ã²ããä¾å­é¨ã§è¨­å®å¤æ´ããããã®ãã¯ã­
+ */
+#ifndef HISTTIM                     /* å®è¡æéè¨æ¸¬ç¨ã®æå»ã®ãã¼ã¿å */
+#define HISTTIM			SystemTimeUsType
+#endif /* HISTTIM */
+
+#ifndef HIST_GET_TIM                /* å®è¡æéè¨æ¸¬ç¨ã®ç¾å¨æå»ã®åå¾ */
+#ifndef TOPPERS_SUPPORT_GET_UTM
+#error get_utm is not supported
+#endif /* TOPPERS_SUPPORT_GET_UTM */
+#define HIST_GET_TIM(p_time)	((void) get_utm(p_time))
+#endif /* HIST_GET_TIM */
+
+#ifndef HIST_CONV_TIM               /* æå»ã®å·®ããå®è¡æéã¸ã®å¤æ */
+#define HIST_CONV_TIM(time)		((uint32) (time))
+#endif /* HIST_CONV_TIM */
+
+#ifndef HIST_BM_HOOK                /* å®è¡æéè¨æ¸¬ç´åã«è¡ãã¹ãå¦ç */
+#define HIST_BM_HOOK()
+#endif /* HIST_BM_HOOK */
+
+LOCAL_INLINE void
+get_utm(HISTTIM *p_time)
+{
+#ifndef GET_UTIM
+	*p_time = (HISTTIM) get_tim_utime();
+#else /* GET_UTIM */
+	*p_time = (HISTTIM) GET_UTIM();
+#endif /* GET_UTIM */
+
+}
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ç®¡çãã­ãã¯
+ */
+typedef struct histogram_control_block {
+	HISTTIM	begin_time;             /* è¨æ¸¬éå§æå» */
+	uint32	maxval;                 /* åå¸ãè¨é²ããæå¤§æé */
+	uint32	*histarea;              /* åå¸ãè¨é²ããã¡ã¢ãªé å */
+	uint32	over;                   /* æå¤§æéãè¶
+ããåº¦æ° */
+	uint32	under;                  /* æéã®éè»¢ãçãããåº¦æ° */
+	boolean	initialized;            /* åæåæ¸ã¿ãã©ããã®ãã©ã° */
+} HISTCB;
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ç®¡çãã­ãã¯ã®ã¨ãªã¢
+ */
+HISTCB histcb_table[TNUM_HIST];
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬IDã®æå°å¤ã¨æå¤§å¤
+ */
+#define TMIN_HISTID		1
+#define TMAX_HISTID		((TMIN_HISTID + TNUM_HIST) - 1)
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®åæå
+ */
+boolean
+init_hist(ObjectIDType histid, uint32 maxval, uint32 *histarea)
+{
+	HISTCB	*p_histcb;
+	uint32	i;
+	boolean ret = TRUE;
+
+	/* ä¸æ­£ãªåå¸è¨æ¸¬IDã®å ´åFALSEãè¿ã */
+	if ((histid < TMIN_HISTID) || (histid > TMAX_HISTID)) {
+		ret = FALSE;
+	}
+	else {
+		p_histcb = &(histcb_table[histid - TMIN_HISTID]);
+
+		for (i = 0U; i <= maxval; i++) {
+			histarea[i] = 0U;
+		}
+		p_histcb->maxval = maxval;
+		p_histcb->histarea = histarea;
+		p_histcb->over = 0U;
+		p_histcb->under = 0U;
+		p_histcb->initialized = TRUE;
+	}
+	return(ret);
+}
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®éå§
+ */
+boolean
+begin_measure(ObjectIDType histid)
+{
+	HISTCB	*p_histcb;
+	boolean ret = TRUE;
+
+	/* ä¸æ­£ãªåå¸è¨æ¸¬IDã®å ´åFALSEãè¿ã */
+	if ((histid < TMIN_HISTID) || (histid > TMAX_HISTID)) {
+		ret = FALSE;
+	}
+	else {
+		p_histcb = &(histcb_table[histid - TMIN_HISTID]);
+
+		/* åæåãã¦ããªãå ´åFALSEãè¿ã */
+		if (p_histcb->initialized == FALSE)	{
+			ret = FALSE;
+		}
+		else {
+			HIST_BM_HOOK();
+			HIST_GET_TIM(&(p_histcb->begin_time));
+		}
+	}
+	return(ret);
+}
+
+/*
+ *  å®è¡æéè¨æ¸¬ã®çµäº
+ */
+boolean
+end_measure(ObjectIDType histid)
+{
+	HISTCB	*p_histcb;
+	HISTTIM	end_time;
+	uint32	val;
+	boolean ret = TRUE;
+
+	HIST_GET_TIM(&end_time);
+
+	/* ä¸æ­£ãªåå¸è¨æ¸¬IDã®å ´åFALSEãè¿ã */
+	if ((histid < TMIN_HISTID) || (histid > TMAX_HISTID)) {
+		ret = FALSE;
+	}
+	else {
+		p_histcb = &(histcb_table[histid - TMIN_HISTID]);
+
+		/* åæåãã¦ããªãå ´åFALSEãè¿ã */
+		if (p_histcb->initialized == FALSE)	{
+			ret = FALSE;
+		}
+		else {
+			val = HIST_CONV_TIM(end_time - p_histcb->begin_time);
+			if (val <= p_histcb->maxval) {
+				p_histcb->histarea[val]++;
+			}
+			else if (val <= ((uint32) 0x7fffffff)) {
+				p_histcb->over++;
+			}
+			else {
+				p_histcb->under++;
+			}
+		}
+	}
+	return(ret);
+}
+
+/*
+ *  å®è¡æéåå¸è¨æ¸¬ã®è¡¨ç¤º
+ */
+boolean
+print_hist(ObjectIDType histid)
+{
+	HISTCB	*p_histcb;
+	uint32	i;
+	boolean ret = TRUE;
+
+	/* ä¸æ­£ãªåå¸è¨æ¸¬IDã®å ´åFALSEãè¿ã */
+	if ((histid < TMIN_HISTID) || (histid > TMAX_HISTID)) {
+		ret = FALSE;
+	}
+	else {
+		p_histcb = &(histcb_table[histid - TMIN_HISTID]);
+
+		/* åæåãã¦ããªãå ´åFALSEãè¿ã */
+		if (p_histcb->initialized == FALSE)	{
+			ret = FALSE;
+		}
+		else {
+			for (i = 0U; i <= p_histcb->maxval; i++) {
+				if (p_histcb->histarea[i] > 0U) {
+#ifndef MEASURE_100_NANO
+					syslog_2(LOG_NOTICE, "%d : %d", i, p_histcb->histarea[i]);
+#else
+					syslog_3(LOG_NOTICE, "%d.%d : %d", i / 10, i % 10, p_histcb->histarea[i]);
+#endif /* MEASURE_100_NANO */
+				}
+			}
+			if (p_histcb->over > 0U) {
+				syslog_2(LOG_NOTICE, "> %d : %d", p_histcb->maxval, p_histcb->over);
+			}
+			if (p_histcb->under > 0U) {
+				syslog_1(LOG_NOTICE, "> 0x7fffffff : %d", p_histcb->under);
+			}
+		}
+	}
+
+	return(ret);
+}
Index: /atk2-sc3-1.4.0-ntisr/library/log_output.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/library/log_output.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/library/log_output.c	(revision 172)
@@ -0,0 +1,275 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: log_output.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°ã®ãã©ã¼ãããåºå
+ */
+
+#include "log_output.h"
+
+void
+_kernel_KernelLibrarySyslog(void *param)
+{
+#ifdef USE_KERNEL_LIBRARY_SYSLOG
+	KERLIBSLG_PRM *prm = (KERLIBSLG_PRM	*) param;
+
+	switch (prm->index) {
+	case KERLIBSLG_ID_SYSLOG_INITIALIZE:
+		_syslog_syslog_initialize();
+		break;
+
+	case KERLIBSLG_ID_SYSLOG_WRI_LOG:
+		prm->return_er = _syslog_syslog_wri_log(prm->prio, prm->p_const_syslog);
+		break;
+
+	case KERLIBSLG_ID_SYSLOG_MSK_LOG:
+		prm->return_er = _syslog_syslog_msk_log(prm->lowmask);
+		break;
+
+	case KERLIBSLG_ID_SYSLOG_PRINTF:
+		_syslog_syslog_printf(prm->p_format, prm->p_args, prm->outputc);
+		break;
+
+	case KERLIBSLG_ID_SYSLOG_PRINT:
+		_syslog_syslog_print(prm->p_const_syslog, prm->outputc);
+		break;
+
+	default:
+		/* ä¸è¨ã®ã±ã¼ã¹ä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã */
+		break;
+	}
+#endif /* USE_KERNEL_LIBRARY_SYSLOG */
+	return;
+}
+
+/*
+ *  æ°å¤ãæå­åã«å¤ææï¼uintptråã®æ°å¤ã®æå¤§æå­æ°
+ *  8é²æ°ï¼10é²æ°ï¼16é²æ°ã¸å¤æãæ³å®
+ *  åä½ä¾ï¼
+ *  2Byteã®å ´åï¼16é²æ°ï¼FFFF  â4æå­
+ *             ï¼10é²æ°ï¼65535 â5æå­
+ *             ï¼ 8é²æ°ï¼177777â6æå­
+ *               âCONVERT_BUFLENã¯æå¤§ã®6æå­ãè¿ã
+ *  è¨ç®ãã©ã¡ã¼ã¿ï¼
+ *  8U:1ãã¤ãã®ãããæ°
+ *  2U:3ã§å²ã£ãéã®ä½ã1ãããï¼ã¾ãã¯2ãããåãå«ããããã®è£æ­£å¤
+ *  3U:10é²æ°ã¸å¤ææï¼æå¤§3ãããã§1æå­ã«ãªã
+ *     (4ãããã ã¨2æ¡æ°å­ã«ãªããã)
+ *  è¨ç®ä¾ï¼
+ *  2Byteã®å ´å
+ *     ãããæ°ã¯2 * 8U = 16bit
+ *     åç´ã«3ã§å²ãã¨ï¼16 / 3 = 5ã¨ãªãï¼ä½ã1ãããåã®æå­æ°ã
+ *     åãæ¨ã¦ããã¦ãã¾ã
+ *     3ã§å²ãåã«2ãããåè¶³ããã¨ã§ï¼åæ¨ã¦ãé²ã
+ *     (16 + 2) / 3 = 6æå­
+ */
+#define CONVERT_BUFLEN	(((sizeof(uintptr) * 8U) + 2U) / 3U)
+
+/*
+ *  æ°å¤ãæå­åã«å¤æ
+ */
+static void
+convert(uintptr val, uint32 radix, const char8 *radchar,
+		uint32 width, boolean minus, boolean padzero, void (*outputc)(char8 c))
+{
+	char8	buf[CONVERT_BUFLEN];
+	uint32	i, j;
+
+	i = 0U;
+	do {
+		buf[i++] = radchar[val % radix];
+		val /= radix;
+	} while ((i < CONVERT_BUFLEN) && (val != 0U));
+
+	if ((minus != FALSE) && (width > 0U)) {
+		width -= 1U;
+	}
+	if ((minus != FALSE) && (padzero != FALSE)) {
+		(*outputc)('-');
+	}
+	for (j = i; j < width; j++) {
+		(*outputc)((char8) ((padzero != FALSE) ? '0' : ' '));
+	}
+	if ((minus != FALSE) && (padzero == FALSE)) {
+		(*outputc)('-');
+	}
+	while (i > 0U) {
+		(*outputc)(buf[--i]);
+	}
+}
+
+/*
+ *  æå­åæ´å½¢åºå
+ */
+static const char8	raddec[] = "0123456789";
+static const char8	radhex[] = "0123456789abcdef";
+static const char8	radHEX[] = "0123456789ABCDEF";
+
+void
+_syslog_syslog_printf(const char8 *format, const uintptr *p_args, void (*outputc)(char8 c))
+{
+	char8		c;
+	uint32		width;
+	boolean		padzero;
+	sintptr		val;
+	const char8	*str;
+
+	while ((c = *format++) != '\0') {
+		if (c != '%') {
+			(*outputc)(c);
+			continue;
+		}
+
+		width = 0U;
+		padzero = FALSE;
+		if ((c = *format++) == '0') {
+			padzero = TRUE;
+			c = *format++;
+		}
+		while (('0' <= c) && (c <= '9')) {
+			width = (width * 10U) + (c - '0');
+			c = *format++;
+		}
+		if (c == 'l') {
+			c = *format++;
+		}
+		switch (c) {
+		case 'd':
+			val = (sintptr) (*p_args++);
+			if (val >= 0) {
+				convert((uintptr) val, 10U, raddec,
+						width, FALSE, padzero, outputc);
+			}
+			else {
+				convert((uintptr) (-val), 10U, raddec,
+						width, TRUE, padzero, outputc);
+			}
+			break;
+		case 'u':
+			val = (sintptr) (*p_args++);
+			convert((uintptr) val, 10U, raddec, width, FALSE, padzero, outputc);
+			break;
+		case 'x':
+		case 'p':
+			val = (sintptr) (*p_args++);
+			convert((uintptr) val, 16U, radhex, width, FALSE, padzero, outputc);
+			break;
+		case 'X':
+			val = (sintptr) (*p_args++);
+			convert((uintptr) val, 16U, radHEX, width, FALSE, padzero, outputc);
+			break;
+		case 'c':
+			(*outputc)((char8) (uintptr) (*p_args++));
+			break;
+		case 's':
+			str = (const char8 *) (*p_args++);
+			while ((c = *str++) != '\0') {
+				(*outputc)(c);
+			}
+			break;
+		case '%':
+			(*outputc)('%');
+			break;
+		case '\0':
+			format--;
+			break;
+		default:
+			/* ä¸è¨ã®ã±ã¼ã¹ä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã */
+			break;
+		}
+	}
+}
+
+/*
+ *  ã­ã°æ
+å ±ã®åºå
+ */
+void
+_syslog_syslog_print(const SYSLOG *p_syslog, void (*outputc)(char8 c))
+{
+	switch (p_syslog->logtype) {
+	case LOG_TYPE_COMMENT:
+		_syslog_syslog_printf((const char8 *) (p_syslog->loginfo[0]),
+							  &(p_syslog->loginfo[1]), outputc);
+		break;
+	case LOG_TYPE_ASSERT:
+		_syslog_syslog_printf("%s:%u: Assertion '%s' failed.",
+							  &(p_syslog->loginfo[0]), outputc);
+		break;
+	default:
+		/* ä¸è¨ã®ã±ã¼ã¹ä»¥å¤ã®å ´åï¼åºåã¯è¡ããªã */
+		break;
+	}
+}
Index: /atk2-sc3-1.4.0-ntisr/library/strerror.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/library/strerror.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/library/strerror.c	(revision 172)
@@ -0,0 +1,174 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: strerror.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¨ã©ã¼ã¡ãã»ã¼ã¸æå­åãè¿ãé¢æ°
+ */
+
+#include "Os.h"
+#include "t_stdlib.h"
+#include "Ioc.h"
+
+
+const char8 *
+atk2_strerror(StatusType ercd)
+{
+	/* ã¨ã©ã¼æå­åãã¼ãã«	*/
+	static const char8	*ercd_tbl[] = {
+		"E_OK",
+		"E_OS_ACCESS",
+		"E_OS_CALLEVEL",
+		"E_OS_ID",
+		"E_OS_LIMIT",
+		"E_OS_NOFUNC",
+		"E_OS_RESOURCE",
+		"E_OS_STATE",
+		"E_OS_VALUE",
+		"E_OS_SERVICEID",
+		"E_OS_ILLEGAL_ADDRESS",
+		"E_OS_MISSINGEND",
+		"E_OS_DISABLEDINT",
+		"E_OS_STACKFAULT",
+		"E_OS_PROTECTION_MEMORY",
+		"E_OS_PROTECTION_TIME_TASK",
+		"E_OS_PROTECTION_TIME_ISR",
+		"E_OS_PROTECTION_ARRIVAL_TASK",
+		"E_OS_PROTECTION_ARRIVAL_ISR",
+		"E_OS_PROTECTION_LOCKED_RESOURCE",
+		"E_OS_PROTECTION_LOCKED_OSINT",
+		"E_OS_PROTECTION_LOCKED_ALLINT",
+		"E_OS_PROTECTION_EXCEPTION",
+		"E_OS_PROTECTION_FATAL",
+		"E_OS_MODE",
+		"E_OS_SHUTDOWN_FATAL",
+		"E_OS_PARAM_POINTER",
+		"E_OS_SYS_ASSERT_FATAL",
+		"E_OS_STACKINSUFFICIENT",
+		"E_OS_CORE",
+		"E_OS_SPINLOCK",
+		"E_OS_INTERFERENCE_DEADLOCK",
+		"E_OS_NESTING_DEADLOCK",
+		"E_OS_SHUTDOWN_OTHER_CORE",
+		"E_OS_TIMEINSUFFICIENT",
+		"E_OS_PROTECTION_TIMEWINDOW",
+		"E_OS_PROTECTION_COUNT_ISR",
+		"unknown error"
+	};
+
+	StatusType			error;
+
+	if (ercd > (StatusType) ERRCODE_NUM) {
+		error = (StatusType) (ERRCODE_NUM + 1U);
+	}
+	else {
+		error = ercd;
+	}
+	return(ercd_tbl[error]);
+}
+
+
+const char8 *
+atk2_ioc_strerror(StatusType ercd)
+{
+	char8 *str;
+
+	switch (ercd) {
+	case IOC_E_OK:
+		str = "IOC_E_OK";
+		break;
+
+	case IOC_E_NOK:
+		str = "IOC_E_NOK";
+		break;
+
+	case IOC_E_LIMIT:
+		str = "IOC_E_LIMIT";
+		break;
+
+	case IOC_E_LOST_DATA:
+		str = "IOC_E_LOST_DATA";
+		break;
+
+	case IOC_E_NO_DATA:
+		str = "IOC_E_NO_DATA";
+		break;
+
+	default:
+		str = "unknown error";
+		break;
+	}
+
+	return(str);
+}
Index: /atk2-sc3-1.4.0-ntisr/library/t_perror.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/library/t_perror.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/library/t_perror.c	(revision 172)
@@ -0,0 +1,97 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: t_perror.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®åºå
+ */
+
+#include "t_syslog.h"
+#include "t_stdlib.h"
+
+void
+t_perror(uint32 prio, const char8 *file, sint32 line, const char8 *expr, StatusType ercd)
+{
+	syslog_5(prio, "%s (%d) reported by '%s' in line %d of '%s'.",
+			 atk2_strerror(ercd), ercd, expr, line, file);
+
+}
+
+void
+t_ioc_perror(uint32 prio, const char8 *file, sint32 line, const char8 *expr, StatusType ercd)
+{
+	syslog_5(prio, "%s (%d) reported by '%s' in line %d of '%s'.",
+			 atk2_ioc_strerror(ercd), ercd, expr, line, file);
+
+}
Index: /atk2-sc3-1.4.0-ntisr/library/vasyslog.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/library/vasyslog.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/library/vasyslog.c	(revision 172)
@@ -0,0 +1,144 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: vasyslog.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		å¯å¤æ°å¼æ°ã®ã·ã¹ãã ã­ã°ã©ã¤ãã©ãª
+ */
+#include "t_syslog.h"
+#include <stdarg.h>
+
+#ifndef TOPPERS_OMIT_SYSLOG
+
+void
+syslog(uint32 prio, const char8 *format, ...)
+{
+	SYSLOG	syslog;
+	va_list	ap;
+	uint32	i;
+	char8	c;
+	boolean	lflag;
+
+	syslog.logtype = LOG_TYPE_COMMENT;
+	syslog.loginfo[0] = (sintptr) format;
+	i = 1U;
+	va_start(ap, format);
+
+	while (((c = *format++) != '\0') && (i < TMAX_LOGINFO)) {
+		if (c != '%') {
+			continue;
+		}
+
+		lflag = FALSE;
+		c = *format++;
+		while (('0' <= c) && (c <= '9')) {
+			c = *format++;
+		}
+		if (c == 'l') {
+			lflag = TRUE;
+			c = *format++;
+		}
+		switch (c) {
+		case 'd':
+			syslog.loginfo[i++] = (lflag != FALSE) ? (sintptr) va_arg(ap, sint32)
+								  : (sintptr) va_arg(ap, sint32);
+			break;
+		case 'u':
+		case 'x':
+		case 'X':
+			syslog.loginfo[i++] = (lflag != FALSE) ? (sintptr) va_arg(ap, uint32)
+								  : (sintptr) va_arg(ap, uint32);
+			break;
+		case 'p':
+			syslog.loginfo[i++] = (sintptr) va_arg(ap, void *);
+			break;
+		case 'c':
+			syslog.loginfo[i++] = (sintptr) va_arg(ap, sint32);
+			break;
+		case 's':
+			syslog.loginfo[i++] = (sintptr) va_arg(ap, const char8 *);
+			break;
+		case '\0':
+			format--;
+			break;
+		default:
+			/* ä¸è¨ã®ã±ã¼ã¹ä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã */
+			break;
+		}
+	}
+	va_end(ap);
+	(void) syslog_wri_log(prio, &syslog);
+}
+
+#endif /* TOPPERS_OMIT_SYSLOG */
Index: /atk2-sc3-1.4.0-ntisr/obj/Makefile
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/Makefile	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/Makefile	(revision 172)
@@ -0,0 +1,707 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2012-2013 by Spansion LLC, USA
+#  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.sample 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+#
+#  ã¿ã¼ã²ããã®æå®ï¼Makefile.targetã§ä¸æ¸ããããã®ãé²ãããï¼
+#
+all:
+
+#
+#  ã¿ã¼ã²ããç¥ç§°ã®å®ç¾©
+#
+TARGET = rh850f1h_pb_ghs
+
+OMIT_WARNING_ALL = true
+
+#
+#  ãã­ã°ã©ãã³ã°è¨èªã®å®ç¾©
+#
+SRCLANG = c
+ifeq ($(SRCLANG),c++)
+  USE_CXX = true
+  CXXLIBS = -lstdc++ -lm -lc
+  CXXRTS = cxxrt.o newlibrt.o
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+SRCDIR = ..
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ã®è¨­å®
+#
+OBJEXT = exe
+
+#
+#  å®è¡ç°å¢ã®å®ç¾©ï¼ã¿ã¼ã²ããä¾å­ã«ä¸æ¸ããããå ´åãããï¼
+#
+DBGENV := 
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#  ï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeå¯¾è±¡ã«ããæã¯ï¼ç©ºã«å®ç¾©ããï¼
+#
+KERNEL_LIB = 
+
+#
+#  ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®å®ç¾©
+#
+KERNEL_FUNCOBJS = 
+
+#
+#  ãã¬ã¼ã¹ã­ã°ãåå¾ãããã©ããã®å®ç¾©
+#
+ENABLE_TRACE = 
+
+#
+#  ã·ã¹ãã ã¿ã¤ã(ã¿ã¤ããã©ã¤ã)ãä½¿ç¨ãããã©ããã®å®ç¾©
+#
+ENABLE_SYS_TIMER = 
+
+#
+#  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãç¡å¹ã«ãããã©ããã®å®ç¾©
+#
+OMIT_HW_COUNTER = 
+
+#
+#  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+#
+ifeq ($(ENABLE_TRACE),true)
+      ENABLE_SYS_TIMER = true
+      CDEFS := $(CDEFS) -DTOPPERS_ENABLE_TRACE
+      KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/arch/logtrace
+      KERNEL_COBJS := $(KERNEL_COBJS) trace_config.o trace_dump.o
+endif
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«é¢ããå®ç¾©
+#
+CFGNAME = sample1
+CFGNAME := $(CFGNAME) target_serial
+ifdef ENABLE_SYS_TIMER
+  CFGNAME := $(CFGNAME) target_timer
+endif
+ifndef OMIT_HW_COUNTER
+  CFGNAME := $(CFGNAME) target_hw_counter
+endif
+CFGNAME := $(CFGNAME) target_mem
+
+#
+#  ã¦ã¼ãã£ãªãã£ãã­ã°ã©ã ã®åç§°
+#
+PERL = /usr/bin/perl
+CFG = $(SRCDIR)/cfg/cfg/cfg
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®å®ç¾©
+#
+OBJNAME = atk2-sc3
+ifdef OBJEXT
+  OBJFILE = $(OBJNAME).$(OBJEXT)
+  CFG1_OUT = cfg1_out.$(OBJEXT)
+  CFG2_OUT = cfg2_out.$(OBJEXT)
+  CFG3_OUT = cfg3_out.$(OBJEXT)
+else
+  OBJFILE = $(OBJNAME)
+  CFG1_OUT = cfg1_out
+  CFG2_OUT = cfg2_out
+  CFG3_OUT = cfg3_out
+endif
+
+#
+#  ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TARGETDIR = $(SRCDIR)/target/$(TARGET)
+
+#
+#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(TARGETDIR)/Makefile.target
+
+#
+#  ã¸ã§ãã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+PASS2_TF = $(SRCDIR)/kernel/kernel.tf $(SRCDIR)/kernel/kernel_common.tf
+DEF_TABS = $(SRCDIR)/kernel/kernel.csv
+CFG_KERNEL = atk2
+CFG_TABS := --ini-file $(SRCDIR)/kernel/kernel.ini $(CFG_TABS)
+CFG_TABS := --api-table $(DEF_TABS) \
+			--cfg1-def-table $(SRCDIR)/kernel/kernel_def.csv $(CFG_TABS)
+CFG_OBJS := Os_Lcfg.o kernel_mem.o ioc.o $(CFG_OBJS)
+CFG2_OUT_SRCS := Os_Lcfg.h Os_Lcfg.c Os_Cfg.h kernel_mem2.c Ioc.c Ioc.h $(CFG2_OUT_SRCS)
+CFG3_OUT_SRCS := kernel_mem3.c $(CFG3_OUT_SRCS)
+CFG2_OBJS := Os_Lcfg.o kernel_mem2.o ioc.o $(CFG2_OBJS)
+CFG3_OBJS := Os_Lcfg.o kernel_mem3.o ioc.o $(CFG3_OBJS)
+ifndef USE_CFG_PASS3
+	ALL_CFG_OBJS := $(CFG_OBJS) cfg1_out.o kernel_mem2.o $(ALL_CFG_OBJS)
+else
+	ALL_CFG_OBJS := $(CFG_OBJS) cfg1_out.o kernel_mem2.o kernel_mem3.o $(ALL_CFG_OBJS)
+endif
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+
+COPTS := $(COPTS) -g 
+ifndef OMIT_WARNING_ALL
+  COPTS := $(COPTS) -Wall -Wno-unused-label -Wpointer-arith
+endif
+ifndef OMIT_OPTIMIZATION
+  COPTS := $(COPTS) -O2
+endif
+CDEFS := $(CDEFS)  -DUSE_KERNEL_LIBRARY_SYSLOG
+INCLUDES := -I. -I$(SRCDIR)/include -I$(SRCDIR)/arch -I$(SRCDIR) $(INCLUDES)
+LDFLAGS := $(LDFLAGS) 
+CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS) 
+CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) 
+CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) 
+LIBS := $(LIBS) $(CXXLIBS)
+CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©
+#
+APPLNAME = sample1
+APPLDIR = 
+APPL_CFG_INPUT := $(foreach file,$(CFGNAME),$(file).arxml)
+
+APPL_DIR = $(APPLDIR) $(SRCDIR)/library
+APPL_ASMOBJS =
+ifdef USE_CXX
+  APPL_CXXOBJS = $(APPLNAME).o  sample2.o
+  APPL_COBJS =
+else
+  APPL_COBJS = $(APPLNAME).o  sample2.o
+endif
+APPL_CFLAGS =
+APPL_LIBS =
+ifdef APPLDIR
+  INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIR),-I$(dir))
+endif
+
+
+#
+#  ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã«é¢ããå®ç¾©
+#
+SYSMOD_DIR := $(SYSMOD_DIR) $(SRCDIR)/sysmod $(SRCDIR)/library
+SYSMOD_ASMOBJS := $(SYSMOD_ASMOBJS)
+SYSMOD_COBJS := $(SYSMOD_COBJS) banner.o syslog.o serial.o \
+				log_output.o vasyslog.o t_perror.o strerror.o chkobj.o \
+				$(CXXRTS)
+SYSMOD_CFLAGS := $(SYSMOD_CFLAGS)
+SYSMOD_LIBS := $(SYSMOD_LIBS)
+INCLUDES := $(INCLUDES)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+#  KERNEL_ASMOBJS: ã«ã¼ãã«ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãã¢ã»ã³ããªè¨èªã®
+#				   ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_COBJS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãCè¨èªã§ï¼ã½ã¼ã¹
+#				 ãã¡ã¤ã«ã¨1å¯¾1ã«å¯¾å¿ãããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_LCSRCS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããCè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ã§ï¼
+#				  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãç
+#				  æãããã®ï¼
+#  KERNEL_LCOBJS: ä¸ã®ã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_AUX_COBJS: ã­ã¼ãã¢ã¸ã¥ã¼ã«ã«å«ããªããï¼ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡
+#					 ã¤ã«ã¨åããªãã·ã§ã³ãé©ç¨ãã¦ã³ã³ãã¤ã«ãã¹ãï¼ã½ã¼
+#					 ã¹ãCè¨èªã®ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#
+KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/kernel
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS)
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel
+ifdef OMIT_MAKEOFFSET
+  OFFSET_H =
+else
+  OFFSET_H = offset.h
+endif
+
+
+#
+#  ã¿ã¼ã²ãããã¡ã¤ã«ï¼è¤æ°ãåæã«é¸æãã¦ã¯ãªããªãï¼
+#
+all: $(OBJFILE)
+#all: $(OBJNAME).bin
+#all: $(OBJNAME).srec
+
+##### ä»¥ä¸ã¯ç·¨éããªããã¨ #####
+
+#
+#  ç°å¢ã«ä¾å­ããã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+ifdef DBGENV
+  CDEFS := $(CDEFS) -D$(DBGENV)
+endif
+
+#
+#  ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+include $(SRCDIR)/kernel/Makefile.kernel
+ifdef KERNEL_FUNCOBJS
+  KERNEL_LCSRCS := $(KERNEL_FCSRCS)
+  KERNEL_LCOBJS := $(foreach file,$(KERNEL_FCSRCS),$($(file:.c=)))
+else
+  KERNEL_CFLAGS := -DALLFUNC $(KERNEL_CFLAGS)
+  KERNEL_COBJS := $(KERNEL_COBJS) \
+					$(foreach file,$(KERNEL_FCSRCS),$(file:.c=.o))
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãããã£ã¬ã¯ããªã«é¢ããå®ç¾©
+#
+vpath %.c $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+vpath %.S $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+vpath %.arxml $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+
+#
+#  ã³ã³ãã¤ã«ã®ããã®å¤æ°ã®å®ç¾©
+#
+KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
+SYSMOD_OBJS = $(SYSMOD_ASMOBJS) $(SYSMOD_COBJS)
+APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
+ALL2_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSMOD_OBJS) $(CFG_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ifdef KERNEL_LIB
+  ALL_LIBS = $(APPL_LIBS) $(SYSMOD_LIBS) -lkernel $(LIBS)
+  LIBS_DEP = $(filter %.a,$(ALL_LIBS)) $(KERNEL_LIB)/libkernel.a
+  LDFLAGS := $(LDFLAGS) -L$(KERNEL_LIB)
+  CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) -L$(KERNEL_LIB)
+  CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) -L$(KERNEL_LIB)
+else
+  ALL_LIBS = $(APPL_LIBS) $(SYSMOD_LIBS) libkernel.a $(LIBS)
+  LIBS_DEP = $(filter %.a,$(ALL_LIBS))
+endif
+
+ifdef LDSCRIPT
+  LDFLAGS := $(LDFLAGS) -T $(LDSCRIPT)
+endif
+ifdef CFG1_OUT_LDSCRIPT
+  CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS) -T $(CFG1_OUT_LDSCRIPT)
+endif
+ifdef CFG2_OUT_LDSCRIPT
+  CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) -T $(CFG2_OUT_LDSCRIPT)
+endif
+ifdef CFG3_OUT_LDSCRIPT
+  CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) -T $(CFG3_OUT_LDSCRIPT)
+endif
+
+#
+#  ãªãã»ãããã¡ã¤ã«ï¼offset.hï¼ã®çæè¦å
+#
+offset.h: $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(SRCDIR)/kernel/genoffset.tf
+	$(CFG) --pass 3 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg1_out.srec --symbol-table cfg1_out.syms \
+				-T $(OFFSET_TF) $(CFG_TABS) $(filter %.arxml,$^)
+
+#
+#  ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+cfg1_out.c: $(APPL_CFG_INPUT) $(SRCDIR)/kernel/kernel_def.csv
+	$(CFG) --pass 1 --kernel $(CFG_KERNEL) $(INCLUDES) $(CFG_TABS) $(filter %.arxml,$^)
+
+$(CFG2_OUT_SRCS): Os_Lcfg.timestamp
+Os_Lcfg.timestamp: $(APPL_CFG_INPUT) $(START_OBJS) cfg1_out.o $(END_OBJS) $(HIDDEN_OBJS) $(PASS2_TF) $(DEF_TABS)
+	$(LINK) $(CFLAGS) $(CFG1_OUT_LDFLAGS) -o $(CFG1_OUT) \
+						$(START_OBJS) cfg1_out.o $(END_OBJS)
+	$(NM) -v $(CFG1_OUT) > cfg1_out.syms
+	cp cfg1_out.run cfg1_out.srec
+	$(CFG) --pass 2 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				-T $(TARGETDIR)/target.tf $(CFG_TABS) $(filter %.arxml,$^)
+
+#  æ¢å­Os_Cfg.hã¨pass2ã§çæããOs_Cfg_tmp.hã¨ã®å·®åãããå ´åOs_Cfg.hãä¸æ¸ã
+	if ! cmp Os_Cfg.h Os_Cfg_tmp.h >/dev/null 2>&1 ; then \
+		mv Os_Cfg_tmp.h Os_Cfg.h ;\
+	else \
+		rm Os_Cfg_tmp.h ;\
+	fi
+ifdef KERNEL_LIB
+	if ! cmp Os_Cfg.h $(KERNEL_LIB)/Os_Cfg.h >/dev/null 2>&1 ; then \
+		echo Config files Os_Cfg.h and $(KERNEL_LIB)/Os_Cfg.h differ! ;\
+		diff -c Os_Cfg.h $(KERNEL_LIB)/Os_Cfg.h ;\
+		false;\
+	fi
+endif
+
+	touch -r Os_Lcfg.c Os_Lcfg.timestamp
+#
+#	ãã¹3ãä½¿ç¨ããå ´å
+#
+ifdef USE_CFG_PASS3
+kernel_mem3.c: $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(ALL2_OBJS) $(LIBS_DEP) $(SRCDIR)/kernel/kernel_mem.tf
+	$(LINK) $(CFLAGS) $(CFG2_OUT_LDFLAGS) -o $(CFG2_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG2_OUT) > cfg2_out.syms
+	cp cfg2_out.run cfg2_out.srec
+	rm -f $(CFG3_OUT_LDSCRIPT)
+	$(CFG) --pass 3 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg2_out.srec --symbol-table cfg2_out.syms \
+				-T $(TARGETDIR)/target_opt.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(CFG3_OUT_LDSCRIPT) ]; then \
+		sed "s/kernel_mem2\.o/kernel_mem3\.o/g" < $(CFG2_OUT_LDSCRIPT) \
+													> $(CFG3_OUT_LDSCRIPT); \
+	fi
+
+
+kernel_mem.c: $(APPL_CFG_INPUT) $(CFG3_OBJS) $(SRCDIR)/kernel/kernel_opt.tf $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(CFG3_OUT_LDFLAGS) -o $(CFG3_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG3_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG3_OUT) > cfg3_out.syms
+	cp cfg3_out.run cfg3_out.srec
+	rm -f $(LDSCRIPT)
+	$(CFG) --pass 4 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg3_out.srec --symbol-table cfg3_out.syms \
+				-T $(TARGETDIR)/target_mem.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(LDSCRIPT) ]; then \
+		sed "s/kernel_mem3\.o/kernel_mem\.o/g" < $(CFG3_OUT_LDSCRIPT) \
+															> $(LDSCRIPT); \
+	fi
+	sed -e '/_kernel_mo_/d' cfg3_out.syms | awk '{print $$1" "$$3}' > cfg3_out-tmp.syms
+	mv cfg3_out-tmp.syms cfg3_out.syms
+endif
+
+#
+#  ãã¹3ãä½¿ç¨ããªãå ´å
+#
+ifndef USE_CFG_PASS3
+kernel_mem.c: $(APPL_CFG_INPUT) $(CFG2_OBJS) $(SRCDIR)/kernel/kernel_mem.tf $(ATK2_SCHEMA) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(CFG2_OUT_LDFLAGS) -o $(CFG2_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG2_OUT) > cfg2_out.syms
+	cp cfg2_out.run cfg2_out.srec
+	touch cfg3_out.tf
+	$(CFG) --pass 4 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg2_out.srec --symbol-table cfg2_out.syms \
+				-T $(TARGETDIR)/target_mem.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(LDSCRIPT) ]; then \
+		sed "s/kernel_mem2\.o/kernel_mem\.o/g" < $(CFG2_OUT_LDSCRIPT) \
+															> $(LDSCRIPT); \
+	fi
+	sed -e '/_kernel_mo_/d' cfg2_out.syms | awk '{print $$1" "$$3}' > cfg2_out-tmp.syms
+	mv cfg2_out-tmp.syms cfg2_out.syms
+endif
+
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªãã¡ã¤ã«ã®çæ
+#
+libkernel.a: $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f libkernel.a
+	$(AR) $(KERNEL_LIB_OBJS) -archive -o libkernel.a
+
+#
+#  ç¹å¥ãªä¾å­é¢ä¿ã®å®ç¾©
+#
+banner.o: Os_Lcfg.timestamp $(filter-out banner.o,$(ALL2_OBJS)) $(LIBS_DEP)
+
+#
+#  å
+¨ä½ã®ãªã³ã¯
+#
+$(OBJFILE): $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(ALL_OBJS) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(LDFLAGS) -o $(OBJFILE) $(START_OBJS) \
+			-Wl,-map=$(OBJNAME).map \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(OBJFILE) | awk '{print $$1" "$$3}' > $(OBJNAME).syms
+	cp $(OBJFILE) $(OBJNAME).srec
+ifndef USE_CFG_PASS3
+	sed -e 's/kernel_mem2/kernel_mem/g' cfg2_out.syms | diff - $(OBJNAME).syms
+else
+	sed -e 's/kernel_mem3/kernel_mem/g' cfg3_out.syms | diff - $(OBJNAME).syms
+endif
+#	$(OBJDUMP) -d $(OBJFILE) > $(OBJNAME).dump
+
+#
+#  ãã¤ããªãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).bin: $(OBJFILE)
+	$(OBJCOPY) -O binary -S $(OBJFILE) $(OBJNAME).bin
+
+#
+#  Sã¬ã³ã¼ããã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).srec: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
+
+#
+#  ã³ã³ãã¤ã«çµæã®æ¶å»
+#
+.PHONY: clean
+clean:
+	rm -f \#* *~ *.o $(CLEAN_FILES)
+	rm -f $(OBJFILE) $(OBJNAME).syms $(OBJNAME).srec $(OBJNAME).bin $(OBJNAME).map
+	rm -f kernel_mem.c kernel_mem.h $(CFG3_OUT) cfg3_out.tf cfg3_out.syms cfg3_out.srec
+	rm -f $(CFG2_OUT) cfg2_out.tf cfg2_out.syms cfg2_out.srec
+	rm -f Os_Lcfg.timestamp $(CFG2_OUT_SRCS) $(CFG3_OUT_SRCS)
+	rm -f cfg1_out.c $(CFG1_OUT) cfg1_out.syms cfg1_out.srec
+	rm -f $(OBJNAME).dump
+	rm -f kernel.res
+	rm -f $(LDSCRIPT) $(CFG2_OUT_LDSCRIPT) $(CFG3_OUT_LDSCRIPT)
+ifndef KERNEL_LIB
+	rm -f libkernel.a
+endif
+	rm -f offset.h
+
+.PHONY: cleankernel
+cleankernel:
+	rm -rf $(KERNEL_LIB_OBJS)
+	rm -f offset.h
+
+.PHONY: cleandep
+cleandep:
+	if ! [ -f Makefile.depend ]; then \
+		rm -f Os_Lcfg.timestamp $(CFG2_OUT_SRCS); \
+		rm -f cfg1_out.c cfg1_out.o $(CFG1_OUT) cfg1_out.syms cfg1_out.srec; \
+		rm -f offset.h; \
+	fi
+	rm -f Makefile.depend
+
+.PHONY: realclean
+realclean: cleandep clean
+	rm -f $(REALCLEAN_FILES)
+
+#
+#  ã¸ã§ãã¬ã¼ã¿ãçæãããã¡ã¤ã«ã®ã³ã³ãã¤ã«ã«ã¼ã«ã¨ä¾å­é¢ä¿ä½æã«ã¼ã«
+#  ã®å®ç¾©
+#
+#  ã¸ã§ãã¬ã¼ã¿ãçæãããã¡ã¤ã«ã¯ï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ç¨ï¼ã·ã¹
+#  ãã ãµã¼ãã¹ç¨ï¼ã«ã¼ãã«ç¨ã®ãã¹ã¦ã®ãªãã·ã§ã³ãä»ãã¦ã³ã³ãã¤ã«ããï¼
+#
+OS_LCFG_CFLAGS = $(APPL_CFLAGS) $(SYSMOD_CFLAGS) $(KERNEL_CFLAGS)
+
+$(ALL_CFG_OBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(OS_LCFG_CFLAGS) $<
+
+$(ALL_CFG_OBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(OS_LCFG_CFLAGS) $<
+
+$(ALL_CFG_OBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(OS_LCFG_CFLAGS)" $< >> Makefile.depend
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ã®çæ
+#
+.PHONY: gendepend
+gendepend:
+	@echo "Generating Makefile.depend."
+
+.PHONY: depend
+ifdef KERNEL_LIB
+depend: cleandep Os_Lcfg.timestamp gendepend \
+		cfg1_out.d \
+		$(ALL2_OBJS:.o=.d)
+else
+depend: cleandep $(OFFSET_H) Os_Lcfg.timestamp gendepend \
+		cfg1_out.d \
+		$(KERNEL_AUX_COBJS:.o=.d) $(KERNEL_ASMOBJS:.o=.d) \
+		$(KERNEL_COBJS:.o=.d) $(KERNEL_LCSRCS:.c=.d) $(ALL2_OBJS:.o=.d)
+endif
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ã
+#
+-include Makefile.depend
+
+#
+#  éçºãã¼ã«ã®ã³ãã³ãåã®å®ç¾©
+#
+ifeq ($(TOOL),gcc)
+  #
+  #  GNUéçºç°å¢ç¨
+  #
+  ifdef GCC_TARGET
+    GCC_TARGET_PREFIX = $(GCC_TARGET)-
+  else
+    GCC_TARGET_PREFIX =
+  endif
+  CC = $(GCC_TARGET_PREFIX)gcc
+  CXX = $(GCC_TARGET_PREFIX)g++
+  AS = $(GCC_TARGET_PREFIX)as
+  LD = $(GCC_TARGET_PREFIX)ld
+  AR = $(GCC_TARGET_PREFIX)ar
+  NM = $(GCC_TARGET_PREFIX)nm
+  RANLIB = $(GCC_TARGET_PREFIX)ranlib
+  OBJCOPY = $(GCC_TARGET_PREFIX)objcopy
+  OBJDUMP = $(GCC_TARGET_PREFIX)objdump
+endif
+
+ifdef USE_CXX
+  LINK = $(CXX)
+else
+  LINK = $(CC)
+endif
+
+#
+#  ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+KERNEL_ALL_COBJS = $(KERNEL_COBJS) $(KERNEL_AUX_COBJS)
+
+$(KERNEL_ALL_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ALL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS): %.o:
+	$(CC) -DTOPPERS_$(*F) -o $@ -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS:.o=.s): %.s:
+	$(CC) -DTOPPERS_$(*F) -o $@ -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(SYSMOD_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(SYSMOD_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(SYSMOD_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(APPL_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS): %.o: %.cpp
+	$(CXX) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS:.o=.s): %.s: %.cpp
+	$(CXX) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+#
+#  ä¾å­é¢ä¿ä½æã«ã¼ã«ã®å®ç¾©
+#
+$(KERNEL_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(KERNEL_LCSRCS:.c=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) -T "$($*)" \
+		-O "-DALLFUNC $(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(KERNEL_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(SYSMOD_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(SYSMOD_CFLAGS)" $< >> Makefile.depend
+
+$(SYSMOD_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(SYSMOD_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_CXXOBJS:.o=.d): %.d: %.cpp
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CXX) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+#
+#  ããã©ã«ãã³ã³ãã¤ã«ã«ã¼ã«ãä¸æ¸ã
+#
+%.o: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c $(CFLAGS) $<
+
+%.s: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -S $(CFLAGS) $<
+
+%.o: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -c $(CFLAGS) $<
+
+%.s: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -S $(CFLAGS) $<
+
+%.o: %.S
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c $(CFLAGS) $<
Index: /atk2-sc3-1.4.0-ntisr/obj/Rte_Type.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/Rte_Type.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/Rte_Type.h	(revision 172)
@@ -0,0 +1,80 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2013-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2013-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2013-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2013-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2013-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Rte_Type.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *  ãµã³ãã«ç¨ããããã¡ã¤ã«(Rte_Type.hã¯RTEã¸ã§ãã¬ã¼ã¿ãçæãã)
+ */
+
+#ifndef RTE_TYPE_H
+#define RTE_TYPE_H
+
+#endif /* RTE_TYPE_H */
Index: /atk2-sc3-1.4.0-ntisr/obj/sample.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/sample.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/sample.h	(revision 172)
@@ -0,0 +1,138 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã ã®å
+±éããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE_H
+#define TOPPERS_SAMPLE_H
+
+#include "Os.h"
+#include "t_syslog.h"
+#include "t_stdlib.h"
+#include "sysmod/serial.h"
+#include "sysmod/syslog.h"
+
+#include "sysmod/banner.h"
+#include "target_sysmod.h"
+#include "target_serial.h"
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®å®ç¾©
+ */
+#include "target_test.h"
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  ãã©ã¡ã¼ã¿æ§é ä½ã®å®ç¾©
+ *  ä¿¡é ¼é¢æ°æä¾è
+ãããããã¡ã¤ã«ã§æä¾ãã
+ */
+struct parameter_struct {
+	sint32		*name1;
+	sint32		name2;
+	TaskType	task_no;
+	StatusType	ercd;
+	StatusType	return_value;   /* è¿æ»å¤ã¯æ§é ä½ã«å«ã */
+};
+
+extern void TaskProk(uint8 task_no);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE_H */
Index: /atk2-sc3-1.4.0-ntisr/obj/sample1.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/sample1.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/sample1.arxml	(revision 172)
@@ -0,0 +1,2172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>ImplementationDataTypes</SHORT-NAME>
+			<ELEMENTS>
+				<IMPLEMENTATION-DATA-TYPE>
+					<SHORT-NAME>uint8</SHORT-NAME>
+					<CATEGORY>VALUE</CATEGORY>
+				</IMPLEMENTATION-DATA-TYPE>
+			</ELEMENTS>
+		</AR-PACKAGE>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>sample1.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>sample2.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsOS</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsStackMonitoring</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsUseGetServiceId</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsUseParameterAccess</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsScalabilityClass</DEFINITION-REF>
+									<VALUE>SC3</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsStatus</DEFINITION-REF>
+									<VALUE>EXTENDED</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsHooks</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsErrorHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPostTaskHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPreTaskHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsProtectionHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsShutdownHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsStartupHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsHookStack</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack/OsHookStackSize</DEFINITION-REF>
+											<VALUE>512</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>TskLevelRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>STANDARD</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>CntRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>STANDARD</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>GroupRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>INTERNAL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NonPriTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task6</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_00</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task7</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_00</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>14</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>HighPriorityTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>15</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>4</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>7</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T2Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainCycArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActTskArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmActivateTask</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>12</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T3Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task4</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>6</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/GroupRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>scheduletable1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration</DEFINITION-REF>
+									<VALUE>60</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_0</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>20</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T10Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableSync</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy</DEFINITION-REF>
+											<VALUE>NONE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task5</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/GroupRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>scheduletable2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration</DEFINITION-REF>
+									<VALUE>50</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_0</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>20</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>30</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_2</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>40</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableSync</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy</DEFINITION-REF>
+											<VALUE>NONE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SetEvtArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task3</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T3Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleAlm1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmIncrementCounter</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter/OsAlarmIncrementCounterRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SchtblSampleCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleAlm2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task10</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T10Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task11</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task12</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task13</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_1</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task14</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_1</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask4</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainEvt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T2Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T3Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsEvent/OsEventMask</DEFINITION-REF>
+									<VALUE>65536</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T10Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T11Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T12Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>C2ISR_for_52</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIsr</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptNumber</DEFINITION-REF>
+									<VALUE>52</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptPriority</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrCategory</DEFINITION-REF>
+									<VALUE>CATEGORY_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptSource</DEFINITION-REF>
+									<VALUE>ENABLE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>C2ISR_for_53</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIsr</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptNumber</DEFINITION-REF>
+									<VALUE>53</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptPriority</DEFINITION-REF>
+									<VALUE>6</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrCategory</DEFINITION-REF>
+									<VALUE>CATEGORY_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptSource</DEFINITION-REF>
+									<VALUE>ENABLE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>KT_osap1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NonPriTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task6</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task7</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemoryModuleRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/banner</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemoryModuleRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/log_output</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemoryModuleRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/sample1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppIsrRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/C2ISR_for_53</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt1</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt2</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt2</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt3</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt3</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt4</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt4</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>actioctask3</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_actioctask3</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt5</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_RaiseInt</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt6</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_ClearInt</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>KT_osap2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask4</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>actioctask4</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_actioctask4</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NT_osap1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/HighPriorityTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task4</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task5</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task13</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task14</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainCycArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActTskArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SetEvtArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleAlm1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleAlm2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/scheduletable1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/scheduletable2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsLinkSection</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionName</DEFINITION-REF>
+									<VALUE>.stack_section</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/INTRAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>banner</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleName</DEFINITION-REF>
+									<VALUE>banner.o</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>log_output</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleName</DEFINITION-REF>
+									<VALUE>log_output.o</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>sample1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleName</DEFINITION-REF>
+									<VALUE>sample1.o</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task8</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>592</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task9</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>768</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActOtherOSAPTskArmCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActOtherOSAPTskArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArmCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmActivateTask</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task4</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>5</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>0</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NT_osap2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task8</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task9</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArmCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsRestartTask</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task8</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppIsrRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/C2ISR_for_52</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IOC</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc</DEFINITION-REF>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>IOC_QUE</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocBufferLength</DEFINITION-REF>
+											<VALUE>3</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_DATA</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>1U</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_RCV</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_SND0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_SND1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>IOC_DEQUE</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>0U</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>10U</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>2</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>20U</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_RCV</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap2</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_SND</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/obj/sample1.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/sample1.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/sample1.c	(revision 172)
@@ -0,0 +1,1481 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample1.c 485 2015-12-17 08:21:50Z witz-itoyo $
+ */
+
+/*
+ *		ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®æ¬ä½
+ *
+ *  ATK2-SC3ã®åºæ¬çãªåä½ãç¢ºèªããããã®ãµã³ãã«ãã­ã°ã©ã ï¼
+ *
+ *  ãã­ã°ã©ã ã®æ¦è¦ï¼PCã¨ãã¼ãéã§ã·ãªã¢ã«éä¿¡ãè¡ãï¼ã¦ã¼ã¶å
+¥å
+ *  ã³ãã³ãã«å¿ããåä½ã¨ã­ã°åºåãè¡ãªãï¼
+ *
+ *  ï¼ã³ãã³ãä¸è¦§ï¼
+ *  ã»ã¿ã¹ã¯æå®
+ *    '1' : ä»¥éã®ã³ãã³ãã Task1 ã«å¯¾ãã¦è¡ã
+ *    '2' : ä»¥éã®ã³ãã³ãã Task2 ã«å¯¾ãã¦è¡ã
+ *    '3' : ä»¥éã®ã³ãã³ãã Task3 ã«å¯¾ãã¦è¡ã
+ *    '4' : ä»¥éã®ã³ãã³ãã Task4 ã«å¯¾ãã¦è¡ã
+ *    '5' : ä»¥éã®ã³ãã³ãã Task5 ã«å¯¾ãã¦è¡ã
+ *    '6' : ä»¥éã®ã³ãã³ãã Task6 ã«å¯¾ãã¦è¡ã
+ *    '7' : ä»¥éã®ã³ãã³ãã Task7 ã«å¯¾ãã¦è¡ã
+ *    '8' : ä»¥éã®ã³ãã³ãã Task8 ã«å¯¾ãã¦è¡ã(ä¸é¨ã¿ã¹ã¯ç®¡çã³ãã³ãä½¿ç¨ã§ããªã)
+ *    '9' : ä»¥éã®ã³ãã³ãã Task9 ã«å¯¾ãã¦è¡ã(ä¸é¨ã¿ã¹ã¯ç®¡çã³ãã³ãä½¿ç¨ã§ããªã)
+ *  ã»ã¿ã¹ã¯ç®¡çæ©è½
+ *    'a' : ActivateTask ã«ã¦ã¿ã¹ã¯ãèµ·åããï¼
+ *    'A' : TerminateTask ã«ã¦ã¿ã¹ã¯ãçµäºããï¼
+ *    '!'(Shift+1) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task1 ãèµ·åãã
+ *    '"'(Shift+2) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task2 ãèµ·åãã
+ *    '#'(Shift+3) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task3 ãèµ·åãã
+ *    '$'(Shift+4) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task4 ãèµ·åãã
+ *    '%'(Shift+5) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task5 ãèµ·åãã
+ *    's' : ãã³ããªã¨ã³ããã£ãå±æ§ã§ããã¿ã¹ã¯ MainTask ã«ã¦æé«
+ *          åªå
+åº¦ã¿ã¹ã¯ HighPriorityTask ãèµ·åãï¼Schedule ã«ã¦
+ *          åã¹ã±ã¸ã¥ã¼ãªã³ã°ãè¡ãï¼
+ *    'S' : ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯ NonPriTask ãèµ·åãã
+ *          ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯ NonPriTask ã«ã¦æé«åªå
+åº¦
+ *          ã¿ã¹ã¯ HighPriorityTask ãèµ·åãï¼ã¿ã¹ã¯çµäºãã
+ *    'y' : ã¿ã¹ã¯11(ã¹ã¿ãã¯å
+±æ)ãå¼ã³åºãï¼ä¿¡é ¼é¢æ°ã§å¦çãè¡ã
+ *    'Y' : ã¿ã¹ã¯12(ã¹ã¿ãã¯å
+±æ)ãå¼ã³åºãï¼ä¿¡é ¼é¢æ°ã§å¦çãè¡ã
+ *          ã¿ã¹ã¯ä¸æ­£çµäºã«ããï¼ã¨ã©ã¼ã³ã¼ãã¯E_OS_MISSINGENDã§
+ *          ã¨ã©ã¼ããã¯ãå¼ã°ãã
+ *    'z' : å®è¡ä¸­ã®ã¿ã¹ã¯ãã GetTaskID ãå®è¡ãã¦ï¼å®è¡ç¶æ
+ã® TaskID ãåå¾ãã
+ *    'Z' : ã¡ã¤ã³ã¿ã¹ã¯ãã GetTaskState ãå®è¡ãã¦ï¼å¯¾è±¡ã¿ã¹ã¯ã®ç¶æ
+ãåå¾ãã
+ *    'x' : divå½ä»¤ãå®è¡ãã¦ï¼æªå®ç¾©å½ä»¤ä¾å¤ãçºçããã
+ *  ã»å²è¾¼ã¿ç®¡çæ©è½
+ *    'd' : DisableAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨
+ *          ç¤ºãï¼ EnableAllInterrupts ãå®è¡ãã
+ *    'D' : SuspendAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨
+ *          ç¤ºãï¼ããã« SuspendAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤
+ *          ãã¼å¤ã3åè¡¨ç¤ºãï¼ResumeAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿
+ *          ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼ResumeAllInterrupts ãå®è¡ãã
+ *    'f' : SuspendOSInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨
+ *          ç¤ºãï¼ããã« SuspendOSInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤
+ *          ãã¼å¤ã3åè¡¨ç¤ºãï¼ããã« SuspendAllInterruptsãå®è¡
+ *          å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼ ResumeAllInterrupts
+ *          ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼
+ *          ResumeOSInterrupts ãå®è¡å¾å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼
+ *          ResumeOSInterrupts ãå®è¡ãã
+ *    'T' : å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨ç¤ºãã
+ *  ã»ãªã½ã¼ã¹ç®¡çæ©è½
+ *    'k' : GetResource ã«ã¦ãªã½ã¼ã¹ TskLevelRes ãåå¾ããï¼ãªãï¼
+ *          Task3 ã¯ï¼ãã®ãªã½ã¼ã¹ããåªå
+åº¦ãé«ãããã¨ã©ã¼ã¨ãªã
+ *    'K' : ReleaseResource ã«ã¦ãªã½ã¼ã¹ TskLevelRes ãè§£æ¾ãã
+ *    'i' : GetResource ã«ã¦ãªã½ã¼ã¹ CntRes ãåå¾å¾ï¼å²è¾¼ã¿
+ *          ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼ReleaseResource ã«ã¦ãªã½ã¼ã¹
+ *          CntRes ãè§£æ¾ãã
+ *  ã»ã¤ãã³ãå¶å¾¡æ©è½
+ *    'e' : SetEvent ã«ã¦ã¤ãã³ããè¨­å®ããï¼Task2 ã¨ Task3 ä»¥å¤ã¯
+ *          å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'w' : ClearEvent ã«ã¦èªã¿ã¹ã¯ã®ã¤ãã³ããã¯ãªã¢ããï¼Task2 ã¨
+ *          Task3 ä»¥å¤ã¯å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'E' : GetEvent ã«ã¦ã¤ãã³ãç¶æ
+ãåå¾ããï¼Task2 ã¨ Task3
+ *          ä»¥å¤ã¯å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'W' : WaitEvent ã«ã¦èªã¿ã¹ã¯ã®ã¤ãã³ããå¾
+ã¤ï¼Task3 ã¨ Task4
+ *          ä»¥å¤ã¯ã¨ã©ã¼ã¨ãªã
+ *  ã»ã¢ã©ã¼ã æ©è½
+ *    'b' : GetAlarmBase ã«ã¦ã¢ã©ã¼ã  MainCycArm ã®ã¢ã©ã¼ã ãã¼ã¹
+ *          æ
+å ±ãåå¾ãã
+ *    'B' : GetAlarm ã«ã¦ã¢ã©ã¼ã  MainCycArm ã®æ®ãã«ã¦ã³ãå¤ã2å
+ *          é£ç¶ã§åå¾ãã
+ *    'v' : SetRelAlarm ã«ã¦ã¢ã©ã¼ã  ActTskArm ãèµ·åãï¼500ms å¾ã«
+ *          ã¿ã¹ã¯ Task1 ãèµ·åãã
+ *    'V' : SetRelAlarm ã«ã¦ã¢ã©ã¼ã  SetEvtArm ãèµ·åãï¼500ms å¾ã«
+ *          ã¤ãã³ã T3Evt ãè¨­å®ãã
+ *    'h' : CancelAlarm ã«ã¦ã¢ã©ã¼ã  ActTskArm ãã­ã£ã³ã»ã«ãã
+ *  ã»ã«ã¦ã³ã¿æä½æ©è½
+ *    'c' : ã¿ã¹ã¯ã«ã¦ IncrementCounter ãå®è¡ãï¼ã«ã¦ã³ã¿ SampleCnt
+ *          ã«ã·ã°ãã«éç¥ãã
+ *          1 ã·ã°ãã«ã§ã¢ã©ã¼ã  SampleArm ãæºäºãï¼ã³ã¼ã«ããã¯ã
+ *          å®è¡ãã
+ *    'C' : ã¿ã¹ã¯ã«ã¦ IncrementCounter ãå®è¡ãï¼ã«ã¦ã³ã¿ SampleCnt2
+ *          ã«ã·ã°ãã«éç¥ãã
+ *          1 ã·ã°ãã«ã§ã¢ã©ã¼ã  SampleArm1 ãæºäºãï¼SampleCnt3 ã
+ *          ã¤ã³ã¯ãªã¡ã³ãããï¼ SampleCnt3 ã¯ 1 ã·ã°ãã«ã§ SampleAlm2
+ *          ãæºäºãã³ã¼ã«ããã¯ãå®è¡ãã
+ *    'j' : ã¿ã¹ã¯ã«ã¦ GetCounterValue ãå®è¡ãã
+ *          åå¾ããå¤ã¯ä¿å­ãã
+ *    'J' : ã¿ã¹ã¯ã«ã¦ GetEalsedCounterValue ãå®è¡ãã
+ *          å
+ã®å¤ã¯ååã®GetCounterValue ã¾ãã¯ GetEalsedCounterValue ã«ã¦åå¾
+ *          ããå¤ã¨ããï¼ååï¼ã¾ãã¯ï¼GetCounterValueãå®è¡ãã¦ããªãå ´åã¯0
+ *          ã¨ãã
+ *
+ *    'r' : ã¿ã¹ã¯ã«ã¦ GetISRIDãå®è¡ãã
+ *          ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã¯GetISRIDãå¼åºããå ´åã¯ã¨ã©ã¼ã¨ãã¦
+ *          INVALID_ISRãè¿å´ããã
+ *
+ *          å²è¾¼ã¿ã³ã³ãã­ã¹ãããã®GetISRIDçºè¡ã¯ï¼SystemTimerCntã®ã³ã¼ã«ããã¯
+ *          ã«ã¼ãã³ï¼'n' ã³ãã³ãã§å®è¡ï¼ã«ã¦è¡ã
+ *
+ *          ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®GetISRIDçºè¡ã¯ï¼SampleCnt2ã®ã³ã¼ã«ããã¯
+ *          ã«ã¼ãã³ï¼'C' ã¾ãã¯ 'c' ã³ãã³ãã§å®è¡ï¼ã«ã¦è¡ã
+ *
+ *  ã»ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«å¶å¾¡æ©è½
+ *    't' : ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«åä½å¶å¾¡ON/OFF
+ *
+ *        'i' : SchtblSampleCntã«ã¦ã³ã¿ãã¤ã³ã¯ãªã¡ã³ããã
+ *              SchtblSampleCntã«ã¦ã³ã¿ã¯ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®é§åã«ã¦ã³ã¿
+ *        '1' : ä»¥éã®ã³ãã³ãã scheduletable1 ã«å¯¾ãã¦è¡ã(ããã©ã«ãå¤)
+ *        '2' : ä»¥éã®ã³ãã³ãã scheduletable2 ã«å¯¾ãã¦è¡ã
+ *        '3' : ä»¥éã®ã³ãã³ãã scheduletable3(å­å¨ããªãID) ã«å¯¾ãã¦è¡ã
+ *              ã³ãã³ãã®ã¨ã©ã¼ç¢ºèªã«ãä½¿ç¨ãã
+ *        's' : StartScheduleTableRelãå®è¡ãï¼ç¸å¯¾å¤(5)ã§ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãéå§ãã
+ *        'S' : StartScheduleTableAbsãå®è¡ãï¼çµ¶å¯¾å¤(5)ã§ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãéå§ãã
+ *        'f' : StopScheduleTableãå®è¡ãï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãåæ­¢ãã
+ *        'n' : NextScheduleTableãå®è¡ãï¼scheduletable2ã«åæ¿ãã
+ *        'N' : NextScheduleTableãå®è¡ãï¼scheduletable1ã«åæ¿ãã
+ *        'g' : GetScheduleTableStatusãå®è¡ãï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¶æ
+ãåå¾ãã
+ *        'q' : ShutdownOS( E_OK ) OSå®è¡å¶å¾¡æ©è½ã®'q'ã¨åç­æ©è½
+ *        'Q' : ShutdownOS( E_OS_STATE ) OSå®è¡å¶å¾¡æ©è½ã®'Q'ã¨åç­æ©è½
+ *
+ *  ã»OSå®è¡å¶å¾¡æ©è½
+ *    'p' : GetActiveApplicationMode ã«ã¦ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã
+ *          åå¾ãã
+ *    'q' : ShutdownOS ãã³ã¼ã E_OK ã§å®è¡ãï¼ãµã³ãã«ãã­ã°ã©ã ã
+ *          çµäºãã
+ *    'Q' : ShutdownOS ãã³ã¼ã E_OS_STATE ã§å®è¡ãï¼ãµã³ãã«ãã­ã°ã©ã 
+ *          ãçµäºãã
+ *
+ *  ã»IOCéåä¿¡æ©è½
+ *    'I' : IOCéåä¿¡ã¢ã¼ã
+ *
+ *        IOC APIãä½¿ç¨ããã¿ã¹ã¯(IocTaskX)ãé¸æ
+ *        '1' : IocTask1(NT_osap1ã«æå±)
+ *        '2' : IocTask2(NT_osap2ã«æå±)
+ *        '3' : IocTask3(KT_osap1ã«æå±)
+ *        '4' : IocTask4(KT_osap2ã«æå±)
+ *
+ *        IOC APIãé¸æ
+ *        '1' : IocSend_IOC_QUE_0(uint8 in1)
+ *        '2' : IocSend_IOC_QUE_1(uint8 in1)
+ *        '3' : IocWriteGroup_IOC_DEQUE(uint8 in1, uint8 in2, uint8 in3)
+ *        '4' : IocReceive_IOC_QUE(uint8 *out1)
+ *        '5' : IocReadGroup_IOC_DEQUE(uint8 *out1, uint8 *out2, uint8 *out3)
+ *        '6' : IocEmptyQueue_IOC_QUE(void)
+ *
+ *        éä¿¡APIé¸ææï¼éä¿¡ãã¼ã¿ãå
+¥åãã
+ *
+ *  ï¼ãªãã¸ã§ã¯ãä¸è¦§ï¼
+ *  ã»OS
+ *    ã¹ã¿ã¼ãã¢ããããã¯ï¼ä½¿ç¨
+ *    ã·ã£ãããã¦ã³ããã¯ï¼ä½¿ç¨
+ *    ã¨ã©ã¼ããã¯ï¼ä½¿ç¨
+ *    ãã¬ã¿ã¹ã¯ããã¯ï¼æªä½¿ç¨
+ *    ãã¹ãã¿ã¹ã¯ããã¯ï¼æªä½¿ç¨
+ *  ã»ã¿ã¹ã¯
+ *    ã¡ã¤ã³ã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼MainTask
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã³ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode1, AppMode2, AppMode3
+ *      æ¦è¦ï¼ã¦ã¼ã¶ã¤ã³ã¿ãã§ã¼ã¹ï¼ã·ãªã¢ã«IOããã³ãã³ããåä¿¡ãï¼
+ *            ããã«å¯¾å¿ããåä½ãè¡ãªãï¼
+ *            å¨æã¢ã©ã¼ã  MainCycArm ã«ããï¼10msãã¨ã«å¾
+ã¡è§£é¤ã
+ *            ã³ãã³ãã®åä¿¡æç¡ããã¼ãªã³ã°ãã
+ *            ã¤ãã³ãï¼IDï¼MainEvtï¼ãé¢é£ä»ãã¦ãã
+ *    æé«åªå
+åº¦ã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼HighPriorityTask
+ *      åªå
+åº¦ï¼15
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã­ã°ãåºåãã¦çµäºããï¼ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *            ããèµ·åããï¼ããªã¨ã³ãããã¦ãããã©ããã®ç¢ºèªç¨
+ *    ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼NonPriTask
+ *      åªå
+åº¦ï¼1
+ *      å¤éèµ·åæ°ï¼8
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã³ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼èµ·åã­ã°ãåºåãï¼æé«åªå
+åº¦ã¿ã¹ã¯ HighPriorityTask ã
+ *            èµ·åå¾ï¼çµäºã­ã°ãåºåãã¦ã¿ã¹ã¯ãçµäºãã
+ *    ã¿ã¹ã¯1
+ *      ã¿ã¹ã¯IDï¼Task1
+ *      åªå
+åº¦ï¼4
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode2
+ *      å¤éèµ·åæ°ï¼8
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯2
+ *      ã¿ã¹ã¯IDï¼Task2
+ *      åªå
+åº¦ï¼7
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            ã¤ãã³ã T2Evt ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯3
+ *      ã¿ã¹ã¯IDï¼Task3
+ *      åªå
+åº¦ï¼12
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode3
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ã¤ãã³ãå¾
+ã¡ãããã¨ãå¯è½ã§ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            ã¤ãã³ã T3Evt ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯4
+ *      ã¿ã¹ã¯IDï¼Task4
+ *      åªå
+åº¦ï¼6
+ *      å¤éèµ·åæ°ï¼5
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            å
+é¨ãªã½ã¼ã¹ GroupRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯5
+ *      ã¿ã¹ã¯IDï¼Task5
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼5
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            å
+é¨ãªã½ã¼ã¹ GroupRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯6
+ *      ã¿ã¹ã¯IDï¼Task6
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼-
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            SC3ã§ã¯ã·ã¹ãã ã¿ã¹ã¯ã¨ãã¦èµ·å
+ *            èµ·åããããã¨å³æé¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            ä½åº¦èµ·åãã¦ãOKã¨ãªã
+ *            Task7ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯7
+ *      ã¿ã¹ã¯IDï¼Task7
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼-
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            SC3ã§ã¯ã¦ã¼ã¶ã¿ã¹ã¯ã¨ãã¦èµ·å
+ *            èµ·åããããã¨å³æé¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            ä½åº¦èµ·åãã¦ãOKã¨ãªã
+ *            Task6ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯8
+ *      ã¿ã¹ã¯IDï¼Task8
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåããï¼ã¢ã¯ã»ã¹æ¨©éã®ãªãTask1ã«å¯¾ãã¦
+ *            GetTaskState()ãçºè¡ãã¦ï¼ã¨ã©ã¼ããã¯ãä¸ãã
+ *    ã¿ã¹ã¯9
+ *      ã¿ã¹ã¯IDï¼Task9
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¢ã¯ã»ã¹æ¨©éã®ããTask2ã«å¯¾ãã¦
+ *            GetTaskState()ãçºè¡ãã¦ï¼Task2ã®ã¹ãã¼ã¿ã¹ãåºåãã
+ *    ã¿ã¹ã¯10
+ *      ã¿ã¹ã¯IDï¼Task10
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T10Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯11
+ *      ã¿ã¹ã¯IDï¼Task11
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T11Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯12
+ *      ã¿ã¹ã¯IDï¼Task12
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T12Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯13
+ *      ã¿ã¹ã¯IDï¼Task13
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨(ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½)
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *            èµ·åããããä¿¡é ¼é¢æ°å®è¡å¾TerminateTaskã§çµäºãã
+ *            Task12ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯14
+ *      ã¿ã¹ã¯IDï¼Task14
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨(ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½)
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *            èµ·åããããä¿¡é ¼é¢æ°å®è¡å¾é¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            Task11ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    IocTask1
+ *      ã¿ã¹ã¯IDï¼IocTask1
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask2
+ *      ã¿ã¹ã¯IDï¼IocTask2
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask3
+ *      ã¿ã¹ã¯IDï¼IocTask3
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask4
+ *      ã¿ã¹ã¯IDï¼IocTask4
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *
+ *  ã»å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³
+ *    ã·ãªã¢ã«IOåä¿¡å²è¾¼ã¿
+ *      ISRIDï¼RxHwSerialInt
+ *      åªå
+åº¦ï¼2
+ *      ã«ãã´ãªï¼2
+ *      æ¦è¦ï¼ã³ãã³ããåä¿¡ãã
+ *  ã»ãªã½ã¼ã¹
+ *    ã¿ã¹ã¯ã¬ãã«ãªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼TskLevelRes
+ *      ãã­ããã£ï¼æ¨æº
+ *    ã¿ã¹ã¯ç¨ã«ã¦ã³ã¿ãªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼CntRes
+ *      ãã­ããã£ï¼æ¨æº
+ *    ã¿ã¹ã¯ã°ã«ã¼ããªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼GroupRes
+ *      ãã­ããã£ï¼å
+é¨
+ *  ã»ã¤ãã³ã
+ *    ã¡ã¤ã³ã¿ã¹ã¯ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼MainEvt
+ *    ã¿ã¹ã¯2ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼T2Evt
+ *    ã¿ã¹ã¯3ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼T3Evt
+ *  ã»ã«ã¦ã³ã¿
+ *    ã·ã¹ãã ã¿ã¤ãã«ã¦ã³ã¿
+ *      ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã«ã¦ã³ãå¤ï¼0ã999
+ *      å ç®å¤ï¼1
+ *    ãµã³ãã«ã«ã¦ã³ã¿
+ *      ã«ã¦ã³ã¿IDï¼SampleCnt
+ *      ã«ã¦ã³ãå¤ï¼0ã99
+ *      å ç®å¤ï¼10
+ *  ã»ã¢ã©ã¼ã 
+ *    ã¡ã¤ã³å¨æã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼MainCycArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¤ãã³ãè¨­å® MainEvt
+ *      èªåèµ·åï¼ãªã
+ *    ã¿ã¹ã¯èµ·åã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼ActTskArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¿ã¹ã¯èµ·å Task1
+ *      èªåèµ·åï¼ãªã
+ *    ã¤ãã³ãè¨­å®ã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼SetEvtArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¤ãã³ãè¨­å® T3Evt
+ *      èªåèµ·åï¼ãªã
+ *    IncrementCounterç¢ºèªç¨ã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼SampleArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼SampleCnt
+ *      ã¢ã¯ã·ã§ã³ï¼ã³ã¼ã«ããã¯é¢æ°å®è¡
+ *      èªåèµ·åï¼ãªã
+ *    ä»OSAPæå±ã¿ã¹ã¯èµ·åã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼ActOtherOSAPTskArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼SchtblSampleCnt
+ *      ã¢ã¯ã·ã§ã³ï¼ã¿ã¹ã¯èµ·å Task4
+ *      èªåèµ·åï¼AppMode1, AppMode2, AppMode3
+ *      è¨­å®ï¼ã«ã¦ã³ã¿5ï¼å¨æ0(åçº)
+ *  ã»ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ã
+ *    èªåèµ·åãªãã¢ã¼ã(MainTaskã®ã¿èªåèµ·å)
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode1
+ *    Task1èªåèµ·åã¢ã¼ã
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode2
+ *    Task3èªåèµ·åã¢ã¼ã
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode3
+ *  ã»ä¿¡é ¼é¢æ°
+ *    ä¿¡é ¼é¢æ°tfnt1
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *      ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ *    ä¿¡é ¼é¢æ°tfnt2
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *      ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ *    ä¿¡é ¼é¢æ°tfnt3
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããã®ShutdownOSã
+ *      åãä»ãã
+ *    ä¿¡é ¼é¢æ°tfnt4
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããä¿¡é ¼OSã¢ããª
+ *      ã±ã¼ã·ã§ã³ã«æå±ããã¿ã¹ã¯ãèµ·åãã
+ *
+ *  æ¬ãã¡ã¤ã«ã¯ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«
+ *  æå±ãã¦ãããªãã¸ã§ã¯ã,sample2.cã§ã¯
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ãã¦ãã
+ *  ãªãã¸ã§ã¯ããè¨è¿°ãã¦ãã
+ */
+
+#define TOPPERS_SVC_FUNCCALL
+
+#include "sample.h"
+#include "sample1.h"
+#include "Ioc.h"
+#include "target_hw_counter.h"
+
+#define GetAppModeInfo()	(0)
+
+/*
+ *  ãã­ãã¯ã·ã§ã³çºçæã®å¦çã¬ãã«
+ */
+#ifdef CFG_USE_PROTECTIONHOOK
+static const char8	*faulty_context_tbl[5] = {
+	"FC_INVALID",
+	"FC_TASK",
+	"FC_C2ISR",
+	"FC_SYSTEM_HOOK",
+	"FC_TRUSTED_FUNC"
+};
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+/*
+ *  ãã¡ã¤ã«åï¼è¡çªå·ã®åç
+§ç¨ã®å¤æ°
+ */
+extern const char8	*fatal_file_name;   /* ãã¡ã¤ã«å */
+extern sint32		fatal_line_num;     /* è¡çªå· */
+
+/*
+ *  å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+sint32 main(void);
+
+DEFINE_VAR_SSTACK(StackType, stack_00[COUNT_STK_T(0x200)]);
+
+extern uint8 GetCommand(void);
+extern void PutActTsk(uint8 task_no);
+extern void PutActNonPriTsk(void);
+extern void PutTermTsk(uint8 task_no);
+extern void PutChainTsk(uint8 from_task_no, uint8 to_task_no);
+extern void PutSchedule(void);
+extern void PutTaskID(void);
+extern void PutTaskState(uint8 task_no);
+extern void PutDisAllInt(void);
+extern void PutSusAllInt(void);
+extern void PutSusOSInt(void);
+extern void PutHwCnt3(void);
+extern void PutGetCntRes(void);
+extern void PutGetTskRes(void);
+extern void PutRelTskRes(void);
+extern void PutSetEvt(uint8 task_no);
+extern void PutClrEvt(uint8 task_no);
+extern void PutGetEvt(uint8 task_no);
+extern void PutWaitEvt(uint8 task_no);
+extern void PutArmBase(void);
+extern void PutArmTick(void);
+extern void PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no);
+extern void PutCanArm(void);
+extern void PutAppMode(void);
+extern void PutActIocTsk(void);
+extern void schedule_table_sample_routine(void);
+
+TASK(IocTask3);
+TASK(IocTask4);
+static void IocProk2(void);
+static uint8 GetCommandNoWait1(void);
+
+/*
+ *  å
+é¨ãã¼ã¿ãããã¡
+ */
+extern volatile uint8 command_tbl[14];                         /* ã³ãã³ãå¼æ¸¡ããã¼ãã« */
+
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#define error_log_ioc(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+
+#define	error_log_ioc(api)										   \
+	{															   \
+		StatusType ercd;										   \
+		ercd = api;     /* åAPIå®è¡ */							   \
+		if (ercd != E_OK) {										   \
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd)); \
+		}														   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt1
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *    ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt1, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	sint32					*p1;
+	sint32					p2;
+
+	p1 = local->name1;
+	p2 = local->name2;
+
+	local->return_value = (StatusType) ((*p1 * 2) + p2);
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt2
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *    ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt2, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	sint32					*p1;
+	sint32					p2;
+
+	p1 = local->name1;
+	p2 = local->name2;
+
+	local->return_value = (StatusType) ((*p1 * 4) + p2);
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt3
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããã®ShutdownOSã
+ *    åãä»ãã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt3, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	StatusType				ercd;
+
+	ercd = local->ercd;
+	ShutdownOS(ercd);
+
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt4
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããä¿¡é ¼OSã¢ããª
+ *    ã±ã¼ã·ã§ã³ã«æå±ããã¿ã¹ã¯ãèµ·åãã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt4, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	TaskType				task_no;
+
+	task_no = local->task_no;
+
+	error_log(ActivateTask(task_no));
+
+	return(E_OK);
+}
+
+/*
+ *  ã¡ã¤ã³ã¿ã¹ã¯
+ *
+ *  ã¦ã¼ã¶ã³ãã³ãã®åä¿¡ã¨ï¼ã³ãã³ããã¨ã®å¦çå®è¡
+ */
+TASK(MainTask)
+{
+	uint8					command;
+	uint8					task_no;
+	uint32					i;
+	struct parameter_struct	local;
+
+	TickType				val = 0U;
+	TickType				eval = 0U;
+
+	/*
+	 *  ã¿ã¹ã¯çªå·ã»ã³ãã³ããããã¡åæå
+	 */
+	task_no = (uint8) (0);
+	for (i = 0U; i < (sizeof(command_tbl) / sizeof(command_tbl[0])); i++) {
+		command_tbl[i] = 0U;
+	}
+
+    Asm("FETRAP 0xf");
+
+	/*
+	 *  MainCycArmãå¨æã¢ã©ã¼ã ã¨ãã¦è¨­å®
+	 */
+	SetRelAlarm(MainCycArm, TICK_FOR_10MS, TICK_FOR_10MS);
+
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+		WaitEvent(MainEvt);     /* 10msã®ä½æ¥­æéå¾
+ã¡ */
+		ClearEvent(MainEvt);
+
+		/*
+		 *  å
+¥åã³ãã³ãåå¾
+		 */
+		syslog(LOG_INFO, "Input Command:");
+		command = GetCommand();
+
+		/*
+		 *  å
+¥åã³ãã³ããã§ãã¯
+		 */
+		if ((command <= (uint8) (0x1fU)) || (command >= (uint8) (0x80U))) {
+			syslog(LOG_INFO, "Not ASCII character");
+		}
+		else {
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", command);
+#endif /* OMIT_ECHO */
+
+			/*
+			 *  ã³ãã³ãå¤å¥
+			 */
+			switch (command) {
+			case '1':
+			case '2':
+			case '3':
+			case '4':
+			case '5':
+			case '6':
+			case '7':
+			case '8':
+			case '9':
+				/*
+				 *  å¦çå¯¾è±¡ã¿ã¹ã¯ã®å¤æ´
+				 */
+				task_no = (uint8) (command - '1');
+				break;
+			case 'A':
+			case '!':
+			case '"':
+			case '#':
+			case '$':
+			case '%':
+			case 'z':
+			case 'k':
+			case 'K':
+			case 'l':
+			case 'i':
+			case 'w':
+			case 'W':
+				/*
+				 *  ã¿ã¹ã¯ã¸ã®ã³ãã³ãéç¥
+				 */
+				command_tbl[task_no] = command;
+				break;
+			/*
+			 *  ä»¥éã¯ã¡ã¤ã³ã¿ã¹ã¯ã§ã³ãã³ãå¦ç
+			 */
+			case 'a':
+				PutActTsk(task_no);
+				break;
+			case 's':
+				PutSchedule();
+				break;
+			case 'S':
+				PutActNonPriTsk();
+				break;
+			case 'Z':
+				PutTaskState(task_no);
+				break;
+			case 'x':
+				syslog(LOG_INFO, "call RAISE_CPU_EXCEPTION");
+				RAISE_CPU_EXCEPTION;
+				break;
+			case 'd':
+				PutDisAllInt();
+				break;
+			case 'D':
+				PutSusAllInt();
+				break;
+			case 'f':
+				PutSusOSInt();
+				break;
+			case 'T':
+				PutHwCnt3();
+				break;
+			case 'e':
+				PutSetEvt(task_no);
+				break;
+			case 'E':
+				PutGetEvt(task_no);
+				break;
+			case 'b':
+				PutArmBase();
+				break;
+			case 'B':
+				PutArmTick();
+				PutArmTick();
+				break;
+			case 'v':
+				/* SetRelAlarm(ActTskArm, 500, 0)ãå®è¡ */
+				PutSetRel(0U, 0U, 0U);
+				break;
+			case 'V':
+				/* SetRelAlarm(SetEvtArm, 500, 0)ãå®è¡ */
+				PutSetRel(1U, 0U, 0U);
+				break;
+			case 'h':
+				/* CancelAlarm(CallBackArm)ãå®è¡ */
+				PutCanArm();
+				break;
+			case 'c':
+				syslog(LOG_INFO, "Call IncrementCounter(SampleCnt)");
+				IncrementCounter(SampleCnt);
+				break;
+			case 'C':
+				syslog(LOG_INFO, "Call IncrementCounter(SampleCnt2)");
+				IncrementCounter(SampleCnt2);
+				break;
+			case 'j':
+				syslog(LOG_INFO, "GetCounterValue(MAIN_HW_COUNTER, val)");
+				GetCounterValue(MAIN_HW_COUNTER, &val);
+				syslog(LOG_INFO, " val = %d", val);
+				break;
+			case 'J':
+				syslog(LOG_INFO, "Pre val = %d", val);
+				syslog(LOG_INFO, "GetElapsedValue(MAIN_HW_COUNTER, val ,eval)");
+				GetElapsedValue(MAIN_HW_COUNTER, &val, &eval);
+				syslog(LOG_INFO, " val = %d", val);
+				syslog(LOG_INFO, " eval = %d", eval);
+				break;
+			case 'r':
+				syslog(LOG_INFO, "GetISRID() Call from Task Context");
+				syslog(LOG_INFO, "GetISRID() = %d", GetISRID());
+				break;
+			case 'p':
+				PutAppMode();
+				break;
+			case 't':
+				schedule_table_sample_routine();
+				break;
+			case 'q':
+				local.ercd = E_OK;
+				CallTrustedFunction(tfnt3, &local); /* ShutdownOS( E_OK ) */
+				break;
+			case 'Q':
+				local.ercd = E_OS_STATE;
+				CallTrustedFunction(tfnt3, &local); /* ShutdownOS( E_OS_STATE ) */
+				break;
+			case 'y':
+				PutActTsk(10U);
+				break;
+			case 'Y':
+				PutActTsk(11U);
+				break;
+			case 'I':
+				PutActIocTsk();
+				break;
+			default:
+				/* ä¸è¨ã®ã³ãã³ãä»¥å¤ã®å ´åï¼å¦çãè¡ããªã */
+				break;
+			}
+		}
+	}
+
+	/*
+	 *  ããã«ã¯ããªã
+	 */
+	syslog(LOG_INFO, "MainTask TERMINATE");
+	error_log(TerminateTask());
+}   /* TASK( MainTask ) */
+
+/*
+ *  ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *
+ *  å®è¡ä¸­ã¯ããªã¨ã³ããããªããã¨ã®ç¢ºèªç¨
+ */
+TASK(NonPriTask)
+{
+	syslog(LOG_INFO, "NonPriTask ACTIVATE");
+	syslog(LOG_INFO, "Call ActivateTask(HighPriorityTask)");
+	error_log(ActivateTask(HighPriorityTask));
+	syslog(LOG_INFO, "NonPriTask TERMINATE");
+
+	error_log(TerminateTask());
+}   /* TASK( NonPriTask ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯6
+ */
+TASK(Task6)
+{
+	TaskProk(5U);
+}   /* TASK( Task6 ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯7
+ */
+TASK(Task7)
+{
+	TaskProk(6U);
+}   /* TASK( Task7 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯3
+ */
+TASK(IocTask3)
+{
+	syslog(LOG_INFO, "IocTask3 ACTIVATE");
+
+	IocProk2();
+
+	syslog(LOG_INFO, "IocTask3 TERMINATE");
+	TerminateTask();
+}   /* TASK( IocTask3 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯4
+ */
+TASK(IocTask4)
+{
+	syslog(LOG_INFO, "IocTask4 ACTIVATE");
+
+	IocProk2();
+
+	syslog(LOG_INFO, "IocTask4 TERMINATE");
+	TerminateTask();
+}   /* TASK( IocTask4 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ */
+static void
+IocProk2(void)
+{
+	uint8			api;        /* ã³ãã³ãåä¿¡ãããã¡(API) */
+	uint8			data[3];    /* éä¿¡ãããã¡ */
+
+	volatile sint32 i;
+	Std_ReturnType	ercd;
+
+	syslog(LOG_INFO, "Select IOC API:");
+	api = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", api);
+#endif /* OMIT_ECHO */
+
+	switch (api) {
+	case '1':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_0");
+		error_log_ioc(IocSend_IOC_QUE_0(data[0]));
+		break;
+	case '2':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_1");
+		error_log_ioc(IocSend_IOC_QUE_1(data[0]));
+		break;
+	case '3':
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "Input send data%d:", i);
+			data[i] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", data[i]);
+#endif /* OMIT_ECHO */
+		}
+		syslog(LOG_INFO, "Call IocWriteGroup_IOC_DEQUE");
+		error_log_ioc(IocWriteGroup_IOC_DEQUE(data[0], data[1], data[2]));
+		break;
+	case '4':
+		syslog(LOG_INFO, "Call IocReceive_IOC_QUE");
+		ercd = IocReceive_IOC_QUE(&data[0]);
+#if !defined(CFG_USE_ERRORHOOK)
+		if (ercd != E_OK) {
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd));
+		}
+#endif /* !defined( CFG_USE_ERRORHOOK ) */
+		if ((ercd == IOC_E_OK) || (ercd == IOC_E_LOST_DATA)) {
+			syslog(LOG_INFO, "recv data:%c", data[0]);
+		}
+		break;
+	case '5':
+		syslog(LOG_INFO, "Call IocReadGroup_IOC_DEQUE");
+		error_log_ioc(IocReadGroup_IOC_DEQUE(&data[0], &data[1], &data[2]));
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "recv data%d:%c", i, data[i]);
+		}
+		break;
+	case '6':
+		syslog(LOG_INFO, "Call IocEmptyQueue_IOC_QUE");
+		error_log_ioc(IocEmptyQueue_IOC_QUE());
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* IocProk2 */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç(ã¦ã§ã¤ãç¡ã)
+ */
+uint8
+GetCommandNoWait1(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommandNoWait1 */
+
+/*
+ *  ã¦ã¼ã¶ã¡ã¤ã³é¢æ°
+ *
+ *  ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®å¤æ­ã¨ï¼ã«ã¼ãã«èµ·å
+ */
+sint32
+main(void)
+{
+	AppModeType	crt_app_mode;
+
+	/*
+	 *  ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®å¤æ­
+	 */
+	switch (GetAppModeInfo()) {
+	case 0:
+		crt_app_mode = AppMode1;
+		break;
+	case 1:
+		crt_app_mode = AppMode2;
+		break;
+	default:
+		crt_app_mode = AppMode3;
+		break;
+	}
+
+	/*
+	 *  ã«ã¼ãã«èµ·å
+	 */
+	StartOS(crt_app_mode);
+
+	while (1) {
+	}
+}   /* main */
+
+/*
+ *  ã¨ã©ã¼ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_ERRORHOOK
+void
+ErrorHook(StatusType Error)
+{
+
+	/*
+	 *  ã¨ã©ã¼è¦å ãã¨ã®ãã©ã¡ã¼ã¿ã­ã°åºå
+	 */
+	switch (OSErrorGetServiceId()) {
+	case OSServiceId_ActivateTask:
+		syslog(LOG_INFO, "Error:%s=ActivateTask(%d)", atk2_strerror(Error), OSError_ActivateTask_TaskID());
+		break;
+	case OSServiceId_TerminateTask:
+		syslog(LOG_INFO, "Error:%s=TerminateTask()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ChainTask:
+		syslog(LOG_INFO, "Error:%s=ChainTask(%d)", atk2_strerror(Error), OSError_ChainTask_TaskID());
+		break;
+	case OSServiceId_Schedule:
+		syslog(LOG_INFO, "Error:%s=Schedule()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetTaskID:
+		syslog(LOG_INFO, "Error:%s=GetTaskID(0x%p)", atk2_strerror(Error), OSError_GetTaskID_TaskID());
+		break;
+	case OSServiceId_GetTaskState:
+		syslog(LOG_INFO, "Error:%s=GetTaskState(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetTaskState_TaskID(), OSError_GetTaskState_State());
+		break;
+	case OSServiceId_EnableAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=EnableAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_DisableAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=DisableAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ResumeAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=ResumeAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_SuspendAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=SuspendAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ResumeOSInterrupts:
+		syslog(LOG_INFO, "Error:%s=ResumeOSInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_SuspendOSInterrupts:
+		syslog(LOG_INFO, "Error:%s=SuspendOSInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetISRID:
+		syslog(LOG_INFO, "Error:%s=GetISRID()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetResource:
+		syslog(LOG_INFO, "Error:%s=GetResource(%d)", atk2_strerror(Error), OSError_GetResource_ResID());
+		break;
+	case OSServiceId_ReleaseResource:
+		syslog(LOG_INFO, "Error:%s=ReleaseResource(%d)", atk2_strerror(Error), OSError_ReleaseResource_ResID());
+		break;
+	case OSServiceId_SetEvent:
+		syslog(LOG_INFO, "Error:%s=SetEvent(%d, 0x%x)", atk2_strerror(Error),
+			   OSError_SetEvent_TaskID(), OSError_SetEvent_Mask());
+		break;
+	case OSServiceId_ClearEvent:
+		syslog(LOG_INFO, "Error:%s=ClearEvent(0x%x)", atk2_strerror(Error), OSError_ClearEvent_Mask());
+		break;
+	case OSServiceId_GetEvent:
+		syslog(LOG_INFO, "Error:%s=GetEvent(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetEvent_TaskID(), OSError_GetEvent_Event());
+		break;
+	case OSServiceId_WaitEvent:
+		syslog(LOG_INFO, "Error:%s=WaitEvent(0x%x)", atk2_strerror(Error), OSError_WaitEvent_Mask());
+		break;
+	case OSServiceId_GetAlarmBase:
+		syslog(LOG_INFO, "Error:%s=GetAlarmBase(0x%p)", atk2_strerror(Error), OSError_GetAlarmBase_AlarmID());
+		break;
+	case OSServiceId_GetAlarm:
+		syslog(LOG_INFO, "Error:%s=GetAlarm(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetAlarm_AlarmID(), OSError_GetAlarm_Tick());
+		break;
+	case OSServiceId_SetRelAlarm:
+		syslog(LOG_INFO, "Error:%s=SetRelAlarm(%d, %d, %d)", atk2_strerror(Error),
+			   OSError_SetRelAlarm_AlarmID(), OSError_SetRelAlarm_increment(), OSError_SetRelAlarm_cycle());
+		break;
+	case OSServiceId_SetAbsAlarm:
+		syslog(LOG_INFO, "Error:%s=SetAbsAlarm(%d, %d, %d)", atk2_strerror(Error),
+			   OSError_SetAbsAlarm_AlarmID(), OSError_SetAbsAlarm_start(), OSError_SetAbsAlarm_cycle());
+		break;
+	case OSServiceId_CancelAlarm:
+		syslog(LOG_INFO, "Error:%s=CancelAlarm(%d)", atk2_strerror(Error), OSError_CancelAlarm_AlarmID());
+		break;
+	case OSServiceId_StartScheduleTableRel:
+		syslog(LOG_INFO, "Error:%s=StartScheduleTableRel(%d, %d)", atk2_strerror(Error),
+			   OSError_StartScheduleTableRel_ScheduleTableID(), OSError_StartScheduleTableRel_Offset());
+		break;
+	case OSServiceId_StartScheduleTableAbs:
+		syslog(LOG_INFO, "Error:%s=StartScheduleTableAbs(%d, %d)", atk2_strerror(Error),
+			   OSError_StartScheduleTableAbs_ScheduleTableID(), OSError_StartScheduleTableAbs_Start());
+		break;
+	case OSServiceId_StopScheduleTable:
+		syslog(LOG_INFO, "Error:%s=StopScheduleTable(%d)", atk2_strerror(Error), OSError_StopScheduleTable_ScheduleTableID());
+		break;
+	case OSServiceId_NextScheduleTable:
+		syslog(LOG_INFO, "Error:%s=NextScheduleTable(%d, %d)", atk2_strerror(Error),
+			   OSError_NextScheduleTable_ScheduleTableID_From(), OSError_NextScheduleTable_ScheduleTableID_To());
+		break;
+	case OSServiceId_GetScheduleTableStatus:
+		syslog(LOG_INFO, "Error:%s=GetScheduleTableStatus(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetScheduleTableStatus_ScheduleTableID(), OSError_GetScheduleTableStatus_ScheduleStatus());
+		break;
+	case OSServiceId_GetActiveApplicationMode:
+		syslog(LOG_INFO, "Error:%s=GetActiveApplicationMode()", atk2_strerror(Error));
+		break;
+	case OSServiceId_StartOS:
+		syslog(LOG_INFO, "Error:%s=StartOS()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ShutdownOS:
+		syslog(LOG_INFO, "Error:%s=ShutdownOS()", atk2_strerror(Error));
+		break;
+	case OSServiceId_IncrementCounter:
+		syslog(LOG_INFO, "Error:%s=IncrementCounter(%d)", atk2_strerror(Error), OSError_IncrementCounter_CounterID());
+		break;
+	case OSServiceId_TaskMissingEnd:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Send:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Write:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_SendGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_WriteGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Receive:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Read:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_ReceiveGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_ReadGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_EmptyQueue:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	default:
+		syslog(LOG_INFO, "Error:%s=UnKnownFunc()", atk2_strerror(Error));
+		break;
+	}
+
+}
+#endif /* CFG_USE_ERRORHOOK */
+
+/*
+ *  ãã¬ã¿ã¹ã¯ããã¯ã«ã¼ãã³
+ *
+ *  Task13/Task14å®è¡åã®ãã¬ã¿ã¹ã¯ããã¯ã®å ´åï¼ã¡ãã»ã¼ã¸ãåºå
+ */
+#ifdef CFG_USE_PRETASKHOOK
+void
+PreTaskHook(void)
+{
+	TaskType tskid;
+
+	GetTaskID(&tskid);
+	if (tskid == Task13) {
+		syslog(LOG_INFO, "\nPreTaskHook before Task13!\n");
+	}
+	if (tskid == Task14) {
+		syslog(LOG_INFO, "\nPreTaskHook before Task14!\n");
+	}
+}
+#endif /* CFG_USE_PRETASKHOOK */
+
+/*
+ *  ãã¹ãã¿ã¹ã¯ããã¯ã«ã¼ãã³
+ *
+ *  Task13/Task14å®è¡å¾ã®ãã¹ãã¿ã¹ã¯ããã¯ã®å ´åï¼ã¡ãã»ã¼ã¸ãåºå
+ */
+#ifdef CFG_USE_POSTTASKHOOK
+void
+PostTaskHook(void)
+{
+	TaskType tskid;
+
+	GetTaskID(&tskid);
+	if (tskid == Task13) {
+		syslog(LOG_INFO, "\nPostTaskHook after Task13!\n");
+	}
+	if (tskid == Task14) {
+		syslog(LOG_INFO, "\nPostTaskHook after Task14!\n");
+	}
+}
+#endif /* CFG_USE_POSTTASKHOOK */
+
+/*
+ *  ã¹ã¿ã¼ãã¢ããããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_STARTUPHOOK
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+extern void target_timer_initialize(void);
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+
+void
+StartupHook(void)
+{
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+	target_timer_initialize();
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+	syslog_initialize();
+	syslog_msk_log(LOG_UPTO(LOG_INFO));
+	InitSerial();
+	print_banner();
+}
+#endif /* CFG_USE_STARTUPHOOK */
+
+/*
+ *  ã·ã£ãããã¦ã³ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_SHUTDOWNHOOK
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+extern void target_timer_terminate(void);
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+
+void
+ShutdownHook(StatusType Error)
+{
+	/* çµäºã­ã°åºå */
+	syslog(LOG_INFO, "Sample System ShutDown");
+	syslog(LOG_INFO, "ShutDownCode:%s", atk2_strerror(Error));
+	syslog(LOG_INFO, "");
+
+	if (Error == E_OS_SYS_ASSERT_FATAL) {
+		syslog(LOG_INFO, "fatal_file_name:%s", fatal_file_name);
+		syslog(LOG_INFO, "fatal_line_num:%d", fatal_line_num);
+	}
+
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+	target_timer_terminate();
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+	TermSerial();
+
+}
+#endif /* CFG_USE_SHUTDOWNHOOK */
+
+/*
+ *  ãã­ãã¯ã·ã§ã³ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_PROTECTIONHOOK
+ProtectionReturnType
+ProtectionHook(StatusType FatalError)
+{
+	StatusType			ercd;
+	FaultyContextType	faulty_context;
+	TaskType			taskid;
+
+	syslog(LOG_INFO, "ProtectionHook");
+
+	if (FatalError == E_OS_STACKFAULT) {
+		syslog(LOG_INFO, "E_OS_STACKFAULT");
+		ercd = PRO_SHUTDOWN;
+	}
+	else if (FatalError == E_OS_PROTECTION_EXCEPTION) {
+		faulty_context = GetFaultyContext();
+		syslog(LOG_INFO, "E_OS_PROTECTION_EXCEPTION and GetFaultyContext() = %s", faulty_context_tbl[faulty_context]);
+
+		switch (faulty_context) {
+		case FC_TASK:
+			ercd = GetTaskID(&taskid);
+			if (taskid == MainTask) {
+				ercd = PRO_IGNORE;
+			}
+			else {
+				ercd = PRO_TERMINATETASKISR;
+			}
+			break;
+		case FC_C2ISR:
+			ercd = PRO_TERMINATETASKISR;
+			break;
+		case FC_SYSTEM_HOOK:
+			ercd = PRO_IGNORE;
+			break;
+		case FC_TRUSTED_FUNC:
+			ercd = PRO_IGNORE;
+			break;
+		case FC_INVALID:
+			ercd = PRO_SHUTDOWN;
+			break;
+		default:
+			ercd = PRO_SHUTDOWN;
+			syslog(LOG_INFO, "unknown error fo GetFaultyContext() = %d", faulty_context);
+		}
+	}
+	else if (FatalError == E_OS_PROTECTION_MEMORY) {
+		faulty_context = GetFaultyContext();
+		syslog(LOG_INFO, "E_OS_PROTECTION_MEMORY and GetFaultyContext() = %s", faulty_context_tbl[faulty_context]);
+#if 0
+        ercd = PRO_TERMINATEAPPL;
+#endif
+#if 1
+        ercd = PRO_TERMINATEAPPL_RESTART;
+#endif
+#if 0
+        ercd = PRO_TERMINATETASKISR;
+#endif
+    }
+	else {
+		ercd = PRO_SHUTDOWN;
+	}
+
+	return(ercd);
+}
+#endif /* CFG_USE_PROTECTIONHOOK */
Index: /atk2-sc3-1.4.0-ntisr/obj/sample1.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/sample1.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/sample1.h	(revision 172)
@@ -0,0 +1,94 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample1.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE1_H
+#define TOPPERS_SAMPLE1_H
+
+#include "target_test.h"
+
+#define TIMER_ISR_PARAM		(TIMER_CONTROL_CONT | TIMER_CONTROL_ITO | TIMER_CONTROL_START)
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+extern StackType stack_00[COUNT_STK_T(0x200)];
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE1_H */
Index: /atk2-sc3-1.4.0-ntisr/obj/sample1.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/sample1.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/sample1.yaml	(revision 172)
@@ -0,0 +1,644 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2015 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2015 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2015 by Witz Corporation
+#  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+#  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+#  Copyright (C) 2014-2015 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+#  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: sample1.yaml 481 2015-12-17 01:59:10Z ertl-ishikawa $
+#
+
+Ecuc:
+  Os:
+    OsInclude1:
+      DefinitionRef: OsInclude
+      OsIncludeFileName: sample1.h
+    OsInclude2:
+      DefinitionRef: OsInclude
+      OsIncludeFileName: sample2.h
+    OsOS:
+      OsStackMonitoring: false
+      OsUseGetServiceId: true
+      OsUseParameterAccess: true
+      OsScalabilityClass: SC3
+      OsStatus: EXTENDED
+      OsHooks:
+        OsErrorHook: true
+        OsPostTaskHook: true
+        OsPreTaskHook: true
+        OsProtectionHook: true
+        OsShutdownHook: true
+        OsStartupHook: true
+      OsHookStack:
+        OsHookStackSize: 512
+    TskLevelRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: STANDARD
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    CntRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: STANDARD
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    GroupRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: INTERNAL
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    SampleCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleCnt2:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleCnt3:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    NonPriTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 8
+      OsTaskPriority: 1
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+    Task6:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskStackStartAddress: stack_00
+      OsTaskSchedule: FULL
+    Task7:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 512
+      OsTaskStackStartAddress: stack_00
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+    MainTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 14
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/MainEvt
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+      OsTaskAutostart:
+        OsTaskAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    HighPriorityTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 15
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    Task1:
+      DefinitionRef: OsTask
+      OsTaskActivation: 8
+      OsTaskPriority: 4
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskResourceRef:
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+      OsTaskAutostart:
+        OsTaskAppModeRef: /Ecuc/Os/AppMode2
+    Task2:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 7
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+      OsTaskResourceRef:
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+      OsTaskEventRef: /Ecuc/Os/T2Evt
+    MainCycArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/MainTask
+          OsAlarmSetEventRef: /Ecuc/Os/MainEvt
+    ActTskArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmActivateTask:
+          OsAlarmActivateTaskRef: /Ecuc/Os/Task1
+    Task3:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 12
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskResourceRef: /Ecuc/Os/CntRes
+      OsTaskEventRef: /Ecuc/Os/T3Evt
+      OsTaskAutostart:
+        OsTaskAppModeRef: /Ecuc/Os/AppMode3
+    Task4:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 6
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+      OsTaskResourceRef:
+        - /Ecuc/Os/GroupRes
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+    scheduletable1:
+      DefinitionRef: OsScheduleTable
+      OsScheduleTableDuration: 60
+      OsScheduleTableRepeating: true
+      OsScheduleTableCounterRef: /Ecuc/Os/SchtblSampleCnt
+      OsScheduleTableExpiryPoint_0:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 10
+        OsScheduleTableTaskActivation_0:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task10
+        OsScheduleTableTaskActivation_1:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task11
+        OsScheduleTableTaskActivation_2:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableExpiryPoint_1:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 20
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T10Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task10
+        OsScheduleTableEventSetting_1:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T11Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task11
+        OsScheduleTableEventSetting_2:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T12Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableSync:
+        OsScheduleTblSyncStrategy: NONE
+    Task5:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskResourceRef:
+        - /Ecuc/Os/GroupRes
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+    scheduletable2:
+      DefinitionRef: OsScheduleTable
+      OsScheduleTableDuration: 50
+      OsScheduleTableRepeating: true
+      OsScheduleTableCounterRef: /Ecuc/Os/SchtblSampleCnt
+      OsScheduleTableExpiryPoint_0:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 20
+        OsScheduleTableTaskActivation_0:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task12
+        OsScheduleTableTaskActivation_1:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task11
+      OsScheduleTableExpiryPoint_1:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 30
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T12Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableExpiryPoint_2:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 40
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T11Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task11
+      OsScheduleTableSync:
+        OsScheduleTblSyncStrategy: NONE
+    SetEvtArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/Task3
+          OsAlarmSetEventRef: /Ecuc/Os/T3Evt
+    SampleAlm1:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/SampleCnt2
+      OsAlarmAction:
+        OsAlarmIncrementCounter:
+          OsAlarmIncrementCounterRef: /Ecuc/Os/SampleCnt3
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 10
+        OsAlarmCycleTime: 10
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    SchtblSampleCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleAlm2:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/SampleCnt3
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/MainTask
+          OsAlarmSetEventRef: /Ecuc/Os/MainEvt
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 10
+        OsAlarmCycleTime: 10
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    Task10:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T10Evt
+    Task11:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T11Evt
+    Task12:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T12Evt
+    Task13:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskStackStartAddress: stack_1
+      OsTaskSystemStackSize: 512
+      OsTaskSystemStackStartAddress: stack_2
+      OsTaskSchedule: FULL
+    Task14:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 512
+      OsTaskStackStartAddress: stack_1
+      OsTaskSystemStackSize: 512
+      OsTaskSystemStackStartAddress: stack_2
+      OsTaskSchedule: FULL
+    IocTask1:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+    IocTask2:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+    IocTask3:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    IocTask4:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    AppMode1:
+      DefinitionRef: OsAppMode
+    AppMode2:
+      DefinitionRef: OsAppMode
+    AppMode3:
+      DefinitionRef: OsAppMode
+    MainEvt:
+      DefinitionRef: OsEvent
+    T2Evt:
+      DefinitionRef: OsEvent
+    T3Evt:
+      DefinitionRef: OsEvent
+      OsEventMask: 65536
+    T10Evt:
+      DefinitionRef: OsEvent
+    T11Evt:
+      DefinitionRef: OsEvent
+    T12Evt:
+      DefinitionRef: OsEvent
+    C2ISR_for_52:
+      DefinitionRef: OsIsr
+      OsIsrInterruptNumber: 52
+      OsIsrInterruptPriority: 5
+      OsIsrCategory: CATEGORY_2
+      OsIsrInterruptSource: ENABLE
+    C2ISR_for_53:
+      DefinitionRef: OsIsr
+      OsIsrInterruptNumber: 53
+      OsIsrInterruptPriority: 6
+      OsIsrCategory: CATEGORY_2
+      OsIsrInterruptSource: ENABLE
+    KT_osap1:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppTaskRef:
+        - /Ecuc/Os/MainTask
+        - /Ecuc/Os/NonPriTask
+        - /Ecuc/Os/Task6
+        - /Ecuc/Os/Task7
+        - /Ecuc/Os/IocTask3
+      OsAppMemoryModuleRef:
+        - /Ecuc/Os/banner
+        - /Ecuc/Os/log_output
+        - /Ecuc/Os/sample1
+      OsAppIsrRef:
+        - /Ecuc/Os/C2ISR_for_53
+        #- /Ecuc/Os/C2ISR_for_52
+      tfnt1:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt1
+      tfnt2:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt2
+      tfnt3:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt3
+      tfnt4:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt4
+      actioctask3:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_actioctask3
+      tfnt5:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_RaiseInt
+      tfnt6:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_ClearInt
+    KT_osap2:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppTaskRef: /Ecuc/Os/IocTask4
+      actioctask4:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_actioctask4
+    NT_osap1:
+      DefinitionRef: OsApplication
+      OsTrusted: false
+      OsAppCounterRef:
+        - /Ecuc/Os/SampleCnt
+        - /Ecuc/Os/SchtblSampleCnt
+        - /Ecuc/Os/SampleCnt2
+        - /Ecuc/Os/SampleCnt3
+      OsAppTaskRef:
+        - /Ecuc/Os/HighPriorityTask
+        - /Ecuc/Os/Task1
+        - /Ecuc/Os/Task2
+        - /Ecuc/Os/Task3
+        - /Ecuc/Os/Task4
+        - /Ecuc/Os/Task5
+        - /Ecuc/Os/Task10
+        - /Ecuc/Os/Task11
+        - /Ecuc/Os/Task12
+        - /Ecuc/Os/Task13
+        - /Ecuc/Os/Task14
+        - /Ecuc/Os/IocTask1
+      OsAppAlarmRef:
+        - /Ecuc/Os/MainCycArm
+        - /Ecuc/Os/ActTskArm
+        - /Ecuc/Os/SetEvtArm
+        - /Ecuc/Os/SampleAlm1
+        - /Ecuc/Os/SampleAlm2
+      OsAppScheduleTableRef:
+        - /Ecuc/Os/scheduletable1
+        - /Ecuc/Os/scheduletable2
+    OsLinkSection:
+      OsLinkSectionName: .stack_section
+      OsLinkSectionMemoryRegionRef: /Ecuc/Os/INTRAM
+    banner:
+      DefinitionRef: OsMemoryModule
+      OsMemoryModuleExport: false
+      OsMemoryModuleName: banner.o
+    log_output:
+      DefinitionRef: OsMemoryModule
+      OsMemoryModuleExport: false
+      OsMemoryModuleName: log_output.o
+    sample1:
+      DefinitionRef: OsMemoryModule
+      OsMemoryModuleExport: false
+      OsMemoryModuleName: sample1.o
+    Task8:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 592
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    Task9:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 768
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    ActOtherOSAPTskArmCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    ActOtherOSAPTskArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/ActOtherOSAPTskArmCnt
+      OsAlarmAction:
+        OsAlarmActivateTask:
+          OsAlarmActivateTaskRef: /Ecuc/Os/Task4
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 5
+        OsAlarmCycleTime: 0
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    NT_osap2:
+      DefinitionRef: OsApplication
+      OsTrusted: false
+      OsAppTaskRef:
+        - /Ecuc/Os/Task8
+        - /Ecuc/Os/Task9
+        - /Ecuc/Os/IocTask2
+      OsAppCounterRef: /Ecuc/Os/ActOtherOSAPTskArmCnt
+      OsAppAlarmRef: /Ecuc/Os/ActOtherOSAPTskArm
+      OsRestartTask: /Ecuc/Os/Task8
+      OsAppIsrRef:
+        - /Ecuc/Os/C2ISR_for_52
+        #- /Ecuc/Os/C2ISR_for_53
+    IOC:
+      DefinitionRef: OsIoc
+      IOC_QUE:
+        DefinitionRef: OsIocCommunication
+        OsIocBufferLength: 3
+        IOC_QUE_DATA:
+          DefinitionRef: OsIocDataProperties
+          OsIocInitValue: 1U
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_QUE_RCV:
+          DefinitionRef: OsIocReceiverProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocReceivingOsApplicationRef: /Ecuc/Os/NT_osap2
+        IOC_QUE_SND0:
+          DefinitionRef: OsIocSenderProperties
+          OsIocSenderId: 0
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/NT_osap1
+        IOC_QUE_SND1:
+          DefinitionRef: OsIocSenderProperties
+          OsIocSenderId: 1
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/KT_osap1
+      IOC_DEQUE:
+        DefinitionRef: OsIocCommunication
+        IOC_DEQUE_DATA0:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 0
+          OsIocInitValue: 0U
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_DATA1:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 1
+          OsIocInitValue: 10U
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_DATA2:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 2
+          OsIocInitValue: 20U
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_RCV:
+          DefinitionRef: OsIocReceiverProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocReceivingOsApplicationRef: /Ecuc/Os/KT_osap2
+        IOC_DEQUE_SND:
+          DefinitionRef: OsIocSenderProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/KT_osap1
+
+IMPLEMENTATION-DATA-TYPE:
+  uint8:
+    CATEGORY: VALUE
Index: /atk2-sc3-1.4.0-ntisr/obj/sample2.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/sample2.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/sample2.c	(revision 172)
@@ -0,0 +1,1225 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample2.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®æ¬ä½
+ *
+ *  ãµã³ãã«ãã­ã°ã©ã ã®åä½ã¯sample1.cã®ã³ã¡ã³ãåç
+§
+ *  æ¬ãã¡ã¤ã«ã¯éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ãã¦ãã
+ *  ãªãã¸ã§ã¯ããè¨è¿°ãã¦ãã
+ */
+
+#include "sample.h"
+#include "sample2.h"
+#include "Ioc.h"
+
+#define GetHwCnt(x, y)
+
+/*
+ *  å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+uint8 GetCommand(void);
+void PutActTsk(uint8 task_no);
+void PutActNonPriTsk(void);
+void PutTermTsk(uint8 task_no);
+void PutChainTsk(uint8 from_task_no, uint8 to_task_no);
+void PutSchedule(void);
+void PutTaskID(void);
+void PutTaskState(uint8 task_no);
+void PutDisAllInt(void);
+void PutSusAllInt(void);
+void PutSusOSInt(void);
+void PutHwCnt3(void);
+void PutGetCntRes(void);
+void PutGetTskRes(void);
+void PutRelTskRes(void);
+void PutSetEvt(uint8 task_no);
+void PutClrEvt(uint8 task_no);
+void PutGetEvt(uint8 task_no);
+void PutWaitEvt(uint8 task_no);
+void PutArmBase(void);
+void PutArmTick(void);
+void PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no);
+void PutCanArm(void);
+void PutAppMode(void);
+void schedule_table_sample_routine(void);
+
+TASK(IocTask1);
+TASK(IocTask2);
+static void IocProk1(void);
+static uint8 GetCommandNoWait2(void);
+
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#define error_log_ioc(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+
+#define	error_log_ioc(api)										   \
+	{															   \
+		StatusType ercd;										   \
+		ercd = api;     /* åAPIå®è¡ */							   \
+		if (ercd != E_OK) {										   \
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd)); \
+		}														   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  å
+é¨ãã¼ã¿ãããã¡
+ */
+volatile uint8				command_tbl[14]; /* ã³ãã³ãå¼æ¸¡ããã¼ãã« */
+
+/*
+ *  å
+é¨å®æ°ãã¼ã¿ãã¼ãã«
+ */
+/* ç¡å¹ã¤ãã³ããã¹ã¯å¤ */
+#define invalid_mask	(EventMaskType) (0)
+
+/* ã¤ãã³ããã¹ã¯ãã¼ãã« */
+static const EventMaskType	event_mask_tbl[5] = {
+	invalid_mask,
+	T2Evt,
+	T3Evt,
+	invalid_mask,
+	invalid_mask
+};
+
+/* ã¿ã¹ã¯IDãã¼ãã« */
+static const TaskType		task_id_tbl[14] = {
+	Task1,
+	Task2,
+	Task3,
+	Task4,
+	Task5,
+	Task6,
+	Task7,
+	Task8,
+	Task9,
+	Task10,
+	Task11,
+	Task12,
+	Task13,
+	Task14
+};
+
+/* ã¢ã©ã¼ã IDãã¼ãã« */
+static const AlarmType		alarm_id_tbl[2] = {
+	ActTskArm,
+	SetEvtArm
+};
+
+/* ãã£ãã¯å¤ãã¼ãã« */
+static const TickType		tick_tbl[2] = {
+	(TickType) 500,
+	(TickType) 900
+};
+
+/* ãµã¤ã¯ã«å¤ãã¼ãã« */
+static const TickType		cycle_tbl[2] = {
+	(TickType) 0,
+	(TickType) COUNTER_MIN_CYCLE
+};
+
+/* ã¤ãã³ããã¹ã¯åæå­åãã¼ãã« */
+static const char8			*event_name_tbl[5] = {
+	"Invalid",
+	"T2Evt",
+	"T3Evt",
+	"Invalid",
+	"Invalid"
+};
+
+/* ã¿ã¹ã¯åæå­åãã¼ãã« */
+static const char8			*task_name_tbl[14] = {
+	"Task1",
+	"Task2",
+	"Task3",
+	"Task4",
+	"Task5",
+	"Task6",
+	"Task7",
+	"Task8",
+	"Task9",
+	"Task10",
+	"Task11",
+	"Task12"
+	"Task13"
+	"Task14"
+};
+
+/* ã¿ã¹ã¯ç¶æ
+æå­åãã¼ãã« */
+static const char8			*task_state_tbl[4] = {
+	"SUSPENDED",
+	"RUNNING",
+	"READY",
+	"WAITING"
+};
+
+/* ã¢ã©ã¼ã åæå­åãã¼ãã« */
+static const char8			*alarm_name_tbl[2] = {
+	"ActTskArm",
+	"SetEvtArm"
+};
+
+DEFINE_VAR_USTACK(StackType, stack_1[COUNT_STK_T(0x200)], ".stack_section");
+DEFINE_VAR_SSTACK(StackType, stack_2[COUNT_STK_T(0x200)]);
+
+/*
+ *  æé«åªå
+åº¦ã¿ã¹ã¯
+ *
+ *  åã¿ã¹ã¯ã®ããªã¨ã³ããç¢ºèªç¨
+ */
+TASK(HighPriorityTask)
+{
+	syslog(LOG_INFO, "HighPriorityTask ACTIVATE");
+	error_log(TerminateTask());
+}   /* TASK( HighPriorityTask ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯1
+ */
+TASK(Task1)
+{
+	TaskProk(0U);
+}   /* TASK( Task1 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯2
+ */
+TASK(Task2)
+{
+	TaskProk(1U);
+}   /* TASK( Task2 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯3
+ */
+TASK(Task3)
+{
+	TaskProk(2U);
+}   /* TASK( Task3 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯4
+ */
+TASK(Task4)
+{
+	TaskProk(3U);
+}   /* TASK( Task4 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯5
+ */
+TASK(Task5)
+{
+	TaskProk(4U);
+}   /* TASK( Task5 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ *  ã¡ã¤ã³ã¿ã¹ã¯ããéç¥ãããã³ãã³ããã¨ã®å¦çå®è¡
+ */
+void
+TaskProk(uint8 task_no)
+{
+	uint8 command;          /* ã³ãã³ãéé¿ãããã¡ */
+    InterruptNumberType intno;
+
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "%s ACTIVATE", task_name_tbl[task_no]);
+    intno = 52U;
+    CallTrustedFunction(tfnt5, (TrustedFunctionParameterRefType)&intno);
+
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+
+		/*
+		 *  ã³ãã³ãåå¾
+		 */
+		while (command_tbl[task_no] == '\0') {
+		}
+		command = command_tbl[task_no];
+		command_tbl[task_no] = 0U;
+
+		/*
+		 *  ã³ãã³ãå¤å®
+		 */
+		switch (command) {
+		case 'A':
+			PutTermTsk(task_no);
+			break;
+		case '!':
+		case '"':
+		case '#':
+		case '$':
+		case '%':
+			PutChainTsk(task_no, (command - '!'));
+			break;
+		case 'z':
+			PutTaskID();
+			break;
+		case 'k':
+			PutGetTskRes();
+			break;
+		case 'K':
+			PutRelTskRes();
+			break;
+		case 'i':
+			PutGetCntRes();
+			break;
+		case 'w':
+			if (task_no < 5U) {
+				PutClrEvt(task_no);
+			}
+			break;
+		case 'W':
+			if (task_no < 5U) {
+				PutWaitEvt(task_no);
+			}
+			break;
+		default:
+			/* ä¸è¨ã®ã³ãã³ãä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã */
+			break;
+		}
+	}
+}   /* TaskProk */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç
+ */
+uint8
+GetCommand(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		WaitEvent(MainEvt);     /* 10msã¦ã§ã¤ã */
+		ClearEvent(MainEvt);
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommand */
+
+/*
+ *  ActivateTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutActTsk(uint8 task_no)
+{
+	struct parameter_struct local;
+
+	syslog(LOG_INFO, "Call ActivateTask(%s)", task_name_tbl[task_no]);
+
+	if (task_no < 5U) {
+		error_log(ActivateTask(task_id_tbl[task_no]));
+	}
+	else {
+		local.task_no = task_id_tbl[task_no];
+		CallTrustedFunction(tfnt4, &local); /* ActivateTask(task_name_tbl[task_no]) */
+	}
+
+}   /* PutActTsk	*/
+
+/*
+ *  ActivateTask å®è¡(NonPriTask)ã»ã­ã°åºåå¦ç
+ */
+void
+PutActNonPriTsk(void)
+{
+	struct parameter_struct local;
+
+	syslog(LOG_INFO, "Call ActivateTask(NonPriTask)");
+
+	local.task_no = NonPriTask;
+	CallTrustedFunction(tfnt4, &local); /* ActivateTask(NonPriTask) */
+
+}   /* PutActNonPriTsk	*/
+
+/*
+ *  TerminateTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutTermTsk(uint8 task_no)
+{
+	StatusType ercd;        /* ã¨ã©ã¼ã³ã¼ã */
+
+	syslog(LOG_INFO, "%s TERMINATE", task_name_tbl[task_no]);
+
+	ercd = TerminateTask();
+	ShutdownOS(ercd);
+}
+
+/*
+ *  ChainTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutChainTsk(uint8 from_task_no, uint8 to_task_no)
+{
+	StatusType ercd;            /* ã¨ã©ã¼ã³ã¼ã */
+
+	syslog(LOG_INFO, "Call ChainTask(%s)", task_name_tbl[to_task_no]);
+	syslog(LOG_INFO, "%s TERMINATE", task_name_tbl[from_task_no]);
+
+	ercd = ChainTask(task_id_tbl[to_task_no]);
+	if (ercd == E_OS_LIMIT) {
+		syslog(LOG_INFO, "Call TerminateTask()");
+		syslog(LOG_INFO, "Because of ChainTask E_OS_LIMIT return");
+		ercd = TerminateTask();
+	}
+	ShutdownOS(ercd);
+}   /* PutChainTsk */
+
+/*
+ *  Schedule å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSchedule(void)
+{
+	syslog(LOG_INFO, "Call ActivateTask(HighPriorityTask)");
+
+	error_log(ActivateTask(HighPriorityTask));
+	syslog(LOG_INFO, "Call Schedule()");
+
+	error_log(Schedule());
+	syslog(LOG_INFO, "Retrun Schedule()");
+}   /* PutSchedule	*/
+
+/*
+ *  GetTaskID å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutTaskID(void)
+{
+	TaskType task_id;           /* ã¿ã¹ã¯IDåå¾ãããã¡ */
+
+	error_log(GetTaskID(&task_id));
+
+	syslog(LOG_INFO, "TaskID:%d", task_id);
+}   /* PutTaskID	*/
+
+/*
+ *  GetTaskState å®è¡ã»ã­ã°åºåå¦ç
+ *  Task1ãTask5ï¼Task7åå¾æã¨ã©ã¼ã¨ãªããªã
+ *  Task6åå¾æã¨ã©ã¼ã¨ãªã
+ */
+void
+PutTaskState(uint8 task_no)
+{
+	TaskStateType state;        /* ã¿ã¹ã¯IDåå¾ãããã¡ */
+
+	error_log(GetTaskState(task_id_tbl[task_no], &state));
+
+	syslog(LOG_INFO, task_name_tbl[task_no]);
+	syslog(LOG_INFO, " State:%s", task_state_tbl[state]);
+}   /* PutTaskState	*/
+
+/*
+ *  DisableAllInterrupts/EnableAllInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutDisAllInt(void)
+{
+	syslog(LOG_INFO, "Call DisableAllInterrupts");
+
+	DisableAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call EnableAllInterrupts");
+
+	EnableAllInterrupts();
+}   /* PutDisAllInt	*/
+
+/*
+ *  SuspendAllInterrupts/ResumeAllInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSusAllInt(void)
+{
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+}   /* PutSusAllInt	*/
+
+/*
+ *  SuspendOSInterrupts/ResumeOSInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSusOSInt(void)
+{
+	syslog(LOG_INFO, "Call SuspendOSInterrupts");
+
+	SuspendOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendOSInterrupts");
+
+	SuspendOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeOSInterrupts");
+
+	ResumeOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeOSInterrupts");
+
+	ResumeOSInterrupts();
+}   /* PutSusOSInt */
+
+/*
+ *  å²è¾¼ã¿åä½ãã¹ãç¨HWã«ã¦ã³ã¿å¤ã®ã­ã°åºåå¦ç
+ */
+void
+PutHwCnt3(void)
+{
+	uint32	isr1_cnt = 0U;      /* C1ISR ã«ã¦ã³ãå¤åå¾ãããã¡ */
+	uint32	isr2_cnt = 0U;      /* C2ISR ã«ã¦ã³ãå¤åå¾ãããã¡ */
+	uint8	cnt;                /* åºååæ°ã«ã¦ã³ã¿ */
+
+	for (cnt = 0U; cnt < 3U; cnt++) {
+		GetHwCnt(&isr1_cnt, &isr2_cnt);
+		syslog(LOG_INFO, "C1ISR Cnt:%d, C2ISR Cnt:%d",
+			   isr1_cnt, isr2_cnt);
+	}
+}   /* PutHwCnt3 */
+
+/*
+ *  GetResource/ReleaseResource å®è¡(å²è¾¼ã¿ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetCntRes(void)
+{
+	syslog(LOG_INFO, "Call GetResource(CntRes)");
+	error_log(GetResource(CntRes));
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ReleaseResource(CntRes)");
+
+	error_log(ReleaseResource(CntRes));
+}   /* PutGetCntRes	*/
+
+/*
+ *  GetResource å®è¡(ã¿ã¹ã¯ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetTskRes(void)
+{
+	syslog(LOG_INFO, "Call GetResource(TskLevelRes)");
+
+	error_log(GetResource(TskLevelRes));
+}   /* PutGetTskRes */
+
+/*
+ *  ReleaseResource å®è¡(ã¿ã¹ã¯ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutRelTskRes(void)
+{
+	syslog(LOG_INFO, "Call ReleaseResource(TskLevelRes)");
+
+	error_log(ReleaseResource(TskLevelRes));
+}
+
+/*
+ *  SetEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSetEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call SetEvent(%s, %s)",
+		   task_name_tbl[task_no], event_name_tbl[task_no]);
+
+	error_log(SetEvent(task_id_tbl[task_no], event_mask_tbl[task_no]));
+}   /* PutSetEvt */
+
+/*
+ *  ClearEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutClrEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call ClearEvent(%s)", event_name_tbl[task_no]);
+
+	error_log(ClearEvent(event_mask_tbl[task_no]));
+}   /* PutClrEvt */
+
+/*
+ *  GetEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetEvt(uint8 task_no)
+{
+	EventMaskType mask;             /* ã¤ãã³ããã¹ã¯åå¾ãããã¡ */
+
+	error_log(GetEvent(task_id_tbl[task_no], &mask));
+
+	syslog(LOG_INFO, "%s Event Mask:0x%x", task_name_tbl[task_no], mask);
+}   /* PutGetEvt */
+
+/*
+ *  WaitEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutWaitEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call WaitEvent(%s)", event_name_tbl[task_no]);
+
+	error_log(WaitEvent(event_mask_tbl[task_no]));
+	syslog(LOG_INFO, "Return WaitEvent(%s)", event_name_tbl[task_no]);
+}   /* PutWaitEvt */
+
+/*
+ *  GetAlarmBase å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutArmBase(void)
+{
+	AlarmBaseType info;             /* ã¢ã©ã¼ã ãã¼ã¹æ
+å ±åå¾ãããã¡ */
+
+	error_log(GetAlarmBase(MainCycArm, &info));
+
+	syslog(LOG_INFO, "MainCycArm Base:");
+	syslog(LOG_INFO, "\tMAXALLOWEDVALUE=%d", info.maxallowedvalue);
+	syslog(LOG_INFO, "\tTICKSPERBASE=%d", info.ticksperbase);
+	syslog(LOG_INFO, "\tMINCYCLE=%d", info.mincycle);
+}   /* PutArmBase */
+
+/*
+ *  PutArmTick å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutArmTick(void)
+{
+	TickType tick;              /* æ®ããã£ãã¯åå¾ãããã¡ */
+
+	error_log(GetAlarm(MainCycArm, &tick));
+
+	syslog(LOG_INFO, "MainCycArm Tick:%d", tick);
+}   /* PutArmTick */
+
+/*
+ *  SetRelAlarm å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no)
+{
+	syslog(LOG_INFO, "Call SetRelAlarm(%s, %d, %d)",
+		   alarm_name_tbl[alarm_no], tick_tbl[tick_no], cycle_tbl[cycle_no]);
+
+	error_log(SetRelAlarm(alarm_id_tbl[alarm_no],
+						  tick_tbl[tick_no], cycle_tbl[cycle_no]));
+}   /* PutSetRel	*/
+
+/*
+ *  CancelAlarm å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutCanArm(void)
+{
+	syslog(LOG_INFO, "Call CancelAlarm(ActTskArm)");
+
+	error_log(CancelAlarm(ActTskArm));
+}   /* PutCanArm */
+
+/*
+ *  GetActiveApplicationMode å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutAppMode(void)
+{
+	switch (GetActiveApplicationMode()) {
+	case AppMode1:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode1");
+		break;
+	case AppMode2:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode2");
+		break;
+	case AppMode3:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode3");
+		break;
+	default:
+		syslog(LOG_INFO, "ActiveApplicationMode:Non");
+		break;
+	}
+}   /* PutAppMode */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãã¹ãç¨ã¡ã¤ã³ã«ã¼ã
+ *
+ *  ã¦ã¼ã¶ã³ãã³ãã®åä¿¡ã¨ï¼ã³ãã³ããã¨ã®å¦çå®è¡
+ */
+void
+schedule_table_sample_routine(void)
+{
+	uint8					command;                /* ã³ãã³ããããã¡ */
+	ScheduleTableType		scheduletable_id;       /* ã³ãã³ãå¼æ°ãããã¡ */
+	ScheduleTableStatusType	status;                 /* ã¹ã±ã¸ã¥ã¼ã«ç¶æ
+å¼æ° */
+	TickType				val;                    /* ã«ã¦ã³ã¿ã®ç¾å¨å¤ */
+	uint8					flag = FALSE;           /* ãªã¿ã¼ã³ãããå¤å®ããããã®ãã©ã° */
+
+	syslog(LOG_INFO, "\t[ schedule table sample routine IN, press 't' OUT ]");
+	syslog(LOG_INFO, "");
+
+	scheduletable_id = scheduletable1;
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+
+		WaitEvent(MainEvt);     /* 10msã®ä½æ¥­æéå¾
+ã¡ */
+		ClearEvent(MainEvt);
+
+		/*
+		 *  å
+¥åã³ãã³ãåå¾
+		 */
+		syslog(LOG_INFO, "Input Command:");
+		command = GetCommand();
+		syslog(LOG_INFO, "%c", command);
+
+		/*
+		 *  ã³ãã³ãå¤å®
+		 */
+		switch (command) {
+		case '1':
+			scheduletable_id = scheduletable1;
+			break;
+		case '2':
+			scheduletable_id = scheduletable2;
+			break;
+		case 'i':
+			IncrementCounter(SchtblSampleCnt);
+			val = 0U;
+			GetCounterValue(SchtblSampleCnt, &val);
+			if ((val % 5U) == 0U) {
+				syslog(LOG_INFO, "\tGetCounterValue(SchtblSampleCnt ) = %d", val);
+			}
+			break;
+		case 's':
+			syslog(LOG_INFO, "\tStartScheduleTableRel(scheduletable%d, 5)", scheduletable_id + 1U);
+			error_log(StartScheduleTableRel(scheduletable_id, 5U));
+			break;
+		case 'S':
+			syslog(LOG_INFO, "\tStartScheduleTableAbs(scheduletable%d, 5)", scheduletable_id + 1U);
+			error_log(StartScheduleTableAbs(scheduletable_id, 5U));
+			break;
+		case 'f':
+			syslog(LOG_INFO, "\tStopScheduleTable(scheduletable%d)", scheduletable_id + 1U);
+			error_log(StopScheduleTable(scheduletable_id));
+			break;
+		case 'n':
+			syslog(LOG_INFO, "\tNextScheduleTable(scheduletable%d, scheduletable%d)", scheduletable_id + 1U, scheduletable2 + 1U);
+			error_log(NextScheduleTable(scheduletable_id, scheduletable2));
+			break;
+		case 'N':
+			syslog(LOG_INFO, "\tNextScheduleTable(scheduletable%d, scheduletable%d)", scheduletable_id + 1U, scheduletable1 + 1U);
+			error_log(NextScheduleTable(scheduletable_id, scheduletable1));
+			break;
+		case 'g':
+			status = 0U;
+			syslog(LOG_INFO, "\tGetScheduleTableStatus(scheduletable%d, status)", scheduletable_id + 1U);
+			error_log(GetScheduleTableStatus(scheduletable_id, &status));
+			syslog(LOG_INFO, "\tstatus = %d", status);
+			break;
+		case 't':
+			syslog(LOG_INFO, "\t[ schedule table sample routine OUT, press 't' IN ]");
+			flag = TRUE;
+			break;
+		default:
+			/* ã³ãã³ããä¸è¨ã®ã±ã¼ã¹ä»¥å¤ãªãå¦çã¯è¡ããªã */
+			break;
+		}
+		/*  ãã©ã°ãç«ã£ã¦ããå ´åï¼ãªã¿ã¼ã³ãã  */
+		if (flag == TRUE) {
+			return;
+		}
+	}
+}   /* schedule_table_sample_routine */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯6
+ */
+TASK(Task10)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task10 ACTIVATE");
+	WaitEvent(T10Evt);
+	syslog(LOG_INFO, "Task10 FINISH");
+	TerminateTask();
+}   /* TASK( Task10 ) */
+
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯7
+ */
+TASK(Task11)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task11 ACTIVATE");
+	WaitEvent(T11Evt);
+	syslog(LOG_INFO, "Task11 FINISH");
+	TerminateTask();
+}   /* TASK( Task11 ) */
+
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯8
+ */
+TASK(Task12)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task12 ACTIVATE");
+	WaitEvent(T12Evt);
+	syslog(LOG_INFO, "Task12 FINISH");
+	TerminateTask();
+}   /* TASK( Task12 ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨ã¿ã¹ã¯11
+ */
+TASK(Task13)
+{
+	struct parameter_struct	local;
+	sint32					pp = 10;
+
+	local.name1 = (sint32 *) &pp;
+	local.name2 = 2;
+
+	CallTrustedFunction(tfnt1, &local); /* 10*2 + 2 = 22 */
+	syslog(LOG_NOTICE, "Task13 tfnt1 ret = %d", local.return_value);
+
+	TerminateTask();
+}   /* TASK( Task13 ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨ã¿ã¹ã¯12
+ */
+TASK(Task14)
+{
+	struct parameter_struct	local;
+	sint32					pp = 20;
+
+	local.name1 = (sint32 *) &pp;
+	local.name2 = 4;
+
+	CallTrustedFunction(tfnt2, &local); /* 20*4 + 4 = 84 */
+	syslog(LOG_NOTICE, "Task14 tfnt2 ret = %d", local.return_value);
+
+}   /* TASK( Task14 ) */
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³éã¢ã¯ã»ã¹æ¨©ç¢ºèªç¨ã¿ã¹ã¯
+ */
+TASK(Task8)
+{
+	TaskStateType state;
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task8 ACTIVATE");
+    /*fatal_line_num++;*/
+	if (E_OK == GetTaskState(Task1, &state)) {
+		syslog(LOG_INFO, "GetTaskState(Task1, &state), state = %s", task_state_tbl[state]);
+	}
+    EnableInterruptSource(C2ISR_for_52);
+    EnableInterruptSource(C2ISR_for_53);
+    AllowAccess();
+	syslog(LOG_INFO, "Task8 FINISH");
+	TerminateTask();
+}   /* TASK( Task8 ) */
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³éã¢ã¯ã»ã¹æ¨©ç¢ºèªç¨ã¿ã¹ã¯
+ */
+TASK(Task9)
+{
+	TaskStateType state;
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task9 ACTIVATE");
+	if (E_OK == GetTaskState(Task2, &state)) {
+		syslog(LOG_INFO, "GetTaskState(Task2, &state), state = %s", task_state_tbl[state]);
+	}
+	syslog(LOG_INFO, "Task9 FINISH");
+	TerminateTask();
+}   /* TASK( Task8 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯1
+ */
+TASK(IocTask1)
+{
+	syslog(LOG_INFO, "IocTask1 ACTIVATE");
+
+	IocProk1();
+
+	syslog(LOG_INFO, "IocTask1 TERMINATE");
+
+	TerminateTask();
+}   /* TASK( IocTask1 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯2
+ */
+TASK(IocTask2)
+{
+	syslog(LOG_INFO, "IocTask2 ACTIVATE");
+
+	IocProk1();
+
+	syslog(LOG_INFO, "IocTask2 TERMINATE");
+
+	TerminateTask();
+}   /* TASK( IocTask2 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ */
+static void
+IocProk1(void)
+{
+	uint8			api;        /* ã³ãã³ãåä¿¡ãããã¡(API) */
+	uint8			data[3];    /* éä¿¡ãããã¡ */
+
+	volatile sint32 i;
+	Std_ReturnType	ercd;
+
+	syslog(LOG_INFO, "Select IOC API:");
+	api = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", api);
+#endif /* OMIT_ECHO */
+
+	switch (api) {
+	case '1':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_0");
+		error_log_ioc(IocSend_IOC_QUE_0(data[0]));
+		break;
+	case '2':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_1");
+		error_log_ioc(IocSend_IOC_QUE_1(data[0]));
+		break;
+	case '3':
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "Input send data%d:", i);
+			data[i] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", data[i]);
+#endif /* OMIT_ECHO */
+		}
+		syslog(LOG_INFO, "Call IocWriteGroup_IOC_DEQUE");
+		error_log_ioc(IocWriteGroup_IOC_DEQUE(data[0], data[1], data[2]));
+		break;
+	case '4':
+		syslog(LOG_INFO, "Call IocReceive_IOC_QUE");
+		ercd = IocReceive_IOC_QUE(&data[0]);
+#if !defined(CFG_USE_ERRORHOOK)
+		if (ercd != E_OK) {
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd));
+		}
+#endif /* !defined( CFG_USE_ERRORHOOK ) */
+		if ((ercd == IOC_E_OK) || (ercd == IOC_E_LOST_DATA)) {
+			syslog(LOG_INFO, "recv data:%c", data[0]);
+		}
+		break;
+	case '5':
+		syslog(LOG_INFO, "Call IocReadGroup_IOC_DEQUE");
+		error_log_ioc(IocReadGroup_IOC_DEQUE(&data[0], &data[1], &data[2]));
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "recv data%d:%c", i, data[i]);
+		}
+		break;
+	case '6':
+		syslog(LOG_INFO, "Call IocEmptyQueue_IOC_QUE");
+		error_log_ioc(IocEmptyQueue_IOC_QUE());
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* IocProk1 */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç(ã¦ã§ã¤ãç¡ã)
+ */
+uint8
+GetCommandNoWait2(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommandNoWait2 */
+
+
+/*
+ *  ActivateTask(IOCç¨) å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutActIocTsk(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	syslog(LOG_INFO, "Select IocTask:");
+	command = GetCommand();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", command);
+#endif /* OMIT_ECHO */
+
+	switch (command) {
+	case '1':
+		error_log(ActivateTask(IocTask1));
+		break;
+	case '2':
+		error_log(ActivateTask(IocTask2));
+		break;
+	case '3':
+		error_log(CallTrustedFunction(actioctask3, NULL));
+		break;
+	case '4':
+		error_log(CallTrustedFunction(actioctask4, NULL));
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* PutActIocTsk	*/
+
+TRUSTEDFUNCTION(TRUSTED_actioctask3, FunctionIndex, FunctionParams)
+{
+	error_log(ActivateTask(IocTask3));
+
+	return(E_OK);
+}
+
+TRUSTEDFUNCTION(TRUSTED_actioctask4, FunctionIndex, FunctionParams)
+{
+	error_log(ActivateTask(IocTask4));
+
+	return(E_OK);
+}
+
+extern void *p_runosap;
+ISR(C2ISR_for_52)
+{
+    InterruptNumberType intno;
+
+	syslog(LOG_NOTICE, "ISR 52 activated");
+    intno = 52U;
+    CallTrustedFunction(tfnt6, (TrustedFunctionParameterRefType)&intno);
+    /*Sample1ClearIntRequest(170U);*/
+    intno = 53U;
+    CallTrustedFunction(tfnt5, (TrustedFunctionParameterRefType)&intno);
+    /*Sample1RaiseInterrupt(171U);*/
+#if 0
+    p_runosap = 0xffffffff;
+#endif
+	syslog(LOG_NOTICE, "ISR 52 terminated");
+}
+ISR(C2ISR_for_53)
+{
+    InterruptNumberType intno;
+
+	syslog(LOG_NOTICE, "ISR 53 activated");
+    intno = 53U;
+    CallTrustedFunction(tfnt6, (TrustedFunctionParameterRefType)&intno);
+#if 0
+    p_runosap = 0xffffffff;
+#endif
+#if 0
+    TerminateApplication(NT_osap2, NO_RESTART);
+#endif
+#if 1
+    TerminateApplication(NT_osap2, RESTART);
+#endif
+    /*Sample1ClearIntRequest(171U);*/
+	syslog(LOG_NOTICE, "ISR 53 terminated");
+}
+
+TRUSTEDFUNCTION(TRUSTED_ClearInt, FunctionIndex, FunctionParams)
+{
+	Sample1ClearIntRequest(*((InterruptNumberType *)FunctionParams));
+
+	return(E_OK);
+}
+
+TRUSTEDFUNCTION(TRUSTED_RaiseInt, FunctionIndex, FunctionParams)
+{
+	Sample1RaiseInterrupt(*((InterruptNumberType *)FunctionParams));
+
+	return(E_OK);
+}
+
+
Index: /atk2-sc3-1.4.0-ntisr/obj/sample2.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/obj/sample2.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/obj/sample2.h	(revision 172)
@@ -0,0 +1,93 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample2.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE2_H
+#define TOPPERS_SAMPLE2_H
+
+#include "target_test.h"
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+extern StackType	stack_1[COUNT_STK_T(0x200)];
+extern StackType	stack_2[COUNT_STK_T(0x200)];
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE2_H */
Index: /atk2-sc3-1.4.0-ntisr/sample/Makefile
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/Makefile	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/Makefile	(revision 172)
@@ -0,0 +1,707 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2012-2013 by Spansion LLC, USA
+#  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.sample 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+#
+#  ã¿ã¼ã²ããã®æå®ï¼Makefile.targetã§ä¸æ¸ããããã®ãé²ãããï¼
+#
+all:
+
+#
+#  ã¿ã¼ã²ããç¥ç§°ã®å®ç¾©
+#
+TARGET = @(TARGET)
+
+OMIT_WARNING_ALL = true
+
+#
+#  ãã­ã°ã©ãã³ã°è¨èªã®å®ç¾©
+#
+SRCLANG = @(SRCLANG)
+ifeq ($(SRCLANG),c++)
+  USE_CXX = true
+  CXXLIBS = -lstdc++ -lm -lc
+  CXXRTS = cxxrt.o newlibrt.o
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+SRCDIR = @(SRCDIR)
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ã®è¨­å®
+#
+OBJEXT = @(OBJEXT)
+
+#
+#  å®è¡ç°å¢ã®å®ç¾©ï¼ã¿ã¼ã²ããä¾å­ã«ä¸æ¸ããããå ´åãããï¼
+#
+DBGENV := @(DBGENV)
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#  ï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeå¯¾è±¡ã«ããæã¯ï¼ç©ºã«å®ç¾©ããï¼
+#
+KERNEL_LIB = @(KERNEL_LIB)
+
+#
+#  ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®å®ç¾©
+#
+KERNEL_FUNCOBJS = @(KERNEL_FUNCOBJS)
+
+#
+#  ãã¬ã¼ã¹ã­ã°ãåå¾ãããã©ããã®å®ç¾©
+#
+ENABLE_TRACE = @(ENABLE_TRACE)
+
+#
+#  ã·ã¹ãã ã¿ã¤ã(ã¿ã¤ããã©ã¤ã)ãä½¿ç¨ãããã©ããã®å®ç¾©
+#
+ENABLE_SYS_TIMER = @(ENABLE_SYS_TIMER)
+
+#
+#  ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ãç¡å¹ã«ãããã©ããã®å®ç¾©
+#
+OMIT_HW_COUNTER = @(OMIT_HW_COUNTER)
+
+#
+#  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+#
+ifeq ($(ENABLE_TRACE),true)
+      ENABLE_SYS_TIMER = true
+      CDEFS := $(CDEFS) -DTOPPERS_ENABLE_TRACE
+      KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/arch/logtrace
+      KERNEL_COBJS := $(KERNEL_COBJS) trace_config.o trace_dump.o
+endif
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã«é¢ããå®ç¾©
+#
+CFGNAME = @(CFGNAME)
+@(CFG_SERIAL)
+ifdef ENABLE_SYS_TIMER
+  CFGNAME := $(CFGNAME) target_timer
+endif
+ifndef OMIT_HW_COUNTER
+  CFGNAME := $(CFGNAME) target_hw_counter
+endif
+CFGNAME := $(CFGNAME) target_mem
+
+#
+#  ã¦ã¼ãã£ãªãã£ãã­ã°ã©ã ã®åç§°
+#
+PERL = @(PERL)
+CFG = @(CFG)
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®å®ç¾©
+#
+OBJNAME = atk2-sc3
+ifdef OBJEXT
+  OBJFILE = $(OBJNAME).$(OBJEXT)
+  CFG1_OUT = cfg1_out.$(OBJEXT)
+  CFG2_OUT = cfg2_out.$(OBJEXT)
+  CFG3_OUT = cfg3_out.$(OBJEXT)
+else
+  OBJFILE = $(OBJNAME)
+  CFG1_OUT = cfg1_out
+  CFG2_OUT = cfg2_out
+  CFG3_OUT = cfg3_out
+endif
+
+#
+#  ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TARGETDIR = $(SRCDIR)/target/$(TARGET)
+
+#
+#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(TARGETDIR)/Makefile.target
+
+#
+#  ã¸ã§ãã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+#
+PASS2_TF = $(SRCDIR)/kernel/kernel.tf $(SRCDIR)/kernel/kernel_common.tf
+DEF_TABS = $(SRCDIR)/kernel/kernel.csv
+CFG_KERNEL = atk2
+CFG_TABS := --ini-file $(SRCDIR)/kernel/kernel.ini $(CFG_TABS)
+CFG_TABS := --api-table $(DEF_TABS) \
+			--cfg1-def-table $(SRCDIR)/kernel/kernel_def.csv $(CFG_TABS)
+CFG_OBJS := Os_Lcfg.o kernel_mem.o ioc.o $(CFG_OBJS)
+CFG2_OUT_SRCS := Os_Lcfg.h Os_Lcfg.c Os_Cfg.h kernel_mem2.c Ioc.c Ioc.h $(CFG2_OUT_SRCS)
+CFG3_OUT_SRCS := kernel_mem3.c $(CFG3_OUT_SRCS)
+CFG2_OBJS := Os_Lcfg.o kernel_mem2.o ioc.o $(CFG2_OBJS)
+CFG3_OBJS := Os_Lcfg.o kernel_mem3.o ioc.o $(CFG3_OBJS)
+ifndef USE_CFG_PASS3
+	ALL_CFG_OBJS := $(CFG_OBJS) cfg1_out.o kernel_mem2.o $(ALL_CFG_OBJS)
+else
+	ALL_CFG_OBJS := $(CFG_OBJS) cfg1_out.o kernel_mem2.o kernel_mem3.o $(ALL_CFG_OBJS)
+endif
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+
+COPTS := $(COPTS) -g @(COPTS)
+ifndef OMIT_WARNING_ALL
+  COPTS := $(COPTS) -Wall -Wno-unused-label -Wpointer-arith
+endif
+ifndef OMIT_OPTIMIZATION
+  COPTS := $(COPTS) -O2
+endif
+CDEFS := $(CDEFS) @(CDEFS) -DUSE_KERNEL_LIBRARY_SYSLOG
+INCLUDES := -I. -I$(SRCDIR)/include -I$(SRCDIR)/arch -I$(SRCDIR) $(INCLUDES)
+LDFLAGS := $(LDFLAGS) @(LDFLAGS)
+CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS) @(LDFLAGS)
+CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) @(LDFLAGS)
+CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) @(LDFLAGS)
+LIBS := $(LIBS) $(CXXLIBS)
+CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©
+#
+APPLNAME = @(APPLNAME)
+APPLDIR = @(APPLDIR)
+APPL_CFG_INPUT := $(foreach file,$(CFGNAME),$(file).arxml)
+
+APPL_DIR = $(APPLDIR) $(SRCDIR)/library
+APPL_ASMOBJS =
+ifdef USE_CXX
+  APPL_CXXOBJS = $(APPLNAME).o @(APPLOBJS)
+  APPL_COBJS =
+else
+  APPL_COBJS = $(APPLNAME).o @(APPLOBJS)
+endif
+APPL_CFLAGS =
+APPL_LIBS =
+ifdef APPLDIR
+  INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIR),-I$(dir))
+endif
+
+
+#
+#  ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã«é¢ããå®ç¾©
+#
+SYSMOD_DIR := $(SYSMOD_DIR) $(SRCDIR)/sysmod $(SRCDIR)/library
+SYSMOD_ASMOBJS := $(SYSMOD_ASMOBJS)
+SYSMOD_COBJS := $(SYSMOD_COBJS) banner.o syslog.o serial.o \
+				log_output.o vasyslog.o t_perror.o strerror.o chkobj.o \
+				$(CXXRTS)
+SYSMOD_CFLAGS := $(SYSMOD_CFLAGS)
+SYSMOD_LIBS := $(SYSMOD_LIBS)
+INCLUDES := $(INCLUDES)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+#  KERNEL_ASMOBJS: ã«ã¼ãã«ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãã¢ã»ã³ããªè¨èªã®
+#				   ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_COBJS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãCè¨èªã§ï¼ã½ã¼ã¹
+#				 ãã¡ã¤ã«ã¨1å¯¾1ã«å¯¾å¿ãããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_LCSRCS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããCè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ã§ï¼
+#				  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãç
+#				  æãããã®ï¼
+#  KERNEL_LCOBJS: ä¸ã®ã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_AUX_COBJS: ã­ã¼ãã¢ã¸ã¥ã¼ã«ã«å«ããªããï¼ã«ã¼ãã«ã®ã½ã¼ã¹ãã¡
+#					 ã¤ã«ã¨åããªãã·ã§ã³ãé©ç¨ãã¦ã³ã³ãã¤ã«ãã¹ãï¼ã½ã¼
+#					 ã¹ãCè¨èªã®ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#
+KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/kernel
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS)
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel
+ifdef OMIT_MAKEOFFSET
+  OFFSET_H =
+else
+  OFFSET_H = offset.h
+endif
+
+
+#
+#  ã¿ã¼ã²ãããã¡ã¤ã«ï¼è¤æ°ãåæã«é¸æãã¦ã¯ãªããªãï¼
+#
+all: $(OBJFILE)
+#all: $(OBJNAME).bin
+#all: $(OBJNAME).srec
+
+##### ä»¥ä¸ã¯ç·¨éããªããã¨ #####
+
+#
+#  ç°å¢ã«ä¾å­ããã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+ifdef DBGENV
+  CDEFS := $(CDEFS) -D$(DBGENV)
+endif
+
+#
+#  ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+include $(SRCDIR)/kernel/Makefile.kernel
+ifdef KERNEL_FUNCOBJS
+  KERNEL_LCSRCS := $(KERNEL_FCSRCS)
+  KERNEL_LCOBJS := $(foreach file,$(KERNEL_FCSRCS),$($(file:.c=)))
+else
+  KERNEL_CFLAGS := -DALLFUNC $(KERNEL_CFLAGS)
+  KERNEL_COBJS := $(KERNEL_COBJS) \
+					$(foreach file,$(KERNEL_FCSRCS),$(file:.c=.o))
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãããã£ã¬ã¯ããªã«é¢ããå®ç¾©
+#
+vpath %.c $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+vpath %.S $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+vpath %.arxml $(KERNEL_DIR) $(SYSMOD_DIR) $(APPL_DIR)
+
+#
+#  ã³ã³ãã¤ã«ã®ããã®å¤æ°ã®å®ç¾©
+#
+KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
+SYSMOD_OBJS = $(SYSMOD_ASMOBJS) $(SYSMOD_COBJS)
+APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
+ALL2_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSMOD_OBJS) $(CFG_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ifdef KERNEL_LIB
+  ALL_LIBS = $(APPL_LIBS) $(SYSMOD_LIBS) -lkernel $(LIBS)
+  LIBS_DEP = $(filter %.a,$(ALL_LIBS)) $(KERNEL_LIB)/libkernel.a
+  LDFLAGS := $(LDFLAGS) -L$(KERNEL_LIB)
+  CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) -L$(KERNEL_LIB)
+  CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) -L$(KERNEL_LIB)
+else
+  ALL_LIBS = $(APPL_LIBS) $(SYSMOD_LIBS) libkernel.a $(LIBS)
+  LIBS_DEP = $(filter %.a,$(ALL_LIBS))
+endif
+
+ifdef LDSCRIPT
+  LDFLAGS := $(LDFLAGS) -T $(LDSCRIPT)
+endif
+ifdef CFG1_OUT_LDSCRIPT
+  CFG1_OUT_LDFLAGS := $(CFG1_OUT_LDFLAGS) -T $(CFG1_OUT_LDSCRIPT)
+endif
+ifdef CFG2_OUT_LDSCRIPT
+  CFG2_OUT_LDFLAGS := $(CFG2_OUT_LDFLAGS) -T $(CFG2_OUT_LDSCRIPT)
+endif
+ifdef CFG3_OUT_LDSCRIPT
+  CFG3_OUT_LDFLAGS := $(CFG3_OUT_LDFLAGS) -T $(CFG3_OUT_LDSCRIPT)
+endif
+
+#
+#  ãªãã»ãããã¡ã¤ã«ï¼offset.hï¼ã®çæè¦å
+#
+offset.h: $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(SRCDIR)/kernel/genoffset.tf
+	$(CFG) --pass 3 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg1_out.srec --symbol-table cfg1_out.syms \
+				-T $(OFFSET_TF) $(CFG_TABS) $(filter %.arxml,$^)
+
+#
+#  ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+cfg1_out.c: $(APPL_CFG_INPUT) $(SRCDIR)/kernel/kernel_def.csv
+	$(CFG) --pass 1 --kernel $(CFG_KERNEL) $(INCLUDES) $(CFG_TABS) $(filter %.arxml,$^)
+
+$(CFG2_OUT_SRCS): Os_Lcfg.timestamp
+Os_Lcfg.timestamp: $(APPL_CFG_INPUT) $(START_OBJS) cfg1_out.o $(END_OBJS) $(HIDDEN_OBJS) $(PASS2_TF) $(DEF_TABS)
+	$(LINK) $(CFLAGS) $(CFG1_OUT_LDFLAGS) -o $(CFG1_OUT) \
+						$(START_OBJS) cfg1_out.o $(END_OBJS)
+	$(NM) -v $(CFG1_OUT) > cfg1_out.syms
+	cp cfg1_out.run cfg1_out.srec
+	$(CFG) --pass 2 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				-T $(TARGETDIR)/target.tf $(CFG_TABS) $(filter %.arxml,$^)
+
+#  æ¢å­Os_Cfg.hã¨pass2ã§çæããOs_Cfg_tmp.hã¨ã®å·®åãããå ´åOs_Cfg.hãä¸æ¸ã
+	if ! cmp Os_Cfg.h Os_Cfg_tmp.h >/dev/null 2>&1 ; then \
+		mv Os_Cfg_tmp.h Os_Cfg.h ;\
+	else \
+		rm Os_Cfg_tmp.h ;\
+	fi
+ifdef KERNEL_LIB
+	if ! cmp Os_Cfg.h $(KERNEL_LIB)/Os_Cfg.h >/dev/null 2>&1 ; then \
+		echo Config files Os_Cfg.h and $(KERNEL_LIB)/Os_Cfg.h differ! ;\
+		diff -c Os_Cfg.h $(KERNEL_LIB)/Os_Cfg.h ;\
+		false;\
+	fi
+endif
+
+	touch -r Os_Lcfg.c Os_Lcfg.timestamp
+#
+#	ãã¹3ãä½¿ç¨ããå ´å
+#
+ifdef USE_CFG_PASS3
+kernel_mem3.c: $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(ALL2_OBJS) $(LIBS_DEP) $(SRCDIR)/kernel/kernel_mem.tf
+	$(LINK) $(CFLAGS) $(CFG2_OUT_LDFLAGS) -o $(CFG2_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG2_OUT) > cfg2_out.syms
+	cp cfg2_out.run cfg2_out.srec
+	rm -f $(CFG3_OUT_LDSCRIPT)
+	$(CFG) --pass 3 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg2_out.srec --symbol-table cfg2_out.syms \
+				-T $(TARGETDIR)/target_opt.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(CFG3_OUT_LDSCRIPT) ]; then \
+		sed "s/kernel_mem2\.o/kernel_mem3\.o/g" < $(CFG2_OUT_LDSCRIPT) \
+													> $(CFG3_OUT_LDSCRIPT); \
+	fi
+
+
+kernel_mem.c: $(APPL_CFG_INPUT) $(CFG3_OBJS) $(SRCDIR)/kernel/kernel_opt.tf $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(CFG3_OUT_LDFLAGS) -o $(CFG3_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG3_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG3_OUT) > cfg3_out.syms
+	cp cfg3_out.run cfg3_out.srec
+	rm -f $(LDSCRIPT)
+	$(CFG) --pass 4 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg3_out.srec --symbol-table cfg3_out.syms \
+				-T $(TARGETDIR)/target_mem.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(LDSCRIPT) ]; then \
+		sed "s/kernel_mem3\.o/kernel_mem\.o/g" < $(CFG3_OUT_LDSCRIPT) \
+															> $(LDSCRIPT); \
+	fi
+	sed -e '/_kernel_mo_/d' cfg3_out.syms | awk '{print $$1" "$$3}' > cfg3_out-tmp.syms
+	mv cfg3_out-tmp.syms cfg3_out.syms
+endif
+
+#
+#  ãã¹3ãä½¿ç¨ããªãå ´å
+#
+ifndef USE_CFG_PASS3
+kernel_mem.c: $(APPL_CFG_INPUT) $(CFG2_OBJS) $(SRCDIR)/kernel/kernel_mem.tf $(ATK2_SCHEMA) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(CFG2_OUT_LDFLAGS) -o $(CFG2_OUT) $(START_OBJS) \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG2_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(CFG2_OUT) > cfg2_out.syms
+	cp cfg2_out.run cfg2_out.srec
+	touch cfg3_out.tf
+	$(CFG) --pass 4 --kernel $(CFG_KERNEL) $(INCLUDES) \
+				--rom-image cfg2_out.srec --symbol-table cfg2_out.syms \
+				-T $(TARGETDIR)/target_mem.tf $(CFG_TABS) $(filter %.arxml,$^)
+	if ! [ -f $(LDSCRIPT) ]; then \
+		sed "s/kernel_mem2\.o/kernel_mem\.o/g" < $(CFG2_OUT_LDSCRIPT) \
+															> $(LDSCRIPT); \
+	fi
+	sed -e '/_kernel_mo_/d' cfg2_out.syms | awk '{print $$1" "$$3}' > cfg2_out-tmp.syms
+	mv cfg2_out-tmp.syms cfg2_out.syms
+endif
+
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªãã¡ã¤ã«ã®çæ
+#
+libkernel.a: $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f libkernel.a
+	$(AR) $(KERNEL_LIB_OBJS) -archive -o libkernel.a
+
+#
+#  ç¹å¥ãªä¾å­é¢ä¿ã®å®ç¾©
+#
+banner.o: Os_Lcfg.timestamp $(filter-out banner.o,$(ALL2_OBJS)) $(LIBS_DEP)
+
+#
+#  å
+¨ä½ã®ãªã³ã¯
+#
+$(OBJFILE): $(APPL_CFG_INPUT) Os_Lcfg.timestamp $(ALL_OBJS) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(LDFLAGS) -o $(OBJFILE) $(START_OBJS) \
+			-Wl,-map=$(OBJNAME).map \
+			$(APPL_OBJS) $(SYSMOD_OBJS) $(CFG_OBJS) $(ALL_LIBS) $(END_OBJS)
+	$(NM) -v $(OBJFILE) | awk '{print $$1" "$$3}' > $(OBJNAME).syms
+	cp $(OBJFILE) $(OBJNAME).srec
+ifndef USE_CFG_PASS3
+	sed -e 's/kernel_mem2/kernel_mem/g' cfg2_out.syms | diff - $(OBJNAME).syms
+else
+	sed -e 's/kernel_mem3/kernel_mem/g' cfg3_out.syms | diff - $(OBJNAME).syms
+endif
+#	$(OBJDUMP) -d $(OBJFILE) > $(OBJNAME).dump
+
+#
+#  ãã¤ããªãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).bin: $(OBJFILE)
+	$(OBJCOPY) -O binary -S $(OBJFILE) $(OBJNAME).bin
+
+#
+#  Sã¬ã³ã¼ããã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).srec: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
+
+#
+#  ã³ã³ãã¤ã«çµæã®æ¶å»
+#
+.PHONY: clean
+clean:
+	rm -f \#* *~ *.o $(CLEAN_FILES)
+	rm -f $(OBJFILE) $(OBJNAME).syms $(OBJNAME).srec $(OBJNAME).bin $(OBJNAME).map
+	rm -f kernel_mem.c kernel_mem.h $(CFG3_OUT) cfg3_out.tf cfg3_out.syms cfg3_out.srec
+	rm -f $(CFG2_OUT) cfg2_out.tf cfg2_out.syms cfg2_out.srec
+	rm -f Os_Lcfg.timestamp $(CFG2_OUT_SRCS) $(CFG3_OUT_SRCS)
+	rm -f cfg1_out.c $(CFG1_OUT) cfg1_out.syms cfg1_out.srec
+	rm -f $(OBJNAME).dump
+	rm -f kernel.res
+	rm -f $(LDSCRIPT) $(CFG2_OUT_LDSCRIPT) $(CFG3_OUT_LDSCRIPT)
+ifndef KERNEL_LIB
+	rm -f libkernel.a
+endif
+	rm -f offset.h
+
+.PHONY: cleankernel
+cleankernel:
+	rm -rf $(KERNEL_LIB_OBJS)
+	rm -f offset.h
+
+.PHONY: cleandep
+cleandep:
+	if ! [ -f Makefile.depend ]; then \
+		rm -f Os_Lcfg.timestamp $(CFG2_OUT_SRCS); \
+		rm -f cfg1_out.c cfg1_out.o $(CFG1_OUT) cfg1_out.syms cfg1_out.srec; \
+		rm -f offset.h; \
+	fi
+	rm -f Makefile.depend
+
+.PHONY: realclean
+realclean: cleandep clean
+	rm -f $(REALCLEAN_FILES)
+
+#
+#  ã¸ã§ãã¬ã¼ã¿ãçæãããã¡ã¤ã«ã®ã³ã³ãã¤ã«ã«ã¼ã«ã¨ä¾å­é¢ä¿ä½æã«ã¼ã«
+#  ã®å®ç¾©
+#
+#  ã¸ã§ãã¬ã¼ã¿ãçæãããã¡ã¤ã«ã¯ï¼ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ç¨ï¼ã·ã¹
+#  ãã ãµã¼ãã¹ç¨ï¼ã«ã¼ãã«ç¨ã®ãã¹ã¦ã®ãªãã·ã§ã³ãä»ãã¦ã³ã³ãã¤ã«ããï¼
+#
+OS_LCFG_CFLAGS = $(APPL_CFLAGS) $(SYSMOD_CFLAGS) $(KERNEL_CFLAGS)
+
+$(ALL_CFG_OBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(OS_LCFG_CFLAGS) $<
+
+$(ALL_CFG_OBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(OS_LCFG_CFLAGS) $<
+
+$(ALL_CFG_OBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(OS_LCFG_CFLAGS)" $< >> Makefile.depend
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ã®çæ
+#
+.PHONY: gendepend
+gendepend:
+	@echo "Generating Makefile.depend."
+
+.PHONY: depend
+ifdef KERNEL_LIB
+depend: cleandep Os_Lcfg.timestamp gendepend \
+		cfg1_out.d \
+		$(ALL2_OBJS:.o=.d)
+else
+depend: cleandep $(OFFSET_H) Os_Lcfg.timestamp gendepend \
+		cfg1_out.d \
+		$(KERNEL_AUX_COBJS:.o=.d) $(KERNEL_ASMOBJS:.o=.d) \
+		$(KERNEL_COBJS:.o=.d) $(KERNEL_LCSRCS:.c=.d) $(ALL2_OBJS:.o=.d)
+endif
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ãã¤ã³ã¯ã«ã¼ã
+#
+-include Makefile.depend
+
+#
+#  éçºãã¼ã«ã®ã³ãã³ãåã®å®ç¾©
+#
+ifeq ($(TOOL),gcc)
+  #
+  #  GNUéçºç°å¢ç¨
+  #
+  ifdef GCC_TARGET
+    GCC_TARGET_PREFIX = $(GCC_TARGET)-
+  else
+    GCC_TARGET_PREFIX =
+  endif
+  CC = $(GCC_TARGET_PREFIX)gcc
+  CXX = $(GCC_TARGET_PREFIX)g++
+  AS = $(GCC_TARGET_PREFIX)as
+  LD = $(GCC_TARGET_PREFIX)ld
+  AR = $(GCC_TARGET_PREFIX)ar
+  NM = $(GCC_TARGET_PREFIX)nm
+  RANLIB = $(GCC_TARGET_PREFIX)ranlib
+  OBJCOPY = $(GCC_TARGET_PREFIX)objcopy
+  OBJDUMP = $(GCC_TARGET_PREFIX)objdump
+endif
+
+ifdef USE_CXX
+  LINK = $(CXX)
+else
+  LINK = $(CC)
+endif
+
+#
+#  ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+KERNEL_ALL_COBJS = $(KERNEL_COBJS) $(KERNEL_AUX_COBJS)
+
+$(KERNEL_ALL_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ALL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS): %.o:
+	$(CC) -DTOPPERS_$(*F) -o $@ -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS:.o=.s): %.s:
+	$(CC) -DTOPPERS_$(*F) -o $@ -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(SYSMOD_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(SYSMOD_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(SYSMOD_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(SYSMOD_CFLAGS) $<
+
+$(APPL_COBJS): %.o: %.c
+	$(CC) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS): %.o: %.cpp
+	$(CXX) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS:.o=.s): %.s: %.cpp
+	$(CXX) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_ASMOBJS): %.o: %.S
+	$(CC) -c $(CFLAGS) $(APPL_CFLAGS) $<
+
+#
+#  ä¾å­é¢ä¿ä½æã«ã¼ã«ã®å®ç¾©
+#
+$(KERNEL_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(KERNEL_LCSRCS:.c=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) -T "$($*)" \
+		-O "-DALLFUNC $(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(KERNEL_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(KERNEL_CFLAGS)" $< >> Makefile.depend
+
+$(SYSMOD_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(SYSMOD_CFLAGS)" $< >> Makefile.depend
+
+$(SYSMOD_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(SYSMOD_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_COBJS:.o=.d): %.d: %.c
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_CXXOBJS:.o=.d): %.d: %.cpp
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CXX) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+$(APPL_ASMOBJS:.o=.d): %.d: %.S
+	@$(PERL) $(SRCDIR)/utils/makedep -C $(CC) $(MAKEDEP_OPTS) \
+		-O "$(CFLAGS) $(APPL_CFLAGS)" $< >> Makefile.depend
+
+#
+#  ããã©ã«ãã³ã³ãã¤ã«ã«ã¼ã«ãä¸æ¸ã
+#
+%.o: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c $(CFLAGS) $<
+
+%.s: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -S $(CFLAGS) $<
+
+%.o: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -c $(CFLAGS) $<
+
+%.s: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -S $(CFLAGS) $<
+
+%.o: %.S
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c $(CFLAGS) $<
Index: /atk2-sc3-1.4.0-ntisr/sample/Rte_Type.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/Rte_Type.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/Rte_Type.h	(revision 172)
@@ -0,0 +1,80 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2013-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2013-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2013-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2013-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2013-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: Rte_Type.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *  ãµã³ãã«ç¨ããããã¡ã¤ã«(Rte_Type.hã¯RTEã¸ã§ãã¬ã¼ã¿ãçæãã)
+ */
+
+#ifndef RTE_TYPE_H
+#define RTE_TYPE_H
+
+#endif /* RTE_TYPE_H */
Index: /atk2-sc3-1.4.0-ntisr/sample/sample.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/sample.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/sample.h	(revision 172)
@@ -0,0 +1,138 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã ã®å
+±éããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE_H
+#define TOPPERS_SAMPLE_H
+
+#include "Os.h"
+#include "t_syslog.h"
+#include "t_stdlib.h"
+#include "sysmod/serial.h"
+#include "sysmod/syslog.h"
+
+#include "sysmod/banner.h"
+#include "target_sysmod.h"
+#include "target_serial.h"
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®å®ç¾©
+ */
+#include "target_test.h"
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  ãã©ã¡ã¼ã¿æ§é ä½ã®å®ç¾©
+ *  ä¿¡é ¼é¢æ°æä¾è
+ãããããã¡ã¤ã«ã§æä¾ãã
+ */
+struct parameter_struct {
+	sint32		*name1;
+	sint32		name2;
+	TaskType	task_no;
+	StatusType	ercd;
+	StatusType	return_value;   /* è¿æ»å¤ã¯æ§é ä½ã«å«ã */
+};
+
+extern void TaskProk(uint8 task_no);
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE_H */
Index: /atk2-sc3-1.4.0-ntisr/sample/sample1.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/sample1.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/sample1.arxml	(revision 172)
@@ -0,0 +1,2088 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd" xmlns="http://autosar.org/schema/r4.0">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>ImplementationDataTypes</SHORT-NAME>
+			<ELEMENTS>
+				<IMPLEMENTATION-DATA-TYPE>
+					<SHORT-NAME>uint8</SHORT-NAME>
+					<CATEGORY>VALUE</CATEGORY>
+				</IMPLEMENTATION-DATA-TYPE>
+			</ELEMENTS>
+		</AR-PACKAGE>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NT_osap2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArmCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task8</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task9</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsLinkSection</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionName</DEFINITION-REF>
+									<VALUE>.stack_section</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NT_osap1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainCycArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActTskArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SetEvtArm</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleAlm1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppAlarmRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleAlm2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/HighPriorityTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task4</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task5</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task13</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task14</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/scheduletable1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppScheduleTableRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/scheduletable2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>AppMode1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAppMode</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActTskArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmActivateTask</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>CntRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>STANDARD</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T11Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActOtherOSAPTskArmCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsOS</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsUseGetServiceId</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsScalabilityClass</DEFINITION-REF>
+									<VALUE>SC3</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsStackMonitoring</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsStatus</DEFINITION-REF>
+									<VALUE>EXTENDED</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsUseParameterAccess</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsHooks</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPreTaskHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsErrorHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsShutdownHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsPostTaskHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsProtectionHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHooks/OsStartupHook</DEFINITION-REF>
+											<VALUE>true</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsHookStack</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsOS/OsHookStack/OsHookStackSize</DEFINITION-REF>
+											<VALUE>512</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task9</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>768</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task8</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>592</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T12Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T2Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task5</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/GroupRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task4</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>6</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/GroupRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>12</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T3Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>7</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T2Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>4</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/CntRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskResourceRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/TskLevelRes</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task7</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_00</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task6</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_00</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IOC</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc</DEFINITION-REF>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>IOC_DEQUE</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_SND</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_RCV</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap2</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>2</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>20U</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>10U</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_DEQUE_DATA0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataPropertyIndex</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>0U</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>IOC_QUE</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocBufferLength</DEFINITION-REF>
+											<VALUE>3</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_DATA</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocInitValue</DEFINITION-REF>
+													<VALUE>1U</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-FOREIGN-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocDataProperties/OsIocDataTypeRef</DEFINITION-REF>
+													<VALUE-REF DEST="IMPLEMENTATION-DATA-TYPE">/ImplementationDataTypes/uint8</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_SND1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId</DEFINITION-REF>
+													<VALUE>1</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/KT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_SND0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+												<ECUC-NUMERICAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSenderId</DEFINITION-REF>
+													<VALUE>0</VALUE>
+												</ECUC-NUMERICAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocSenderProperties/OsIocSendingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>IOC_QUE_RCV</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties</DEFINITION-REF>
+											<PARAMETER-VALUES>
+												<ECUC-TEXTUAL-PARAM-VALUE>
+													<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocFunctionImplementationKind</DEFINITION-REF>
+													<VALUE>FUNCTION</VALUE>
+												</ECUC-TEXTUAL-PARAM-VALUE>
+											</PARAMETER-VALUES>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsIoc/OsIocCommunication/OsIocReceiverProperties/OsIocReceivingOsApplicationRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask4</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>IocTask1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>GroupRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>INTERNAL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task14</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_1</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task13</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_1</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>5</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>9</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackStartAddress</DEFINITION-REF>
+									<VALUE>stack_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task12</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task11</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>Task10</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>13</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T10Evt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt3</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleCnt2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>sample2.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>sample1.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainEvt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>scheduletable2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration</DEFINITION-REF>
+									<VALUE>50</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_2</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>40</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>30</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_0</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>20</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableSync</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy</DEFINITION-REF>
+											<VALUE>NONE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>scheduletable1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableRepeating</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableDuration</DEFINITION-REF>
+									<VALUE>60</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SchtblSampleCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>20</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T12Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T11Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableEventSetting_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableEventSetting/OsScheduleTableSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T10Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableExpiryPoint_0</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTblExpPointOffset</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_2</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task12</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_1</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task11</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsScheduleTableTaskActivation_0</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableExpiryPoint/OsScheduleTableTaskActivation/OsScheduleTableActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task10</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsScheduleTableSync</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsScheduleTable/OsScheduleTableSync/OsScheduleTblSyncStrategy</DEFINITION-REF>
+											<VALUE>NONE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>banner</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleName</DEFINITION-REF>
+									<VALUE>banner.o</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T3Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsEvent/OsEventMask</DEFINITION-REF>
+									<VALUE>65536</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainCycArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>HighPriorityTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>FULL</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>15</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>log_output</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleName</DEFINITION-REF>
+									<VALUE>log_output.o</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SchtblSampleCnt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>SOFTWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>99</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>TskLevelRes</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsResource</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceProperty</DEFINITION-REF>
+									<VALUE>STANDARD</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsResource/OsResourceAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>ActOtherOSAPTskArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/ActOtherOSAPTskArmCnt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmActivateTask</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmActivateTask/OsAlarmActivateTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task4</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>0</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>5</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>sample1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryModule/OsMemoryModuleName</DEFINITION-REF>
+									<VALUE>sample1.o</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>KT_osap2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask4</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>actioctask4</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_actioctask4</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>KT_osap1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NonPriTask</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task6</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task7</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppTaskRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/IocTask3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemoryModuleRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/banner</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemoryModuleRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/log_output</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemoryModuleRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/sample1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt4</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt4</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt3</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt3</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt2</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt2</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>tfnt1</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_tfnt1</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>actioctask3</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-FUNCTION-NAME-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionName</DEFINITION-REF>
+											<VALUE>TRUSTED_actioctask3</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationTrustedFunction/OsTrustedFunctionStackSize</DEFINITION-REF>
+											<VALUE>32</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>T10Evt</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsEvent</DEFINITION-REF>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SetEvtArm</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/Task3</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/T3Evt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MainTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>14</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskEventRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAccessingApplication</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NT_osap1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsTaskAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart</DEFINITION-REF>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskAutostart/OsTaskAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleAlm2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmSetEvent</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventTaskRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainTask</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmSetEvent/OsAlarmSetEventRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MainEvt</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>SampleAlm1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAction</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-CHOICE-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction</DEFINITION-REF>
+									<SUB-CONTAINERS>
+										<ECUC-CONTAINER-VALUE>
+											<SHORT-NAME>OsAlarmIncrementCounter</SHORT-NAME>
+											<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter</DEFINITION-REF>
+											<REFERENCE-VALUES>
+												<ECUC-REFERENCE-VALUE>
+													<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAction/OsAlarmIncrementCounter/OsAlarmIncrementCounterRef</DEFINITION-REF>
+													<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/SampleCnt3</VALUE-REF>
+												</ECUC-REFERENCE-VALUE>
+											</REFERENCE-VALUES>
+										</ECUC-CONTAINER-VALUE>
+									</SUB-CONTAINERS>
+								</ECUC-CONTAINER-VALUE>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsAlarmAutostart</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-TEXTUAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAutostartType</DEFINITION-REF>
+											<VALUE>ABSOLUTE</VALUE>
+										</ECUC-TEXTUAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmCycleTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAlarmTime</DEFINITION-REF>
+											<VALUE>10</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+									<REFERENCE-VALUES>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode1</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode2</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+										<ECUC-REFERENCE-VALUE>
+											<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsAlarm/OsAlarmAutostart/OsAlarmAppModeRef</DEFINITION-REF>
+											<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/AppMode3</VALUE-REF>
+										</ECUC-REFERENCE-VALUE>
+									</REFERENCE-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NonPriTask</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsTask</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSchedule</DEFINITION-REF>
+									<VALUE>NON</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskSystemStackSize</DEFINITION-REF>
+									<VALUE>512</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskActivation</DEFINITION-REF>
+									<VALUE>8</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsTask/OsTaskPriority</DEFINITION-REF>
+									<VALUE>1</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/sample/sample1.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/sample1.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/sample1.c	(revision 172)
@@ -0,0 +1,1466 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample1.c 485 2015-12-17 08:21:50Z witz-itoyo $
+ */
+
+/*
+ *		ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®æ¬ä½
+ *
+ *  ATK2-SC3ã®åºæ¬çãªåä½ãç¢ºèªããããã®ãµã³ãã«ãã­ã°ã©ã ï¼
+ *
+ *  ãã­ã°ã©ã ã®æ¦è¦ï¼PCã¨ãã¼ãéã§ã·ãªã¢ã«éä¿¡ãè¡ãï¼ã¦ã¼ã¶å
+¥å
+ *  ã³ãã³ãã«å¿ããåä½ã¨ã­ã°åºåãè¡ãªãï¼
+ *
+ *  ï¼ã³ãã³ãä¸è¦§ï¼
+ *  ã»ã¿ã¹ã¯æå®
+ *    '1' : ä»¥éã®ã³ãã³ãã Task1 ã«å¯¾ãã¦è¡ã
+ *    '2' : ä»¥éã®ã³ãã³ãã Task2 ã«å¯¾ãã¦è¡ã
+ *    '3' : ä»¥éã®ã³ãã³ãã Task3 ã«å¯¾ãã¦è¡ã
+ *    '4' : ä»¥éã®ã³ãã³ãã Task4 ã«å¯¾ãã¦è¡ã
+ *    '5' : ä»¥éã®ã³ãã³ãã Task5 ã«å¯¾ãã¦è¡ã
+ *    '6' : ä»¥éã®ã³ãã³ãã Task6 ã«å¯¾ãã¦è¡ã
+ *    '7' : ä»¥éã®ã³ãã³ãã Task7 ã«å¯¾ãã¦è¡ã
+ *    '8' : ä»¥éã®ã³ãã³ãã Task8 ã«å¯¾ãã¦è¡ã(ä¸é¨ã¿ã¹ã¯ç®¡çã³ãã³ãä½¿ç¨ã§ããªã)
+ *    '9' : ä»¥éã®ã³ãã³ãã Task9 ã«å¯¾ãã¦è¡ã(ä¸é¨ã¿ã¹ã¯ç®¡çã³ãã³ãä½¿ç¨ã§ããªã)
+ *  ã»ã¿ã¹ã¯ç®¡çæ©è½
+ *    'a' : ActivateTask ã«ã¦ã¿ã¹ã¯ãèµ·åããï¼
+ *    'A' : TerminateTask ã«ã¦ã¿ã¹ã¯ãçµäºããï¼
+ *    '!'(Shift+1) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task1 ãèµ·åãã
+ *    '"'(Shift+2) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task2 ãèµ·åãã
+ *    '#'(Shift+3) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task3 ãèµ·åãã
+ *    '$'(Shift+4) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task4 ãèµ·åãã
+ *    '%'(Shift+5) : ChainTask ã«ã¦ã¿ã¹ã¯ãçµäºãï¼Task5 ãèµ·åãã
+ *    's' : ãã³ããªã¨ã³ããã£ãå±æ§ã§ããã¿ã¹ã¯ MainTask ã«ã¦æé«
+ *          åªå
+åº¦ã¿ã¹ã¯ HighPriorityTask ãèµ·åãï¼Schedule ã«ã¦
+ *          åã¹ã±ã¸ã¥ã¼ãªã³ã°ãè¡ãï¼
+ *    'S' : ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯ NonPriTask ãèµ·åãã
+ *          ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯ NonPriTask ã«ã¦æé«åªå
+åº¦
+ *          ã¿ã¹ã¯ HighPriorityTask ãèµ·åãï¼ã¿ã¹ã¯çµäºãã
+ *    'y' : ã¿ã¹ã¯11(ã¹ã¿ãã¯å
+±æ)ãå¼ã³åºãï¼ä¿¡é ¼é¢æ°ã§å¦çãè¡ã
+ *    'Y' : ã¿ã¹ã¯12(ã¹ã¿ãã¯å
+±æ)ãå¼ã³åºãï¼ä¿¡é ¼é¢æ°ã§å¦çãè¡ã
+ *          ã¿ã¹ã¯ä¸æ­£çµäºã«ããï¼ã¨ã©ã¼ã³ã¼ãã¯E_OS_MISSINGENDã§
+ *          ã¨ã©ã¼ããã¯ãå¼ã°ãã
+ *    'z' : å®è¡ä¸­ã®ã¿ã¹ã¯ãã GetTaskID ãå®è¡ãã¦ï¼å®è¡ç¶æ
+ã® TaskID ãåå¾ãã
+ *    'Z' : ã¡ã¤ã³ã¿ã¹ã¯ãã GetTaskState ãå®è¡ãã¦ï¼å¯¾è±¡ã¿ã¹ã¯ã®ç¶æ
+ãåå¾ãã
+ *    'x' : divå½ä»¤ãå®è¡ãã¦ï¼æªå®ç¾©å½ä»¤ä¾å¤ãçºçããã
+ *  ã»å²è¾¼ã¿ç®¡çæ©è½
+ *    'd' : DisableAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨
+ *          ç¤ºãï¼ EnableAllInterrupts ãå®è¡ãã
+ *    'D' : SuspendAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨
+ *          ç¤ºãï¼ããã« SuspendAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤
+ *          ãã¼å¤ã3åè¡¨ç¤ºãï¼ResumeAllInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿
+ *          ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼ResumeAllInterrupts ãå®è¡ãã
+ *    'f' : SuspendOSInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨
+ *          ç¤ºãï¼ããã« SuspendOSInterrupts ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤
+ *          ãã¼å¤ã3åè¡¨ç¤ºãï¼ããã« SuspendAllInterruptsãå®è¡
+ *          å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼ ResumeAllInterrupts
+ *          ãå®è¡å¾ï¼å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼
+ *          ResumeOSInterrupts ãå®è¡å¾å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼
+ *          ResumeOSInterrupts ãå®è¡ãã
+ *    'T' : å²è¾¼ã¿ã¿ã¤ãå¤ã3åè¡¨ç¤ºãã
+ *  ã»ãªã½ã¼ã¹ç®¡çæ©è½
+ *    'k' : GetResource ã«ã¦ãªã½ã¼ã¹ TskLevelRes ãåå¾ããï¼ãªãï¼
+ *          Task3 ã¯ï¼ãã®ãªã½ã¼ã¹ããåªå
+åº¦ãé«ãããã¨ã©ã¼ã¨ãªã
+ *    'K' : ReleaseResource ã«ã¦ãªã½ã¼ã¹ TskLevelRes ãè§£æ¾ãã
+ *    'i' : GetResource ã«ã¦ãªã½ã¼ã¹ CntRes ãåå¾å¾ï¼å²è¾¼ã¿
+ *          ã¿ã¤ãå¤ã3åè¡¨ç¤ºãï¼ReleaseResource ã«ã¦ãªã½ã¼ã¹
+ *          CntRes ãè§£æ¾ãã
+ *  ã»ã¤ãã³ãå¶å¾¡æ©è½
+ *    'e' : SetEvent ã«ã¦ã¤ãã³ããè¨­å®ããï¼Task2 ã¨ Task3 ä»¥å¤ã¯
+ *          å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'w' : ClearEvent ã«ã¦èªã¿ã¹ã¯ã®ã¤ãã³ããã¯ãªã¢ããï¼Task2 ã¨
+ *          Task3 ä»¥å¤ã¯å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'E' : GetEvent ã«ã¦ã¤ãã³ãç¶æ
+ãåå¾ããï¼Task2 ã¨ Task3
+ *          ä»¥å¤ã¯å²ãå½ã¦ããªãããã¨ã©ã¼ã¨ãªã
+ *    'W' : WaitEvent ã«ã¦èªã¿ã¹ã¯ã®ã¤ãã³ããå¾
+ã¤ï¼Task3 ã¨ Task4
+ *          ä»¥å¤ã¯ã¨ã©ã¼ã¨ãªã
+ *  ã»ã¢ã©ã¼ã æ©è½
+ *    'b' : GetAlarmBase ã«ã¦ã¢ã©ã¼ã  MainCycArm ã®ã¢ã©ã¼ã ãã¼ã¹
+ *          æ
+å ±ãåå¾ãã
+ *    'B' : GetAlarm ã«ã¦ã¢ã©ã¼ã  MainCycArm ã®æ®ãã«ã¦ã³ãå¤ã2å
+ *          é£ç¶ã§åå¾ãã
+ *    'v' : SetRelAlarm ã«ã¦ã¢ã©ã¼ã  ActTskArm ãèµ·åãï¼500ms å¾ã«
+ *          ã¿ã¹ã¯ Task1 ãèµ·åãã
+ *    'V' : SetRelAlarm ã«ã¦ã¢ã©ã¼ã  SetEvtArm ãèµ·åãï¼500ms å¾ã«
+ *          ã¤ãã³ã T3Evt ãè¨­å®ãã
+ *    'h' : CancelAlarm ã«ã¦ã¢ã©ã¼ã  ActTskArm ãã­ã£ã³ã»ã«ãã
+ *  ã»ã«ã¦ã³ã¿æä½æ©è½
+ *    'c' : ã¿ã¹ã¯ã«ã¦ IncrementCounter ãå®è¡ãï¼ã«ã¦ã³ã¿ SampleCnt
+ *          ã«ã·ã°ãã«éç¥ãã
+ *          1 ã·ã°ãã«ã§ã¢ã©ã¼ã  SampleArm ãæºäºãï¼ã³ã¼ã«ããã¯ã
+ *          å®è¡ãã
+ *    'C' : ã¿ã¹ã¯ã«ã¦ IncrementCounter ãå®è¡ãï¼ã«ã¦ã³ã¿ SampleCnt2
+ *          ã«ã·ã°ãã«éç¥ãã
+ *          1 ã·ã°ãã«ã§ã¢ã©ã¼ã  SampleArm1 ãæºäºãï¼SampleCnt3 ã
+ *          ã¤ã³ã¯ãªã¡ã³ãããï¼ SampleCnt3 ã¯ 1 ã·ã°ãã«ã§ SampleAlm2
+ *          ãæºäºãã³ã¼ã«ããã¯ãå®è¡ãã
+ *    'j' : ã¿ã¹ã¯ã«ã¦ GetCounterValue ãå®è¡ãã
+ *          åå¾ããå¤ã¯ä¿å­ãã
+ *    'J' : ã¿ã¹ã¯ã«ã¦ GetEalsedCounterValue ãå®è¡ãã
+ *          å
+ã®å¤ã¯ååã®GetCounterValue ã¾ãã¯ GetEalsedCounterValue ã«ã¦åå¾
+ *          ããå¤ã¨ããï¼ååï¼ã¾ãã¯ï¼GetCounterValueãå®è¡ãã¦ããªãå ´åã¯0
+ *          ã¨ãã
+ *
+ *    'r' : ã¿ã¹ã¯ã«ã¦ GetISRIDãå®è¡ãã
+ *          ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã¯GetISRIDãå¼åºããå ´åã¯ã¨ã©ã¼ã¨ãã¦
+ *          INVALID_ISRãè¿å´ããã
+ *
+ *          å²è¾¼ã¿ã³ã³ãã­ã¹ãããã®GetISRIDçºè¡ã¯ï¼SystemTimerCntã®ã³ã¼ã«ããã¯
+ *          ã«ã¼ãã³ï¼'n' ã³ãã³ãã§å®è¡ï¼ã«ã¦è¡ã
+ *
+ *          ã¿ã¹ã¯ã³ã³ãã­ã¹ãããã®GetISRIDçºè¡ã¯ï¼SampleCnt2ã®ã³ã¼ã«ããã¯
+ *          ã«ã¼ãã³ï¼'C' ã¾ãã¯ 'c' ã³ãã³ãã§å®è¡ï¼ã«ã¦è¡ã
+ *
+ *  ã»ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«å¶å¾¡æ©è½
+ *    't' : ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«åä½å¶å¾¡ON/OFF
+ *
+ *        'i' : SchtblSampleCntã«ã¦ã³ã¿ãã¤ã³ã¯ãªã¡ã³ããã
+ *              SchtblSampleCntã«ã¦ã³ã¿ã¯ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ã®é§åã«ã¦ã³ã¿
+ *        '1' : ä»¥éã®ã³ãã³ãã scheduletable1 ã«å¯¾ãã¦è¡ã(ããã©ã«ãå¤)
+ *        '2' : ä»¥éã®ã³ãã³ãã scheduletable2 ã«å¯¾ãã¦è¡ã
+ *        '3' : ä»¥éã®ã³ãã³ãã scheduletable3(å­å¨ããªãID) ã«å¯¾ãã¦è¡ã
+ *              ã³ãã³ãã®ã¨ã©ã¼ç¢ºèªã«ãä½¿ç¨ãã
+ *        's' : StartScheduleTableRelãå®è¡ãï¼ç¸å¯¾å¤(5)ã§ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãéå§ãã
+ *        'S' : StartScheduleTableAbsãå®è¡ãï¼çµ¶å¯¾å¤(5)ã§ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãéå§ãã
+ *        'f' : StopScheduleTableãå®è¡ãï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãåæ­¢ãã
+ *        'n' : NextScheduleTableãå®è¡ãï¼scheduletable2ã«åæ¿ãã
+ *        'N' : NextScheduleTableãå®è¡ãï¼scheduletable1ã«åæ¿ãã
+ *        'g' : GetScheduleTableStatusãå®è¡ãï¼ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¶æ
+ãåå¾ãã
+ *        'q' : ShutdownOS( E_OK ) OSå®è¡å¶å¾¡æ©è½ã®'q'ã¨åç­æ©è½
+ *        'Q' : ShutdownOS( E_OS_STATE ) OSå®è¡å¶å¾¡æ©è½ã®'Q'ã¨åç­æ©è½
+ *
+ *  ã»OSå®è¡å¶å¾¡æ©è½
+ *    'p' : GetActiveApplicationMode ã«ã¦ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã
+ *          åå¾ãã
+ *    'q' : ShutdownOS ãã³ã¼ã E_OK ã§å®è¡ãï¼ãµã³ãã«ãã­ã°ã©ã ã
+ *          çµäºãã
+ *    'Q' : ShutdownOS ãã³ã¼ã E_OS_STATE ã§å®è¡ãï¼ãµã³ãã«ãã­ã°ã©ã 
+ *          ãçµäºãã
+ *
+ *  ã»IOCéåä¿¡æ©è½
+ *    'I' : IOCéåä¿¡ã¢ã¼ã
+ *
+ *        IOC APIãä½¿ç¨ããã¿ã¹ã¯(IocTaskX)ãé¸æ
+ *        '1' : IocTask1(NT_osap1ã«æå±)
+ *        '2' : IocTask2(NT_osap2ã«æå±)
+ *        '3' : IocTask3(KT_osap1ã«æå±)
+ *        '4' : IocTask4(KT_osap2ã«æå±)
+ *
+ *        IOC APIãé¸æ
+ *        '1' : IocSend_IOC_QUE_0(uint8 in1)
+ *        '2' : IocSend_IOC_QUE_1(uint8 in1)
+ *        '3' : IocWriteGroup_IOC_DEQUE(uint8 in1, uint8 in2, uint8 in3)
+ *        '4' : IocReceive_IOC_QUE(uint8 *out1)
+ *        '5' : IocReadGroup_IOC_DEQUE(uint8 *out1, uint8 *out2, uint8 *out3)
+ *        '6' : IocEmptyQueue_IOC_QUE(void)
+ *
+ *        éä¿¡APIé¸ææï¼éä¿¡ãã¼ã¿ãå
+¥åãã
+ *
+ *  ï¼ãªãã¸ã§ã¯ãä¸è¦§ï¼
+ *  ã»OS
+ *    ã¹ã¿ã¼ãã¢ããããã¯ï¼ä½¿ç¨
+ *    ã·ã£ãããã¦ã³ããã¯ï¼ä½¿ç¨
+ *    ã¨ã©ã¼ããã¯ï¼ä½¿ç¨
+ *    ãã¬ã¿ã¹ã¯ããã¯ï¼æªä½¿ç¨
+ *    ãã¹ãã¿ã¹ã¯ããã¯ï¼æªä½¿ç¨
+ *  ã»ã¿ã¹ã¯
+ *    ã¡ã¤ã³ã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼MainTask
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã³ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode1, AppMode2, AppMode3
+ *      æ¦è¦ï¼ã¦ã¼ã¶ã¤ã³ã¿ãã§ã¼ã¹ï¼ã·ãªã¢ã«IOããã³ãã³ããåä¿¡ãï¼
+ *            ããã«å¯¾å¿ããåä½ãè¡ãªãï¼
+ *            å¨æã¢ã©ã¼ã  MainCycArm ã«ããï¼10msãã¨ã«å¾
+ã¡è§£é¤ã
+ *            ã³ãã³ãã®åä¿¡æç¡ããã¼ãªã³ã°ãã
+ *            ã¤ãã³ãï¼IDï¼MainEvtï¼ãé¢é£ä»ãã¦ãã
+ *    æé«åªå
+åº¦ã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼HighPriorityTask
+ *      åªå
+åº¦ï¼15
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã­ã°ãåºåãã¦çµäºããï¼ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *            ããèµ·åããï¼ããªã¨ã³ãããã¦ãããã©ããã®ç¢ºèªç¨
+ *    ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *      ã¿ã¹ã¯IDï¼NonPriTask
+ *      åªå
+åº¦ï¼1
+ *      å¤éèµ·åæ°ï¼8
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã³ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼èµ·åã­ã°ãåºåãï¼æé«åªå
+åº¦ã¿ã¹ã¯ HighPriorityTask ã
+ *            èµ·åå¾ï¼çµäºã­ã°ãåºåãã¦ã¿ã¹ã¯ãçµäºãã
+ *    ã¿ã¹ã¯1
+ *      ã¿ã¹ã¯IDï¼Task1
+ *      åªå
+åº¦ï¼4
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode2
+ *      å¤éèµ·åæ°ï¼8
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯2
+ *      ã¿ã¹ã¯IDï¼Task2
+ *      åªå
+åº¦ï¼7
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            ã¤ãã³ã T2Evt ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯3
+ *      ã¿ã¹ã¯IDï¼Task3
+ *      åªå
+åº¦ï¼12
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼AppMode3
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ã¤ãã³ãå¾
+ã¡ãããã¨ãå¯è½ã§ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            ã¤ãã³ã T3Evt ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯4
+ *      ã¿ã¹ã¯IDï¼Task4
+ *      åªå
+åº¦ï¼6
+ *      å¤éèµ·åæ°ï¼5
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            å
+é¨ãªã½ã¼ã¹ GroupRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯5
+ *      ã¿ã¹ã¯IDï¼Task5
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼5
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            èµ·åããããã¨ç¡éã«ã¼ãã«å
+¥ãï¼ã³ãã³ãå¦çãå®è¡ãã
+ *            ãªã½ã¼ã¹ TskLevelRes ãé¢é£ä»ãã¦ãã
+ *            ãªã½ã¼ã¹ CntRes ãé¢é£ä»ãã¦ãã
+ *            å
+é¨ãªã½ã¼ã¹ GroupRes ãé¢é£ä»ãã¦ãã
+ *    ã¿ã¹ã¯6
+ *      ã¿ã¹ã¯IDï¼Task6
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼-
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            SC3ã§ã¯ã·ã¹ãã ã¿ã¹ã¯ã¨ãã¦èµ·å
+ *            èµ·åããããã¨å³æé¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            ä½åº¦èµ·åãã¦ãOKã¨ãªã
+ *            Task7ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯7
+ *      ã¿ã¹ã¯IDï¼Task7
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼-
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *      æ¦è¦ï¼ä¸¦åå¦çã¿ã¹ã¯ï¼ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½ï¼
+ *            SC3ã§ã¯ã¦ã¼ã¶ã¿ã¹ã¯ã¨ãã¦èµ·å
+ *            èµ·åããããã¨å³æé¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            ä½åº¦èµ·åãã¦ãOKã¨ãªã
+ *            Task6ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯8
+ *      ã¿ã¹ã¯IDï¼Task8
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåããï¼ã¢ã¯ã»ã¹æ¨©éã®ãªãTask1ã«å¯¾ãã¦
+ *            GetTaskState()ãçºè¡ãã¦ï¼ã¨ã©ã¼ããã¯ãä¸ãã
+ *    ã¿ã¹ã¯9
+ *      ã¿ã¹ã¯IDï¼Task9
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¢ã¯ã»ã¹æ¨©éã®ããTask2ã«å¯¾ãã¦
+ *            GetTaskState()ãçºè¡ãã¦ï¼Task2ã®ã¹ãã¼ã¿ã¹ãåºåãã
+ *    ã¿ã¹ã¯10
+ *      ã¿ã¹ã¯IDï¼Task10
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T10Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯11
+ *      ã¿ã¹ã¯IDï¼Task11
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T11Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯12
+ *      ã¿ã¹ã¯IDï¼Task12
+ *      åªå
+åº¦ï¼14
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼èµ·åã¡ãã»ã¼ã¸åºåãï¼ã¤ãã³ã(T12Evt)ãå¾
+ã¡
+ *    ã¿ã¹ã¯13
+ *      ã¿ã¹ã¯IDï¼Task13
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨(ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½)
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *            èµ·åããããä¿¡é ¼é¢æ°å®è¡å¾TerminateTaskã§çµäºãã
+ *            Task12ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    ã¿ã¹ã¯14
+ *      ã¿ã¹ã¯IDï¼Task14
+ *      åªå
+åº¦ï¼8
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨(ã¡ã¤ã³ã¿ã¹ã¯ããã®æä»¤ã«ããåä½)
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *            èµ·åããããä¿¡é ¼é¢æ°å®è¡å¾é¢æ°ãçµäºãã
+ *            ãã®å ´åã§ãæ­£ããTerminateTaskãå®è¡ãããããç¢ºèª
+ *            Task11ã¨ã¹ã¿ãã¯ãå
+±æ
+ *    IocTask1
+ *      ã¿ã¹ã¯IDï¼IocTask1
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask2
+ *      ã¿ã¹ã¯IDï¼IocTask2
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask3
+ *      ã¿ã¹ã¯IDï¼IocTask3
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *    IocTask4
+ *      ã¿ã¹ã¯IDï¼IocTask4
+ *      åªå
+åº¦ï¼9
+ *      å¤éèµ·åæ°ï¼1
+ *      ã¹ã±ã¸ã¥ã¼ã«ï¼ãã«ããªã¨ã³ããã£ã
+ *      èªåèµ·åï¼ãªã
+ *      æ¦è¦ï¼IOCéä¿¡å¦ç(IOC APIã®é¸æï¼éä¿¡ãã¼ã¿è¨­å®ï¼å®è¡)ãè¡ã
+ *            éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±
+ *
+ *  ã»å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³
+ *    ã·ãªã¢ã«IOåä¿¡å²è¾¼ã¿
+ *      ISRIDï¼RxHwSerialInt
+ *      åªå
+åº¦ï¼2
+ *      ã«ãã´ãªï¼2
+ *      æ¦è¦ï¼ã³ãã³ããåä¿¡ãã
+ *  ã»ãªã½ã¼ã¹
+ *    ã¿ã¹ã¯ã¬ãã«ãªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼TskLevelRes
+ *      ãã­ããã£ï¼æ¨æº
+ *    ã¿ã¹ã¯ç¨ã«ã¦ã³ã¿ãªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼CntRes
+ *      ãã­ããã£ï¼æ¨æº
+ *    ã¿ã¹ã¯ã°ã«ã¼ããªã½ã¼ã¹
+ *      ãªã½ã¼ã¹IDï¼GroupRes
+ *      ãã­ããã£ï¼å
+é¨
+ *  ã»ã¤ãã³ã
+ *    ã¡ã¤ã³ã¿ã¹ã¯ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼MainEvt
+ *    ã¿ã¹ã¯2ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼T2Evt
+ *    ã¿ã¹ã¯3ã¤ãã³ã
+ *      ã¤ãã³ãIDï¼T3Evt
+ *  ã»ã«ã¦ã³ã¿
+ *    ã·ã¹ãã ã¿ã¤ãã«ã¦ã³ã¿
+ *      ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã«ã¦ã³ãå¤ï¼0ã999
+ *      å ç®å¤ï¼1
+ *    ãµã³ãã«ã«ã¦ã³ã¿
+ *      ã«ã¦ã³ã¿IDï¼SampleCnt
+ *      ã«ã¦ã³ãå¤ï¼0ã99
+ *      å ç®å¤ï¼10
+ *  ã»ã¢ã©ã¼ã 
+ *    ã¡ã¤ã³å¨æã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼MainCycArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¤ãã³ãè¨­å® MainEvt
+ *      èªåèµ·åï¼ãªã
+ *    ã¿ã¹ã¯èµ·åã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼ActTskArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¿ã¹ã¯èµ·å Task1
+ *      èªåèµ·åï¼ãªã
+ *    ã¤ãã³ãè¨­å®ã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼SetEvtArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼MAIN_HW_COUNTER
+ *      ã¢ã¯ã·ã§ã³ï¼ã¤ãã³ãè¨­å® T3Evt
+ *      èªåèµ·åï¼ãªã
+ *    IncrementCounterç¢ºèªç¨ã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼SampleArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼SampleCnt
+ *      ã¢ã¯ã·ã§ã³ï¼ã³ã¼ã«ããã¯é¢æ°å®è¡
+ *      èªåèµ·åï¼ãªã
+ *    ä»OSAPæå±ã¿ã¹ã¯èµ·åã¢ã©ã¼ã 
+ *      ã¢ã©ã¼ã IDï¼ActOtherOSAPTskArm
+ *      ãã¼ã¹ã«ã¦ã³ã¿IDï¼SchtblSampleCnt
+ *      ã¢ã¯ã·ã§ã³ï¼ã¿ã¹ã¯èµ·å Task4
+ *      èªåèµ·åï¼AppMode1, AppMode2, AppMode3
+ *      è¨­å®ï¼ã«ã¦ã³ã¿5ï¼å¨æ0(åçº)
+ *  ã»ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ã
+ *    èªåèµ·åãªãã¢ã¼ã(MainTaskã®ã¿èªåèµ·å)
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode1
+ *    Task1èªåèµ·åã¢ã¼ã
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode2
+ *    Task3èªåèµ·åã¢ã¼ã
+ *      ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãIDï¼AppMode3
+ *  ã»ä¿¡é ¼é¢æ°
+ *    ä¿¡é ¼é¢æ°tfnt1
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *      ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ *    ä¿¡é ¼é¢æ°tfnt2
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *      ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ *    ä¿¡é ¼é¢æ°tfnt3
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããã®ShutdownOSã
+ *      åãä»ãã
+ *    ä¿¡é ¼é¢æ°tfnt4
+ *      éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããä¿¡é ¼OSã¢ããª
+ *      ã±ã¼ã·ã§ã³ã«æå±ããã¿ã¹ã¯ãèµ·åãã
+ *
+ *  æ¬ãã¡ã¤ã«ã¯ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«
+ *  æå±ãã¦ãããªãã¸ã§ã¯ã,sample2.cã§ã¯
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ãã¦ãã
+ *  ãªãã¸ã§ã¯ããè¨è¿°ãã¦ãã
+ */
+
+#define TOPPERS_SVC_FUNCCALL
+
+#include "sample.h"
+#include "sample1.h"
+#include "Ioc.h"
+#include "target_hw_counter.h"
+
+#define GetAppModeInfo()	(0)
+
+/*
+ *  ãã­ãã¯ã·ã§ã³çºçæã®å¦çã¬ãã«
+ */
+#ifdef CFG_USE_PROTECTIONHOOK
+static const char8	*faulty_context_tbl[5] = {
+	"FC_INVALID",
+	"FC_TASK",
+	"FC_C2ISR",
+	"FC_SYSTEM_HOOK",
+	"FC_TRUSTED_FUNC"
+};
+#endif /* CFG_USE_PROTECTIONHOOK */
+
+/*
+ *  ãã¡ã¤ã«åï¼è¡çªå·ã®åç
+§ç¨ã®å¤æ°
+ */
+extern const char8	*fatal_file_name;   /* ãã¡ã¤ã«å */
+extern sint32		fatal_line_num;     /* è¡çªå· */
+
+/*
+ *  å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+sint32 main(void);
+
+DEFINE_VAR_SSTACK(StackType, stack_00[COUNT_STK_T(0x200)]);
+
+extern uint8 GetCommand(void);
+extern void PutActTsk(uint8 task_no);
+extern void PutActNonPriTsk(void);
+extern void PutTermTsk(uint8 task_no);
+extern void PutChainTsk(uint8 from_task_no, uint8 to_task_no);
+extern void PutSchedule(void);
+extern void PutTaskID(void);
+extern void PutTaskState(uint8 task_no);
+extern void PutDisAllInt(void);
+extern void PutSusAllInt(void);
+extern void PutSusOSInt(void);
+extern void PutHwCnt3(void);
+extern void PutGetCntRes(void);
+extern void PutGetTskRes(void);
+extern void PutRelTskRes(void);
+extern void PutSetEvt(uint8 task_no);
+extern void PutClrEvt(uint8 task_no);
+extern void PutGetEvt(uint8 task_no);
+extern void PutWaitEvt(uint8 task_no);
+extern void PutArmBase(void);
+extern void PutArmTick(void);
+extern void PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no);
+extern void PutCanArm(void);
+extern void PutAppMode(void);
+extern void PutActIocTsk(void);
+extern void schedule_table_sample_routine(void);
+
+TASK(IocTask3);
+TASK(IocTask4);
+static void IocProk2(void);
+static uint8 GetCommandNoWait1(void);
+
+/*
+ *  å
+é¨ãã¼ã¿ãããã¡
+ */
+extern volatile uint8 command_tbl[14];                         /* ã³ãã³ãå¼æ¸¡ããã¼ãã« */
+
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#define error_log_ioc(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+
+#define	error_log_ioc(api)										   \
+	{															   \
+		StatusType ercd;										   \
+		ercd = api;     /* åAPIå®è¡ */							   \
+		if (ercd != E_OK) {										   \
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd)); \
+		}														   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt1
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *    ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt1, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	sint32					*p1;
+	sint32					p2;
+
+	p1 = local->name1;
+	p2 = local->name2;
+
+	local->return_value = (StatusType) ((*p1 * 2) + p2);
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt2
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããæ¸¡ããã
+ *    ãã¤ã³ã¿å¼æ°ã®èª­æ¸ãæä½ãã¦ï¼è¨ç®çµæã
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«è¿ã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt2, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	sint32					*p1;
+	sint32					p2;
+
+	p1 = local->name1;
+	p2 = local->name2;
+
+	local->return_value = (StatusType) ((*p1 * 4) + p2);
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt3
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããã®ShutdownOSã
+ *    åãä»ãã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt3, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	StatusType				ercd;
+
+	ercd = local->ercd;
+	ShutdownOS(ercd);
+
+	return(E_OK);
+}
+
+/*
+ *  ä¿¡é ¼é¢æ°tfnt4
+ *    éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ããä¿¡é ¼OSã¢ããª
+ *    ã±ã¼ã·ã§ã³ã«æå±ããã¿ã¹ã¯ãèµ·åãã
+ */
+TRUSTEDFUNCTION(TRUSTED_tfnt4, FunctionIndex, FunctionParams)
+{
+	struct parameter_struct *local = FunctionParams;
+
+	TaskType				task_no;
+
+	task_no = local->task_no;
+
+	error_log(ActivateTask(task_no));
+
+	return(E_OK);
+}
+
+/*
+ *  ã¡ã¤ã³ã¿ã¹ã¯
+ *
+ *  ã¦ã¼ã¶ã³ãã³ãã®åä¿¡ã¨ï¼ã³ãã³ããã¨ã®å¦çå®è¡
+ */
+TASK(MainTask)
+{
+	uint8					command;
+	uint8					task_no;
+	uint32					i;
+	struct parameter_struct	local;
+
+	TickType				val = 0U;
+	TickType				eval = 0U;
+
+	/*
+	 *  ã¿ã¹ã¯çªå·ã»ã³ãã³ããããã¡åæå
+	 */
+	task_no = (uint8) (0);
+	for (i = 0U; i < (sizeof(command_tbl) / sizeof(command_tbl[0])); i++) {
+		command_tbl[i] = 0U;
+	}
+
+	/*
+	 *  MainCycArmãå¨æã¢ã©ã¼ã ã¨ãã¦è¨­å®
+	 */
+	SetRelAlarm(MainCycArm, TICK_FOR_10MS, TICK_FOR_10MS);
+
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+		WaitEvent(MainEvt);     /* 10msã®ä½æ¥­æéå¾
+ã¡ */
+		ClearEvent(MainEvt);
+
+		/*
+		 *  å
+¥åã³ãã³ãåå¾
+		 */
+		syslog(LOG_INFO, "Input Command:");
+		command = GetCommand();
+
+		/*
+		 *  å
+¥åã³ãã³ããã§ãã¯
+		 */
+		if ((command <= (uint8) (0x1fU)) || (command >= (uint8) (0x80U))) {
+			syslog(LOG_INFO, "Not ASCII character");
+		}
+		else {
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", command);
+#endif /* OMIT_ECHO */
+
+			/*
+			 *  ã³ãã³ãå¤å¥
+			 */
+			switch (command) {
+			case '1':
+			case '2':
+			case '3':
+			case '4':
+			case '5':
+			case '6':
+			case '7':
+			case '8':
+			case '9':
+				/*
+				 *  å¦çå¯¾è±¡ã¿ã¹ã¯ã®å¤æ´
+				 */
+				task_no = (uint8) (command - '1');
+				break;
+			case 'A':
+			case '!':
+			case '"':
+			case '#':
+			case '$':
+			case '%':
+			case 'z':
+			case 'k':
+			case 'K':
+			case 'l':
+			case 'i':
+			case 'w':
+			case 'W':
+				/*
+				 *  ã¿ã¹ã¯ã¸ã®ã³ãã³ãéç¥
+				 */
+				command_tbl[task_no] = command;
+				break;
+			/*
+			 *  ä»¥éã¯ã¡ã¤ã³ã¿ã¹ã¯ã§ã³ãã³ãå¦ç
+			 */
+			case 'a':
+				PutActTsk(task_no);
+				break;
+			case 's':
+				PutSchedule();
+				break;
+			case 'S':
+				PutActNonPriTsk();
+				break;
+			case 'Z':
+				PutTaskState(task_no);
+				break;
+			case 'x':
+				syslog(LOG_INFO, "call RAISE_CPU_EXCEPTION");
+				RAISE_CPU_EXCEPTION;
+				break;
+			case 'd':
+				PutDisAllInt();
+				break;
+			case 'D':
+				PutSusAllInt();
+				break;
+			case 'f':
+				PutSusOSInt();
+				break;
+			case 'T':
+				PutHwCnt3();
+				break;
+			case 'e':
+				PutSetEvt(task_no);
+				break;
+			case 'E':
+				PutGetEvt(task_no);
+				break;
+			case 'b':
+				PutArmBase();
+				break;
+			case 'B':
+				PutArmTick();
+				PutArmTick();
+				break;
+			case 'v':
+				/* SetRelAlarm(ActTskArm, 500, 0)ãå®è¡ */
+				PutSetRel(0U, 0U, 0U);
+				break;
+			case 'V':
+				/* SetRelAlarm(SetEvtArm, 500, 0)ãå®è¡ */
+				PutSetRel(1U, 0U, 0U);
+				break;
+			case 'h':
+				/* CancelAlarm(CallBackArm)ãå®è¡ */
+				PutCanArm();
+				break;
+			case 'c':
+				syslog(LOG_INFO, "Call IncrementCounter(SampleCnt)");
+				IncrementCounter(SampleCnt);
+				break;
+			case 'C':
+				syslog(LOG_INFO, "Call IncrementCounter(SampleCnt2)");
+				IncrementCounter(SampleCnt2);
+				break;
+			case 'j':
+				syslog(LOG_INFO, "GetCounterValue(MAIN_HW_COUNTER, val)");
+				GetCounterValue(MAIN_HW_COUNTER, &val);
+				syslog(LOG_INFO, " val = %d", val);
+				break;
+			case 'J':
+				syslog(LOG_INFO, "Pre val = %d", val);
+				syslog(LOG_INFO, "GetElapsedValue(MAIN_HW_COUNTER, val ,eval)");
+				GetElapsedValue(MAIN_HW_COUNTER, &val, &eval);
+				syslog(LOG_INFO, " val = %d", val);
+				syslog(LOG_INFO, " eval = %d", eval);
+				break;
+			case 'r':
+				syslog(LOG_INFO, "GetISRID() Call from Task Context");
+				syslog(LOG_INFO, "GetISRID() = %d", GetISRID());
+				break;
+			case 'p':
+				PutAppMode();
+				break;
+			case 't':
+				schedule_table_sample_routine();
+				break;
+			case 'q':
+				local.ercd = E_OK;
+				CallTrustedFunction(tfnt3, &local); /* ShutdownOS( E_OK ) */
+				break;
+			case 'Q':
+				local.ercd = E_OS_STATE;
+				CallTrustedFunction(tfnt3, &local); /* ShutdownOS( E_OS_STATE ) */
+				break;
+			case 'y':
+				PutActTsk(10U);
+				break;
+			case 'Y':
+				PutActTsk(11U);
+				break;
+			case 'I':
+				PutActIocTsk();
+				break;
+			default:
+				/* ä¸è¨ã®ã³ãã³ãä»¥å¤ã®å ´åï¼å¦çãè¡ããªã */
+				break;
+			}
+		}
+	}
+
+	/*
+	 *  ããã«ã¯ããªã
+	 */
+	syslog(LOG_INFO, "MainTask TERMINATE");
+	error_log(TerminateTask());
+}   /* TASK( MainTask ) */
+
+/*
+ *  ãã³ããªã¨ã³ããã£ãã¿ã¹ã¯
+ *
+ *  å®è¡ä¸­ã¯ããªã¨ã³ããããªããã¨ã®ç¢ºèªç¨
+ */
+TASK(NonPriTask)
+{
+	syslog(LOG_INFO, "NonPriTask ACTIVATE");
+	syslog(LOG_INFO, "Call ActivateTask(HighPriorityTask)");
+	error_log(ActivateTask(HighPriorityTask));
+	syslog(LOG_INFO, "NonPriTask TERMINATE");
+
+	error_log(TerminateTask());
+}   /* TASK( NonPriTask ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯6
+ */
+TASK(Task6)
+{
+	TaskProk(5U);
+}   /* TASK( Task6 ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯7
+ */
+TASK(Task7)
+{
+	TaskProk(6U);
+}   /* TASK( Task7 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯3
+ */
+TASK(IocTask3)
+{
+	syslog(LOG_INFO, "IocTask3 ACTIVATE");
+
+	IocProk2();
+
+	syslog(LOG_INFO, "IocTask3 TERMINATE");
+	TerminateTask();
+}   /* TASK( IocTask3 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯4
+ */
+TASK(IocTask4)
+{
+	syslog(LOG_INFO, "IocTask4 ACTIVATE");
+
+	IocProk2();
+
+	syslog(LOG_INFO, "IocTask4 TERMINATE");
+	TerminateTask();
+}   /* TASK( IocTask4 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ */
+static void
+IocProk2(void)
+{
+	uint8			api;        /* ã³ãã³ãåä¿¡ãããã¡(API) */
+	uint8			data[3];    /* éä¿¡ãããã¡ */
+
+	volatile sint32 i;
+	Std_ReturnType	ercd;
+
+	syslog(LOG_INFO, "Select IOC API:");
+	api = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", api);
+#endif /* OMIT_ECHO */
+
+	switch (api) {
+	case '1':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_0");
+		error_log_ioc(IocSend_IOC_QUE_0(data[0]));
+		break;
+	case '2':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_1");
+		error_log_ioc(IocSend_IOC_QUE_1(data[0]));
+		break;
+	case '3':
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "Input send data%d:", i);
+			data[i] = GetCommandNoWait1();
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", data[i]);
+#endif /* OMIT_ECHO */
+		}
+		syslog(LOG_INFO, "Call IocWriteGroup_IOC_DEQUE");
+		error_log_ioc(IocWriteGroup_IOC_DEQUE(data[0], data[1], data[2]));
+		break;
+	case '4':
+		syslog(LOG_INFO, "Call IocReceive_IOC_QUE");
+		ercd = IocReceive_IOC_QUE(&data[0]);
+#if !defined(CFG_USE_ERRORHOOK)
+		if (ercd != E_OK) {
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd));
+		}
+#endif /* !defined( CFG_USE_ERRORHOOK ) */
+		if ((ercd == IOC_E_OK) || (ercd == IOC_E_LOST_DATA)) {
+			syslog(LOG_INFO, "recv data:%c", data[0]);
+		}
+		break;
+	case '5':
+		syslog(LOG_INFO, "Call IocReadGroup_IOC_DEQUE");
+		error_log_ioc(IocReadGroup_IOC_DEQUE(&data[0], &data[1], &data[2]));
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "recv data%d:%c", i, data[i]);
+		}
+		break;
+	case '6':
+		syslog(LOG_INFO, "Call IocEmptyQueue_IOC_QUE");
+		error_log_ioc(IocEmptyQueue_IOC_QUE());
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* IocProk2 */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç(ã¦ã§ã¤ãç¡ã)
+ */
+uint8
+GetCommandNoWait1(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommandNoWait1 */
+
+/*
+ *  ã¦ã¼ã¶ã¡ã¤ã³é¢æ°
+ *
+ *  ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®å¤æ­ã¨ï¼ã«ã¼ãã«èµ·å
+ */
+sint32
+main(void)
+{
+	AppModeType	crt_app_mode;
+
+	/*
+	 *  ã¢ããªã±ã¼ã·ã§ã³ã¢ã¼ãã®å¤æ­
+	 */
+	switch (GetAppModeInfo()) {
+	case 0:
+		crt_app_mode = AppMode1;
+		break;
+	case 1:
+		crt_app_mode = AppMode2;
+		break;
+	default:
+		crt_app_mode = AppMode3;
+		break;
+	}
+
+	/*
+	 *  ã«ã¼ãã«èµ·å
+	 */
+	StartOS(crt_app_mode);
+
+	while (1) {
+	}
+}   /* main */
+
+/*
+ *  ã¨ã©ã¼ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_ERRORHOOK
+void
+ErrorHook(StatusType Error)
+{
+
+	/*
+	 *  ã¨ã©ã¼è¦å ãã¨ã®ãã©ã¡ã¼ã¿ã­ã°åºå
+	 */
+	switch (OSErrorGetServiceId()) {
+	case OSServiceId_ActivateTask:
+		syslog(LOG_INFO, "Error:%s=ActivateTask(%d)", atk2_strerror(Error), OSError_ActivateTask_TaskID());
+		break;
+	case OSServiceId_TerminateTask:
+		syslog(LOG_INFO, "Error:%s=TerminateTask()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ChainTask:
+		syslog(LOG_INFO, "Error:%s=ChainTask(%d)", atk2_strerror(Error), OSError_ChainTask_TaskID());
+		break;
+	case OSServiceId_Schedule:
+		syslog(LOG_INFO, "Error:%s=Schedule()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetTaskID:
+		syslog(LOG_INFO, "Error:%s=GetTaskID(0x%p)", atk2_strerror(Error), OSError_GetTaskID_TaskID());
+		break;
+	case OSServiceId_GetTaskState:
+		syslog(LOG_INFO, "Error:%s=GetTaskState(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetTaskState_TaskID(), OSError_GetTaskState_State());
+		break;
+	case OSServiceId_EnableAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=EnableAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_DisableAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=DisableAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ResumeAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=ResumeAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_SuspendAllInterrupts:
+		syslog(LOG_INFO, "Error:%s=SuspendAllInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ResumeOSInterrupts:
+		syslog(LOG_INFO, "Error:%s=ResumeOSInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_SuspendOSInterrupts:
+		syslog(LOG_INFO, "Error:%s=SuspendOSInterrupts()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetISRID:
+		syslog(LOG_INFO, "Error:%s=GetISRID()", atk2_strerror(Error));
+		break;
+	case OSServiceId_GetResource:
+		syslog(LOG_INFO, "Error:%s=GetResource(%d)", atk2_strerror(Error), OSError_GetResource_ResID());
+		break;
+	case OSServiceId_ReleaseResource:
+		syslog(LOG_INFO, "Error:%s=ReleaseResource(%d)", atk2_strerror(Error), OSError_ReleaseResource_ResID());
+		break;
+	case OSServiceId_SetEvent:
+		syslog(LOG_INFO, "Error:%s=SetEvent(%d, 0x%x)", atk2_strerror(Error),
+			   OSError_SetEvent_TaskID(), OSError_SetEvent_Mask());
+		break;
+	case OSServiceId_ClearEvent:
+		syslog(LOG_INFO, "Error:%s=ClearEvent(0x%x)", atk2_strerror(Error), OSError_ClearEvent_Mask());
+		break;
+	case OSServiceId_GetEvent:
+		syslog(LOG_INFO, "Error:%s=GetEvent(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetEvent_TaskID(), OSError_GetEvent_Event());
+		break;
+	case OSServiceId_WaitEvent:
+		syslog(LOG_INFO, "Error:%s=WaitEvent(0x%x)", atk2_strerror(Error), OSError_WaitEvent_Mask());
+		break;
+	case OSServiceId_GetAlarmBase:
+		syslog(LOG_INFO, "Error:%s=GetAlarmBase(0x%p)", atk2_strerror(Error), OSError_GetAlarmBase_AlarmID());
+		break;
+	case OSServiceId_GetAlarm:
+		syslog(LOG_INFO, "Error:%s=GetAlarm(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetAlarm_AlarmID(), OSError_GetAlarm_Tick());
+		break;
+	case OSServiceId_SetRelAlarm:
+		syslog(LOG_INFO, "Error:%s=SetRelAlarm(%d, %d, %d)", atk2_strerror(Error),
+			   OSError_SetRelAlarm_AlarmID(), OSError_SetRelAlarm_increment(), OSError_SetRelAlarm_cycle());
+		break;
+	case OSServiceId_SetAbsAlarm:
+		syslog(LOG_INFO, "Error:%s=SetAbsAlarm(%d, %d, %d)", atk2_strerror(Error),
+			   OSError_SetAbsAlarm_AlarmID(), OSError_SetAbsAlarm_start(), OSError_SetAbsAlarm_cycle());
+		break;
+	case OSServiceId_CancelAlarm:
+		syslog(LOG_INFO, "Error:%s=CancelAlarm(%d)", atk2_strerror(Error), OSError_CancelAlarm_AlarmID());
+		break;
+	case OSServiceId_StartScheduleTableRel:
+		syslog(LOG_INFO, "Error:%s=StartScheduleTableRel(%d, %d)", atk2_strerror(Error),
+			   OSError_StartScheduleTableRel_ScheduleTableID(), OSError_StartScheduleTableRel_Offset());
+		break;
+	case OSServiceId_StartScheduleTableAbs:
+		syslog(LOG_INFO, "Error:%s=StartScheduleTableAbs(%d, %d)", atk2_strerror(Error),
+			   OSError_StartScheduleTableAbs_ScheduleTableID(), OSError_StartScheduleTableAbs_Start());
+		break;
+	case OSServiceId_StopScheduleTable:
+		syslog(LOG_INFO, "Error:%s=StopScheduleTable(%d)", atk2_strerror(Error), OSError_StopScheduleTable_ScheduleTableID());
+		break;
+	case OSServiceId_NextScheduleTable:
+		syslog(LOG_INFO, "Error:%s=NextScheduleTable(%d, %d)", atk2_strerror(Error),
+			   OSError_NextScheduleTable_ScheduleTableID_From(), OSError_NextScheduleTable_ScheduleTableID_To());
+		break;
+	case OSServiceId_GetScheduleTableStatus:
+		syslog(LOG_INFO, "Error:%s=GetScheduleTableStatus(%d, 0x%p)", atk2_strerror(Error),
+			   OSError_GetScheduleTableStatus_ScheduleTableID(), OSError_GetScheduleTableStatus_ScheduleStatus());
+		break;
+	case OSServiceId_GetActiveApplicationMode:
+		syslog(LOG_INFO, "Error:%s=GetActiveApplicationMode()", atk2_strerror(Error));
+		break;
+	case OSServiceId_StartOS:
+		syslog(LOG_INFO, "Error:%s=StartOS()", atk2_strerror(Error));
+		break;
+	case OSServiceId_ShutdownOS:
+		syslog(LOG_INFO, "Error:%s=ShutdownOS()", atk2_strerror(Error));
+		break;
+	case OSServiceId_IncrementCounter:
+		syslog(LOG_INFO, "Error:%s=IncrementCounter(%d)", atk2_strerror(Error), OSError_IncrementCounter_CounterID());
+		break;
+	case OSServiceId_TaskMissingEnd:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Send:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Write:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_SendGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_WriteGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Receive:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_Read:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_ReceiveGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_ReadGroup:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	case IOCServiceId_IOC_EmptyQueue:
+		syslog(LOG_INFO, "Error:%s=MissingEnd()", atk2_ioc_strerror(Error));
+		break;
+	default:
+		syslog(LOG_INFO, "Error:%s=UnKnownFunc()", atk2_strerror(Error));
+		break;
+	}
+
+}
+#endif /* CFG_USE_ERRORHOOK */
+
+/*
+ *  ãã¬ã¿ã¹ã¯ããã¯ã«ã¼ãã³
+ *
+ *  Task13/Task14å®è¡åã®ãã¬ã¿ã¹ã¯ããã¯ã®å ´åï¼ã¡ãã»ã¼ã¸ãåºå
+ */
+#ifdef CFG_USE_PRETASKHOOK
+void
+PreTaskHook(void)
+{
+	TaskType tskid;
+
+	GetTaskID(&tskid);
+	if (tskid == Task13) {
+		syslog(LOG_INFO, "\nPreTaskHook before Task13!\n");
+	}
+	if (tskid == Task14) {
+		syslog(LOG_INFO, "\nPreTaskHook before Task14!\n");
+	}
+}
+#endif /* CFG_USE_PRETASKHOOK */
+
+/*
+ *  ãã¹ãã¿ã¹ã¯ããã¯ã«ã¼ãã³
+ *
+ *  Task13/Task14å®è¡å¾ã®ãã¹ãã¿ã¹ã¯ããã¯ã®å ´åï¼ã¡ãã»ã¼ã¸ãåºå
+ */
+#ifdef CFG_USE_POSTTASKHOOK
+void
+PostTaskHook(void)
+{
+	TaskType tskid;
+
+	GetTaskID(&tskid);
+	if (tskid == Task13) {
+		syslog(LOG_INFO, "\nPostTaskHook after Task13!\n");
+	}
+	if (tskid == Task14) {
+		syslog(LOG_INFO, "\nPostTaskHook after Task14!\n");
+	}
+}
+#endif /* CFG_USE_POSTTASKHOOK */
+
+/*
+ *  ã¹ã¿ã¼ãã¢ããããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_STARTUPHOOK
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+extern void target_timer_initialize(void);
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+
+void
+StartupHook(void)
+{
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+	target_timer_initialize();
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+	syslog_initialize();
+	syslog_msk_log(LOG_UPTO(LOG_INFO));
+	InitSerial();
+	print_banner();
+}
+#endif /* CFG_USE_STARTUPHOOK */
+
+/*
+ *  ã·ã£ãããã¦ã³ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_SHUTDOWNHOOK
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+extern void target_timer_terminate(void);
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+
+void
+ShutdownHook(StatusType Error)
+{
+	/* çµäºã­ã°åºå */
+	syslog(LOG_INFO, "Sample System ShutDown");
+	syslog(LOG_INFO, "ShutDownCode:%s", atk2_strerror(Error));
+	syslog(LOG_INFO, "");
+
+	if (Error == E_OS_SYS_ASSERT_FATAL) {
+		syslog(LOG_INFO, "fatal_file_name:%s", fatal_file_name);
+		syslog(LOG_INFO, "fatal_line_num:%d", fatal_line_num);
+	}
+
+#ifdef TOPPERS_ENABLE_SYS_TIMER
+	target_timer_terminate();
+#endif /* TOPPERS_ENABLE_SYS_TIMER */
+	TermSerial();
+
+}
+#endif /* CFG_USE_SHUTDOWNHOOK */
+
+/*
+ *  ãã­ãã¯ã·ã§ã³ããã¯ã«ã¼ãã³
+ */
+#ifdef CFG_USE_PROTECTIONHOOK
+ProtectionReturnType
+ProtectionHook(StatusType FatalError)
+{
+	StatusType			ercd;
+	FaultyContextType	faulty_context;
+	TaskType			taskid;
+
+	syslog(LOG_INFO, "ProtectionHook");
+
+	if (FatalError == E_OS_STACKFAULT) {
+		syslog(LOG_INFO, "E_OS_STACKFAULT");
+		ercd = PRO_SHUTDOWN;
+	}
+	else if (FatalError == E_OS_PROTECTION_EXCEPTION) {
+		faulty_context = GetFaultyContext();
+		syslog(LOG_INFO, "E_OS_PROTECTION_EXCEPTION and GetFaultyContext() = %s", faulty_context_tbl[faulty_context]);
+
+		switch (faulty_context) {
+		case FC_TASK:
+			ercd = GetTaskID(&taskid);
+			if (taskid == MainTask) {
+				ercd = PRO_IGNORE;
+			}
+			else {
+				ercd = PRO_TERMINATETASKISR;
+			}
+			break;
+		case FC_C2ISR:
+			ercd = PRO_TERMINATETASKISR;
+			break;
+		case FC_SYSTEM_HOOK:
+			ercd = PRO_IGNORE;
+			break;
+		case FC_TRUSTED_FUNC:
+			ercd = PRO_IGNORE;
+			break;
+		case FC_INVALID:
+			ercd = PRO_SHUTDOWN;
+			break;
+		default:
+			ercd = PRO_SHUTDOWN;
+			syslog(LOG_INFO, "unknown error fo GetFaultyContext() = %d", faulty_context);
+		}
+	}
+	else {
+		ercd = PRO_SHUTDOWN;
+	}
+
+	return(ercd);
+}
+#endif /* CFG_USE_PROTECTIONHOOK */
Index: /atk2-sc3-1.4.0-ntisr/sample/sample1.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/sample1.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/sample1.h	(revision 172)
@@ -0,0 +1,94 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample1.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE1_H
+#define TOPPERS_SAMPLE1_H
+
+#include "target_test.h"
+
+#define TIMER_ISR_PARAM		(TIMER_CONTROL_CONT | TIMER_CONTROL_ITO | TIMER_CONTROL_START)
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+extern StackType stack_00[COUNT_STK_T(0x200)];
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE1_H */
Index: /atk2-sc3-1.4.0-ntisr/sample/sample1.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/sample1.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/sample1.yaml	(revision 172)
@@ -0,0 +1,617 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2015 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2015 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2015 by Witz Corporation
+#  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+#  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+#  Copyright (C) 2014-2015 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+#  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: sample1.yaml 481 2015-12-17 01:59:10Z ertl-ishikawa $
+#
+
+Ecuc:
+  Os:
+    OsInclude1:
+      DefinitionRef: OsInclude
+      OsIncludeFileName: sample1.h
+    OsInclude2:
+      DefinitionRef: OsInclude
+      OsIncludeFileName: sample2.h
+    OsOS:
+      OsStackMonitoring: true
+      OsUseGetServiceId: true
+      OsUseParameterAccess: true
+      OsScalabilityClass: SC3
+      OsStatus: EXTENDED
+      OsHooks:
+        OsErrorHook: true
+        OsPostTaskHook: true
+        OsPreTaskHook: true
+        OsProtectionHook: true
+        OsShutdownHook: true
+        OsStartupHook: true
+      OsHookStack:
+        OsHookStackSize: 512
+    TskLevelRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: STANDARD
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    CntRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: STANDARD
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    GroupRes:
+      DefinitionRef: OsResource
+      OsResourceProperty: INTERNAL
+      OsResourceAccessingApplication: /Ecuc/Os/NT_osap1
+    SampleCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleCnt2:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleCnt3:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    NonPriTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 8
+      OsTaskPriority: 1
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+    Task6:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskStackStartAddress: stack_00
+      OsTaskSchedule: FULL
+    Task7:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 512
+      OsTaskStackStartAddress: stack_00
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+    MainTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 14
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/MainEvt
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+      OsTaskAutostart:
+        OsTaskAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    HighPriorityTask:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 15
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    Task1:
+      DefinitionRef: OsTask
+      OsTaskActivation: 8
+      OsTaskPriority: 4
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskResourceRef:
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+      OsTaskAutostart:
+        OsTaskAppModeRef: /Ecuc/Os/AppMode2
+    Task2:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 7
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+      OsTaskResourceRef:
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+      OsTaskEventRef: /Ecuc/Os/T2Evt
+    MainCycArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/MainTask
+          OsAlarmSetEventRef: /Ecuc/Os/MainEvt
+    ActTskArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmActivateTask:
+          OsAlarmActivateTaskRef: /Ecuc/Os/Task1
+    Task3:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 12
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskResourceRef: /Ecuc/Os/CntRes
+      OsTaskEventRef: /Ecuc/Os/T3Evt
+      OsTaskAutostart:
+        OsTaskAppModeRef: /Ecuc/Os/AppMode3
+    Task4:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 6
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+      OsTaskResourceRef:
+        - /Ecuc/Os/GroupRes
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+    scheduletable1:
+      DefinitionRef: OsScheduleTable
+      OsScheduleTableDuration: 60
+      OsScheduleTableRepeating: true
+      OsScheduleTableCounterRef: /Ecuc/Os/SchtblSampleCnt
+      OsScheduleTableExpiryPoint_0:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 10
+        OsScheduleTableTaskActivation_0:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task10
+        OsScheduleTableTaskActivation_1:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task11
+        OsScheduleTableTaskActivation_2:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableExpiryPoint_1:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 20
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T10Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task10
+        OsScheduleTableEventSetting_1:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T11Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task11
+        OsScheduleTableEventSetting_2:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T12Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableSync:
+        OsScheduleTblSyncStrategy: NONE
+    Task5:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskResourceRef:
+        - /Ecuc/Os/GroupRes
+        - /Ecuc/Os/CntRes
+        - /Ecuc/Os/TskLevelRes
+    scheduletable2:
+      DefinitionRef: OsScheduleTable
+      OsScheduleTableDuration: 50
+      OsScheduleTableRepeating: true
+      OsScheduleTableCounterRef: /Ecuc/Os/SchtblSampleCnt
+      OsScheduleTableExpiryPoint_0:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 20
+        OsScheduleTableTaskActivation_0:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task12
+        OsScheduleTableTaskActivation_1:
+          DefinitionRef: OsScheduleTableTaskActivation
+          OsScheduleTableActivateTaskRef: /Ecuc/Os/Task11
+      OsScheduleTableExpiryPoint_1:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 30
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T12Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task12
+      OsScheduleTableExpiryPoint_2:
+        DefinitionRef: OsScheduleTableExpiryPoint
+        OsScheduleTblExpPointOffset: 40
+        OsScheduleTableEventSetting_0:
+          DefinitionRef: OsScheduleTableEventSetting
+          OsScheduleTableSetEventRef: /Ecuc/Os/T11Evt
+          OsScheduleTableSetEventTaskRef: /Ecuc/Os/Task11
+      OsScheduleTableSync:
+        OsScheduleTblSyncStrategy: NONE
+    SetEvtArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/MAIN_HW_COUNTER
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/Task3
+          OsAlarmSetEventRef: /Ecuc/Os/T3Evt
+    SampleAlm1:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/SampleCnt2
+      OsAlarmAction:
+        OsAlarmIncrementCounter:
+          OsAlarmIncrementCounterRef: /Ecuc/Os/SampleCnt3
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 10
+        OsAlarmCycleTime: 10
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    SchtblSampleCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    SampleAlm2:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/SampleCnt3
+      OsAlarmAction:
+        OsAlarmSetEvent:
+          OsAlarmSetEventTaskRef: /Ecuc/Os/MainTask
+          OsAlarmSetEventRef: /Ecuc/Os/MainEvt
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 10
+        OsAlarmCycleTime: 10
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    Task10:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T10Evt
+    Task11:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T11Evt
+    Task12:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 13
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: NON
+      OsTaskEventRef: /Ecuc/Os/T12Evt
+    Task13:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskStackStartAddress: stack_1
+      OsTaskSystemStackSize: 512
+      OsTaskSystemStackStartAddress: stack_2
+      OsTaskSchedule: FULL
+    Task14:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 512
+      OsTaskStackStartAddress: stack_1
+      OsTaskSystemStackSize: 512
+      OsTaskSystemStackStartAddress: stack_2
+      OsTaskSchedule: FULL
+    IocTask1:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap2
+    IocTask2:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+      OsTaskAccessingApplication: /Ecuc/Os/NT_osap1
+    IocTask3:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    IocTask4:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 9
+      OsTaskStackSize: 512
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    AppMode1:
+      DefinitionRef: OsAppMode
+    AppMode2:
+      DefinitionRef: OsAppMode
+    AppMode3:
+      DefinitionRef: OsAppMode
+    MainEvt:
+      DefinitionRef: OsEvent
+    T2Evt:
+      DefinitionRef: OsEvent
+    T3Evt:
+      DefinitionRef: OsEvent
+      OsEventMask: 65536
+    T10Evt:
+      DefinitionRef: OsEvent
+    T11Evt:
+      DefinitionRef: OsEvent
+    T12Evt:
+      DefinitionRef: OsEvent
+    KT_osap1:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppTaskRef:
+        - /Ecuc/Os/MainTask
+        - /Ecuc/Os/NonPriTask
+        - /Ecuc/Os/Task6
+        - /Ecuc/Os/Task7
+        - /Ecuc/Os/IocTask3
+      OsAppMemoryModuleRef:
+        - /Ecuc/Os/banner
+        - /Ecuc/Os/log_output
+        - /Ecuc/Os/sample1
+      tfnt1:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt1
+      tfnt2:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt2
+      tfnt3:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt3
+      tfnt4:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_tfnt4
+      actioctask3:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_actioctask3
+    KT_osap2:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppTaskRef: /Ecuc/Os/IocTask4
+      actioctask4:
+        DefinitionRef: OsApplicationTrustedFunction
+        OsTrustedFunctionStackSize: 32
+        OsTrustedFunctionName: TRUSTED_actioctask4
+    NT_osap1:
+      DefinitionRef: OsApplication
+      OsTrusted: false
+      OsAppCounterRef:
+        - /Ecuc/Os/SampleCnt
+        - /Ecuc/Os/SchtblSampleCnt
+        - /Ecuc/Os/SampleCnt2
+        - /Ecuc/Os/SampleCnt3
+      OsAppTaskRef:
+        - /Ecuc/Os/HighPriorityTask
+        - /Ecuc/Os/Task1
+        - /Ecuc/Os/Task2
+        - /Ecuc/Os/Task3
+        - /Ecuc/Os/Task4
+        - /Ecuc/Os/Task5
+        - /Ecuc/Os/Task10
+        - /Ecuc/Os/Task11
+        - /Ecuc/Os/Task12
+        - /Ecuc/Os/Task13
+        - /Ecuc/Os/Task14
+        - /Ecuc/Os/IocTask1
+      OsAppAlarmRef:
+        - /Ecuc/Os/MainCycArm
+        - /Ecuc/Os/ActTskArm
+        - /Ecuc/Os/SetEvtArm
+        - /Ecuc/Os/SampleAlm1
+        - /Ecuc/Os/SampleAlm2
+      OsAppScheduleTableRef:
+        - /Ecuc/Os/scheduletable1
+        - /Ecuc/Os/scheduletable2
+    OsLinkSection:
+      OsLinkSectionName: .stack_section
+      OsLinkSectionMemoryRegionRef: /Ecuc/Os/RAM
+    banner:
+      DefinitionRef: OsMemoryModule
+      OsMemoryModuleExport: false
+      OsMemoryModuleName: banner.o
+    log_output:
+      DefinitionRef: OsMemoryModule
+      OsMemoryModuleExport: false
+      OsMemoryModuleName: log_output.o
+    sample1:
+      DefinitionRef: OsMemoryModule
+      OsMemoryModuleExport: false
+      OsMemoryModuleName: sample1.o
+    Task8:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 592
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    Task9:
+      DefinitionRef: OsTask
+      OsTaskActivation: 5
+      OsTaskPriority: 8
+      OsTaskStackSize: 768
+      OsTaskSystemStackSize: 512
+      OsTaskSchedule: FULL
+    ActOtherOSAPTskArmCnt:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 99
+      OsCounterMinCycle: 10
+      OsCounterTicksPerBase: 10
+      OsCounterType: SOFTWARE
+    ActOtherOSAPTskArm:
+      DefinitionRef: OsAlarm
+      OsAlarmCounterRef: /Ecuc/Os/ActOtherOSAPTskArmCnt
+      OsAlarmAction:
+        OsAlarmActivateTask:
+          OsAlarmActivateTaskRef: /Ecuc/Os/Task4
+      OsAlarmAutostart:
+        OsAlarmAlarmTime: 5
+        OsAlarmCycleTime: 0
+        OsAlarmAutostartType: ABSOLUTE
+        OsAlarmAppModeRef:
+          - /Ecuc/Os/AppMode1
+          - /Ecuc/Os/AppMode2
+          - /Ecuc/Os/AppMode3
+    NT_osap2:
+      DefinitionRef: OsApplication
+      OsTrusted: false
+      OsAppTaskRef:
+        - /Ecuc/Os/Task8
+        - /Ecuc/Os/Task9
+        - /Ecuc/Os/IocTask2
+      OsAppCounterRef: /Ecuc/Os/ActOtherOSAPTskArmCnt
+      OsAppAlarmRef: /Ecuc/Os/ActOtherOSAPTskArm
+    IOC:
+      DefinitionRef: OsIoc
+      IOC_QUE:
+        DefinitionRef: OsIocCommunication
+        OsIocBufferLength: 3
+        IOC_QUE_DATA:
+          DefinitionRef: OsIocDataProperties
+          OsIocInitValue: 1U
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_QUE_RCV:
+          DefinitionRef: OsIocReceiverProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocReceivingOsApplicationRef: /Ecuc/Os/NT_osap2
+        IOC_QUE_SND0:
+          DefinitionRef: OsIocSenderProperties
+          OsIocSenderId: 0
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/NT_osap1
+        IOC_QUE_SND1:
+          DefinitionRef: OsIocSenderProperties
+          OsIocSenderId: 1
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/KT_osap1
+      IOC_DEQUE:
+        DefinitionRef: OsIocCommunication
+        IOC_DEQUE_DATA0:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 0
+          OsIocInitValue: 0U
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_DATA1:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 1
+          OsIocInitValue: 10U
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_DATA2:
+          DefinitionRef: OsIocDataProperties
+          OsIocDataPropertyIndex: 2
+          OsIocInitValue: 20U
+          OsIocDataTypeRef: /ImplementationDataTypes/uint8
+        IOC_DEQUE_RCV:
+          DefinitionRef: OsIocReceiverProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocReceivingOsApplicationRef: /Ecuc/Os/KT_osap2
+        IOC_DEQUE_SND:
+          DefinitionRef: OsIocSenderProperties
+          OsIocFunctionImplementationKind: FUNCTION
+          OsIocSendingOsApplicationRef: /Ecuc/Os/KT_osap1
+
+IMPLEMENTATION-DATA-TYPE:
+  uint8:
+    CATEGORY: VALUE
Index: /atk2-sc3-1.4.0-ntisr/sample/sample2.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/sample2.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/sample2.c	(revision 172)
@@ -0,0 +1,1165 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample2.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®æ¬ä½
+ *
+ *  ãµã³ãã«ãã­ã°ã©ã ã®åä½ã¯sample1.cã®ã³ã¡ã³ãåç
+§
+ *  æ¬ãã¡ã¤ã«ã¯éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã«æå±ãã¦ãã
+ *  ãªãã¸ã§ã¯ããè¨è¿°ãã¦ãã
+ */
+
+#include "sample.h"
+#include "sample2.h"
+#include "Ioc.h"
+
+#define GetHwCnt(x, y)
+
+/*
+ *  å
+é¨é¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+uint8 GetCommand(void);
+void PutActTsk(uint8 task_no);
+void PutActNonPriTsk(void);
+void PutTermTsk(uint8 task_no);
+void PutChainTsk(uint8 from_task_no, uint8 to_task_no);
+void PutSchedule(void);
+void PutTaskID(void);
+void PutTaskState(uint8 task_no);
+void PutDisAllInt(void);
+void PutSusAllInt(void);
+void PutSusOSInt(void);
+void PutHwCnt3(void);
+void PutGetCntRes(void);
+void PutGetTskRes(void);
+void PutRelTskRes(void);
+void PutSetEvt(uint8 task_no);
+void PutClrEvt(uint8 task_no);
+void PutGetEvt(uint8 task_no);
+void PutWaitEvt(uint8 task_no);
+void PutArmBase(void);
+void PutArmTick(void);
+void PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no);
+void PutCanArm(void);
+void PutAppMode(void);
+void schedule_table_sample_routine(void);
+
+TASK(IocTask1);
+TASK(IocTask2);
+static void IocProk1(void);
+static uint8 GetCommandNoWait2(void);
+
+/*
+ *  APIã¨ã©ã¼ã­ã°ãã¯ã­
+ *
+ *  ErrorHookãæå¹ã®å ´åã¯ErrorHookãã
+ *  ã¨ã©ã¼ã­ã°ãåºåã, ErrorHookãç¡å¹ã®å ´åã¯
+ *  ä»¥ä¸ã®ãã¯ã­ããã¨ã©ã¼ã­ã°åºåãè¡ã
+ */
+#if defined(CFG_USE_ERRORHOOK)
+#define error_log(api)	(api)
+#define error_log_ioc(api)	(api)
+#else /* !defined( CFG_USE_ERRORHOOK ) */
+#define	error_log(api)										   \
+	{														   \
+		StatusType ercd;									   \
+		ercd = api;     /* åAPIå®è¡ */						   \
+		if (ercd != E_OK) {									   \
+			syslog(LOG_INFO, "Error:%d", atk2_strerror(ercd)); \
+		}													   \
+	}
+
+#define	error_log_ioc(api)										   \
+	{															   \
+		StatusType ercd;										   \
+		ercd = api;     /* åAPIå®è¡ */							   \
+		if (ercd != E_OK) {										   \
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd)); \
+		}														   \
+	}
+#endif /* defined( CFG_USE_ERRORHOOK ) */
+
+/*
+ *  å
+é¨ãã¼ã¿ãããã¡
+ */
+volatile uint8				command_tbl[14]; /* ã³ãã³ãå¼æ¸¡ããã¼ãã« */
+
+/*
+ *  å
+é¨å®æ°ãã¼ã¿ãã¼ãã«
+ */
+/* ç¡å¹ã¤ãã³ããã¹ã¯å¤ */
+#define invalid_mask	(EventMaskType) (0)
+
+/* ã¤ãã³ããã¹ã¯ãã¼ãã« */
+static const EventMaskType	event_mask_tbl[5] = {
+	invalid_mask,
+	T2Evt,
+	T3Evt,
+	invalid_mask,
+	invalid_mask
+};
+
+/* ã¿ã¹ã¯IDãã¼ãã« */
+static const TaskType		task_id_tbl[14] = {
+	Task1,
+	Task2,
+	Task3,
+	Task4,
+	Task5,
+	Task6,
+	Task7,
+	Task8,
+	Task9,
+	Task10,
+	Task11,
+	Task12,
+	Task13,
+	Task14
+};
+
+/* ã¢ã©ã¼ã IDãã¼ãã« */
+static const AlarmType		alarm_id_tbl[2] = {
+	ActTskArm,
+	SetEvtArm
+};
+
+/* ãã£ãã¯å¤ãã¼ãã« */
+static const TickType		tick_tbl[2] = {
+	(TickType) 500,
+	(TickType) 900
+};
+
+/* ãµã¤ã¯ã«å¤ãã¼ãã« */
+static const TickType		cycle_tbl[2] = {
+	(TickType) 0,
+	(TickType) COUNTER_MIN_CYCLE
+};
+
+/* ã¤ãã³ããã¹ã¯åæå­åãã¼ãã« */
+static const char8			*event_name_tbl[5] = {
+	"Invalid",
+	"T2Evt",
+	"T3Evt",
+	"Invalid",
+	"Invalid"
+};
+
+/* ã¿ã¹ã¯åæå­åãã¼ãã« */
+static const char8			*task_name_tbl[14] = {
+	"Task1",
+	"Task2",
+	"Task3",
+	"Task4",
+	"Task5",
+	"Task6",
+	"Task7",
+	"Task8",
+	"Task9",
+	"Task10",
+	"Task11",
+	"Task12"
+	"Task13"
+	"Task14"
+};
+
+/* ã¿ã¹ã¯ç¶æ
+æå­åãã¼ãã« */
+static const char8			*task_state_tbl[4] = {
+	"SUSPENDED",
+	"RUNNING",
+	"READY",
+	"WAITING"
+};
+
+/* ã¢ã©ã¼ã åæå­åãã¼ãã« */
+static const char8			*alarm_name_tbl[2] = {
+	"ActTskArm",
+	"SetEvtArm"
+};
+
+DEFINE_VAR_USTACK(StackType, stack_1[COUNT_STK_T(0x200)], ".stack_section");
+DEFINE_VAR_SSTACK(StackType, stack_2[COUNT_STK_T(0x200)]);
+
+/*
+ *  æé«åªå
+åº¦ã¿ã¹ã¯
+ *
+ *  åã¿ã¹ã¯ã®ããªã¨ã³ããç¢ºèªç¨
+ */
+TASK(HighPriorityTask)
+{
+	syslog(LOG_INFO, "HighPriorityTask ACTIVATE");
+	error_log(TerminateTask());
+}   /* TASK( HighPriorityTask ) */
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯1
+ */
+TASK(Task1)
+{
+	TaskProk(0U);
+}   /* TASK( Task1 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯2
+ */
+TASK(Task2)
+{
+	TaskProk(1U);
+}   /* TASK( Task2 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯3
+ */
+TASK(Task3)
+{
+	TaskProk(2U);
+}   /* TASK( Task3 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯4
+ */
+TASK(Task4)
+{
+	TaskProk(3U);
+}   /* TASK( Task4 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯5
+ */
+TASK(Task5)
+{
+	TaskProk(4U);
+}   /* TASK( Task5 ) */
+
+
+/*
+ *  ä¸¦åå®è¡ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ *  ã¡ã¤ã³ã¿ã¹ã¯ããéç¥ãããã³ãã³ããã¨ã®å¦çå®è¡
+ */
+void
+TaskProk(uint8 task_no)
+{
+	uint8 command;          /* ã³ãã³ãéé¿ãããã¡ */
+
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "%s ACTIVATE", task_name_tbl[task_no]);
+
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+
+		/*
+		 *  ã³ãã³ãåå¾
+		 */
+		while (command_tbl[task_no] == '\0') {
+		}
+		command = command_tbl[task_no];
+		command_tbl[task_no] = 0U;
+
+		/*
+		 *  ã³ãã³ãå¤å®
+		 */
+		switch (command) {
+		case 'A':
+			PutTermTsk(task_no);
+			break;
+		case '!':
+		case '"':
+		case '#':
+		case '$':
+		case '%':
+			PutChainTsk(task_no, (command - '!'));
+			break;
+		case 'z':
+			PutTaskID();
+			break;
+		case 'k':
+			PutGetTskRes();
+			break;
+		case 'K':
+			PutRelTskRes();
+			break;
+		case 'i':
+			PutGetCntRes();
+			break;
+		case 'w':
+			if (task_no < 5U) {
+				PutClrEvt(task_no);
+			}
+			break;
+		case 'W':
+			if (task_no < 5U) {
+				PutWaitEvt(task_no);
+			}
+			break;
+		default:
+			/* ä¸è¨ã®ã³ãã³ãä»¥å¤ã®å ´åï¼å¦çã¯è¡ããªã */
+			break;
+		}
+	}
+}   /* TaskProk */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç
+ */
+uint8
+GetCommand(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		WaitEvent(MainEvt);     /* 10msã¦ã§ã¤ã */
+		ClearEvent(MainEvt);
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommand */
+
+/*
+ *  ActivateTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutActTsk(uint8 task_no)
+{
+	struct parameter_struct local;
+
+	syslog(LOG_INFO, "Call ActivateTask(%s)", task_name_tbl[task_no]);
+
+	if (task_no < 5U) {
+		error_log(ActivateTask(task_id_tbl[task_no]));
+	}
+	else {
+		local.task_no = task_id_tbl[task_no];
+		CallTrustedFunction(tfnt4, &local); /* ActivateTask(task_name_tbl[task_no]) */
+	}
+
+}   /* PutActTsk	*/
+
+/*
+ *  ActivateTask å®è¡(NonPriTask)ã»ã­ã°åºåå¦ç
+ */
+void
+PutActNonPriTsk(void)
+{
+	struct parameter_struct local;
+
+	syslog(LOG_INFO, "Call ActivateTask(NonPriTask)");
+
+	local.task_no = NonPriTask;
+	CallTrustedFunction(tfnt4, &local); /* ActivateTask(NonPriTask) */
+
+}   /* PutActNonPriTsk	*/
+
+/*
+ *  TerminateTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutTermTsk(uint8 task_no)
+{
+	StatusType ercd;        /* ã¨ã©ã¼ã³ã¼ã */
+
+	syslog(LOG_INFO, "%s TERMINATE", task_name_tbl[task_no]);
+
+	ercd = TerminateTask();
+	ShutdownOS(ercd);
+}
+
+/*
+ *  ChainTask å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutChainTsk(uint8 from_task_no, uint8 to_task_no)
+{
+	StatusType ercd;            /* ã¨ã©ã¼ã³ã¼ã */
+
+	syslog(LOG_INFO, "Call ChainTask(%s)", task_name_tbl[to_task_no]);
+	syslog(LOG_INFO, "%s TERMINATE", task_name_tbl[from_task_no]);
+
+	ercd = ChainTask(task_id_tbl[to_task_no]);
+	if (ercd == E_OS_LIMIT) {
+		syslog(LOG_INFO, "Call TerminateTask()");
+		syslog(LOG_INFO, "Because of ChainTask E_OS_LIMIT return");
+		ercd = TerminateTask();
+	}
+	ShutdownOS(ercd);
+}   /* PutChainTsk */
+
+/*
+ *  Schedule å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSchedule(void)
+{
+	syslog(LOG_INFO, "Call ActivateTask(HighPriorityTask)");
+
+	error_log(ActivateTask(HighPriorityTask));
+	syslog(LOG_INFO, "Call Schedule()");
+
+	error_log(Schedule());
+	syslog(LOG_INFO, "Retrun Schedule()");
+}   /* PutSchedule	*/
+
+/*
+ *  GetTaskID å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutTaskID(void)
+{
+	TaskType task_id;           /* ã¿ã¹ã¯IDåå¾ãããã¡ */
+
+	error_log(GetTaskID(&task_id));
+
+	syslog(LOG_INFO, "TaskID:%d", task_id);
+}   /* PutTaskID	*/
+
+/*
+ *  GetTaskState å®è¡ã»ã­ã°åºåå¦ç
+ *  Task1ãTask5ï¼Task7åå¾æã¨ã©ã¼ã¨ãªããªã
+ *  Task6åå¾æã¨ã©ã¼ã¨ãªã
+ */
+void
+PutTaskState(uint8 task_no)
+{
+	TaskStateType state;        /* ã¿ã¹ã¯IDåå¾ãããã¡ */
+
+	error_log(GetTaskState(task_id_tbl[task_no], &state));
+
+	syslog(LOG_INFO, task_name_tbl[task_no]);
+	syslog(LOG_INFO, " State:%s", task_state_tbl[state]);
+}   /* PutTaskState	*/
+
+/*
+ *  DisableAllInterrupts/EnableAllInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutDisAllInt(void)
+{
+	syslog(LOG_INFO, "Call DisableAllInterrupts");
+
+	DisableAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call EnableAllInterrupts");
+
+	EnableAllInterrupts();
+}   /* PutDisAllInt	*/
+
+/*
+ *  SuspendAllInterrupts/ResumeAllInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSusAllInt(void)
+{
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+}   /* PutSusAllInt	*/
+
+/*
+ *  SuspendOSInterrupts/ResumeOSInterrupts å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSusOSInt(void)
+{
+	syslog(LOG_INFO, "Call SuspendOSInterrupts");
+
+	SuspendOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendOSInterrupts");
+
+	SuspendOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call SuspendAllInterrupts");
+
+	SuspendAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeAllInterrupts");
+
+	ResumeAllInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeOSInterrupts");
+
+	ResumeOSInterrupts();
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ResumeOSInterrupts");
+
+	ResumeOSInterrupts();
+}   /* PutSusOSInt */
+
+/*
+ *  å²è¾¼ã¿åä½ãã¹ãç¨HWã«ã¦ã³ã¿å¤ã®ã­ã°åºåå¦ç
+ */
+void
+PutHwCnt3(void)
+{
+	uint32	isr1_cnt = 0U;      /* C1ISR ã«ã¦ã³ãå¤åå¾ãããã¡ */
+	uint32	isr2_cnt = 0U;      /* C2ISR ã«ã¦ã³ãå¤åå¾ãããã¡ */
+	uint8	cnt;                /* åºååæ°ã«ã¦ã³ã¿ */
+
+	for (cnt = 0U; cnt < 3U; cnt++) {
+		GetHwCnt(&isr1_cnt, &isr2_cnt);
+		syslog(LOG_INFO, "C1ISR Cnt:%d, C2ISR Cnt:%d",
+			   isr1_cnt, isr2_cnt);
+	}
+}   /* PutHwCnt3 */
+
+/*
+ *  GetResource/ReleaseResource å®è¡(å²è¾¼ã¿ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetCntRes(void)
+{
+	syslog(LOG_INFO, "Call GetResource(CntRes)");
+	error_log(GetResource(CntRes));
+
+	PutHwCnt3();
+	syslog(LOG_INFO, "Call ReleaseResource(CntRes)");
+
+	error_log(ReleaseResource(CntRes));
+}   /* PutGetCntRes	*/
+
+/*
+ *  GetResource å®è¡(ã¿ã¹ã¯ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetTskRes(void)
+{
+	syslog(LOG_INFO, "Call GetResource(TskLevelRes)");
+
+	error_log(GetResource(TskLevelRes));
+}   /* PutGetTskRes */
+
+/*
+ *  ReleaseResource å®è¡(ã¿ã¹ã¯ã¬ãã«)ã»ã­ã°åºåå¦ç
+ */
+void
+PutRelTskRes(void)
+{
+	syslog(LOG_INFO, "Call ReleaseResource(TskLevelRes)");
+
+	error_log(ReleaseResource(TskLevelRes));
+}
+
+/*
+ *  SetEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSetEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call SetEvent(%s, %s)",
+		   task_name_tbl[task_no], event_name_tbl[task_no]);
+
+	error_log(SetEvent(task_id_tbl[task_no], event_mask_tbl[task_no]));
+}   /* PutSetEvt */
+
+/*
+ *  ClearEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutClrEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call ClearEvent(%s)", event_name_tbl[task_no]);
+
+	error_log(ClearEvent(event_mask_tbl[task_no]));
+}   /* PutClrEvt */
+
+/*
+ *  GetEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutGetEvt(uint8 task_no)
+{
+	EventMaskType mask;             /* ã¤ãã³ããã¹ã¯åå¾ãããã¡ */
+
+	error_log(GetEvent(task_id_tbl[task_no], &mask));
+
+	syslog(LOG_INFO, "%s Event Mask:0x%x", task_name_tbl[task_no], mask);
+}   /* PutGetEvt */
+
+/*
+ *  WaitEvent å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutWaitEvt(uint8 task_no)
+{
+	syslog(LOG_INFO, "Call WaitEvent(%s)", event_name_tbl[task_no]);
+
+	error_log(WaitEvent(event_mask_tbl[task_no]));
+	syslog(LOG_INFO, "Return WaitEvent(%s)", event_name_tbl[task_no]);
+}   /* PutWaitEvt */
+
+/*
+ *  GetAlarmBase å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutArmBase(void)
+{
+	AlarmBaseType info;             /* ã¢ã©ã¼ã ãã¼ã¹æ
+å ±åå¾ãããã¡ */
+
+	error_log(GetAlarmBase(MainCycArm, &info));
+
+	syslog(LOG_INFO, "MainCycArm Base:");
+	syslog(LOG_INFO, "\tMAXALLOWEDVALUE=%d", info.maxallowedvalue);
+	syslog(LOG_INFO, "\tTICKSPERBASE=%d", info.ticksperbase);
+	syslog(LOG_INFO, "\tMINCYCLE=%d", info.mincycle);
+}   /* PutArmBase */
+
+/*
+ *  PutArmTick å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutArmTick(void)
+{
+	TickType tick;              /* æ®ããã£ãã¯åå¾ãããã¡ */
+
+	error_log(GetAlarm(MainCycArm, &tick));
+
+	syslog(LOG_INFO, "MainCycArm Tick:%d", tick);
+}   /* PutArmTick */
+
+/*
+ *  SetRelAlarm å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutSetRel(uint8 alarm_no, uint8 tick_no, uint8 cycle_no)
+{
+	syslog(LOG_INFO, "Call SetRelAlarm(%s, %d, %d)",
+		   alarm_name_tbl[alarm_no], tick_tbl[tick_no], cycle_tbl[cycle_no]);
+
+	error_log(SetRelAlarm(alarm_id_tbl[alarm_no],
+						  tick_tbl[tick_no], cycle_tbl[cycle_no]));
+}   /* PutSetRel	*/
+
+/*
+ *  CancelAlarm å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutCanArm(void)
+{
+	syslog(LOG_INFO, "Call CancelAlarm(ActTskArm)");
+
+	error_log(CancelAlarm(ActTskArm));
+}   /* PutCanArm */
+
+/*
+ *  GetActiveApplicationMode å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutAppMode(void)
+{
+	switch (GetActiveApplicationMode()) {
+	case AppMode1:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode1");
+		break;
+	case AppMode2:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode2");
+		break;
+	case AppMode3:
+		syslog(LOG_INFO, "ActiveApplicationMode:AppMode3");
+		break;
+	default:
+		syslog(LOG_INFO, "ActiveApplicationMode:Non");
+		break;
+	}
+}   /* PutAppMode */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ãã¹ãç¨ã¡ã¤ã³ã«ã¼ã
+ *
+ *  ã¦ã¼ã¶ã³ãã³ãã®åä¿¡ã¨ï¼ã³ãã³ããã¨ã®å¦çå®è¡
+ */
+void
+schedule_table_sample_routine(void)
+{
+	uint8					command;                /* ã³ãã³ããããã¡ */
+	ScheduleTableType		scheduletable_id;       /* ã³ãã³ãå¼æ°ãããã¡ */
+	ScheduleTableStatusType	status;                 /* ã¹ã±ã¸ã¥ã¼ã«ç¶æ
+å¼æ° */
+	TickType				val;                    /* ã«ã¦ã³ã¿ã®ç¾å¨å¤ */
+	uint8					flag = FALSE;           /* ãªã¿ã¼ã³ãããå¤å®ããããã®ãã©ã° */
+
+	syslog(LOG_INFO, "\t[ schedule table sample routine IN, press 't' OUT ]");
+	syslog(LOG_INFO, "");
+
+	scheduletable_id = scheduletable1;
+	/*
+	 *  ã³ãã³ãå®è¡ã«ã¼ã
+	 */
+	while (1) {
+
+		WaitEvent(MainEvt);     /* 10msã®ä½æ¥­æéå¾
+ã¡ */
+		ClearEvent(MainEvt);
+
+		/*
+		 *  å
+¥åã³ãã³ãåå¾
+		 */
+		syslog(LOG_INFO, "Input Command:");
+		command = GetCommand();
+		syslog(LOG_INFO, "%c", command);
+
+		/*
+		 *  ã³ãã³ãå¤å®
+		 */
+		switch (command) {
+		case '1':
+			scheduletable_id = scheduletable1;
+			break;
+		case '2':
+			scheduletable_id = scheduletable2;
+			break;
+		case 'i':
+			IncrementCounter(SchtblSampleCnt);
+			val = 0U;
+			GetCounterValue(SchtblSampleCnt, &val);
+			if ((val % 5U) == 0U) {
+				syslog(LOG_INFO, "\tGetCounterValue(SchtblSampleCnt ) = %d", val);
+			}
+			break;
+		case 's':
+			syslog(LOG_INFO, "\tStartScheduleTableRel(scheduletable%d, 5)", scheduletable_id + 1U);
+			error_log(StartScheduleTableRel(scheduletable_id, 5U));
+			break;
+		case 'S':
+			syslog(LOG_INFO, "\tStartScheduleTableAbs(scheduletable%d, 5)", scheduletable_id + 1U);
+			error_log(StartScheduleTableAbs(scheduletable_id, 5U));
+			break;
+		case 'f':
+			syslog(LOG_INFO, "\tStopScheduleTable(scheduletable%d)", scheduletable_id + 1U);
+			error_log(StopScheduleTable(scheduletable_id));
+			break;
+		case 'n':
+			syslog(LOG_INFO, "\tNextScheduleTable(scheduletable%d, scheduletable%d)", scheduletable_id + 1U, scheduletable2 + 1U);
+			error_log(NextScheduleTable(scheduletable_id, scheduletable2));
+			break;
+		case 'N':
+			syslog(LOG_INFO, "\tNextScheduleTable(scheduletable%d, scheduletable%d)", scheduletable_id + 1U, scheduletable1 + 1U);
+			error_log(NextScheduleTable(scheduletable_id, scheduletable1));
+			break;
+		case 'g':
+			status = 0U;
+			syslog(LOG_INFO, "\tGetScheduleTableStatus(scheduletable%d, status)", scheduletable_id + 1U);
+			error_log(GetScheduleTableStatus(scheduletable_id, &status));
+			syslog(LOG_INFO, "\tstatus = %d", status);
+			break;
+		case 't':
+			syslog(LOG_INFO, "\t[ schedule table sample routine OUT, press 't' IN ]");
+			flag = TRUE;
+			break;
+		default:
+			/* ã³ãã³ããä¸è¨ã®ã±ã¼ã¹ä»¥å¤ãªãå¦çã¯è¡ããªã */
+			break;
+		}
+		/*  ãã©ã°ãç«ã£ã¦ããå ´åï¼ãªã¿ã¼ã³ãã  */
+		if (flag == TRUE) {
+			return;
+		}
+	}
+}   /* schedule_table_sample_routine */
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯6
+ */
+TASK(Task10)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task10 ACTIVATE");
+	WaitEvent(T10Evt);
+	syslog(LOG_INFO, "Task10 FINISH");
+	TerminateTask();
+}   /* TASK( Task10 ) */
+
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯7
+ */
+TASK(Task11)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task11 ACTIVATE");
+	WaitEvent(T11Evt);
+	syslog(LOG_INFO, "Task11 FINISH");
+	TerminateTask();
+}   /* TASK( Task11 ) */
+
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ã«ãã¼ãã«ç¢ºèªç¨ã¿ã¹ã¯8
+ */
+TASK(Task12)
+{
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task12 ACTIVATE");
+	WaitEvent(T12Evt);
+	syslog(LOG_INFO, "Task12 FINISH");
+	TerminateTask();
+}   /* TASK( Task12 ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨ã¿ã¹ã¯11
+ */
+TASK(Task13)
+{
+	struct parameter_struct	local;
+	sint32					pp = 10;
+
+	local.name1 = (sint32 *) &pp;
+	local.name2 = 2;
+
+	CallTrustedFunction(tfnt1, &local); /* 10*2 + 2 = 22 */
+	syslog(LOG_NOTICE, "Task13 tfnt1 ret = %d", local.return_value);
+
+	TerminateTask();
+}   /* TASK( Task13 ) */
+
+/*
+ *  ä¿¡é ¼é¢æ°åä½ç¢ºèªç¨ã¿ã¹ã¯12
+ */
+TASK(Task14)
+{
+	struct parameter_struct	local;
+	sint32					pp = 20;
+
+	local.name1 = (sint32 *) &pp;
+	local.name2 = 4;
+
+	CallTrustedFunction(tfnt2, &local); /* 20*4 + 4 = 84 */
+	syslog(LOG_NOTICE, "Task14 tfnt2 ret = %d", local.return_value);
+
+}   /* TASK( Task14 ) */
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³éã¢ã¯ã»ã¹æ¨©ç¢ºèªç¨ã¿ã¹ã¯
+ */
+TASK(Task8)
+{
+	TaskStateType state;
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task8 ACTIVATE");
+	if (E_OK == GetTaskState(Task1, &state)) {
+		syslog(LOG_INFO, "GetTaskState(Task1, &state), state = %s", task_state_tbl[state]);
+	}
+	syslog(LOG_INFO, "Task8 FINISH");
+	TerminateTask();
+}   /* TASK( Task8 ) */
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³éã¢ã¯ã»ã¹æ¨©ç¢ºèªç¨ã¿ã¹ã¯
+ */
+TASK(Task9)
+{
+	TaskStateType state;
+	/*
+	 *  ã¿ã¹ã¯èµ·åã­ã°åºå
+	 */
+	syslog(LOG_INFO, "Task9 ACTIVATE");
+	if (E_OK == GetTaskState(Task2, &state)) {
+		syslog(LOG_INFO, "GetTaskState(Task2, &state), state = %s", task_state_tbl[state]);
+	}
+	syslog(LOG_INFO, "Task9 FINISH");
+	TerminateTask();
+}   /* TASK( Task8 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯1
+ */
+TASK(IocTask1)
+{
+	syslog(LOG_INFO, "IocTask1 ACTIVATE");
+
+	IocProk1();
+
+	syslog(LOG_INFO, "IocTask1 TERMINATE");
+
+	TerminateTask();
+}   /* TASK( IocTask1 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯2
+ */
+TASK(IocTask2)
+{
+	syslog(LOG_INFO, "IocTask2 ACTIVATE");
+
+	IocProk1();
+
+	syslog(LOG_INFO, "IocTask2 TERMINATE");
+
+	TerminateTask();
+}   /* TASK( IocTask2 ) */
+
+/*
+ *  IOCç¢ºèªç¨ã¿ã¹ã¯å
+é¨å¦ç
+ *
+ */
+static void
+IocProk1(void)
+{
+	uint8			api;        /* ã³ãã³ãåä¿¡ãããã¡(API) */
+	uint8			data[3];    /* éä¿¡ãããã¡ */
+
+	volatile sint32 i;
+	Std_ReturnType	ercd;
+
+	syslog(LOG_INFO, "Select IOC API:");
+	api = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", api);
+#endif /* OMIT_ECHO */
+
+	switch (api) {
+	case '1':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_0");
+		error_log_ioc(IocSend_IOC_QUE_0(data[0]));
+		break;
+	case '2':
+		syslog(LOG_INFO, "Input send data:");
+		data[0] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+		syslog(LOG_INFO, "%c", data[0]);
+#endif /* OMIT_ECHO */
+
+		syslog(LOG_INFO, "Call IocSend_IOC_QUE_1");
+		error_log_ioc(IocSend_IOC_QUE_1(data[0]));
+		break;
+	case '3':
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "Input send data%d:", i);
+			data[i] = GetCommandNoWait2();
+#ifndef OMIT_ECHO
+			syslog(LOG_INFO, "%c", data[i]);
+#endif /* OMIT_ECHO */
+		}
+		syslog(LOG_INFO, "Call IocWriteGroup_IOC_DEQUE");
+		error_log_ioc(IocWriteGroup_IOC_DEQUE(data[0], data[1], data[2]));
+		break;
+	case '4':
+		syslog(LOG_INFO, "Call IocReceive_IOC_QUE");
+		ercd = IocReceive_IOC_QUE(&data[0]);
+#if !defined(CFG_USE_ERRORHOOK)
+		if (ercd != E_OK) {
+			syslog(LOG_INFO, "Error:%d", atk2_ioc_strerror(ercd));
+		}
+#endif /* !defined( CFG_USE_ERRORHOOK ) */
+		if ((ercd == IOC_E_OK) || (ercd == IOC_E_LOST_DATA)) {
+			syslog(LOG_INFO, "recv data:%c", data[0]);
+		}
+		break;
+	case '5':
+		syslog(LOG_INFO, "Call IocReadGroup_IOC_DEQUE");
+		error_log_ioc(IocReadGroup_IOC_DEQUE(&data[0], &data[1], &data[2]));
+		for (i = 0; i < 3U; i++) {
+			syslog(LOG_INFO, "recv data%d:%c", i, data[i]);
+		}
+		break;
+	case '6':
+		syslog(LOG_INFO, "Call IocEmptyQueue_IOC_QUE");
+		error_log_ioc(IocEmptyQueue_IOC_QUE());
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* IocProk1 */
+
+/*
+ *  ã³ãã³ãåä¿¡å¦ç(ã¦ã§ã¤ãç¡ã)
+ */
+uint8
+GetCommandNoWait2(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	/*
+	 *  ã³ãã³ããåä¿¡ããã¾ã§ã«ã¼ã
+	 */
+	command = '\0';
+	do {
+		RecvPolSerialChar(&command);    /* åä¿¡ãããã¡ãã¼ãªã³ã° */
+		if (command == '\n') {
+			command = '\0';
+		}
+	} while (command == '\0');
+
+
+	return(command);
+}   /* GetCommandNoWait2 */
+
+
+/*
+ *  ActivateTask(IOCç¨) å®è¡ã»ã­ã°åºåå¦ç
+ */
+void
+PutActIocTsk(void)
+{
+	uint8 command;          /* ã³ãã³ãåä¿¡ãããã¡ */
+
+	syslog(LOG_INFO, "Select IocTask:");
+	command = GetCommand();
+#ifndef OMIT_ECHO
+	syslog(LOG_INFO, "%c", command);
+#endif /* OMIT_ECHO */
+
+	switch (command) {
+	case '1':
+		error_log(ActivateTask(IocTask1));
+		break;
+	case '2':
+		error_log(ActivateTask(IocTask2));
+		break;
+	case '3':
+		error_log(CallTrustedFunction(actioctask3, NULL));
+		break;
+	case '4':
+		error_log(CallTrustedFunction(actioctask4, NULL));
+		break;
+	default:
+		syslog(LOG_INFO, "undefined command");
+		break;
+	}
+}   /* PutActIocTsk	*/
+
+TRUSTEDFUNCTION(TRUSTED_actioctask3, FunctionIndex, FunctionParams)
+{
+	error_log(ActivateTask(IocTask3));
+
+	return(E_OK);
+}
+
+TRUSTEDFUNCTION(TRUSTED_actioctask4, FunctionIndex, FunctionParams)
+{
+	error_log(ActivateTask(IocTask4));
+
+	return(E_OK);
+}
Index: /atk2-sc3-1.4.0-ntisr/sample/sample2.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sample/sample2.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sample/sample2.h	(revision 172)
@@ -0,0 +1,93 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2011-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample2.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³æå±ãµã³ãã«ãã­ã°ã©ã ã®ããããã¡ã¤ã«
+ */
+
+#ifndef TOPPERS_SAMPLE2_H
+#define TOPPERS_SAMPLE2_H
+
+#include "target_test.h"
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+extern StackType	stack_1[COUNT_STK_T(0x200)];
+extern StackType	stack_2[COUNT_STK_T(0x200)];
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SAMPLE2_H */
Index: /atk2-sc3-1.4.0-ntisr/sysmod/banner.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sysmod/banner.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sysmod/banner.c	(revision 172)
@@ -0,0 +1,94 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: banner.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºå
+ */
+
+#include "t_syslog.h"
+#include "target_sysmod.h"
+
+static const char8 banner[] =
+	"\n" TKERNEL_NAME " Release %X.%X.%X for " TARGET_NAME
+	" (" __DATE__ ", " __TIME__ ")\n";
+
+void
+print_banner(void)
+{
+	syslog_syslog_3(LOG_NOTICE, banner,
+					OS_SW_MAJOR_VERSION,
+					OS_SW_MINOR_VERSION,
+					OS_SW_PATCH_VERSION);
+}
Index: /atk2-sc3-1.4.0-ntisr/sysmod/banner.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sysmod/banner.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sysmod/banner.h	(revision 172)
@@ -0,0 +1,86 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2008-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: banner.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºå
+ */
+
+#ifndef TOPPERS_BANNER_H
+#define TOPPERS_BANNER_H
+
+/*
+ *  ã«ã¼ãã«èµ·åã¡ãã»ã¼ã¸ã®åºå
+ */
+extern void print_banner(void);
+
+#endif /* TOPPERS_BANNER_H */
Index: /atk2-sc3-1.4.0-ntisr/sysmod/chkobj.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sysmod/chkobj.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sysmod/chkobj.c	(revision 172)
@@ -0,0 +1,198 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: chkobj.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+#include	"Os.h"
+
+#include	<stdarg.h>
+
+/*
+ *  CheckObjectAccess()
+ *   éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ã®ãªãã¸ã§ã¯ãã¢ã¯ã»ã¹å¯å¦ããã§ãã¯ãã
+ *
+ *  å¯å¤å¼æ°ãç¨ããããï¼ã¦ã¼ã¶ã¨ã®ã¤ã³ã¿ãã§ã¼ã¹ãåæã¤é¢æ°ã
+ *  ã©ã¤ãã©ãªã¨ãã¦æä¾ãï¼ãã§ãã¯æ¬ä½ã¯ã«ã¼ãã«ã§è¡ã
+ *
+ *  va_arg() ã® ç¬¬2å¼æ°ã¯ï¼ååºãã¹ãå¼æ°ã®åãç¤ºã
+ *  æ¬æ¥ã§ããã°TaskTypeãªã©ãæå®ãã¹ãã§ãããï¼xxxTypeã¯uint32ã§ãã
+ *  va_arg() ã® ç¬¬2å¼æ°ã« int(ã double) ä»¥å¤ã®åãæå®ããã¨ã³ã³ã
+ *  ã¤ã©ãæ­£ããã³ã¼ããçæããªã(äºæ
+é²æ­¢ã®ããå¼·å¶çã«CPUä¾å¤ã
+ *  çºçãããå½ä»¤ãçæãã)
+ *  ãã®ããï¼æ¬æ¥ã®å(TaskTypeãªã©)ãè¨­å®ãããã¨ãåºæ¥ãªãã®ã§ï¼
+ *  å¼æ°ã®å¹
+ãæã¤"uint32"ã¨ãã
+ */
+
+ObjectAccessType
+CheckObjectAccess(ApplicationType ApplID, ObjectTypeType ObjectType, ...)
+{
+	ObjectAccessType	access = NO_ACCESS;
+	va_list				ap;
+	uint32				object_id;
+
+	va_start(ap, ObjectType);
+	object_id = va_arg(ap, uint32);
+	va_end(ap);
+
+	switch (ObjectType) {
+	case OBJECT_TASK:
+		access = CheckTaskAccess(ApplID, object_id);
+		break;
+
+	case OBJECT_ISR:
+		access = CheckISRAccess(ApplID, object_id);
+		break;
+
+	case OBJECT_ALARM:
+		access = CheckAlarmAccess(ApplID, object_id);
+		break;
+
+	case OBJECT_RESOURCE:
+		access = CheckResourceAccess(ApplID, object_id);
+		break;
+
+	case OBJECT_COUNTER:
+		access = CheckCounterAccess(ApplID, object_id);
+		break;
+
+	case OBJECT_SCHEDULETABLE:
+		access = CheckScheduleTableAccess(ApplID, object_id);
+		break;
+
+	default:
+		access = NO_ACCESS;
+		break;
+	}
+
+	return(access);
+}
+
+/*
+ *  CheckObjectOwnership()
+ *   OSã¢ããªã±ã¼ã·ã§ã³ã®ãªãã¸ã§ã¯ãææããã§ãã¯ãã
+ *
+ *  å¯å¤å¼æ°ãç¨ããããï¼ã¦ã¼ã¶ã¨ã®ã¤ã³ã¿ãã§ã¼ã¹ãåæã¤é¢æ°ã
+ *  ã©ã¤ãã©ãªã¨ãã¦æä¾ãï¼ãã§ãã¯æ¬ä½ã¯ã«ã¼ãã«ã§è¡ã
+ *
+ *  va_arg() ã® ç¬¬2å¼æ°ã¯ï¼ååºãã¹ãå¼æ°ã®åãç¤ºã
+ *  æ¬æ¥ã§ããã°TaskTypeãªã©ãæå®ãã¹ãã§ãããï¼xxxTypeã¯uint32ã§ãã
+ *  va_arg() ã® ç¬¬2å¼æ°ã« int(ã double) ä»¥å¤ã®åãæå®ããã¨ã³ã³ã
+ *  ã¤ã©ãæ­£ããã³ã¼ããçæããªã(äºæ
+é²æ­¢ã®ããå¼·å¶çã«CPUä¾å¤ã
+ *  çºçãããå½ä»¤ãçæãã)
+ *  ãã®ããï¼æ¬æ¥ã®å(TaskTypeãªã©)ãè¨­å®ãããã¨ãåºæ¥ãªãã®ã§ï¼
+ *  å¼æ°ã®å¹
+ãæã¤"uint32"ã¨ãã
+ */
+
+ApplicationType
+CheckObjectOwnership(ObjectTypeType ObjectType, ...)
+{
+	ApplicationType owner = INVALID_OSAPPLICATION;
+	va_list			ap;
+	uint32			object_id;
+
+	va_start(ap, ObjectType);
+	object_id = va_arg(ap, uint32);
+	va_end(ap);
+
+	switch (ObjectType) {
+	case OBJECT_TASK:
+		owner = CheckTaskOwnership(object_id);
+		break;
+
+	case OBJECT_ISR:
+		owner = CheckISROwnership(object_id);
+		break;
+
+	case OBJECT_ALARM:
+		owner = CheckAlarmOwnership(object_id);
+		break;
+
+	case OBJECT_COUNTER:
+		owner = CheckCounterOwnership(object_id);
+		break;
+
+	case OBJECT_SCHEDULETABLE:
+		owner = CheckScheduleTableOwnership(object_id);
+		break;
+
+	default:
+		owner = INVALID_OSAPPLICATION;
+		break;
+	}
+
+	return(owner);
+}
Index: /atk2-sc3-1.4.0-ntisr/sysmod/serial.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sysmod/serial.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sysmod/serial.c	(revision 172)
@@ -0,0 +1,172 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: serial.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ãµã³ãã«åãã·ãªã¢ã«IOã¢ã¸ã¥ã¼ã«
+ */
+
+#include	"Os.h"
+#include	"target_serial.h"
+#include	"target_sysmod.h"
+#include	"serial.h"
+
+
+/*
+ *  åä¿¡ç¨ãã¼ã¿
+ */
+
+static uint8	rx_char;
+static boolean	rx_flag;
+
+/*
+ *  ã·ãªã¢ã«IOã¢ã¸ã¥ã¼ã«åæåå¦ç
+ *
+ *  å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼åºããã¨
+ */
+void
+InitSerial(void)
+{
+	/*
+	 *  åä¿¡ãã©ã°åæå
+	 */
+	rx_flag = FALSE;
+
+	/*
+	 *  ä¾å­é¨åæåå¦çå®è¡
+	 */
+	InitHwSerial();
+}
+
+/*
+ *  ã·ãªã¢ã«IOã¢ã¸ã¥ã¼ã«åæ­¢å¦ç
+ *
+ *  åºåãå®äºãã¦ãããã¨ã¯ä¿éããªãï¼ãããã­ãã¯é²æ­¢ï¼
+ *  ã³ã³ãã­ã¹ãã­ãã¯ãã¦åºåããã®ã§ï¼ã»ã¼åé¡ãªãï¼æå¾ã®ï¼æå­ã®ã¿ï¼
+ *
+ *  å²è¾¼ã¿ç¦æ­¢ç¶æ
+ã§å¼åºããã¨
+ */
+void
+TermSerial(void)
+{
+	/*
+	 *  ä¾å­é¨åæåå¦çå®è¡
+	 */
+	TermHwSerial();
+
+	/*
+	 *  åä¿¡ãã¼ã¿ç¡å¹å
+	 */
+	rx_flag = FALSE;
+}
+
+/*
+ *  æå­åä¿¡å¦ç
+ */
+void
+RecvPolSerialChar(uint8 *character)
+{
+	SuspendAllInterrupts();
+	if (rx_flag != FALSE) {
+		/*
+		 *  å²è¾¼ã¿ç¦æ­¢ã«ãã¦åä¿¡ãã¼ã¿åå¾ã»ãã©ã°ã¯ãªã¢
+		 */
+		*character = rx_char;
+		rx_flag = FALSE;
+	}
+	else {
+		/*
+		 *  åä¿¡ãã¼ã¿ããªãå ´åã¯'\0'ãè¿ã
+		 */
+		*character = '\0';
+	}
+	ResumeAllInterrupts();
+}
+
+/*
+ *  åä¿¡ã³ã¼ã«ããã¯é¢æ°
+ */
+void
+RxSerialInt(uint8 character)
+{
+	/*
+	 *  å²è¾¼ã¿ç¦æ­¢ã«ãã¦åä¿¡ãã¼ã¿ä¿æã»ãã©ã°ã¯ãªã¢
+	 */
+	SuspendAllInterrupts();
+	rx_char = character;
+	rx_flag = TRUE;
+	ResumeAllInterrupts();
+}
Index: /atk2-sc3-1.4.0-ntisr/sysmod/serial.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sysmod/serial.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sysmod/serial.h	(revision 172)
@@ -0,0 +1,109 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2004-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: serial.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã·ãªã¢ã«ã¤ã³ã¿ãã§ã¼ã¹ãã©ã¤ã
+ */
+
+#ifndef TOPPERS_SERIAL_H
+#define TOPPERS_SERIAL_H
+
+/*
+ *	ãµã³ãã«åãã·ãªã¢ã«IOã¢ã¸ã¥ã¼ã«
+ */
+
+
+
+#ifndef TOPPERS_MACRO_ONLY
+
+/*
+ *  ã·ãªã¢ã«IOã¢ã¸ã¥ã¼ã«åæåå¦çé¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+extern void InitSerial(void);
+
+/*
+ *  ã·ãªã¢ã«IOã¢ã¸ã¥ã¼ã«åæ­¢å¦çé¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+extern void TermSerial(void);
+
+/*
+ *  æå­åä¿¡å¦çé¢æ°ãã­ãã¿ã¤ãå®£è¨
+ */
+extern void RecvPolSerialChar(uint8 *character);
+
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_SERIAL_H */
Index: /atk2-sc3-1.4.0-ntisr/sysmod/syslog.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sysmod/syslog.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sysmod/syslog.c	(revision 172)
@@ -0,0 +1,199 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: syslog.c 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°æ©è½
+ */
+
+
+/*
+ *  AUTOSARå
+±éã®ãã¼ã¿åã»å®æ°ã»ãã¯ã­
+ */
+#include "Std_Types.h"
+
+#include "t_syslog.h"
+#include "log_output.h"
+#include "target_sysmod.h"
+#include "syslog.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+ */
+#ifndef LOG_SYSLOG_WRI_LOG_ENTER
+#define LOG_SYSLOG_WRI_LOG_ENTER(prio, p_syslog)
+#endif /* LOG_SYSLOG_WRI_LOG_ENTER */
+
+#ifndef LOG_SYSLOG_WRI_LOG_LEAVE
+#define LOG_SYSLOG_WRI_LOG_LEAVE(ercd)
+#endif /* LOG_SYSLOG_WRI_LOG_LEAVE */
+
+#ifndef LOG_SYSLOG_MSK_LOG_ENTER
+#define LOG_SYSLOG_MSK_LOG_ENTER(lowmask)
+#endif /* LOG_SYSLOG_MSK_LOG_ENTER */
+
+#ifndef LOG_SYSLOG_MSK_LOG_LEAVE
+#define LOG_SYSLOG_MSK_LOG_LEAVE(ercd)
+#endif /* LOG_SYSLOG_MSK_LOG_LEAVE */
+
+/*
+ *  åºåãã¹ãã­ã°æ
+å ±ã®éè¦åº¦ï¼ããããããï¼
+ */
+static uint32 syslog_lowmask_not;      /* ä½ã¬ãã«åºåãã¹ãéè¦åº¦ï¼åè»¢ï¼*/
+
+/*
+ *  ã·ã¹ãã ã­ã°æ©è½ã®åæå
+ */
+void
+_syslog_syslog_initialize(void)
+{
+	syslog_lowmask_not = 0U;
+}
+
+/*
+ *  ã­ã°æ
+å ±ã®åºå
+ *
+ *  CPUã­ãã¯ç¶æ
+ãå®è¡ã³ã³ãã­ã¹ãã«ãããåä½ã§ããããã«å®è£
+ãã¦ãã
+ */
+StatusType
+_syslog_syslog_wri_log(uint32 prio, const SYSLOG *p_syslog)
+{
+	SIL_PRE_LOC;
+	LOG_SYSLOG_WRI_LOG_ENTER(prio, p_syslog);
+	SIL_LOC_INT();
+
+	/*
+	 *  ä½ã¬ãã«åºå
+	 */
+	if (((~syslog_lowmask_not) & LOG_MASK(prio)) != 0U) {
+		_syslog_syslog_print(p_syslog, &target_fput_log);
+		(*target_fput_log)('\n');
+	}
+
+	SIL_UNL_INT();
+	LOG_SYSLOG_WRI_LOG_LEAVE(E_OK);
+	return(E_OK);
+}
+
+/*
+ *  åºåãã¹ãã­ã°æ
+å ±ã®éè¦åº¦ã®è¨­å®
+ */
+StatusType
+_syslog_syslog_msk_log(uint32 lowmask)
+{
+	LOG_SYSLOG_MSK_LOG_ENTER(lowmask);
+	syslog_lowmask_not = ~lowmask;
+	LOG_SYSLOG_MSK_LOG_LEAVE(E_OK);
+	return(E_OK);
+}
+
+
+void
+syslog_initialize(void)
+{
+	KERLIBSLG_PRM prm;
+
+	prm.index = KERLIBSLG_ID_SYSLOG_INITIALIZE;
+	KernelLibrarySyslog(&prm);
+	return;
+}
+
+StatusType
+syslog_wri_log(uint32 prio, const SYSLOG *p_syslog)
+{
+	KERLIBSLG_PRM prm;
+
+	prm.index = KERLIBSLG_ID_SYSLOG_WRI_LOG;
+	prm.prio = prio;
+	prm.p_const_syslog = p_syslog;
+	KernelLibrarySyslog(&prm);
+	return(prm.return_er);
+}
+
+StatusType
+syslog_msk_log(uint32 lowmask)
+{
+	KERLIBSLG_PRM prm;
+
+	prm.index = KERLIBSLG_ID_SYSLOG_MSK_LOG;
+	prm.lowmask = lowmask;
+	KernelLibrarySyslog(&prm);
+	return(prm.return_er);
+}
Index: /atk2-sc3-1.4.0-ntisr/sysmod/syslog.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/sysmod/syslog.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/sysmod/syslog.h	(revision 172)
@@ -0,0 +1,106 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2005-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2011-2015 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2011-2013 by Spansion LLC, USA
+ *  Copyright (C) 2011-2015 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2011-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2011-2015 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2011-2015 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2011-2015 by Witz Corporation
+ *  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by eSOL Co.,Ltd., JAPAN
+ *  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+ *  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: syslog.h 425 2015-12-07 08:06:19Z witz-itoyo $
+ */
+
+/*
+ *		ã·ã¹ãã ã­ã°æ©è½
+ */
+
+#ifndef TOPPERS_SYSLOG_H
+#define TOPPERS_SYSLOG_H
+
+/*
+ *  ã·ã¹ãã ã­ã°åºåãè¡ãããã®å®ç¾©
+ */
+#include "t_syslog.h"
+
+/*
+ *  ã­ã°ãããã¡ã¨ããã«ã¢ã¯ã»ã¹ããããã®ãã¤ã³ã¿
+ */
+#ifndef TCNT_SYSLOG_BUFFER
+#define TCNT_SYSLOG_BUFFER	64      /* ã­ã°ãããã¡ã®ãµã¤ãº */
+#endif /* TCNT_SYSLOG_BUFFER */
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ç¨ã·ã¹ãã ã­ã°æ©è½ã®åæå
+ */
+extern void syslog_initialize(void);
+
+/*
+ *  éä¿¡é ¼OSã¢ããªã±ã¼ã·ã§ã³ç¨åºåãã¹ãã­ã°æ
+å ±ã®éè¦åº¦ã®è¨­å®
+ */
+extern StatusType syslog_msk_log(uint32 lowmask);
+
+#endif /* TOPPERS_SYSLOG_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/E_PACKAGE
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/E_PACKAGE	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/E_PACKAGE	(revision 172)
@@ -0,0 +1,10 @@
+E_PACKAGE atk2-sc3_hsbrh850f1l_ccrh
+VERSION %date
+
+INCLUDE MANIFEST
+INCLUDE ../../MANIFEST
+INCLUDE ../../target/hsbrh850f1l_gcc/MANIFEST
+INCLUDE ../../arch/v850_gcc/MANIFEST
+INCLUDE ../../arch/v850_ccrh/MANIFEST
+INCLUDE ../../arch/ccrh/MANIFEST
+INCLUDE ../../arch/ccrh/configure/MANIFEST
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/MANIFEST	(revision 172)
@@ -0,0 +1,15 @@
+PACKAGE atk2-sc3
+
+E_PACKAGE
+MANIFEST
+target.py
+target.tf
+target_asm.tf
+target_cfg1_out.h
+target_inline_symbols.h
+target_mem.tf
+target_offset.tf
+target_svc.h
+target_syslog.h
+target_test.h
+target_user.txt
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target.py
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target.py	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target.py	(revision 172)
@@ -0,0 +1,72 @@
+#!python
+# -*- coding: utf-8 -*-
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ï½(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: target.py 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+MAIN_CLK = '8000'
+
+INCLUDES = INCLUDES + ["target/hsbrh850f1l_ccrh", "target/hsbrh850f1l_gcc"]
+
+statup_file = 'arch/v850_ccrh/start.asm'
+kernel_target_files = ['target/hsbrh850f1l_gcc/target_config.c','arch/v850_gcc/tauj_hw_counter.c','arch/v850_gcc/uart_rlin.c','arch/v850_gcc/rh850_f1l.c' ]
+
+# soucre prc file
+execfile(srcdir + "arch/v850_ccrh/prc.py")
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target.tf	(revision 172)
@@ -0,0 +1,134 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target.tf 166 2015-06-04 07:11:25Z t_ishikawa $
+$
+
+$
+$     ãã¹2ã®ã¿ã¼ã²ããä¾å­ãã³ãã¬ã¼ãï¼HSBV850E2FGç¨ï¼
+$
+$ 
+$  arch/gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $REG.REGNAME[STANDARD_ROM]$.extend(["RESET","EIINTTBL"])$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$ 
+$TARGET_PAGE_SIZE_STR = 16$
+$TARGET_SEC_ALIGN_STR = 16$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = "\"*.text *.text.*\""$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = "\"*.rodata *.rodata.*\""$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = "\"*.data *.data.*\""$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = "\"*.bss *.bss.* COMMON\""$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = "\"*.rosdata\""$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = "\"*.sdata\""$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = "\"*.sbss *.scommon\""$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$ 
+$  å
+±æãªã¼ãå°æã©ã¤ãã®ã¿ãµãã¼ã
+$ 
+$FUNCTION HOOK_ERRORCHECK_SEC$
+    $IF !EQ(SEC.OSAPID[ARGV[1]], "") &&
+        (SEC.OSAPID[ARGV[1]] != TDOM_KERNEL) &&
+        !OSAP.TRUSTED[SEC.OSAPID[ARGV[1]]] &&
+        !SEC.EXPORT[ARGV[1]]$
+        $ERROR$
+            OsMemorySectionExport of OsMemorySection $SEC.SECTION[ARGV[1]]$ must be true.$NL$
+        $END$
+    $END$
+$END$
+
+$
+$  ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "v850_ccrh/prc.tf"$
+
+$
+$  ã¢ã»ã³ããªãã¡ã¤ã«ç¨ã®ããããã¡ã¤ã«ã®çæ
+$
+$INCLUDE "target/hsbrh850f1l_ccrh/target_asm.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_asm.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_asm.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_asm.tf	(revision 172)
@@ -0,0 +1,76 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target_asm.tf 164 2015-06-03 01:22:29Z t_ishikawa $
+$
+
+$
+$  ã¢ã»ã³ããªãã¡ã¤ã«ç¨ã®ããããã¡ã¤ã«ã®çæ
+$
+$FILE "asm_config.inc"$
+
+$
+$  ã³ã¢ä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ãï¼V850ç¨ï¼
+$
+$INCLUDE "v850_ccrh/prc_asm.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_cfg1_out.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_cfg1_out.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_cfg1_out.h	(revision 172)
@@ -0,0 +1,80 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_cfg1_out.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ */
+
+/*
+ *	ã³ã³ãã¤ã©ä¾å­ã®ã¹ã¿ãã®å®ç¾©
+ */
+#include "ccrh/tool_cfg1_out.h"
+
+/*
+ *  ã³ã¢ä¾å­ã®ã¹ã¿ãã®å®ç¾©
+ */
+#include "v850_ccrh/prc_cfg1_out.h"
+
+void
+target_hardware_initialize(void)
+{
+}
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_inline_symbols.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_inline_symbols.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_inline_symbols.h	(revision 172)
@@ -0,0 +1,72 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012 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ãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_inline_symbols.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã³ã³ãã¤ã©ä¾å­å®ç¾©
+ */
+
+#ifndef TARGET_INLINE_SYMBOL_H
+#define TARGET_INLINE_SYMBOL_H
+
+#include "prc_inline_symbols.h"
+
+
+#endif /* TARGET_INLINE_SYMBOL_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_mem.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_mem.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_mem.tf	(revision 172)
@@ -0,0 +1,58 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$ =====================================================================
+
+$INCLUDE "v850_ccrh/prc_mem.tf"$
+
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_offset.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_offset.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_offset.tf	(revision 172)
@@ -0,0 +1,82 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target_offset.tf 164 2015-06-03 01:22:29Z t_ishikawa $
+$
+
+$
+$       ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤ã«ï¼HSBV850E2FGç¨ï¼
+$
+
+$
+$  æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "kernel/genoffset.tf"$
+
+$
+$  ã³ã¢ä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ãï¼V850E2ç¨ï¼
+$
+$INCLUDE "v850_ccrh/prc_offset.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_svc.h	(revision 172)
@@ -0,0 +1,62 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+
+#ifndef TOPPERS_TARGET_SVC_H
+#define TOPPERS_TARGET_SVC_H
+
+#include "v850_ccrh/prc_svc.h"
+
+#endif /* TOPPERS_TARGET_SVC_H */
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_syslog.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_syslog.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_syslog.h	(revision 172)
@@ -0,0 +1,65 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_syslog.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ã·ã¹ã­ã°æ©è½ã®ãã­ã»ããµä¾å­é¨
+ */
+
+#ifndef TOPPERS_TARGET_SYSLOG_H
+#define TOPPERS_TARGET_SYSLOG_H
+
+#include "v850_gcc/prc_syslog.h"
+
+#endif /* TOPPERS_TARGET_SYSLOG_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_test.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_test.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_test.h	(revision 172)
@@ -0,0 +1,95 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_test.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼HSBV850E2FGç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_TEST_H
+#define TOPPERS_TARGET_TEST_H
+
+/*
+ *  sample1ã§ä½¿ç¨ããã¢ã©ã¼ã ã®å¨æï¼ç´1ç§ï¼
+ */
+#define COUNTER_MIN_CYCLE	((uint32) 8000000)
+
+
+/*
+ *  sample1ã§ä½¿ç¨ããä¾å¤
+ */
+#pragma inline_asm _raise_cpu_exception
+static void
+_raise_cpu_exception(void)
+{
+	trap 0x6
+}
+
+#define RAISE_CPU_EXCEPTION		_raise_cpu_exception()
+
+#endif /* TOPPERS_TARGET_TEST_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ccrh/target_user.txt	(revision 172)
@@ -0,0 +1,147 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼FL-850/F1Lã¿ã¼ã²ããä¾å­é¨(CCRHç)ããã¥ã¢ã«ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯FL-850/F1Lã¿ã¼ã²ããä¾å­é¨ã®æ
+å ±ãè¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: target_user.txt 164 2015-06-03 01:22:29Z t_ishikawa $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+FL-850/F1Lã¿ã¼ã²ããä¾å­é¨ï¼FL-850/F1Lä¾å­é¨ï¼ã¯ï¼ã«ããµã¹ã¨ã¬ã¯ãã­ã
+ã¯ã¹ç¤¾ã®RH850/F1Lãæ­è¼ãããã»ã©ã»ãã¯ãã­ã¸ã¼ã®FL-850/F1L-176-Sããµãã¼
+ããã¦ããï¼
+
+
+âåä½ç¢ºèªãã¼ã¸ã§ã³
+
+åä½ç¢ºèªãè¡ã£ãã³ã³ãã¤ã©ã®ãã¼ã¸ã§ã³ã¯æ¬¡ã®éãã§ããï¼
+
+ CC-RH V1.01.00
+
+  
+âã­ã°åºå
+
+ã­ã°åºåã®ããï¼RLIN3ã®ãã¼ã5ãä½¿ç¨ããï¼
+
+ãã¼ã¿ãã©ã¼ãããã¯ï¼
+
+ã»115200bpsããã¼ã¿8bitãããªãã£ãªããã¹ããã1bitããã­ã¼å¶å¾¡ãªã
+
+ã§ããï¼
+
+
+âãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿
+
+ã»ãµã³ãã«ãã­ã°ã©ã ã«ã¦ï¼TAUJ0, TAUJ1ãä½¿ç¨ï¼
+ã»1åã®ã«ã¦ã³ã¿ã«2ã¤ã®ã¿ã¤ããä½¿ç¨ãã¦ããï¼
+    å·®åã¿ã¤ãï¼ç®çã®æéãè¨­å®ããæã®ç¾å¨æé(ç¾å¨å¤ã¿ã¤ã)ã¨æ¬¡ã®æº
+    äºæéã¨ã®ç¸å¯¾æéãã«ã¦ã³ããããã¨ã§ç®çã®çµ¶å¯¾æéã«æºäºãããã¨
+    ã¨ãã.
+        count mode:count down once
+    ç¾å¨å¤ã¿ã¤ãï¼ã«ã¦ã³ã¿å¨æåã®ãã¼ã¹ã¿ã¤ããå®ç¾(çµ¶å¯¾æéãã«ã¦ã³ã)
+        count mode:continuous count down
+ã»ä½¿ç¨ã«ã¦ã³ã¿æ
+å ±
+    ã«ã¦ã³ã¿åï¼MAIN_HW_COUNTER
+        å·®åã¿ã¤ãï¼TAUJ0
+        ç¾å¨å¤ã¿ã¤ãï¼TAUJ1
+        1ãã£ãã¯å½ããã®ç§æ°ï¼1/TIMER_CLOCK_HZ
+
+
+âãã«ãåã³ãããã°ç°å¢
+
+ãã«ãåã³ãããã°ç°å¢ã¯CS+ãä½¿ç¨ããï¼åä½ç¢ºèªãè¡ã£ããã¼ã¸ã§ã³ã¯æ¬¡
+ã®éãã§ããï¼
+
+ CS+ V3.00.00
+ (IronPythonã³ã³ã½ã¼ã«ã»ãã©ã°ã¤ã³ ä½¿ç¨)
+ 
+ãã«ãã®æé ã¯æ¬¡ã®éãã§ããï¼ 
+ 
+----- ããããè¿½è¨ -----
+0. arch/v850_ccrh/sample/* ã sample/ ã«ã³ãã¼ï¼
+----- ããã¾ã§è¿½è¨ -----
+
+1../arch/ccrh/configure ãatk2-sc3ã®ã½ã¼ã¹ä»¥ä¸ã®é©å½ãªãã©ã«ãã«ã³ãã¼ï¼
+
+2../arch/ccrh/configure/def.py ã®å
+å®¹ãç·¨éï¼æä½éä»¥ä¸ãå¤æ´ããå¿
+è¦ãã
+  ãï¼
+
+ SRCDIR 
+ TARGET_MCU
+ 
+3. configure.mtpj ãéãï¼atk2-sc3 ã®ãã­ã¸ã§ã¯ããã¡ã¤ã«ãä½æããã
+  ã®ãå¾
+ã¤ï¼
+  
+----- ããããè¿½è¨ -----
+4.ã¢ã¯ãã£ããã­ã¸ã§ã¯ããcfgã«å¤æ´ãï¼ãã«ãããï¼
+  ã¡ãã¥ã¼ãã ãã«ã -> ãã«ãã»ãã­ã¸ã§ã¯ã ãé¸æããï¼
+ãâ»ã¨ã©ã¼ã¨ãªãï¼ãã­ã¸ã§ã¯ããéãã¾ããåé¡ããã¾ããï¼è©³ç´°ã¯ï¼
+    arch/v850_ccrh/prc_design ãåç
+§ãã¦ãã ããï¼
+
+5.ãã­ã¸ã§ã¯ããéããã®ã§ï¼atk2-sc3 ã®ãã­ã¸ã§ã¯ããã¡ã¤ã«ãååº¦éãï¼
+ãcfg_pass4 ãã¢ã¯ãã£ããã­ã¸ã§ã¯ãã«å¤æ´ãï¼ãã«ãããï¼
+
+6.atk2-sc3 ãã¢ã¯ãã£ããã­ã¸ã§ã¯ãã«å¤æ´ãï¼ãã«ãããï¼
+
+7.ãããã°    
+----- ããã¾ã§è¿½è¨ -----
+ 
+ 
+âå¤æ´å±¥æ­´
+2015/04/07
+ã»COUNTER_MIN_CYCLEã®å®ç¾©ãè¿½å 
+
+2014/07/19
+ã»æ°è¦ä½æ
+ 
+ä»¥ä¸ 
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/E_PACKAGE
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/E_PACKAGE	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/E_PACKAGE	(revision 172)
@@ -0,0 +1,7 @@
+E_PACKAGE atk2-sc3_fl850f1l_gcc
+VERSION %date
+
+INCLUDE MANIFEST
+INCLUDE ../../MANIFEST
+INCLUDE ../../arch/v850_gcc/MANIFEST
+../../cfg/cfg/cfg.exe
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/MANIFEST	(revision 172)
@@ -0,0 +1,30 @@
+PACKAGE atk2-sc3
+
+E_PACKAGE
+hsbrh850f1l.h
+Makefile.target
+MANIFEST
+target.tf
+target_cfg1_out.h
+target_check.tf
+target_config.c
+target_config.h
+target_hw_counter.arxml
+target_hw_counter.h
+target_hw_counter.yaml
+target_kernel.h
+target_mem.arxml
+target_mem.h
+target_mem.tf
+target_mem.yaml
+target_mpu.h
+target_offset.tf
+target_opt.tf
+target_serial.arxml
+target_serial.h
+target_serial.yaml
+target_svc.h
+target_syslog.h
+target_sysmod.h
+target_test.h
+target_user.txt
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/Makefile.target
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/Makefile.target	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/Makefile.target	(revision 172)
@@ -0,0 +1,160 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.target 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+#
+#		Makefile ã®ã¿ã¼ã²ããä¾å­é¨ï¼HSBRH850F1Lç¨ï¼
+#
+
+#
+#  ãã¼ãåã®å®ç¾©
+#
+BOARD = HSBRH850F1L
+
+#
+#  GNUéçºç°å¢ã®ã¿ã¼ã²ããã¢ã¼ã­ãã¯ãã£ã®å®ç¾©
+#
+GCC_TARGET = v850-elf
+
+#
+#  ã¢ã¼ã­ãã¯ãã£æå®
+#
+ARCH = V850E3V5
+
+#
+#  ã³ã¢æå®
+#
+CORETYPE = RH850G3K
+
+#
+#  ãã¼ãæ¯ã«è¨­å®ãç°ãªãé 
+ç®
+#
+CDEFS := $(CDEFS) -DTOPPERS_LABEL_ASM
+CFG1_OUT_LDSCRIPT = $(SRCDIR)/arch/v850_gcc/rh850_f1l_1m.ld
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES := $(INCLUDES) -I$(TARGETDIR)
+
+#
+#  ãµãã¼ãå½ä»¤æ¯ã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+# ãã¼ãã«
+COPTS := $(COPTS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIR := $(KERNEL_DIR) $(TARGETDIR)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS) target_config.o rh850_f1l.o tauj_hw_counter.o
+
+#
+#  ã·ã¹ãã ã¿ã¤ãã«é¢ããè¨­å®
+#
+ifeq ($(ENABLE_SYS_TIMER),true)
+      CDEFS := $(CDEFS) -DTOPPERS_ENABLE_SYS_TIMER
+      KERNEL_COBJS := $(KERNEL_COBJS) taua_timer.o
+endif
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSMOD_DIR := $(SYSMOD_DIR) $(TARGETDIR)
+SYSMOD_COBJS := $(SYSMOD_COBJS) uart_rlin.o
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³è¨­å®
+#
+ifeq ($(findstring target_timer,$(CFGNAME)),target_timer)
+  CFGNAME := $(CFGNAME) taua_timer
+endif
+ifeq ($(findstring target_serial,$(CFGNAME)),target_serial)
+  CFGNAME := $(CFGNAME) uart
+endif
+
+#
+#  ä¾å­é¢ä¿ã®å®ç¾©
+#
+Os_Lcfg.timestamp: $(TARGETDIR)/target.tf
+$(OBJFILE): $(TARGETDIR)/target_mem.tf
+offset.h: $(TARGETDIR)/target_offset.tf
+
+#
+#  ãªãã»ãããã¡ã¤ã«çæã®ããã®å®ç¾©
+#
+OFFSET_TF := $(TARGETDIR)/target_offset.tf
+
+#
+#  ãã­ã»ããµä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/arch/v850_gcc/Makefile.prc
+
+#
+#  å®è¡ã¢ã¸ã¥ã¼ã«ã®ã­ã¼ãï¼å®è¡
+#
+run: $(OBJNAME).exe
+	@sh $(SRCDIR)/arch/v850_gcc/autorun/exe.sh $(SRCDIR) $(TARGET)
+
+urun: $(OBJNAME).exe
+	@sh $(SRCDIR)/arch/v850_gcc/autorun/exe.sh $(SRCDIR) $(TARGET) &
+	@ruby $(SRCDIR)/arch/v850_gcc/autorun/com_port.rb
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/hsbrh850f1l.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/hsbrh850f1l.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/hsbrh850f1l.h	(revision 172)
@@ -0,0 +1,121 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: fl850f1l.h 107 2014-10-30 09:11:04Z fujisft-shigihara $
+ */
+/*
+ *		HSBRH850F1Lãã¼ãã®å®ç¾©
+ */
+
+#ifndef TOPPERS_HSBRH850F1L_H
+#define TOPPERS_HSBRH850F1L_H
+
+#include "v850_gcc/rh850_f1l.h"
+
+/*
+ *  ã¯ã­ãã¯éåº¦
+ */
+
+/*
+ *  PLLé¢é£ã®å®ç¾©
+ */
+#define MAINOSC_CLOCK_MHZ	8       /* Main OSC is 8MHz */
+#define SUBOSC_CLOCK_KHZ	32768   /* Sub OSC is 32.768kHz */
+#define INTOSCH_CLK_MHZ		8       /* High Speed Internal OSC Clock is 8MHz */
+#define INTOSCL_CLK_KHZ		240     /* Low Speed Internal OSC Clock is 240kHz */
+
+#define PLL_CLK_MHZ		80  /* PLL is 80MHz */
+#define PLLC_OUTBSEL	0   /* PLLOUTBSEL */
+#define PLLC_mr			1   /* M[1:0]   */
+#define PLLC_par		4   /* PA[2:0]  */
+#define PLLC_nr			40  /* N[5:0]+1 */
+
+/*
+ * Port 8 Configuration for LED
+ *   P8_4: LED4(OUT)
+ *   P8_5: LED3(OUT)
+ *   P8_6: LED2(OUT)
+ *   P8_7: LED1(OUT)
+ */
+#define LED_P8_MASK				((uint16) 0x00F0)
+#define LED_PM8_INIT			((uint16) 0xFF0F)
+#define LED_P8_INIT				((uint16) 0x00F0)
+
+/*
+ *  Port 10 Configration for RLIN31
+ *   P10_12 : RLIN31TX (ç¬¬2å
+¼ç¨)
+ *   P10_11 : RLIN31RX (ç¬¬2å
+¼ç¨)
+ */
+#define RLIN31_P10_MASK			((uint16) 0x1800)
+#define RLIN31_PMC10_INIT		((uint16) 0x1800)
+#define RLIN31_PFC10_INIT		((uint16) 0x1800)
+#define RLIN31_PM10_INIT		((uint16) 0x0800)
+#define RLIN31_PIBC10_INIT		((uint16) 0x0800)
+
+/*
+ * Macro for hsbrh850f1l_led_output
+ */
+#define POS_LED1				((uint16) 0x01)
+#define POS_LED2				((uint16) 0x02)
+#define POS_LED3				((uint16) 0x04)
+#define POS_LED4				((uint16) 0x08)
+#define POS_LED_ALL				((uint16) 0x0F)
+
+#endif /* TOPPERS_HSBRH850F1L_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target.tf	(revision 172)
@@ -0,0 +1,127 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target.tf 164 2015-06-03 01:22:29Z t_ishikawa $
+$
+
+$
+$     ãã¹2ã®ã¿ã¼ã²ããä¾å­ãã³ãã¬ã¼ãï¼HSBRH850F1Lç¨ï¼
+$
+
+$ 
+$  arch/gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $TAB$.vector : AT(0) {$NL$
+    $TAB$$TAB$*("*.reset.text")$NL$
+    $TAB$$TAB$. += 1;$NL$
+    $TAB$$TAB$. = ALIGN(16);$NL$
+    $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$  
+$TARGET_PAGE_SIZE_STR = 16$
+$TARGET_SEC_ALIGN_STR = 16$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = "*.text *.text.*"$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = "*.rodata *.rodata.*"$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = "*.data *.data.*"$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = "*.bss *.bss.* COMMON"$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = "*.rosdata"$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = "*.sdata"$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = "*.sbss *.scommon"$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$
+$  ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "v850_gcc/prc.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_cfg1_out.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_cfg1_out.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_cfg1_out.h	(revision 172)
@@ -0,0 +1,82 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_cfg1_out.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ */
+
+/*
+ *  ã³ã¢ä¾å­ã®ã¹ã¿ãã®å®ç¾©
+ */
+#include "v850_gcc/prc_cfg1_out.h"
+void
+target_hardware_initialize(void)
+{
+}
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_check.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_check.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_check.tf	(revision 172)
@@ -0,0 +1,77 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target_check.tf 164 2015-06-03 01:22:29Z t_ishikawa $
+$
+
+$
+$     ãã¹3ã®ã¿ã¼ã²ããä¾å­ãã³ãã¬ã¼ãï¼FL-850/F1Lç¨ï¼
+$
+
+$
+$  ã³ã¢ä¾å­ã®ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "v850_gcc/prc_check.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_config.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_config.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_config.c	(revision 172)
@@ -0,0 +1,287 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_config.c 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã¿ã¼ã²ããä¾å­ã¢ã¸ã¥ã¼ã«ï¼HSBRH850F1Lç¨ï¼
+ */
+
+#include "kernel_impl.h"
+#include "v850_gcc/uart_rlin.h"
+#include "v850_gcc/prc_sil.h"
+#include "target_sysmod.h"
+#ifdef ENABLE_RETURN_MAIN
+#include "interrupt.h"
+#endif /* ENABLE_RETURN_MAIN */
+#ifdef TOPPERS_ENABLE_TRACE
+#include "logtrace/trace_config.h"
+#endif /* TOPPERS_ENABLE_TRACE */
+
+/*
+ *  æå­åã®åºå
+ */
+void
+target_fput_str(const char8 *c)
+{
+	while (*c != '\0') {
+		uart_putc(*c);
+		c++;
+	}
+	uart_putc('\n');
+}
+
+void
+hsbrh850f1l_led_output(uint8 pattern)
+{
+	uint16 wk;
+
+	pattern = ~pattern;
+	wk = sil_reh_mem((void *) P(8));
+	wk &= ~LED_P8_MASK;
+	wk |= (pattern & LED_P8_MASK);
+	sil_wrh_mem((void *) P(8), wk);
+}
+
+/*
+ *  ãã¼ãã®åæè¨­å®
+ */
+void
+target_port_initialize(void)
+{
+	uint16 wk;
+
+	/*
+	 * PORT8(LED)
+	 */
+	/* PM8 è¨­å® */
+	wk = sil_reh_mem((void *) PM(8));
+	wk &= ~LED_P8_MASK;
+	wk |= (LED_PM8_INIT & LED_P8_MASK);
+	sil_wrh_mem((void *) PM(8), wk);
+
+	/* P8 è¨­å® */
+	wk = sil_reh_mem((void *) P(8));
+	wk &= ~LED_P8_MASK;
+	wk |= (LED_P8_INIT & LED_P8_MASK);
+	sil_wrh_mem((void *) P(8), wk);
+
+	/*
+	 * PORT10(RLIN31)
+	 */
+	/* PFC10 è¨­å® */
+	wk = sil_reh_mem((void *) PFC(10));
+	wk &= ~RLIN31_P10_MASK;
+	wk |= (RLIN31_PFC10_INIT & RLIN31_P10_MASK);
+	sil_wrh_mem((void *) PFC(10), wk);
+
+	/* PMC10 è¨­å® */
+	wk = sil_reh_mem((void *) PMC(10));
+	wk &= ~RLIN31_P10_MASK;
+	wk |= (RLIN31_PMC10_INIT & RLIN31_P10_MASK);
+	sil_wrh_mem((void *) PMC(10), wk);
+
+	/* PM10 è¨­å® */
+	wk = sil_reh_mem((void *) PM(10));
+	wk &= ~RLIN31_P10_MASK;
+	wk |= (RLIN31_PM10_INIT & RLIN31_P10_MASK);
+	sil_wrh_mem((void *) PM(10), wk);
+
+	/* PIBC10 è¨­å® */
+	wk = sil_reh_mem((void *) PIBC(10));
+	wk &= ~RLIN31_P10_MASK;
+	wk |= (RLIN31_PIBC10_INIT & RLIN31_P10_MASK);
+	sil_wrh_mem((void *) PIBC(10), wk);
+}
+
+/*
+ *  ã¯ã­ãã¯é¢ä¿ã®åæå
+ */
+void
+target_clock_initialize(void)
+{
+	uint32 errcnt = 0;
+
+	/* Init Main Clock */
+	if (EnableMainOSC(MHz(MAINOSC_CLOCK_MHZ)) != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	/* Init PLL */
+	if (EnablePLL() != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	/* Set CPU Clock */
+	if (SetClockSelection(CKSC_CPUCLKS_CTL, CKSC_CPUCLKS_ACT,
+						  PNO_CtrlProt1, 0x03, /* 80MHz f_CPUCLK */
+						  CKSC_CPUCLKD_CTL, CKSC_CPUCLKD_ACT,
+						  0x01) != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	/* Set TAUJ Clock */
+	if (SetClockSelection(CKSC_ATAUJS_CTL, CKSC_ATAUJS_ACT,
+					  PNO_CtrlProt0, 0x02, /* MainOSC */
+					  CKSC_ATAUJD_CTL, CKSC_ATAUJD_ACT,
+					  0x01) != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	if (errcnt > 0) {
+		infinite_loop();
+	}
+}
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®ãã¼ãã¦ã§ã¢ã®åæå
+ *  ã¹ã¿ã¼ã¢ããã«ã¼ãã³ããå¼ã³åºãããï¼
+ */
+void
+target_hardware_initialize(void)
+{
+	/* ã¯ã­ãã¯ã®åæè¨­å® */
+	target_clock_initialize();
+
+	/* ãã¼ãã®åæè¨­å® */
+	target_port_initialize();
+}
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®åæå
+ */
+void
+target_initialize(void)
+{
+	/*
+	 *  V850ä¾å­ã®åæå
+	 */
+	prc_initialize();
+
+
+
+#ifdef TOPPERS_ENABLE_TRACE
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°æ©è½ã®åæå
+	 */
+	trace_initialize((uintptr) (TRACE_AUTOSTOP));
+#endif /* TOPPERS_ENABLE_TRACE */
+}
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®çµäºå¦ç
+ */
+void
+target_exit(void)
+{
+#ifdef TOPPERS_ENABLE_TRACE
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°ã®ãã³ã
+	 */
+	trace_dump(target_fput_log);
+#endif /* TOPPERS_ENABLE_TRACE */
+
+#ifndef ENABLE_RETURN_MAIN
+	/*
+	 *  ã·ã£ãããã¦ã³å¦çã®åºå
+	 */
+	target_fput_str("Kernel Exit...");
+#else
+	target_fput_str("Kernel Shutdown...");
+#endif /* ENABLE_RETURN_MAIN */
+
+	/*
+	 *  FL-850/F1Lä¾å­ã®çµäºå¦ç
+	 */
+	prc_terminate();
+
+#ifdef ENABLE_RETURN_MAIN
+	p_ctxosap = NULL;
+	kerflg = FALSE;
+	except_nest_cnt = 0U;
+	nested_lock_os_int_cnt = 0U;
+	sus_all_cnt = 0U;
+	sus_os_cnt = 0U;
+
+	/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæåã¨main()ã®å¼ã³åºã */
+	return_main();
+#endif /* ENABLE_RETURN_MAIN */
+
+	infinite_loop();
+}
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®æå­åºå
+ */
+void
+target_fput_log(char8 c)
+{
+	if (c == '\n') {
+		uart_putc('\r');
+	}
+	uart_putc(c);
+}
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_config.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_config.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_config.h	(revision 172)
@@ -0,0 +1,125 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_config.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã¿ã¼ã²ããä¾å­ã¢ã¸ã¥ã¼ã«ï¼HSBRH850F1Lç¨ï¼
+ *
+ *  ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«
+ *  kernel_impl.hã®ã¿ã¼ã²ããä¾å­é¨ã®ä½ç½®ä»ãã¨ãªã
+ */
+
+#ifndef TOPPERS_TARGET_CONFIG_H
+#define TOPPERS_TARGET_CONFIG_H
+
+#include "target/hsbrh850f1l_gcc/target_mpu.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ */
+#ifdef TOPPERS_ENABLE_TRACE
+#include "logtrace/trace_config.h"
+#endif /* TOPPERS_ENABLE_TRACE */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+extern void *p_ctxosap;
+
+extern void target_hardware_initialize(void);
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ä¾å­ã®åæå
+ */
+extern void target_initialize(void);
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ã®çµäº
+ *  ã·ã¹ãã ãçµäºããæã«ä½¿ã
+ */
+extern void target_exit(void) NoReturn;
+
+/*
+ *  æå­åã®åºå
+ */
+extern void target_fput_str(const char8 *c);
+
+/*
+ *  ãããã¯ç¨LEDåºå
+ */
+extern void hsbrh850f1l_led_output(uint8 pattern);
+
+#define TARGET_SVC_TABLE	PRC_SVC_TABLE
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ */
+#include "v850_gcc/prc_config.h"
+
+#endif /* TOPPERS_TARGET_CONFIG_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.arxml	(revision 172)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>target_hw_counter.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>TRUSTED_OSAP_for_MAIN_HW_COUNTER</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppIsrRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/C2ISR_for_MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MAIN_HW_COUNTER</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>536870911</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>4000</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-FLOAT-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsSecondsPerTick</DEFINITION-REF>
+									<VALUE>1.25e-07</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>HARDWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterIsrRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/C2ISR_for_MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>C2ISR_for_MAIN_HW_COUNTER</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIsr</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptNumber</DEFINITION-REF>
+									<VALUE>HWC_DTIM_INTNO</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptPriority</DEFINITION-REF>
+									<VALUE>HWC_DTIM_INTPRI</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrCategory</DEFINITION-REF>
+									<VALUE>CATEGORY_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptSource</DEFINITION-REF>
+									<VALUE>ENABLE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.h	(revision 172)
@@ -0,0 +1,276 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2014 by Spansion LLC, USA
+ *  Copyright (C) 2014 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_hw_counter.h 165 2015-06-04 05:24:57Z t_ishikawa $
+ */
+
+/*
+ *		ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼HSBRH850F1Lç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_HW_COUNTER_H
+#define TOPPERS_TARGET_HW_COUNTER_H
+
+/*
+ *  ä½¿ç¨ããã¿ã¤ãã¼ã®ã¦ãããçªå·ã¨å·®åã¿ã¤ãã¨ç¾å¨å¤ã¿ã¤ãã®ãã£ãã«
+ */
+#define HWC_DTIM_UNIT  0  /* 0 or 1 */
+#define HWC_DTIM_ID    0
+#define HWC_CTIM_UNIT  0  /* 0 or 1 */
+#define HWC_CTIM_ID    1
+
+/*
+ *  å²è¾¼ã¿çªå·
+ */
+#if (HWC_DTIM_UNIT == 0)
+#define HWC_DTIM_INTNO  (TAUFJ0I0_INTNO + HWC_DTIM_ID)
+#elif (HWC_DTIM_UNIT == 1)
+#define HWC_DTIM_INTNO  (TAUFJ1I0_INTNO + HWC_DTIM_ID)
+#else /*(HWC_DTIM_UNIT == 1) */
+#error define HWC_UNIT  0 or 1.
+#endif /* (HWC_DTIM_UNIT == 0) */
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦
+ */
+#define HWC_DTIM_INTPRI  1
+
+/*
+ *  ã¿ã¤ãã¯ã­ãã¯å¨æ³¢æ°ï¼Hzï¼ï¼8MHzï¼
+ */
+#define TIMER_CLOCK_HZ		((uint32) 8000000)
+
+/*
+ *  TAUJé¢é£ã¬ã¸ã¹ã¿
+ */
+#define TAUJ_BASE(n)	((uint32) (0xffe50000U + (n * 0x1000U)))
+#define TAUJTPS(n)		(TAUJ_BASE(n) + 0x90U)
+#define TAUJCDR(n, ch)	(TAUJ_BASE(n) + (ch * 0x04U))
+#define TAUJCNT(n, ch)	(TAUJ_BASE(n) + 0x10U + (ch * 0x04U))
+#define TAUJCMOR(n, ch)	(TAUJ_BASE(n) + 0x80U + (ch * 0x04U))
+#define TAUJCMUR(n, ch)	(TAUJ_BASE(n) + 0x20U + (ch * 0x04U))
+#define TAUJTS(n)		(TAUJ_BASE(n) + 0x54U)
+#define TAUJTT(n)		(TAUJ_BASE(n) + 0x58U)
+
+#define MCU_TAUJ_MASK_CK0				((uint16) 0xfff0)
+#define MCU_TAUJ_CK0_0					((uint16) 0x0000) /* åå¨ãªã */
+#define MCU_TAUJ00_CMOR					((uint16) 0x0000)
+#define MCU_TAUJ00_CMUR					((uint8) 0x01)
+
+/*
+ *  TAUJã®ã¦ãããçªå·ã¨ãã£ãã«ããå
+¥åå²è¾¼ã¿çªå·ã¸ã®å¤æ
+ */
+#define TAUJ_INTNO(n, ch)	(n == 0)? ((uint32) ((TAUFJ0I0_INTNO + ch))) : ((uint32) (TAUFJ1I0_INTNO + ch))
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+LOCAL_INLINE void
+HwcounterClearInterrupt(uint32 intno)
+{
+	/* å²è¾¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	/* å²è¾¼ã¿è¦æ±ãããã®ã¯ãªã¢ */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) & ~EIRFn);
+}
+
+/*
+ *  å²è¾¼ã¿ç¦æ­¢ï¼è¨±å¯è¨­å®
+ */
+LOCAL_INLINE void
+HwcounterDisableInterrupt(uint32 intno)
+{
+	/* å²è¾¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	/* å²è¾¼ã¿ãã¹ã¯ãããã®ã»ãã */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) | EIMKn);
+}
+
+LOCAL_INLINE void
+HwcounterEnableInterrupt(uint32 intno)
+{
+	/* å²è¾¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	/* å²è¾¼ã¿ãã¹ã¯ãããã®ã»ãã */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) & ~EIMKn);
+}
+
+/*
+ *  TAUJn ã¿ã¤ãã®åä½éå§ï¼åæ­¢å¦ç
+ */
+LOCAL_INLINE void
+SetTimerStartTAUJ(uint8 n, uint8 ch)
+{
+	/* ã¿ã¤ãéå§å¦ç */
+	sil_wrh_mem((void *) TAUJTS(n), (1 << ch));
+}
+
+LOCAL_INLINE void
+SetTimerStopTAUJ(uint8 n, uint8 ch)
+{
+	/* ã¿ã¤ãåæ­¢å¦ç */
+	sil_wrh_mem((void *) TAUJTT(n), (1 << ch));
+}
+
+/*
+ *  TAUJnãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ç¾å¨ãã£ãã¯å¤åå¾
+ */
+LOCAL_INLINE TickType
+GetCurrentTimeTAUJ(uint8 n, uint8 ch, TickType maxval)
+{
+	TickType	count;
+	TickType	curr_time = 0U;
+
+	count = sil_rew_mem((void *) (TAUJCNT(n, ch)));
+
+	/* ãã¦ã³ã«ã¦ã³ã¿ã®çºï¼ç¾å¨ããã¯å¤ã«å¤æ */
+	curr_time = maxval - count;
+	curr_time = (curr_time % maxval);
+
+	return(curr_time);
+}
+
+/*
+ *  TAUBé¢é£ã¬ã¸ã¹ã¿
+ */
+#define TAUB_BASE(n)	((uint32) (0xffe30000U + (n * 0x1000U)))
+#define TAUBTPS(n)		(TAUB_BASE(n) + 0x240U)
+#define TAUBCDR(n, ch)	(TAUB_BASE(n) + (ch * 0x04U))
+#define TAUBCNT(n, ch)	(TAUB_BASE(n) + 0x80U + (ch * 0x04U))
+#define TAUBCMOR(n, ch)	(TAUB_BASE(n) + 0x2000U + (ch * 0x04U))
+#define TAUBCMUR(n, ch)	(TAUB_BASE(n) + 0xC0U + (ch * 0x04U))
+#define TAUBTS(n)		(TAUB_BASE(n) + 0x1C4U)
+#define TAUBTT(n)		(TAUB_BASE(n) + 0x1C8U)
+
+#define MCU_TAUB_MASK_CK0				((uint16) 0xfff0)
+#define MCU_TAUB_CK0_0					((uint16) 0x0000) /* åå¨ãªã */
+#define MCU_TAUB00_CMOR					((uint16) 0x0000)
+#define MCU_TAUB00_CMUR					((uint8) 0x01)
+
+#define TAUB_INTNO(n, ch)	(n == 0)? ((uint32) ((134 + ch))) : ((uint32) (248 + ch))
+
+/*
+ *  TAUBn ã¿ã¤ãã®åä½éå§ï¼åæ­¢å¦ç
+ */
+LOCAL_INLINE void
+SetTimerStartTAUB(uint8 n, uint8 ch)
+{
+	/* ã¿ã¤ãéå§å¦ç */
+	sil_wrh_mem((void *) TAUBTS(n), (1 << ch));
+}
+
+LOCAL_INLINE void
+SetTimerStopTAUB(uint8 n, uint8 ch)
+{
+	/* ã¿ã¤ãåæ­¢å¦ç */
+	sil_wrh_mem((void *) TAUBTT(n), (1 << ch));
+}
+
+/*
+ *  TAUBnãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ç¾å¨ãã£ãã¯å¤åå¾
+ */
+LOCAL_INLINE TickType
+GetCurrentTimeTAUB(uint8 n, uint8 ch, TickType maxval)
+{
+	TickType	count;
+	TickType	curr_time = 0U;
+
+	count = (TickType)sil_reh_mem((void *) (TAUBCNT(n, ch)));
+
+	/* ãã¦ã³ã«ã¦ã³ã¿ã®çºï¼ç¾å¨ããã¯å¤ã«å¤æ */
+	curr_time = maxval - count;
+	curr_time = (curr_time % maxval);
+
+	return(curr_time);
+}
+
+
+/* MAIN_HW_COUNTERã®å®ç¾© */
+extern void init_hwcounter_MAIN_HW_COUNTER(TickType maxval, TimeType nspertick);
+extern void start_hwcounter_MAIN_HW_COUNTER(void);
+extern void stop_hwcounter_MAIN_HW_COUNTER(void);
+extern void set_hwcounter_MAIN_HW_COUNTER(TickType exprtick);
+extern TickType get_hwcounter_MAIN_HW_COUNTER(void);
+extern void cancel_hwcounter_MAIN_HW_COUNTER(void);
+extern void trigger_hwcounter_MAIN_HW_COUNTER(void);
+extern void int_clear_hwcounter_MAIN_HW_COUNTER(void);
+extern void int_cancel_hwcounter_MAIN_HW_COUNTER(void);
+extern void increment_hwcounter_MAIN_HW_COUNTER(void);
+
+/*
+ *  10msã¨ä¸è´ãããã£ãã¯å¤(ãµã³ãã«ãã­ã°ã©ã ç¨)
+ */
+#define TICK_FOR_10MS	TIMER_CLOCK_HZ / 100
+
+#endif /* TOPPERS_TARGET_HW_COUNTER_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_hw_counter.yaml	(revision 172)
@@ -0,0 +1,93 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJISOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: target_hw_counter.yaml 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    OsInclude:
+      OsIncludeFileName: target_hw_counter.h
+    TRUSTED_OSAP_for_MAIN_HW_COUNTER:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppCounterRef:
+        - /Ecuc/Os/MAIN_HW_COUNTER
+      OsAppIsrRef:
+        - /Ecuc/Os/C2ISR_for_MAIN_HW_COUNTER
+    MAIN_HW_COUNTER:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 0x1FFFFFFF
+      OsCounterMinCycle: 4000
+      OsCounterTicksPerBase: 10
+      OsSecondsPerTick: 1.25e-07  # 1.0/TIMER_CLOCK_HZ
+      OsCounterType: HARDWARE
+      OsCounterIsrRef: /Ecuc/Os/C2ISR_for_MAIN_HW_COUNTER
+    C2ISR_for_MAIN_HW_COUNTER:
+      DefinitionRef: OsIsr
+      OsIsrInterruptNumber: HWC_DTIM_INTNO
+      OsIsrInterruptPriority: HWC_DTIM_INTPRI
+      OsIsrCategory: CATEGORY_2
+      OsIsrInterruptSource: ENABLE
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_kernel.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_kernel.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_kernel.h	(revision 172)
@@ -0,0 +1,108 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2016 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_kernel.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		Os.hã®ã¿ã¼ã²ããä¾å­é¨ï¼HSBRH850F1Lç¨ï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼Os.hã§ã¤ã³ã¯ã«ã¼ãããã
+ *  ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªã
+ */
+
+#ifndef TOPPERS_TARGET_KERNEL_H
+#define TOPPERS_TARGET_KERNEL_H
+
+#include "hsbrh850f1l.h"
+
+/* ãã§ãã¯ç¨ã¿ã¹ã¯ã¹ã¿ãã¯ãµã¤ãºã®æå°å¤ã®å®ç¾© */
+#define TARGET_MIN_STKSZ	196
+
+/* ãã§ãã¯ç¨éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯æå°å¤ã®å®ç¾© */
+#define MINIMUM_OSTKSZ	256
+
+/* åã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ãå¤ã®å®ç¾©*/
+#define DEFAULT_TASKSTKSZ	(1024U) /* 1K bytes */
+#define DEFAULT_TASKSYSTEMSTKSZ			(1024U) /* 1K bytes */
+#define DEFAULT_ISRSTKSZ	(1024U) /* 1K bytes */
+#define DEFAULT_ISRSYSTEMSTKSZ			(1024U) /* 1K bytes */
+#define DEFAULT_HOOKSTKSZ	(1024U) /* 1K bytes */
+#define DEFAULT_TRUSTEDFUNCTIONSTKSZ	(128U)  /* 128 bytes */
+#define DEFAULT_OSSTKSZ		(8192U) /* 8K bytes */
+
+/* ã³ã³ãã­ã¹ãã®ä¿å­å¾©å¸°ã«PUSHSP/POPSPãä½¿ç¨ */
+#define TOPPERS_USE_PUSHSP
+
+/*
+ *  ãã­ã»ããµã§å
+±éãªå®ç¾©
+ */
+#include "v850_gcc/prc_kernel.h"
+
+#define TARGET_SVC_NUM	(PRC_SVC_NUM)
+
+#endif /* TOPPERS_TARGET_KERNEL_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.arxml	(revision 172)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>target_mem.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>FLASH</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionStartAddress</DEFINITION-REF>
+									<VALUE>0</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionSize</DEFINITION-REF>
+									<VALUE>1*1024*1024</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionName</DEFINITION-REF>
+									<VALUE>FLASH</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>RAM</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionStartAddress</DEFINITION-REF>
+									<VALUE>4275994624</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionSize</DEFINITION-REF>
+									<VALUE>96*1024</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionName</DEFINITION-REF>
+									<VALUE>RAM</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>STANDARDREGION</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion/OsStandardMemoryRomRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/FLASH</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion/OsStandardMemoryRamRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.h	(revision 172)
@@ -0,0 +1,65 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+#ifndef _TOPPERS_TARGET_MEM_H_
+#define _TOPPERS_TARGET_MEM_H_
+
+/*
+ *  ã¡ã¢ãªãªã¼ã¸ã§ã³ã«é¢ããå®ç¾©
+ */
+
+#include "target_mpu.h"
+
+#endif /* _TOPPERS_TARGET_MEM_H_ */
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.tf	(revision 172)
@@ -0,0 +1,58 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$ =====================================================================
+
+$INCLUDE "v850_gcc/prc_mem.tf"$
+
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mem.yaml	(revision 172)
@@ -0,0 +1,86 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJISOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  AUTOSARï¼AUTomotive Open System ARchitectureï¼ã¯ï¼AUTOSARä»æ§ã«åºã¥
+#  ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«
+#  ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: target_mem.yaml 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    OsInclude:
+      OsIncludeFileName: target_mem.h
+    FLASH:
+      DefinitionRef: OsMemoryRegion
+      OsMemoryRegionWriteable: false
+      OsMemoryRegionStartAddress: 0
+      OsMemoryRegionSize: 1*1024*1024
+      OsMemoryRegionName: FLASH
+    RAM:
+      DefinitionRef: OsMemoryRegion
+      OsMemoryRegionWriteable: true
+      OsMemoryRegionStartAddress: 0xfede8000
+      OsMemoryRegionSize: 96*1024
+      OsMemoryRegionName: RAM
+    STANDARDREGION:
+      DefinitionRef: OsStandardMemoryRegion
+      OsStandardMemoryRomRegionRef: /Ecuc/Os/FLASH
+      OsStandardMemoryRamRegionRef: /Ecuc/Os/RAM
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mpu.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mpu.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_mpu.h	(revision 172)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+/*
+ *	MPUãã©ã¤ã
+ */
+
+#ifndef TOPPERS_TARGET_MPU_H
+#define TOPPERS_TARGET_MPU_H
+
+#define TNUM_MPU_REG 4
+#define TARGET_MPM_CONFIG (0x501U)
+#define USE_MPU_SRPW_SDATA
+#define USE_MPU_SRW_DATA_SDATA
+
+#include "v850_gcc/prc_mpu.h"
+
+#endif /* TOPPERS_TARGET_MPU_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_offset.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_offset.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_offset.tf	(revision 172)
@@ -0,0 +1,82 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target_offset.tf 164 2015-06-03 01:22:29Z t_ishikawa $
+$
+
+$
+$       ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤ã«ï¼HSBRH850F1Lç¨ï¼
+$
+
+$
+$  æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "kernel/genoffset.tf"$
+
+$
+$  ã³ã¢ä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ãï¼V850ç¨ï¼
+$
+$INCLUDE "v850_gcc/prc_offset.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_opt.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_opt.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_opt.tf	(revision 172)
@@ -0,0 +1,108 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+$INCLUDE "cfg2_out.tf"$
+
+$ 
+$  arch/v850_gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $TAB$.vector : AT(0) {$NL$
+    $TAB$$TAB$*(.vectors)$NL$
+    $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$  
+$TARGET_PAGE_SIZE_STR = 16$
+$TARGET_SEC_ALIGN_STR = 16$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = "*.text *.text.*"$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = "*.rodata *.rodata.*"$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = "*.data *.data.*"$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = "*.bss *.bss.* COMMON"$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = "*.rosdata"$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = "*.sdata"$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = "*.sbss *.scommon"$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$INCLUDE "v850_gcc/prc_opt.tf"$
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.arxml	(revision 172)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>target_serial.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.h	(revision 172)
@@ -0,0 +1,100 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_serial.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã·ãªã¢ã«I/Oããã¤ã¹ï¼SIOï¼ãã©ã¤ãï¼HSBRH850F1Lç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_SERIAL_H
+#define TOPPERS_TARGET_SERIAL_H
+
+/*
+ *  ãã¼ã1ãä½¿ç¨
+ */
+#define RLIN3x_USE_PORT1
+
+/*
+ *   ãã¼ã¬ã¼ãã¬ã¸ã¹ã¿ã¸ã®è¨­å®å¤ PCLK=40MHz, 115200bps
+ */
+#define RLIN3xLWBR_VAL		0xf2
+#define RLIN3xLBRP01_VAL	10
+
+/*
+ *  SIOã®å²è¾¼ã¿ãã³ãã©ã®ãã¯ã¿çªå·
+ */
+#define INTNO_SIO	(RLIN31_RX_INTNO)       /* å²è¾¼ã¿çªå· */
+#define INTPRI_SIO	2                       /* å²è¾¼ã¿åªå
+åº¦ */
+
+/*
+ *  ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«
+ */
+#include "v850_gcc/uart_rlin.h"
+
+#endif /* TOPPERS_TARGET_SERIAL_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_serial.yaml	(revision 172)
@@ -0,0 +1,71 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: target_serial.yaml 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    OsInclude:
+      OsIncludeFileName: target_serial.h
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_svc.h	(revision 172)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+
+#ifndef TOPPERS_TARGET_SVC_H
+#define TOPPERS_TARGET_SVC_H
+
+#ifdef USE_CCRH
+/*
+ *  target_config.cããã®ã¤ã³ã¯ã«ã¼ãã¬ã¼ã
+ */
+#include "v850_ccrh/prc_svc.h"
+#else /* USECCRH */
+#include "v850_gcc/prc_svc.h"
+#endif /* USECCRH */
+
+#endif /* TOPPERS_TARGET_SVC_H */
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_syslog.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_syslog.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_syslog.h	(revision 172)
@@ -0,0 +1,65 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_syslog.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ã·ã¹ã­ã°æ©è½ã®ãã­ã»ããµä¾å­é¨
+ */
+
+#ifndef TOPPERS_TARGET_SYSLOG_H
+#define TOPPERS_TARGET_SYSLOG_H
+
+#include "v850_gcc/prc_syslog.h"
+
+#endif /* TOPPERS_TARGET_SYSLOG_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_sysmod.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_sysmod.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_sysmod.h	(revision 172)
@@ -0,0 +1,95 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_sysmod.h 164 2015-06-03 01:22:29Z t_ishikawa $
+ */
+
+/*
+ *		ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã®ã¿ã¼ã²ããä¾å­é¨ï¼HSBRH850F1Lç¨ï¼
+ *
+ *  ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«
+ *  ãã®ãã¡ã¤ã«ã®å
+å®¹ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã«è¨è¿°ããï¼
+ *  ãã®ãã¡ã¤ã«ã¯ç¡ããªãè¦è¾¼ã¿
+ */
+#ifndef TOPPERS_TARGET_SYSMOD_H
+#define TOPPERS_TARGET_SYSMOD_H
+
+#include "v850_gcc/prc_sil.h"
+
+/*
+ *  èµ·åã¡ãã»ã¼ã¸ã®ã¿ã¼ã²ããã·ã¹ãã å
+ */
+#define TARGET_NAME	"HSBRH850F1L"
+
+/*
+ *  ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®æå­åºå
+ *
+ *  ã¿ã¼ã²ããä¾å­ã®æ¹æ³ã§ï¼æå­cãè¡¨ç¤º/åºå/ä¿å­ãã
+ */
+extern void target_fput_log(char8 c);
+
+#endif /* TOPPERS_TARGET_SYSMOD_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_test.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_test.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_test.h	(revision 172)
@@ -0,0 +1,87 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_test.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼FL-850/F1Lç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_TEST_H
+#define TOPPERS_TARGET_TEST_H
+
+/*
+ *  sample1ã§ä½¿ç¨ããã¢ã©ã¼ã ã®å¨æï¼ç´1ç§ï¼
+ */
+#define COUNTER_MIN_CYCLE	((uint32) 8000000)
+
+/*
+ *  sample1ã§ä½¿ç¨ããCPUä¾å¤
+ */
+#define RAISE_CPU_EXCEPTION		Asm("trap 0x6" ::: "memory")
+
+#endif /* TOPPERS_TARGET_TEST_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_gcc/target_user.txt	(revision 172)
@@ -0,0 +1,167 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼FL-850/F1Lã¿ã¼ã²ããä¾å­é¨(GCCç)ããã¥ã¢ã«ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯FL-850/F1Lã¿ã¼ã²ããä¾å­é¨ã®æ
+å ±ãè¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2014 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: target_user.txt 187 2015-06-25 03:39:04Z t_ishikawa $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+FL-850/F1Lã¿ã¼ã²ããä¾å­é¨ï¼FL-850/F1Lä¾å­é¨ï¼ã¯ï¼ã«ããµã¹ã¨ã¬ã¯ãã­ã
+ã¯ã¹ç¤¾ã®RH850/F1Lãæ­è¼ãããã»ã©ã»ãã¯ãã­ã¸ã¼ã®FL-850/F1L-176-Sããµãã¼
+ããã¦ããï¼
+
+
+âåä½ç¢ºèªãã¼ã¸ã§ã³
+
+åä½ç¢ºèªãè¡ã£ãã³ã³ãã¤ã©ã®ãã¼ã¸ã§ã³ã¯æ¬¡ã®éãã§ããï¼
+
+ã»KPITç¤¾ gcc version 4.9-GNUV850_v14.01 (GCC_Build_2.01) 
+
+
+âã­ã°åºå
+
+ã­ã°åºåã®ããï¼RLIN3ã®ãã¼ã5ãä½¿ç¨ããï¼
+
+ãã¼ã¿ãã©ã¼ãããã¯ï¼
+
+ã»115200bpsããã¼ã¿8bitãããªãã£ãªããã¹ããã1bitããã­ã¼å¶å¾¡ãªã
+
+ã§ããï¼
+
+
+âãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿
+
+ã»ãµã³ãã«ãã­ã°ã©ã ã«ã¦ï¼TAUJ0, TAUJ1ãä½¿ç¨ï¼
+ã»1åã®ã«ã¦ã³ã¿ã«2ã¤ã®ã¿ã¤ããä½¿ç¨ãã¦ããï¼
+    å·®åã¿ã¤ãï¼ç®çã®æéãè¨­å®ããæã®ç¾å¨æé(ç¾å¨å¤ã¿ã¤ã)ã¨æ¬¡ã®æº
+    äºæéã¨ã®ç¸å¯¾æéãã«ã¦ã³ããããã¨ã§ç®çã®çµ¶å¯¾æéã«æºäºãããã¨
+    ã¨ãã.
+        count mode:count down once
+    ç¾å¨å¤ã¿ã¤ãï¼ã«ã¦ã³ã¿å¨æåã®ãã¼ã¹ã¿ã¤ããå®ç¾(çµ¶å¯¾æéãã«ã¦ã³ã)
+        count mode:continuous count down
+ã»ä½¿ç¨ã«ã¦ã³ã¿æ
+å ±
+    ã«ã¦ã³ã¿åï¼MAIN_HW_COUNTER
+        å·®åã¿ã¤ãï¼TAUJ0
+        ç¾å¨å¤ã¿ã¤ãï¼TAUJ1
+        1ãã£ãã¯å½ããã®ç§æ°ï¼1/TIMER_CLOCK_HZ
+
+
+âãã«ãç°å¢
+
+ãã«ãç°å¢ã¯Windowsä¸ã®Cygwinãä½¿ç¨ããï¼Cygwinã«ã¯æä½éä»¥ä¸ã®ããã±
+ã¼ã¸ãã¤ã³ã¹ãã¼ã«ããå¿
+è¦ãããï¼
+
+ ã»make
+ ã»perl
+ 
+ 
+âãããã°ç°å¢
+
+åä½ç¢ºèªã¯CS+ã§å®æ½ããï¼CS+ã®è¨­å®æ¹æ³ã¯æ¬¡ã®éãã§ããï¼
+
+ 1) CubeSuite+ãèµ·å
+ 2) æ°è¦ãã­ã¸ã§ã¯ããä½æï¼
+    ã¡ãã¥ã¼ãã[ãã¡ã¤ã«] â [æ°è¦ä½æ] â [æ°ãããã­ã¸ã§ã¯ããä½æ]ãé¸æ
+ 3) ãã­ã¸ã§ã¯ãã®ä½æ
+  ãã­ã¸ã§ã¯ãä½æãã¤ã¢ã­ã°å
+ã§ä»¥ä¸ã®è¨­å®ããã¾ãã
+   [1] ãã¤ã¯ã­ã³ã³ãã­ã¼ã©        ï¼RH850ãé¸æ
+   [2] ä½¿ç¨ãããã¤ã¯ã­ã³ã³ãã­ã¼ã©ï¼R7F701035xAFP
+   [3] ãã­ã¸ã§ã¯ãã®ç¨®é¡          ï¼ãããã¯å°ç¨
+   [4] ãã­ã¸ã§ã¯ãå              ï¼ä»»æ
+   [5] ä½æå ´æ                    ï¼ä»»æ
+   [6] OKãé¸æ
+   ä¸è¨[5]ã§æå®ãããã©ã«ãå
+ã«ãã­ã¸ã§ã¯ãå.mtpjãã¡ã¤ã«ãä½æãããï¼
+ 4) ãããã¯ãã¼ã«ã®é¸æ
+   [1] ç»é¢å·¦å´ããªã¼å
+ã®RH850ã·ã¥ãã¬ã¼ã¿ãé¸æãå³ã¯ãªãã¯
+   [2] ä½¿ç¨ãããããã¯ãã¼ã«ãé¸æ
+   [3] æ¥ç¶ç¨è¨­å®ã®ã¿ããé¸æ
+   [4] ã¡ã¤ã³ã»ã¯ã­ãã¯å¨æ³¢æ° ã« 8 ãæå®
+ 5) ãã¦ã³ã­ã¼ããã¡ã¤ã«ã®è¨­å®
+   [1] ç»é¢å³å´ã®ã¿ããã[ãã¦ã³ã­ã¼ãã»ãã¡ã¤ã«è¨­å®]ãé¸æ
+   [2] ç»é¢å³å´ã®ãã¦ã³ã­ã¼ããããã¡ã¤ã«ãé¸æ
+   [3] é¸æè¡å³ç«¯[...]ãå·¦ã¯ãªãã¯
+   [4] ãã¦ã³ã­ã¼ãã»ãã¤ã¢ã­ã°å
+ã§[è¿½å ]ãã¿ã³ãé¸æ
+   [5] ãã¦ã³ã­ã¼ãã»ãã¡ã¤ã«æ
+å ±ã®ãã¡ã¤ã«ãé¸æå¾[...]ãå·¦ã¯ãªãã¯
+   [6] ãã¦ã³ã­ã¼ããã¡ã¤ã«ã¯[atk2-sc3.exe]ãé¸æ
+   [7] OKãé¸æ
+ 6) ãã¡ã¤ã«ããã¦ã³ã­ã¼ã
+   [1] ã¿ã¼ã²ãããã¼ãã®é»æºãON
+   [2] ã¡ãã¥ã¼ãã[ãããã¯]â[ãããã¯ã»ãã¼ã«ã¸ãã¦ã³ã­ã¼ã]ãé¸æ
+      â»ãã¦ã³ã­ã¼ãå®äºå¾ãããã¦ã³ã­ã¼ããå®äºãã¾ããããä»¥ä¸ã®åé¡ããå¯è½æ§ãããã¾ãããã¨
+      è­¦åã¡ãã»ã¼ã¸ãè¡¨ç¤ºããããï¼OKãé¸æï¼
+ 7) ãã­ã°ã©ã ã®å®è¡
+   [1] ã¡ãã¥ã¼ãã[ãããã¯]â[ãªã¹ã¿ã¼ã]ãé¸æ
+      ã¿ã¼ããã«ç»é¢ã«[Input Command:]ã¨è¡¨ç¤ºãåºãã°æ­£å¸¸ã«åä½ãã¦ãã ï¼
+ ä¸è¨æé ã® 2)ã5)ã¯æ°è¦ã«ãã­ã¸ã§ã¯ããä½æããæã®ã¿å®è¡ï¼
+
+
+âå¶éäºé 
+
+
+CS+ V3.00.00 ã§ã¯ï¼GCCã®LMAãçè§£ã§ããªãï¼ãã®ããï¼ã³ã³ãã¤ã«ãªãã·
+ã§ã³ã« -DOMIT_DATA_INIT ãæå®ãã¦ãï¼ROMãã¼ãããå ´åã¯ãã®å®ç¾©ãå¤
+ãã¦ã³ã³ãã¤ã«ãè¡ãCubeSuite+ä»¥å¤ã®ãããã¬ãä½¿ç¨ãã¦æ¸ãè¾¼ããã¨ï¼
+
+
+âå¤æ´å±¥æ­´
+2014/09/08
+ã»RLIN3 UART ãã©ã¤ãã®ãã¼ããå¤æ´å¯è½ã«ï¼
+
+2014/07/17
+ æ°è¦ä½æ
+
+ä»¥ä¸ 
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/E_PACKAGE
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/E_PACKAGE	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/E_PACKAGE	(revision 172)
@@ -0,0 +1,9 @@
+E_PACKAGE atk2-sc3_hsbrh850f1l_ghs
+VERSION %date
+
+INCLUDE MANIFEST
+INCLUDE ../../MANIFEST
+INCLUDE ../../target/hsbrh850f1l_gcc/MANIFEST
+INCLUDE ../../arch/v850_gcc/MANIFEST
+INCLUDE ../../arch/v850_ghs/MANIFEST
+INCLUDE ../../arch/ghs/MANIFEST
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/MANIFEST	(revision 172)
@@ -0,0 +1,12 @@
+PACKAGE atk2-sc3
+
+E_PACKAGE
+Makefile.target
+MANIFEST
+target.tf
+target_syslog.h
+target_test.h
+target_user.txt
+target_opt.tf
+target_svc.h
+target_mem.tf
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/Makefile.target
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/Makefile.target	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/Makefile.target	(revision 172)
@@ -0,0 +1,163 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.target 187 2015-06-25 03:39:04Z t_ishikawa $
+#
+
+#
+#		Makefile ã®ã¿ã¼ã²ããä¾å­é¨ï¼HSBRH850F1Lç¨ï¼
+#
+
+#
+#  ãã¼ãåã®å®ç¾©
+#
+BOARD = hsbrh850f1l
+
+#
+#  GCCç¨ã®ãã¡ã¤ã«ã®ãã£ã¬ã¯ããª
+#
+TARGETDIR_GCC := $(SRCDIR)/target/$(BOARD)_gcc
+
+#
+#  ã¢ã¼ã­ãã¯ãã£æå®
+#
+ARCH = V850E3V5
+
+#
+#  ã³ã¢æå®
+#
+CORETYPE = RH850G3K
+
+#
+#  ãã¼ãæ¯ã«è¨­å®ãç°ãªãé 
+ç®
+#
+
+CDEFS := $(CDEFS) -DTOPPERS_LABEL_ASM
+CFG1_OUT_LDSCRIPT = $(SRCDIR)/arch/v850_ghs/rh850_f1l_1m.ld
+
+
+#
+#  åããã¡ã¤ã«ããã£ãå ´åã«ARMCCä¾å­é¨ã®ãã¡ã¤ã«ãä½¿ç¨ããããã«ããã«ï¼
+#  GCCä¾å­é¨ã®ãã¡ã¤ã«ãå¾ã§æå®ããï¼
+#
+INCLUDES := $(INCLUDES) -I$(TARGETDIR) -I$(TARGETDIR_GCC)
+
+#
+#  ãµãã¼ãå½ä»¤æ¯ã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+# ãã¼ãã«
+COPTS := $(COPTS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIR := $(KERNEL_DIR) $(TARGETDIR) $(TARGETDIR_GCC)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS) target_config.o tauj_hw_counter.o rh850_f1l.o
+
+#
+#  ã·ã¹ãã ã¿ã¤ãã«é¢ããè¨­å®
+#
+ifeq ($(ENABLE_SYS_TIMER),true)
+      CDEFS := $(CDEFS) -DTOPPERS_ENABLE_SYS_TIMER
+      KERNEL_COBJS := $(KERNEL_COBJS) taua_timer.o
+endif
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSMOD_DIR := $(SYSMOD_DIR) $(TARGETDIR) $(TARGETDIR_GCC)
+SYSMOD_COBJS := $(SYSMOD_COBJS) uart_rlin.o
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³è¨­å®
+#
+ifeq ($(findstring target_timer,$(CFGNAME)),target_timer)
+  CFGNAME := $(CFGNAME) taua_timer
+endif
+ifeq ($(findstring target_serial,$(CFGNAME)),target_serial)
+  CFGNAME := $(CFGNAME) uart
+endif
+
+#
+#  ä¾å­é¢ä¿ã®å®ç¾©
+#
+Os_Lcfg.timestamp: $(TARGETDIR)/target.tf
+$(OBJFILE): $(TARGETDIR)/target_mem.tf
+offset.h: $(TARGETDIR_GCC)/target_offset.tf
+
+#
+#  ãªãã»ãããã¡ã¤ã«çæã®ããã®å®ç¾©
+#
+OFFSET_TF := $(TARGETDIR_GCC)/target_offset.tf
+
+#
+#  ãã­ã»ããµä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/arch/v850_ghs/Makefile.prc
+
+#
+#  å®è¡ã¢ã¸ã¥ã¼ã«ã®ã­ã¼ãï¼å®è¡
+#
+run: $(OBJNAME).exe
+	@sh $(SRCDIR)/arch/v850_gcc/autorun/exe.sh $(SRCDIR) $(TARGET)
+
+urun: $(OBJNAME).exe
+	@sh $(SRCDIR)/arch/v850_gcc/autorun/exe.sh $(SRCDIR) $(TARGET) &
+	@ruby $(SRCDIR)/arch/v850_gcc/autorun/com_port.rb
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target.tf	(revision 172)
@@ -0,0 +1,154 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target.tf 164 2015-06-03 01:22:29Z t_ishikawa $
+$
+
+$FUNCTION HOOK_ERRORCHECK_MOD$
+    $IF (MOD.OSAPID[ARGV[1]] != TDOM_KERNEL) &&
+        (MOD.OSAPID[ARGV[1]] != TDOM_NONE) &&
+        !OSAP.TRUSTED[MOD.OSAPID[ARGV[1]]] && 
+        !MOD.EXPORT[ARGV[1]]$
+        $ERROR$
+            OsMemoryModuleExport of OsMemoryModule $MOD.MODULE[ARGV[1]]$ must be true.$NL$
+        $END$
+    $END$
+$END$
+
+$FUNCTION HOOK_ERRORCHECK_SEC$
+    $IF !EQ(SEC.OSAPID[ARGV[1]], "") &&
+        (SEC.OSAPID[ARGV[1]] != TDOM_KERNEL) &&
+        !OSAP.TRUSTED[SEC.OSAPID[ARGV[1]]] &&
+        !SEC.EXPORT[ARGV[1]]$
+        $ERROR$
+            OsMemorySectionExport of OsMemorySection $SEC.SECTION[ARGV[1]]$ must be true.$NL$
+        $END$
+    $END$
+$END$
+
+$ 
+$  arch/gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $TAB$.vector : AT(0) {$NL$
+    $TAB$$TAB$*("*.reset.text")$NL$
+    $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+	$TAB$.call_table_data ALIGN (4) :$NL$
+	$TAB${$NL$
+	$TAB$PROVIDE(__ctbp = .);$NL$
+	$TAB$$TAB$*(.call_table_data)$NL$
+	$TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+	$NL$
+	$TAB$.call_table_text :$NL$
+	$TAB${$NL$
+	$TAB$$TAB$*(.call_table_text)$NL$
+	$TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$ 
+$TARGET_PAGE_SIZE_STR = 16$
+$TARGET_SEC_ALIGN_STR = 16$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = { ".text",  "\"*.text\"",  "\"*.text.*\"" }$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = { ".rodata",  "\"*.rodata\"",  "\"*.rodata.*\"" }$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = { ".data",  "\"*.data\"",  "\"*.data.*\"" }$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = { ".bss",  "\"*.bss\"",  "\"*.bss.*\"", "COMMON" }$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = { ".rosdata",  "\"*.rosdata\"",  "\"*.rosdata.*\"" }$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = { ".sdata",  "\"*.sdata\"",  "\"*.sdata.*\"" }$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = { ".sbss",  "\"*.sbss\"",  "\"*.sbss.*\"", "SMALLCOMMON" }$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$
+$  ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "v850_ghs/prc.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_mem.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_mem.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_mem.tf	(revision 172)
@@ -0,0 +1,66 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$ =====================================================================
+
+$FUNCTION START_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("___start_", ARGV[1]))$
+$END$
+
+$FUNCTION LIMIT_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("___limit_", ARGV[1]))$
+$END$
+
+$INCLUDE "v850_gcc/prc_mem.tf"$
+
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_opt.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_opt.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_opt.tf	(revision 172)
@@ -0,0 +1,116 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+$INCLUDE "cfg2_out.tf"$
+
+$ 
+$  arch/v850_gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $TAB$.vector : AT(0) {$NL$
+    $TAB$$TAB$*("*.reset.text")$NL$
+    $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$ 
+$TARGET_PAGE_SIZE_STR = 16$
+$TARGET_SEC_ALIGN_STR = 16$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = { ".text",  "\"*.text\"",  "\"*.text.*\"" }$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = { ".rodata",  "\"*.rodata\"",  "\"*.rodata.*\"" }$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = { ".data",  "\"*.data\"",  "\"*.data.*\"" }$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = { ".bss",  "\"*.bss\"",  "\"*.bss.*\"", "COMMON" }$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = { ".rosdata",  "\"*.rosdata\"",  "\"*.rosdata.*\"" }$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = { ".sdata",  "\"*.sdata\"",  "\"*.sdata.*\"" }$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = { ".sbss",  "\"*.sbss\"",  "\"*.sbss.*\"", "SMALLCOMMON" }$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$FUNCTION START_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("___start_", ARGV[1]))$
+$END$
+
+$FUNCTION LIMIT_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("___limit_", ARGV[1]))$
+$END$
+
+$INCLUDE "v850_ghs/prc_opt.tf"$
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_svc.h	(revision 172)
@@ -0,0 +1,62 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+
+#ifndef TOPPERS_TARGET_SVC_H
+#define TOPPERS_TARGET_SVC_H
+
+#include "v850_ghs/prc_svc.h"
+
+#endif /* TOPPERS_TARGET_SVC_H */
+
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_syslog.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_syslog.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_syslog.h	(revision 172)
@@ -0,0 +1,65 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_syslog.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ã·ã¹ã­ã°æ©è½ã®ãã­ã»ããµä¾å­é¨
+ */
+
+#ifndef TOPPERS_TARGET_SYSLOG_H
+#define TOPPERS_TARGET_SYSLOG_H
+
+#include "v850_gcc/prc_syslog.h"
+
+#endif /* TOPPERS_TARGET_SYSLOG_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_test.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_test.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_test.h	(revision 172)
@@ -0,0 +1,87 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_test.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼FL-850/F1Lç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_TEST_H
+#define TOPPERS_TARGET_TEST_H
+
+/*
+ *  sample1ã§ä½¿ç¨ããã¢ã©ã¼ã ã®å¨æï¼ç´1ç§ï¼
+ */
+#define COUNTER_MIN_CYCLE	((uint32) 8000000)
+
+/*
+ *  sample1ã§ä½¿ç¨ããä¾å¤
+ */
+#define RAISE_CPU_EXCEPTION		Asm("trap 0x6")     /* FIXME */
+
+#endif /* TOPPERS_TARGET_TEST_H */
Index: /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/hsbrh850f1l_ghs/target_user.txt	(revision 172)
@@ -0,0 +1,161 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼FL-850/F1Lã¿ã¼ã²ããä¾å­é¨(GHSç)ããã¥ã¢ã«ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯FL-850/F1Lã¿ã¼ã²ããä¾å­é¨ã®æ
+å ±ãè¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: target_user.txt 164 2015-06-03 01:22:29Z t_ishikawa $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+FL-850/F1Lã¿ã¼ã²ããä¾å­é¨ï¼FL-850/F1Lä¾å­é¨ï¼ã¯ï¼ã«ããµã¹ã¨ã¬ã¯ãã­ã
+ã¯ã¹ç¤¾ã®RH850/F1Lãæ­è¼ãããã»ã©ã»ãã¯ãã­ã¸ã¼ã®FL-850/F1L-176-Sããµãã¼
+ããã¦ããï¼
+
+
+âåä½ç¢ºèªãã¼ã¸ã§ã³
+
+åä½ç¢ºèªãè¡ã£ãã³ã³ãã¤ã©ã®ãã¼ã¸ã§ã³ã¯ãã­ã»ããµä¾å­é¨ã®ã¦ã¼ã¶ã¼ãã
+ã¥ã¢ã«ã«è¨è¼ãã¦ããï¼
+
+
+âã­ã°åºå
+
+ã­ã°åºåã®ããï¼RLIN3ã®ãã¼ã5ãä½¿ç¨ããï¼
+
+ãã¼ã¿ãã©ã¼ãããã¯ï¼
+
+ã»115200bpsããã¼ã¿8bitãããªãã£ãªããã¹ããã1bitããã­ã¼å¶å¾¡ãªã
+
+ã§ããï¼
+
+
+âãµã³ãã«ãã­ã°ã©ã ã§ç¨ããã¿ã¤ã
+
+ã»ãµã³ãã«ãã­ã°ã©ã ã«ã¦ï¼TAUJ0, TAUJ1ãä½¿ç¨ï¼
+ã»1åã®ã«ã¦ã³ã¿ã«2ã¤ã®ã¿ã¤ããä½¿ç¨ãã¦ããï¼
+    å·®åã¿ã¤ãï¼ç®çã®æéãè¨­å®ããæã®ç¾å¨æé(ç¾å¨å¤ã¿ã¤ã)ã¨æ¬¡ã®æº
+    äºæéã¨ã®ç¸å¯¾æéãã«ã¦ã³ããããã¨ã§ç®çã®çµ¶å¯¾æéã«æºäºãããã¨
+    ã¨ãã.
+        count mode:count down once
+    ç¾å¨å¤ã¿ã¤ãï¼ã«ã¦ã³ã¿å¨æåã®ãã¼ã¹ã¿ã¤ããå®ç¾(çµ¶å¯¾æéãã«ã¦ã³ã)
+        count mode:continuous count down
+ã»ä½¿ç¨ã«ã¦ã³ã¿æ
+å ±
+    ã«ã¦ã³ã¿åï¼MAIN_HW_COUNTER
+        å·®åã¿ã¤ãï¼TAUJ0
+        ç¾å¨å¤ã¿ã¤ãï¼TAUJ1
+        1ãã£ãã¯å½ããã®ç§æ°ï¼1/TIMER_CLOCK_HZ
+
+
+âãã«ãç°å¢
+
+ãã«ãç°å¢ã¯Windowsä¸ã®Cygwinãä½¿ç¨ããï¼Cygwinã«ã¯æä½éä»¥ä¸ã®ããã±
+ã¼ã¸ãã¤ã³ã¹ãã¼ã«ããå¿
+è¦ãããï¼
+
+ ã»make
+ ã»perl
+ 
+Makefileã®éå½¢ã¯sampleä»¥ä¸ã®ãã®ã§ã¯ãªãï¼ ./arch/v850_ghs/Makefile.sample 
+ãsampleä»¥ä¸ã«Makefileã¨ãã¦ã³ãã¼ãã¦ä½¿ç¨ãããã¨ï¼
+
+----- ããããè¿½è¨ -----
+arch/v850_ghs/Makefile.sample ã sample/Makefile ã«ã³ãã¼ãããã¨ã®
+ãã«ãæé ã¯ï¼atk2-sc1ã®doc/user.txtããåç
+§ãã ããï¼
+----- ããã¾ã§è¿½è¨ -----
+ 
+âãããã°ç°å¢
+
+åä½ç¢ºèªã¯CS+ã§å®æ½ããï¼CS+ã®è¨­å®æ¹æ³ã¯æ¬¡ã®éãã§ããï¼
+
+ 1) CubeSuite+ãèµ·å
+ 2) æ°è¦ãã­ã¸ã§ã¯ããä½æï¼
+    ã¡ãã¥ã¼ãã[ãã¡ã¤ã«] â [æ°è¦ä½æ] â [æ°ãããã­ã¸ã§ã¯ããä½æ]ãé¸æ
+ 3) ãã­ã¸ã§ã¯ãã®ä½æ
+  ãã­ã¸ã§ã¯ãä½æãã¤ã¢ã­ã°å
+ã§ä»¥ä¸ã®è¨­å®ããã¾ãã
+   [1] ãã¤ã¯ã­ã³ã³ãã­ã¼ã©        ï¼RH850ãé¸æ
+   [2] ä½¿ç¨ãããã¤ã¯ã­ã³ã³ãã­ã¼ã©ï¼R7F701035xAFP
+   [3] ãã­ã¸ã§ã¯ãã®ç¨®é¡          ï¼ãããã¯å°ç¨
+   [4] ãã­ã¸ã§ã¯ãå              ï¼ä»»æ
+   [5] ä½æå ´æ                    ï¼ä»»æ
+   [6] OKãé¸æ
+   ä¸è¨[5]ã§æå®ãããã©ã«ãå
+ã«ãã­ã¸ã§ã¯ãå.mtpjãã¡ã¤ã«ãä½æãããï¼
+ 4) ãããã¯ãã¼ã«ã®é¸æ
+   [1] ç»é¢å·¦å´ããªã¼å
+ã®RH850ã·ã¥ãã¬ã¼ã¿ãé¸æãå³ã¯ãªãã¯
+   [2] ä½¿ç¨ãããããã¯ãã¼ã«ãé¸æ
+   [3] æ¥ç¶ç¨è¨­å®ã®ã¿ããé¸æ
+   [4] ã¡ã¤ã³ã»ã¯ã­ãã¯å¨æ³¢æ° ã« 8 ãæå®
+ 5) ãã¦ã³ã­ã¼ããã¡ã¤ã«ã®è¨­å®
+   [1] ç»é¢å³å´ã®ã¿ããã[ãã¦ã³ã­ã¼ãã»ãã¡ã¤ã«è¨­å®]ãé¸æ
+   [2] ç»é¢å³å´ã®ãã¦ã³ã­ã¼ããããã¡ã¤ã«ãé¸æ
+   [3] é¸æè¡å³ç«¯[...]ãå·¦ã¯ãªãã¯
+   [4] ãã¦ã³ã­ã¼ãã»ãã¤ã¢ã­ã°å
+ã§[è¿½å ]ãã¿ã³ãé¸æ
+   [5] ãã¦ã³ã­ã¼ãã»ãã¡ã¤ã«æ
+å ±ã®ãã¡ã¤ã«ãé¸æå¾[...]ãå·¦ã¯ãªãã¯
+   [6] ãã¦ã³ã­ã¼ããã¡ã¤ã«ã¯[atk2-sc3.exe]ãé¸æ
+   [7] OKãé¸æ
+ 6) ãã¡ã¤ã«ããã¦ã³ã­ã¼ã
+   [1] ã¿ã¼ã²ãããã¼ãã®é»æºãON
+   [2] ã¡ãã¥ã¼ãã[ãããã¯]â[ãããã¯ã»ãã¼ã«ã¸ãã¦ã³ã­ã¼ã]ãé¸æ
+ 7) ãã­ã°ã©ã ã®å®è¡
+   [1] ã¡ãã¥ã¼ãã[ãããã¯]â[ãªã¹ã¿ã¼ã]ãé¸æ
+      ã¿ã¼ããã«ç»é¢ã«[Input Command:]ã¨è¡¨ç¤ºãåºãã°æ­£å¸¸ã«åä½ãã¦ãã ï¼
+ ä¸è¨æé ã® 2)ã5)ã¯æ°è¦ã«ãã­ã¸ã§ã¯ããä½æããæã®ã¿å®è¡ï¼
+
+
+âå¤æ´å±¥æ­´
+2015/06/26
+ SC3å¯¾å¿
+ 
+ä»¥ä¸ 
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/MANIFEST	(revision 172)
@@ -0,0 +1,31 @@
+PACKAGE atk2-sc3
+
+MANIFEST
+Makefile.target
+rh850f1h_pb.h
+start.S
+target.tf
+target_cfg1_out.h
+target_config.c
+target_config.h
+target_hw_counter.arxml
+target_hw_counter.h
+target_hw_counter.yaml
+target_kernel.h
+target_mem.arxml
+target_mem.h
+target_mem.tf
+target_mem.yaml
+target_mem_pe1only.yaml
+target_mem_pe1only.arxml
+target_mpu.h
+target_offset.tf
+target_opt.tf
+target_serial.arxml
+target_serial.h
+target_serial.yaml
+target_svc.h
+target_syslog.h
+target_sysmod.h
+target_test.h
+target_user.txt
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/Makefile.target
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/Makefile.target	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/Makefile.target	(revision 172)
@@ -0,0 +1,171 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.target 35 2014-07-17 14:00:37Z ertl-honda $
+#
+
+#
+#		Makefile ã®ã¿ã¼ã²ããä¾å­é¨ï¼RH850F1H_PBç¨ï¼
+#
+
+#
+#  ãã¼ãåã®å®ç¾©
+#
+BOARD = RH850F1H_PB
+
+#
+#  GNUéçºç°å¢ã®ã¿ã¼ã²ããã¢ã¼ã­ãã¯ãã£ã®å®ç¾©
+#
+GCC_TARGET = v850-elf
+
+#
+#  ã¢ã¼ã­ãã¯ãã£æå®
+#
+ARCH = V850E3V5
+
+#
+#  ã³ã¢ã¿ã¤ãæå®
+#
+CORETYPE = RH850G3M
+
+#
+#  ãã¼ããã­ã¼ããä½¿ç¨ããã
+#
+USE_HARD_FLOAT = true
+
+#
+#  ãã¼ãæ¯ã«è¨­å®ãç°ãªãé 
+ç®
+#
+CDEFS := $(CDEFS) -DTOPPERS_LABEL_ASM -DOMIT_DATA_INIT
+CFG1_OUT_LDSCRIPT = $(SRCDIR)/arch/v850_gcc/rh850_f1h_6m.ld
+
+#
+#  ä½¿ç¨ããUARTã®ãã¼ã
+#
+CDEFS := $(CDEFS) -DRLIN3x_USE_PORT0
+#CDEFS := $(CDEFS) -DRLIN3x_USE_PORT1
+
+#
+#  ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+INCLUDES := $(INCLUDES) -I$(TARGETDIR)
+
+#
+#  ãµãã¼ãå½ä»¤æ¯ã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+# ãã¼ãã«
+COPTS := $(COPTS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIR := $(KERNEL_DIR) $(TARGETDIR)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS) target_config.o rh850_f1h.o tauj_hw_counter.o
+
+#
+#  ã·ã¹ãã ã¿ã¤ãã«é¢ããè¨­å®
+#
+ifeq ($(ENABLE_SYS_TIMER),true)
+      CDEFS := $(CDEFS) -DTOPPERS_ENABLE_SYS_TIMER
+      KERNEL_COBJS := $(KERNEL_COBJS) taua_timer.o
+endif
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSMOD_DIR := $(SYSMOD_DIR) $(TARGETDIR)
+SYSMOD_COBJS := $(SYSMOD_COBJS) uart_rlin.o
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³è¨­å®
+#
+ifeq ($(findstring target_timer,$(CFGNAME)),target_timer)
+  CFGNAME := $(CFGNAME) taua_timer
+endif
+ifeq ($(findstring target_serial,$(CFGNAME)),target_serial)
+  CFGNAME := $(CFGNAME) uart
+endif
+
+#
+#  ä¾å­é¢ä¿ã®å®ç¾©
+#
+Os_Lcfg.timestamp: $(TARGETDIR)/target.tf
+$(OBJFILE): $(TARGETDIR)/target_mem.tf
+offset.h: $(TARGETDIR)/target_offset.tf
+
+#
+#  ãªãã»ãããã¡ã¤ã«çæã®ããã®å®ç¾©
+#
+OFFSET_TF := $(TARGETDIR)/target_offset.tf
+
+#
+#  ãã­ã»ããµä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/arch/v850_gcc/Makefile.prc
+
+#
+#  å®è¡ã¢ã¸ã¥ã¼ã«ã®ã­ã¼ãï¼å®è¡
+#
+run: $(OBJNAME).exe
+	@sh $(SRCDIR)/arch/v850_gcc/autorun/exe.sh $(SRCDIR) $(TARGET)
+
+urun: $(OBJNAME).exe
+	@sh $(SRCDIR)/arch/v850_gcc/autorun/exe.sh $(SRCDIR) $(TARGET) &
+	@ruby $(SRCDIR)/arch/v850_gcc/autorun/com_port.rb
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/rh850f1h_pb.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/rh850f1h_pb.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/rh850f1h_pb.h	(revision 172)
@@ -0,0 +1,120 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: fl850f1l.h 35 2014-07-17 14:00:37Z ertl-honda $
+ */
+/*
+ *		RH850F1H_PBãã¼ãã®å®ç¾©
+ */
+
+#ifndef TOPPERS_RH850F1H_PB_H
+#define TOPPERS_RH850F1H_PB_H
+
+#include "v850_gcc/rh850_f1h.h"
+
+/*
+ *  PLLé¢é£ã®å®ç¾©
+ */
+#define MAINOSC_CLOCK_MHZ	16    /* Main OSC is 16MHz */
+
+#define PLL0_CLK_MHZ	120 /* PLL is 120MHz */
+
+/* PPLLCLK(120MHz)=16MHz x (Nr(60)/Mr(2)) X 1/Pr(4) */
+#define PLL0C_FVV 2  /* åæå¤ */
+#define PLL0C_MF  0  /* åæå¤ */
+#define PLL0C_ADJ 0  /* åæå¤ */
+#define PLL0C_MD  0  /* PLLã¢ã¼ã */
+#define PLL0C_SMD 0  /* åæå¤ */
+#define PLL0C_M   1  /* Fx:16Mhz, Mr=2 */
+#define PLL0C_P   2  /* 80ã120MHz,Pr=4 */
+#define PLL0C_N  59  /* Nr=60 */
+
+#define PLL1_CLK_MHZ		80  /* PLL is 80MHz */
+
+/* PPLLCLK(120MHz)=16MHz x (Nr(40)/Mr(2)) X 1/Pr(4) */
+#define PLL1C_M   1  /* Fx:16Mhz, Mr=2 */
+#define PLL1C_PA  2  /* 60ã80MHz,Pr=4 */ 
+#define PLL1C_N  39  /* Nr=40 */
+
+/*
+ *  Port 10 Configration for RLIN30
+ *   P10_10 : RLIN30TX
+ *   P10_9  : RLIN30RX
+ */
+#define RLIN30_P10_MASK			((uint16) 0x0600)
+#define RLIN30_PM10_INIT		((uint16) 0x0200)
+#define RLIN30_PFC10_INIT		((uint16) 0x0600)
+#define RLIN30_PFCE10_INIT		((uint16) 0x0000)
+#define RLIN30_PFCAE10_INIT		((uint16) 0x0000)
+#define RLIN30_PMC10_INIT		((uint16) 0x0600)
+#define RLIN30_PIBC10_INIT		((uint16) 0x0200)
+
+/*
+ *  Port 0 Configration for RLIN31
+ *   P0_5  : RLIN31TX
+ *   P0_4  : RLIN31RX
+ */
+#define RLIN31_P0_MASK			((uint16) 0x0030)
+#define RLIN31_PM0_INIT			((uint16) 0x0010)
+#define RLIN31_PFC0_INIT		((uint16) 0x0000)
+#define RLIN31_PFCE0_INIT		((uint16) 0x0000)
+#define RLIN31_PFCAE0_INIT		((uint16) 0x0000)
+#define RLIN31_PMC0_INIT		((uint16) 0x0030)
+#define RLIN31_PIBC0_INIT		((uint16) 0x0010)
+
+#endif /* TOPPERS_FL850F1L_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/start.S
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/start.S	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/start.S	(revision 172)
@@ -0,0 +1,322 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: start.S 43 2014-07-19 15:33:29Z ertl-honda $
+ */
+
+/*
+ *		ã«ã¼ãã«å¯¾å¿ã®ã¹ã¿ã¼ãã¢ããã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ */
+
+#define OMIT_INCLUDE_OS_CFG		/* Os_Cfg.hã¤ã³ã¯ã«ã¼ãææ­¢ */
+
+#include <v850asm.inc>
+
+    /* =begin modified for SC3 */
+	.section .text_kernel
+	.align  4
+	.global __start
+    .extern _bsssecinib_table
+    .extern _tnum_bsssec
+    .extern _datasecinib_table
+    .extern _tnum_datasec
+    .extern _syscall_table
+    /* =end modified for SC3 */
+__start:
+	di                                  /* å²ãè¾¼ã¿ç¦æ­¢ */
+	/*
+	 * åç¨®ãã¤ã³ã¿ã®åæå(SP/TP/EP/GP/CTBP)
+	 */
+	Lea     __ostkpt, r3
+	ld.w    0[r3], r3
+	Lea		__tp, tp 
+	Lea     __ep, ep
+	Lea     __gp, gp
+	Lea     __ctbp, r6
+	ldsr    r6, 20
+    /* =begin modified for SC3 */
+    /*
+     *  syscallã®åä½è¨­å®
+     */
+    mov     SYSCALL_SIZE, r6
+    ldsr    r6, 11, 1
+    Lea     _syscall_table, r6
+    ldsr    r6, 12, 1
+    syncp
+
+    /* =end modified for SC3 */
+
+#ifdef TOPPERS_USE_HFLOAT
+	/* 
+	 *  FPUãæå¹ã«
+	 */
+	stsr psw, r12       /* load psw */
+	mov  0x00010000,r13 /* PSW.CU0(PSW[16]) = 1 */
+	or   r13, r12
+	ldsr r12, psw       /* store psw */
+#endif /* TOPPERS_USE_HFLOAT */
+
+	/* permit local ram access */
+	mov 0xfffee600, r20 -- PEG #0 base
+	mov 0x0001, r21 -- PEGG1SP val / All SPID is permit
+	mov 0xffffffff, r22 -- PEGG1MK val / All Address Masked
+	mov 0x00000077, r23 -- PEGG1BA val / Enable, Read/Write permit, Non-Lock, Base=0
+
+	st.h    r21, 0x0c[r20]   -- set PEGGSP
+	st.w    r22, 0x80[r20]   -- set PEGG1MK
+	st.w    r23, 0x84[r20]   -- set PEGG1BA
+
+	-- Store completion barrier
+	ld.w    0x84[r20], r0
+	syncp
+
+	/*
+	 *  hardware_init_hook ã®å¼åºãï¼0 ã§ãªãå ´åï¼
+	 *
+	 *  ã¿ã¼ã²ãããã¼ãã¦ã§ã¢ã«ä¾å­ãã¦å¿
+è¦ãªåæåå¦çãããå ´å
+	 *  ã¯ï¼hardware_init_hook ã¨ããé¢æ°ãç¨æããï¼
+	 */
+
+	Lea     _hardware_init_hook, r1
+	cmp     r0, r1
+	be      hardware_init_hook_end
+#ifdef __v850e3v5__
+	jarl    [r1], lp
+#else /* __v850e3v5__ */
+	jarl    _hardware_init_hook, lp
+#endif /* __v850e3v5__ */
+
+hardware_init_hook_end:
+    /* =begin modified for SC3 */
+	/*
+	 *  BSSã»ã¯ã·ã§ã³åæå
+     *  r0: ã¼ã­ã¬ã¸ã¹ã¿
+	 */
+    mov     r0, r6                  /* r6: ãã¼ãã«ã®ã¤ã³ããã¯ã¹ i */
+    Lea     _tnum_bsssec, r7
+    ld.w    0[r7], r7               /* r7: ãã¼ãã«ã®è¦ç´ æ° num */
+    Lea     _bsssecinib_table, r8   /* r8: ãã¼ãã«ã®ã¢ãã¬ã¹ */
+bss_clear_start:
+    cmp     r7, r6                  /* ã«ã¼ãçµäºæ¡ä»¶: i >= num */
+    bnl     bss_clear_end
+    ld.w    0[r8], ep               /* ep: bssã®å
+é ­çªå° */
+    ld.w    4[r8], r9               /* r9: bssã®çµäºçªå° */
+	cmp     r9, ep                  /* bssãç©ºãï¼ */
+	bnl 	bss_clear_start_hook    /* ç©ºãªãã°æ¬¡ã®bssã¸ */
+    nop
+bss_clear_body:
+    /*
+     *  bssã®é åã¯ï¼4byteå¢çã«ã¢ã©ã¤ã³ããã¦ãã
+     *  ãã£ã¦ï¼4byteãã¤ãã¼ã¿ãã³ãã¼ãã¦ãã
+     */
+	sst.w   r0, 0[ep]           /* bssã®é åã0ã§åæå */
+	add     4, ep              /* æ¬¡ã®çªå°ã¸ */
+	cmp     r9, ep              /* bssã®çµäºçªå°ã¾ã§æ¥ããï¼ */
+	bl      bss_clear_body      /* çµäºçªå°ã§ãªããã°ã«ã¼ã */
+#ifdef BSSSEC_ALIGN_MASK
+    /*
+     *  å¢çã«ãªãã¾ã§åæåãç¶ãã
+     */
+    mov     BSSSEC_ALIGN_MASK, r10
+bss_clear_body2:
+    tst     r10, ep         /* ep & 0xf == 0 ? */
+    bz      bss_clear_start_hook
+	sst.w	r0, 0[ep]       /* 0åæå */
+    add     4, ep
+    jr      bss_clear_body2
+#endif /* BSSSEC_ALIGN_MASK */
+    nop
+bss_clear_start_hook:
+    add     8, r8 /* ãã¼ãã«ã®ã¢ãã¬ã¹ãã¤ã³ã¯ãªã¡ã³ã 4byte * 2 -> 8 */
+    add     1, r6 /* ãã¼ãã«ã®ã¤ã³ããã¯ã¹ãã¤ã³ã¯ãªã¡ã³ã: i++ */
+    br      bss_clear_start
+    nop
+bss_clear_end:
+
+#ifndef OMIT_DATA_INIT
+	/*
+	 *  dataã»ã¯ã·ã§ã³ã®åæåï¼ROMåå¯¾å¿ï¼
+	 *
+	 */
+    mov     r0, r6                  /* r6: ãã¼ãã«ã®ã¤ã³ããã¯ã¹ i */
+    Lea     _tnum_datasec, r7
+    ld.w    0[r7], r7               /* r7: ãã¼ãã«ã®è¦ç´ æ° num */
+    Lea     _datasecinib_table, r8  /* r8: ãã¼ãã«ã®ã¢ãã¬ã¹ */
+FLABEL(data_init_start)
+    cmp     r7, r6                  /* ã«ã¼ãçµäºæ¡ä»¶: i >= num */
+    bnl     data_init_end
+    ld.w    0[r8], ep               /* ep : dataã®å
+é ­çªå° */
+    ld.w    4[r8], r9               /* r9 : dataã®çµäºçªå° */
+    ld.w    8[r8], r2               /* r2: idataã®çµäºçªå° */
+	cmp     r9, ep                  /* dataãç©ºãï¼ */
+	bnl 	data_init_start_hook    /* ç©ºãªãã°æ¬¡ã®dataã¸ */
+    nop
+FLABEL(data_init_body)
+	ld.b	0[r2], r10      /* idataã®å¤ãã­ã¼ã */
+	sst.b	r10, 0[ep]      /* idataã®å¤ãdataã®ã¢ãã¬ã¹ã¸ã¹ãã¢ */
+	add		1, ep           /* dataã®æ¬¡ã®çªå°ã¸ */
+	add		1, r2           /* idataã®æ¬¡ã®çªå°ã¸ */
+    cmp     r9, ep          /* dataã®çµäºçªå°ã¾ã§æ¥ããï¼ */
+    bl      data_init_body  /* çµäºçªå°ã§ãªããã°ã«ã¼ã */
+#ifdef DATASEC_ALIGN_MASK
+    /*
+     *  å¢çã«ãªãã¾ã§åæåãç¶ãã
+     */
+    mov     DATASEC_ALIGN_MASK, r10
+FLABEL(data_init_body2)
+    tst     r10, ep         /* ep & 0xf == 0 ? */
+    bz      data_init_start_hook
+	sst.b	r0, 0[ep]       /* 0åæå */
+    add     1, ep
+    jr      data_init_body2
+#endif /* DATASEC_ALIGN_MASK */
+    nop
+FLABEL(data_init_start_hook)        
+    add     12, r8  /* ãã¼ãã«ã®ã¢ãã¬ã¹ãã¤ã³ã¯ãªã¡ã³ã 4byte * 3 -> 12 */
+    add     1, r6   /* ãã¼ãã«ã®ã¤ã³ããã¯ã¹ãã¤ã³ã¯ãªã¡ã³ã: i++ */
+	br		data_init_start         
+    nop
+FLABEL(data_init_end)
+#endif /* OMIT_DATA_INIT */
+    /* =end modified for SC3 */
+	/*
+	 *  software_init_hook ãå¼åºãï¼0 ã§ãªãå ´åï¼
+	 *
+	 *  ã½ããã¦ã§ã¢ç°å¢ï¼ç¹ã«ã©ã¤ãã©ãªï¼ã«ä¾å­ãã¦å¿
+è¦ãªåæåå¦
+	 *  çãããå ´åã¯ï¼software_init_hook ã¨ããé¢æ°ãç¨æããã°
+	 *  ããï¼
+	 */
+	Lea     _software_init_hook, r1
+	cmp     r0, r1
+	be      software_init_hook_end
+#ifdef __v850e3v5__
+	jarl    [r1], lp
+#else /* __v850e3v5__ */
+	jarl    _software_init_hook, lp
+#endif /* __v850e3v5__ */
+
+software_init_hook_end:
+
+
+	/*
+	 *  ã«ã¼ãã«ãèµ·åããï¼
+	 */
+	jarl    _target_hardware_initialize, r31
+	jarl    _main, r31
+	halt
+#if defined(PE2_ONLY) || defined(PE1_ONLY) 
+	jarl    __non_use_pe_start, r31
+
+	.section .non_use_pe_rom
+	.align  4
+	.global  __non_use_pe_start
+ __non_use_pe_start:
+	nop
+#ifdef PE2_ONLY
+	/* IBDxxx ã®åæå */
+	mov 0x00010002, r2
+
+	/* RLIN30 */
+	mov 0xFFFFB88C, r3
+	st.w r2, 0[r3]
+
+	/* RLIN31 */
+	mov 0xFFFFB9E8, r3
+	st.w r2, 0[r3]
+
+	/* TAUJ0I0 */
+	mov 0xFFFFB940, r3
+	st.w r2, 0[r3]
+	/* TAUJ1I0 */
+	mov 0xFFFFBAA0, r3
+	st.w r2, 0[r3]
+#endif /* PE2_ONLY */
+
+	/* permit local ram access */
+	mov 0xfffee600, r20 -- PEG #0 base
+	mov 0x0001, r21 -- PEGG1SP val / All SPID is permit
+	mov 0xffffffff, r22 -- PEGG1MK val / All Address Masked
+	mov 0x00000077, r23 -- PEGG1BA val / Enable, Read/Write permit, Non-Lock, Base=0
+
+	st.h    r21, 0x0c[r20]   -- set PEGGSP
+	st.w    r22, 0x80[r20]   -- set PEGG1MK
+	st.w    r23, 0x84[r20]   -- set PEGG1BA
+
+	-- Store completion barrier
+	ld.w    0x84[r20], r0
+	syncp
+
+__non_use_pe_start_1:
+	halt
+	br   __non_use_pe_start_1
+
+#endif /* defined(PE2_ONLY) || defined(PE1_ONLY) */
+
+	.end
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target.tf	(revision 172)
@@ -0,0 +1,127 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target.tf 35 2014-07-17 14:00:37Z ertl-honda $
+$
+
+$
+$     ãã¹2ã®ã¿ã¼ã²ããä¾å­ãã³ãã¬ã¼ãï¼RH850F1H_PBç¨ï¼
+$
+
+$ 
+$  arch/gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $TAB$.vector : AT(0) {$NL$
+    $TAB$$TAB$*("*.reset.text")$NL$
+    $TAB$$TAB$. += 1;$NL$
+    $TAB$$TAB$. = ALIGN(16);$NL$
+    $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$  
+$TARGET_PAGE_SIZE_STR = 16$
+$TARGET_SEC_ALIGN_STR = 16$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = "*.text *.text.*"$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = "*.rodata *.rodata.*"$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = "*.data *.data.*"$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = "*.bss *.bss.* COMMON"$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = "*.rosdata"$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = "*.sdata"$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = "*.sbss *.scommon"$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$
+$  ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "v850_gcc/prc.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_cfg1_out.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_cfg1_out.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_cfg1_out.h	(revision 172)
@@ -0,0 +1,82 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_cfg1_out.h 35 2014-07-17 14:00:37Z ertl-honda $
+ */
+
+/*
+ *		cfg1_out.cããªã³ã¯ããããã«å¿
+è¦ãªã¹ã¿ãã®å®ç¾©
+ */
+
+/*
+ *  ã³ã¢ä¾å­ã®ã¹ã¿ãã®å®ç¾©
+ */
+#include "v850_gcc/prc_cfg1_out.h"
+void
+target_hardware_initialize(void)
+{
+}
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_config.c
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_config.c	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_config.c	(revision 172)
@@ -0,0 +1,358 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_config.c 42 2014-07-19 07:10:58Z ertl-honda $
+ */
+
+/*
+ *		ã¿ã¼ã²ããä¾å­ã¢ã¸ã¥ã¼ã«ï¼RH850F1H_PBç¨ï¼
+ */
+
+#include "kernel_impl.h"
+#include "v850_gcc/uart_rlin.h"
+#include "v850_gcc/prc_sil.h"
+#include "target_sysmod.h"
+#ifdef ENABLE_RETURN_MAIN
+#include "interrupt.h"
+#endif /* ENABLE_RETURN_MAIN */
+#ifdef TOPPERS_ENABLE_TRACE
+#include "logtrace/trace_config.h"
+#endif /* TOPPERS_ENABLE_TRACE */
+
+/*
+ *  æå­åã®åºå
+ */
+void
+target_fput_str(const char8 *c)
+{
+	while (*c != '\0') {
+		uart_putc(*c);
+		c++;
+	}
+	uart_putc('\n');
+}
+
+
+/*
+ *  ãã¼ãã®åæè¨­å®
+ */
+void
+target_port_initialize(void)
+{
+	uint16 wk;
+
+#ifdef RLIN3x_USE_PORT0
+	/*
+	 * PORT10(RLIN30)
+	 */
+	/* PFC10 è¨­å® */
+	wk = sil_reh_mem((void *) PFC(10));
+	wk &= ~RLIN30_P10_MASK;
+	wk |= (RLIN30_PFC10_INIT & RLIN30_P10_MASK);
+	sil_wrh_mem((void *) PFC(10), wk);
+
+	/* PFCE10 è¨­å® */
+	wk = sil_reh_mem((void *) PFCE(10));
+	wk &= ~RLIN30_P10_MASK;
+	wk |= (RLIN30_PFCE10_INIT & RLIN30_P10_MASK);
+	sil_wrh_mem((void *) PFCE(10), wk);
+
+	/* PFCAE10 è¨­å® */
+	wk = sil_reh_mem((void *) PFCAE(10));
+	wk &= ~RLIN30_P10_MASK;
+	wk |= (RLIN30_PFCAE10_INIT & RLIN30_P10_MASK);
+	sil_wrh_mem((void *) PFCAE(10), wk);
+
+	/* PM1 è¨­å® */
+	wk = sil_reh_mem((void *) PM(10));
+	wk &= ~RLIN30_P10_MASK;
+	wk |= (RLIN30_PM10_INIT & RLIN30_P10_MASK);
+	sil_wrh_mem((void *) PM(10), wk);
+
+	/* PMC10 è¨­å® */
+	wk = sil_reh_mem((void *) PMC(10));
+	wk &= ~RLIN30_P10_MASK;
+	wk |= (RLIN30_PMC10_INIT & RLIN30_P10_MASK);
+	sil_wrh_mem((void *) PMC(10), wk);
+
+	/* PIBC10 è¨­å® */
+	wk = sil_reh_mem((void *) PIBC(10));
+	wk &= ~RLIN30_P10_MASK;
+	wk |= (RLIN30_PIBC10_INIT & RLIN30_P10_MASK);
+	sil_wrh_mem((void *) PIBC(10), wk);
+
+#elif defined(RLIN3x_USE_PORT1)
+
+	/*
+	 * PORT0(RLIN31)
+	 */
+	/* PFC0 è¨­å® */
+	wk = sil_reh_mem((void *) PFC(0));
+	wk &= ~RLIN31_P0_MASK;
+	wk |= (RLIN31_PFC0_INIT & RLIN31_P0_MASK);
+	sil_wrh_mem((void *) PFC(0), wk);
+
+	/* PFCE0 è¨­å® */
+	wk = sil_reh_mem((void *) PFCE(0));
+	wk &= ~RLIN31_P0_MASK;
+	wk |= (RLIN31_PFCE0_INIT & RLIN31_P0_MASK);
+	sil_wrh_mem((void *) PFCE(0), wk);
+
+	/* PFCAE0 è¨­å® */
+	wk = sil_reh_mem((void *) PFCAE(0));
+	wk &= ~RLIN31_P0_MASK;
+	wk |= (RLIN31_PFCAE0_INIT & RLIN31_P0_MASK);
+	sil_wrh_mem((void *) PFCAE(0), wk);
+
+	/* PM1 è¨­å® */
+	wk = sil_reh_mem((void *) PM(0));
+	wk &= ~RLIN31_P0_MASK;
+	wk |= (RLIN31_PM0_INIT & RLIN31_P0_MASK);
+	sil_wrh_mem((void *) PM(0), wk);
+
+	/* PMC0 è¨­å® */
+	wk = sil_reh_mem((void *) PMC(0));
+	wk &= ~RLIN31_P0_MASK;
+	wk |= (RLIN31_PMC0_INIT & RLIN31_P0_MASK);
+	sil_wrh_mem((void *) PMC(0), wk);
+
+	/* PIBC0 è¨­å® */
+	wk = sil_reh_mem((void *) PIBC(0));
+	wk &= ~RLIN31_P0_MASK;
+	wk |= (RLIN31_PIBC0_INIT & RLIN31_P0_MASK);
+	sil_wrh_mem((void *) PIBC(0), wk);
+
+#else
+
+#error define RLIN3x_USE_PORT0 or RLIN3x_USE_PORT1
+
+#endif /* RLIN3x_USE_PORT0 */
+}
+
+/*
+ *  ã¯ã­ãã¯é¢ä¿ã®åæå
+ */
+void
+target_clock_initialize(void)
+{
+	uint32	errcnt = 0;
+
+	/* Init Main Clock */
+	if (EnableMainOSC(MHz(MAINOSC_CLOCK_MHZ)) != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	/* Init PLL0 */
+	if (EnablePLL0() != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	/* Init PLL1 */
+	if (EnablePLL1() != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	/* Set RLIN Clock */
+	if (SetClockSelection(CKSC_ILINS_CTL, CKSC_ILINS_ACT,
+					  PNO_CtrlProt1, 0x02, /* MainOSC */
+					  CKSC_ILIND_CTL, CKSC_ILIND_ACT,
+					  0x01) != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	/* Set TAUJ Clock */
+	if (SetClockSelection(CKSC_ATAUJS_CTL, CKSC_ATAUJS_ACT,
+						  PNO_CtrlProt0, 0x02, /* MainOSC */
+						  CKSC_ATAUJD_CTL, CKSC_ATAUJD_ACT,
+						  0x02 /* MainOSC/2 */
+						  ) != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	/*
+	 * Set CPU Clock
+	 * èµ·åæã®å¾
+ã¡åããã«ä½¿ç¨ããããæå¾ã«è¨­å®ãããã¨ï¼ 
+	 */
+	if (SetClockSelection(CKSC_CPUCLKS_CTL, CKSC_CPUCLKS_ACT,
+					  PNO_CtrlProt1, 0x03, /* 120MHz CPLLCLK */
+					  CKSC_CPUCLKD_CTL, CKSC_CPUCLKD_ACT,
+					  0x01) != UC_SUCCESS) {
+		errcnt++;
+	}
+
+	if (errcnt > 0) {
+		infinite_loop();
+	}
+}
+
+extern void _reset(void);
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®ãã¼ãã¦ã§ã¢ã®åæå
+ *  ã¹ã¿ã¼ã¢ããã«ã¼ãã³ããå¼ã³åºãããï¼ 
+ */
+void
+target_hardware_initialize(void)
+{
+#ifdef INIT_IBD_FOR_PE2
+	/* PE2ç¨ã®IBDã®è¨­å® */
+	/* RLIN31 */
+	sil_wrw_mem((void*)0xFFFFB9E8, 0x00010002);
+	/* TAUJ1I0 */
+	sil_wrw_mem((void*)0xFFFFBAA0, 0x00010002);
+#endif /* INIT_IBD_FOR_PE2 */
+
+#ifndef OMIT_CLOCK_INIT
+	/* ã¯ã­ãã¯ã®åæè¨­å® */
+	target_clock_initialize();
+#else
+	/* ã¯ã­ãã¯åæåå¾
+ã¡ */
+	while(sil_rew_mem((void *)CKSC_CPUCLKS_CTL) != 0x03){}
+#endif /* !OMIT_CLOCK_INIT */
+
+	/* ãªã»ãããã¯ã¿ã®åæå */
+	__LDSR(2,1,(unsigned int)_reset);
+
+	/* ãã¼ãã®åæè¨­å® */
+	target_port_initialize();
+}
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®åæå
+ */
+void
+target_initialize(void)
+{
+	/*
+	 *  V850ä¾å­ã®åæå
+	 */
+	prc_initialize();
+
+
+
+#ifdef TOPPERS_ENABLE_TRACE
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°æ©è½ã®åæå
+	 */
+	trace_initialize((uintptr) (TRACE_AUTOSTOP));
+#endif /* TOPPERS_ENABLE_TRACE */
+}
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®çµäºå¦ç
+ */
+void
+target_exit(void)
+{
+#ifdef TOPPERS_ENABLE_TRACE
+	/*
+	 *  ãã¬ã¼ã¹ã­ã°ã®ãã³ã
+	 */
+	trace_dump(target_fput_log);
+#endif /* TOPPERS_ENABLE_TRACE */
+
+#ifndef ENABLE_RETURN_MAIN
+	/*
+	 *  ã·ã£ãããã¦ã³å¦çã®åºå
+	 */
+	target_fput_str("Kernel Exit...");
+#else
+	target_fput_str("Kernel Shutdown...");
+#endif /* ENABLE_RETURN_MAIN */
+
+	/*
+	 *  RH850F1H_PBä¾å­ã®çµäºå¦ç
+	 */
+	prc_terminate();
+
+#ifdef ENABLE_RETURN_MAIN
+	p_ctxosap = NULL;
+	kerflg = FALSE;
+	except_nest_cnt = 0U;
+	nested_lock_os_int_cnt = 0U;
+    sus_all_cnt = 0U;
+    sus_os_cnt = 0U;
+
+	/* ã¹ã¿ãã¯ãã¤ã³ã¿ã®åæåã¨main()ã®å¼ã³åºã */
+	return_main();
+#endif /* ENABLE_RETURN_MAIN */
+
+	infinite_loop();
+}
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®æå­åºå
+ */
+void
+target_fput_log(char8 c)
+{
+	if (c == '\n') {
+		uart_putc('\r');
+	}
+	uart_putc(c);
+}
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_config.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_config.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_config.h	(revision 172)
@@ -0,0 +1,123 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_config.h 35 2014-07-17 14:00:37Z ertl-honda $
+ */
+
+/*
+ *		ã¿ã¼ã²ããä¾å­ã¢ã¸ã¥ã¼ã«ï¼RH850F1H_PBç¨ï¼
+ *
+ *  ã«ã¼ãã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«
+ *  kernel_impl.hã®ã¿ã¼ã²ããä¾å­é¨ã®ä½ç½®ä»ãã¨ãªã
+ */
+
+#ifndef TOPPERS_TARGET_CONFIG_H
+#define TOPPERS_TARGET_CONFIG_H
+
+#include "target/rh850f1h_pb_gcc/target_mpu.h"
+
+/*
+ *  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ */
+#ifdef TOPPERS_ENABLE_TRACE
+#include "logtrace/trace_config.h"
+#endif /* TOPPERS_ENABLE_TRACE */
+
+#ifndef TOPPERS_MACRO_ONLY
+
+extern void target_hardware_initialize(void);
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ä¾å­ã®åæå
+ */
+extern void target_initialize(void);
+
+/*
+ *  ã¿ã¼ã²ããã·ã¹ãã ã®çµäº
+ *  ã·ã¹ãã ãçµäºããæã«ä½¿ã
+ */
+extern void target_exit(void) NoReturn;
+
+/*
+ *  æå­åã®åºå
+ */
+extern void target_fput_str(const char8 *c);
+
+/*
+ *  ãããã¯ç¨LEDåºå
+ */
+extern void fl850_led_output(uint8 pattern);
+
+#define TARGET_SVC_TABLE	PRC_SVC_TABLE
+
+#endif /* TOPPERS_MACRO_ONLY */
+
+/*
+ *  ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«ï¼V850ç¨ï¼
+ */
+#include "v850_gcc/prc_config.h"
+
+#endif /* TOPPERS_TARGET_CONFIG_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.arxml	(revision 172)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>target_hw_counter.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>TRUSTED_OSAP_for_MAIN_HW_COUNTER</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppCounterRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppIsrRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/C2ISR_for_MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>MAIN_HW_COUNTER</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsCounter</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMaxAllowedValue</DEFINITION-REF>
+									<VALUE>536870911</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterMinCycle</DEFINITION-REF>
+									<VALUE>4000</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterTicksPerBase</DEFINITION-REF>
+									<VALUE>10</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-FLOAT-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsSecondsPerTick</DEFINITION-REF>
+									<VALUE>1.25e-07</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterType</DEFINITION-REF>
+									<VALUE>HARDWARE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsCounter/OsCounterIsrRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/C2ISR_for_MAIN_HW_COUNTER</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>C2ISR_for_MAIN_HW_COUNTER</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsIsr</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptNumber</DEFINITION-REF>
+									<VALUE>HWC_DTIM_INTNO</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptPriority</DEFINITION-REF>
+									<VALUE>HWC_DTIM_INTPRI</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrCategory</DEFINITION-REF>
+									<VALUE>CATEGORY_2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-ENUMERATION-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsIsr/OsIsrInterruptSource</DEFINITION-REF>
+									<VALUE>ENABLE</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.h	(revision 172)
@@ -0,0 +1,241 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2014 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2014 by Spansion LLC, USA
+ *  Copyright (C) 2014 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_hw_counter.h 35 2014-07-17 14:00:37Z ertl-honda $
+ */
+
+/*
+ *		ãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼fl850f1lç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_HW_COUNTER_H
+#define TOPPERS_TARGET_HW_COUNTER_H
+
+#include "rh850_f1h.h"
+
+/*
+ *  ä½¿ç¨ããã¿ã¤ãã¼ã®ã¦ãããçªå·ã¨å·®åã¿ã¤ãã¨ç¾å¨å¤ã¿ã¤ãã®ãã£ãã«
+ */
+#ifdef HWC_USE_UNIT0
+
+#define HWC_DTIM_UNIT  0  /* 0 or 1 */
+#define HWC_DTIM_ID    0
+#define HWC_CTIM_UNIT  0  /* 0 or 1 */
+#define HWC_CTIM_ID    1
+
+#elif defined(HWC_USE_UNIT1)
+
+#define HWC_DTIM_UNIT  1  /* 0 or 1 */
+#define HWC_DTIM_ID    0
+#define HWC_CTIM_UNIT  1  /* 0 or 1 */
+#define HWC_CTIM_ID    1
+
+#endif /* HWC_USE_UNIT0 */
+
+/*
+ *  å²è¾¼ã¿çªå·
+ */
+#if (HWC_DTIM_UNIT == 0)
+#define HWC_DTIM_INTNO  (TAUFJ0I0_INTNO + HWC_DTIM_ID)
+#elif (HWC_DTIM_UNIT == 1)
+#define HWC_DTIM_INTNO  (TAUFJ1I0_INTNO + HWC_DTIM_ID)
+#else /*(HWC_DTIM_UNIT == 1) */
+#error define HWC_UNIT  0 or 1.
+#endif /* (HWC_DTIM_UNIT == 0) */
+
+/*
+ *  å²è¾¼ã¿åªå
+åº¦
+ */
+#if (HWC_DTIM_UNIT == 0)
+#define HWC_DTIM_INTPRI  2
+#elif (HWC_DTIM_UNIT == 1)
+#define HWC_DTIM_INTPRI  1
+#else /*(HWC_DTIM_UNIT == 1) */
+#error define HWC_UNIT  0 or 1.
+#endif /* (HWC_DTIM_UNIT == 0) */
+
+/*
+ *  ã¿ã¤ãã¯ã­ãã¯å¨æ³¢æ°ï¼Hzï¼ï¼8MHzï¼
+ */
+#define TIMER_CLOCK_HZ		((uint32) 8000000)
+
+/*
+ *  TAUJé¢é£ã¬ã¸ã¹ã¿
+ */
+#define TAUJ_BASE(n)	((uint32) (0xffe50000U + (n * 0x1000U)))
+#define TAUJTPS(n)		(TAUJ_BASE(n) + 0x90U)
+#define TAUJCDR(n, ch)	(TAUJ_BASE(n) + (ch * 0x04U))
+#define TAUJCNT(n, ch)	(TAUJ_BASE(n) + 0x10U + (ch * 0x04U))
+#define TAUJCMOR(n, ch)	(TAUJ_BASE(n) + 0x80U + (ch * 0x04U))
+#define TAUJCMUR(n, ch)	(TAUJ_BASE(n) + 0x20U + (ch * 0x04U))
+#define TAUJTS(n)		(TAUJ_BASE(n) + 0x54U)
+#define TAUJTT(n)		(TAUJ_BASE(n) + 0x58U)
+
+#define MCU_TAUJ_MASK_CK0				((uint16) 0xfff0)
+#define MCU_TAUJ_CK0_0					((uint16) 0x0000) /* åå¨ãªã */
+#define MCU_TAUJ00_CMOR					((uint16) 0x0000)
+#define MCU_TAUJ00_CMUR					((uint8) 0x01)
+
+/*
+ *  TAUJã®ã¦ãããçªå·ã¨ãã£ãã«ããå
+¥åå²è¾¼ã¿çªå·ã¸ã®å¤æ
+ */
+#define TAUJ_INTNO(n, ch)	(n == 0)? ((uint32) ((TAUFJ0I0_INTNO + ch))) : ((uint32) (TAUFJ1I0_INTNO + ch))
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+LOCAL_INLINE void
+HwcounterClearInterrupt(uint32 intno)
+{
+	/* å²è¾¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	/* å²è¾¼ã¿è¦æ±ãããã®ã¯ãªã¢ */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) & ~EIRFn);
+}
+
+/*
+ *  å²è¾¼ã¿ç¦æ­¢ï¼è¨±å¯è¨­å®
+ */
+LOCAL_INLINE void
+HwcounterDisableInterrupt(uint32 intno)
+{
+	/* å²è¾¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	/* å²è¾¼ã¿ãã¹ã¯ãããã®ã»ãã */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) | EIMKn);
+}
+
+LOCAL_INLINE void
+HwcounterEnableInterrupt(uint32 intno)
+{
+	/* å²è¾¼ã¿å¶å¾¡ã¬ã¸ã¹ã¿ */
+	uint32 eic_address = EIC_ADDRESS(intno);
+
+	/* å²è¾¼ã¿ãã¹ã¯ãããã®ã»ãã */
+	sil_wrh_mem((void *) eic_address,
+				sil_reh_mem((void *) eic_address) & ~EIMKn);
+}
+
+/*
+ *  TAUJn ã¿ã¤ãã®åä½éå§ï¼åæ­¢å¦ç
+ */
+LOCAL_INLINE void
+SetTimerStartTAUJ(uint8 n, uint8 ch)
+{
+	/* ã¿ã¤ãéå§å¦ç */
+	sil_wrh_mem((void *) TAUJTS(n), (1 << ch));
+}
+
+LOCAL_INLINE void
+SetTimerStopTAUJ(uint8 n, uint8 ch)
+{
+	/* ã¿ã¤ãåæ­¢å¦ç */
+	sil_wrh_mem((void *) TAUJTT(n), (1 << ch));
+}
+
+/*
+ *  TAUJnãã¼ãã¦ã§ã¢ã«ã¦ã³ã¿ç¾å¨ãã£ãã¯å¤åå¾
+ */
+LOCAL_INLINE TickType
+GetCurrentTimeTAUJ(uint8 n, uint8 ch, TickType maxval)
+{
+	TickType	count;
+	TickType	curr_time = 0U;
+
+	count = sil_rew_mem((void *) (TAUJCNT(n, ch)));
+
+	/* ãã¦ã³ã«ã¦ã³ã¿ã®çºï¼ç¾å¨ããã¯å¤ã«å¤æ */
+	curr_time = maxval - count;
+	curr_time = (curr_time % maxval);
+
+	return(curr_time);
+}
+
+
+/* MAIN_HW_COUNTERã®å®ç¾© */
+extern void init_hwcounter_MAIN_HW_COUNTER(TickType maxval, TimeType nspertick);
+extern void start_hwcounter_MAIN_HW_COUNTER(void);
+extern void stop_hwcounter_MAIN_HW_COUNTER(void);
+extern void set_hwcounter_MAIN_HW_COUNTER(TickType exprtick);
+extern TickType get_hwcounter_MAIN_HW_COUNTER(void);
+extern void cancel_hwcounter_MAIN_HW_COUNTER(void);
+extern void trigger_hwcounter_MAIN_HW_COUNTER(void);
+extern void int_clear_hwcounter_MAIN_HW_COUNTER(void);
+extern void int_cancel_hwcounter_MAIN_HW_COUNTER(void);
+extern void increment_hwcounter_MAIN_HW_COUNTER(void);
+
+/*
+ *  10msã¨ä¸è´ãããã£ãã¯å¤(ãµã³ãã«ãã­ã°ã©ã ç¨)
+ */
+#define TICK_FOR_10MS	TIMER_CLOCK_HZ / 100
+
+#endif /* TOPPERS_TARGET_HW_COUNTER_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_hw_counter.yaml	(revision 172)
@@ -0,0 +1,93 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJISOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: target_hw_counter.yaml 35 2014-07-17 14:00:37Z ertl-honda $
+#
+
+Ecuc:
+  Os:
+    OsInclude:
+      OsIncludeFileName: target_hw_counter.h
+    TRUSTED_OSAP_for_MAIN_HW_COUNTER:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsAppCounterRef:
+        - /Ecuc/Os/MAIN_HW_COUNTER
+      OsAppIsrRef:
+        - /Ecuc/Os/C2ISR_for_MAIN_HW_COUNTER
+    MAIN_HW_COUNTER:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 0x1FFFFFFF
+      OsCounterMinCycle: 4000
+      OsCounterTicksPerBase: 10
+      OsSecondsPerTick: 1.25e-07  # 1.0/TIMER_CLOCK_HZ
+      OsCounterType: HARDWARE
+      OsCounterIsrRef: /Ecuc/Os/C2ISR_for_MAIN_HW_COUNTER
+    C2ISR_for_MAIN_HW_COUNTER:
+      DefinitionRef: OsIsr
+      OsIsrInterruptNumber: HWC_DTIM_INTNO
+      OsIsrInterruptPriority: HWC_DTIM_INTPRI
+      OsIsrCategory: CATEGORY_2
+      OsIsrInterruptSource: ENABLE
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_kernel.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_kernel.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_kernel.h	(revision 172)
@@ -0,0 +1,108 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2016 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_kernel.h 35 2014-07-17 14:00:37Z ertl-honda $
+ */
+
+/*
+ *		Os.hã®ã¿ã¼ã²ããä¾å­é¨ï¼RH850F1H_PBç¨ï¼
+ *
+ *  ãã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«ã¯ï¼Os.hã§ã¤ã³ã¯ã«ã¼ãããã
+ *  ä»ã®ãã¡ã¤ã«ããç´æ¥ã¤ã³ã¯ã«ã¼ããããã¨ã¯ãªã
+ */
+
+#ifndef TOPPERS_TARGET_KERNEL_H
+#define TOPPERS_TARGET_KERNEL_H
+
+#include "rh850f1h_pb.h"
+
+/* ãã§ãã¯ç¨ã¿ã¹ã¯ã¹ã¿ãã¯ãµã¤ãºã®æå°å¤ã®å®ç¾© */
+#define TARGET_MIN_STKSZ	196
+
+/* ãã§ãã¯ç¨éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯æå°å¤ã®å®ç¾© */
+#define MINIMUM_OSTKSZ	256
+
+/* åã¹ã¿ãã¯ãµã¤ãºã®ããã©ã«ãå¤ã®å®ç¾©*/
+#define DEFAULT_TASKSTKSZ	(1024U) /* 1K bytes */
+#define DEFAULT_TASKSYSTEMSTKSZ			(1024U) /* 1K bytes */
+#define DEFAULT_ISRSTKSZ	(1024U) /* 1K bytes */
+#define DEFAULT_ISRSYSTEMSTKSZ			(1024U) /* 1K bytes */
+#define DEFAULT_HOOKSTKSZ	(1024U) /* 1K bytes */
+#define DEFAULT_TRUSTEDFUNCTIONSTKSZ	(128U)  /* 128 bytes */
+#define DEFAULT_OSSTKSZ		(8192U) /* 8K bytes */
+
+/* ã³ã³ãã­ã¹ãã®ä¿å­å¾©å¸°ã«PUSHSP/POPSPãä½¿ç¨ */
+#define TOPPERS_USE_PUSHSP
+
+/*
+ *  ãã­ã»ããµã§å
+±éãªå®ç¾©
+ */
+#include "v850_gcc/prc_kernel.h"
+
+#define TARGET_SVC_NUM	(PRC_SVC_NUM)
+
+#endif /* TOPPERS_TARGET_KERNEL_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.arxml	(revision 172)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>target_mem.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>INTROM_PE1</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionStartAddress</DEFINITION-REF>
+									<VALUE>0</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionSize</DEFINITION-REF>
+									<VALUE>4*1024*1024</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionName</DEFINITION-REF>
+									<VALUE>INTROM_PE1</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>INTROM_PE2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionStartAddress</DEFINITION-REF>
+									<VALUE>8388608</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionSize</DEFINITION-REF>
+									<VALUE>2*1024*1024</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionName</DEFINITION-REF>
+									<VALUE>INTROM_PE2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>INTRAM</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionStartAddress</DEFINITION-REF>
+									<VALUE>4273799168</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionSize</DEFINITION-REF>
+									<VALUE>192*1024</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionName</DEFINITION-REF>
+									<VALUE>INTRAM</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>INTRAM2</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionWriteable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionStartAddress</DEFINITION-REF>
+									<VALUE>268435456</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-INTEGER-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionSize</DEFINITION-REF>
+									<VALUE>192*1024</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemoryRegion/OsMemoryRegionName</DEFINITION-REF>
+									<VALUE>INTRAM2</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.h	(revision 172)
@@ -0,0 +1,65 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+#ifndef _TOPPERS_TARGET_MEM_H_
+#define _TOPPERS_TARGET_MEM_H_
+
+/*
+ *  ã¡ã¢ãªãªã¼ã¸ã§ã³ã«é¢ããå®ç¾©
+ */
+
+#include "target_mpu.h"
+
+#endif /* _TOPPERS_TARGET_MEM_H_ */
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.tf	(revision 172)
@@ -0,0 +1,58 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$ =====================================================================
+
+$INCLUDE "v850_gcc/prc_mem.tf"$
+
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem.yaml	(revision 172)
@@ -0,0 +1,94 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJISOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  AUTOSARï¼AUTomotive Open System ARchitectureï¼ã¯ï¼AUTOSARä»æ§ã«åºã¥
+#  ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«
+#  ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: target_mem.yaml 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+Ecuc:
+  Os:
+    OsInclude:
+      OsIncludeFileName: target_mem.h
+    INTROM_PE1:
+      DefinitionRef: OsMemoryRegion
+      OsMemoryRegionWriteable: false
+      OsMemoryRegionStartAddress: 0
+      OsMemoryRegionSize: 4*1024*1024
+      OsMemoryRegionName: INTROM_PE1
+    INTROM_PE2:
+      DefinitionRef: OsMemoryRegion
+      OsMemoryRegionWriteable: false
+      OsMemoryRegionStartAddress: 0x00800000
+      OsMemoryRegionSize: 2*1024*1024
+      OsMemoryRegionName: INTROM_PE2
+    INTRAM:
+      DefinitionRef: OsMemoryRegion
+      OsMemoryRegionWriteable: true
+      OsMemoryRegionStartAddress: 0xFEBD0000
+      OsMemoryRegionSize: 192*1024
+      OsMemoryRegionName: INTRAM
+    INTRAM2:
+      DefinitionRef: OsMemoryRegion
+      OsMemoryRegionWriteable: true
+      OsMemoryRegionStartAddress: 0x10000000
+      OsMemoryRegionSize: 192*1024
+      OsMemoryRegionName: INTRAM2
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem_pe1only.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem_pe1only.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem_pe1only.arxml	(revision 172)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>STANDARDREGION</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion</DEFINITION-REF>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion/OsStandardMemoryRomRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/INTROM_PE1</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsStandardMemoryRegion/OsStandardMemoryRamRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/INTRAM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>NON_USE_PE_ROM</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionName</DEFINITION-REF>
+									<VALUE>.non_use_pe_rom</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionWriteable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionReadable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExecutable</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionShort</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionCacheable</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionDevice</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionExport</DEFINITION-REF>
+									<VALUE>false</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsMemorySection/OsMemorySectionMemoryRegionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">INTROM_PE2</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+						</ECUC-CONTAINER-VALUE>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>TRUSTED_OSAP_for_NON_USE_PE_ROM</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-NUMERICAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsTrusted</DEFINITION-REF>
+									<VALUE>true</VALUE>
+								</ECUC-NUMERICAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+							<REFERENCE-VALUES>
+								<ECUC-REFERENCE-VALUE>
+									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsAppMemorySectionRef</DEFINITION-REF>
+									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/NON_USE_PE_ROM</VALUE-REF>
+								</ECUC-REFERENCE-VALUE>
+							</REFERENCE-VALUES>
+							<SUB-CONTAINERS>
+								<ECUC-CONTAINER-VALUE>
+									<SHORT-NAME>OsApplicationHooks</SHORT-NAME>
+									<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks</DEFINITION-REF>
+									<PARAMETER-VALUES>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppErrorHook</DEFINITION-REF>
+											<VALUE>false</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppShutdownHook</DEFINITION-REF>
+											<VALUE>false</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+										<ECUC-NUMERICAL-PARAM-VALUE>
+											<DEFINITION-REF DEST="ECUC-BOOLEAN-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsApplication/OsApplicationHooks/OsAppStartupHook</DEFINITION-REF>
+											<VALUE>false</VALUE>
+										</ECUC-NUMERICAL-PARAM-VALUE>
+									</PARAMETER-VALUES>
+								</ECUC-CONTAINER-VALUE>
+							</SUB-CONTAINERS>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem_pe1only.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem_pe1only.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mem_pe1only.yaml	(revision 172)
@@ -0,0 +1,92 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  AUTOSARï¼AUTomotive Open System ARchitectureï¼ã¯ï¼AUTOSARä»æ§ã«åºã¥
+#  ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«
+#  ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: target_mem.yaml 164 2015-06-03 01:22:29Z t_ishikawa $
+#
+
+# æ¨æºã¡ã¢ãªãªã¼ã¸ã§ã³ãPE1ã«é
+ç½®ãã
+# PE2ãåæ­¢ãããããã®ã³ã¼ããPE2ã®ROMã«é
+ç½®ãã
+
+Ecuc:
+  Os:
+    STANDARDREGION:
+      DefinitionRef: OsStandardMemoryRegion
+      OsStandardMemoryRomRegionRef: /Ecuc/Os/INTROM_PE1
+      OsStandardMemoryRamRegionRef: /Ecuc/Os/INTRAM
+    NON_USE_PE_ROM:
+      DefinitionRef: OsMemorySection
+      OsMemorySectionName: .non_use_pe_rom
+      OsMemorySectionMemoryRegionRef: INTROM_PE2
+      OsMemorySectionWriteable: false
+      OsMemorySectionReadable: true
+      OsMemorySectionExecutable: true
+      OsMemorySectionShort: false
+      OsMemorySectionCacheable: false
+      OsMemorySectionDevice: false
+      OsMemorySectionExport: false
+    TRUSTED_OSAP_for_NON_USE_PE_ROM:
+      DefinitionRef: OsApplication
+      OsTrusted: true
+      OsApplicationHooks:
+        OsAppErrorHook: false
+        OsAppShutdownHook: false
+        OsAppStartupHook: false
+      OsAppMemorySectionRef:
+        - /Ecuc/Os/NON_USE_PE_ROM
+      
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mpu.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mpu.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_mpu.h	(revision 172)
@@ -0,0 +1,76 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+/*
+ *	MPUãã©ã¤ã
+ */
+
+#ifndef TOPPERS_TARGET_MPU_H
+#define TOPPERS_TARGET_MPU_H
+
+#define TNUM_MPU_REG 16
+#define TARGET_MPM_CONFIG (0x101U)
+#define USE_MPU_SRPW_DATA
+#define USE_MPU_SRPW_SDATA
+#define USE_MPU_PR_TEXT
+#define USE_MPU_PR_SDATA
+#define USE_MPU_PRW_DATA
+#define USE_MPU_PRW_SDATA
+#define USE_MPU_SRW_DATA_SDATA
+#define USE_MPU_SR_TEXT
+#define USE_MPU_SR_DATA_SDATA
+
+#include "v850_gcc/prc_mpu.h"
+
+#endif /* TOPPERS_TARGET_MPU_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_offset.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_offset.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_offset.tf	(revision 172)
@@ -0,0 +1,82 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target_offset.tf 35 2014-07-17 14:00:37Z ertl-honda $
+$
+
+$
+$       ãªãã»ãããã¡ã¤ã«çæç¨ãã³ãã¬ã¼ããã¡ã¤ã«ï¼RH850F1H_PBç¨ï¼
+$
+
+$
+$  æ¨æºãã³ãã¬ã¼ããã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "kernel/genoffset.tf"$
+
+$
+$  ã³ã¢ä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ãï¼V850ç¨ï¼
+$
+$INCLUDE "v850_gcc/prc_offset.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_opt.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_opt.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_opt.tf	(revision 172)
@@ -0,0 +1,108 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+$INCLUDE "cfg2_out.tf"$
+
+$ 
+$  arch/v850_gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $TAB$.vector : AT(0) {$NL$
+    $TAB$$TAB$*(.vectors)$NL$
+    $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$  
+$TARGET_PAGE_SIZE_STR = 16$
+$TARGET_SEC_ALIGN_STR = 16$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = "*.text *.text.*"$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = "*.rodata *.rodata.*"$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = "*.data *.data.*"$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = "*.bss *.bss.* COMMON"$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = "*.rosdata"$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = "*.sdata"$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = "*.sbss *.scommon"$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$INCLUDE "v850_gcc/prc_opt.tf"$
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.arxml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.arxml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.arxml	(revision 172)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="EUC-JP"?>
+<!-- Generated by ABREX Ver. 1.1.0 -->
+<AUTOSAR xmlns="http://autosar.org/schema/r4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd">
+	<AR-PACKAGES>
+		<AR-PACKAGE>
+			<SHORT-NAME>Ecuc</SHORT-NAME>
+			<ELEMENTS>
+				<ECUC-MODULE-CONFIGURATION-VALUES>
+					<SHORT-NAME>Os</SHORT-NAME>
+					<DEFINITION-REF DEST="ECUC-MODULE-DEF">/AUTOSAR/EcucDefs/Os</DEFINITION-REF>
+					<ECUC-DEF-EDITION>4.2.0</ECUC-DEF-EDITION>
+					<IMPLEMENTATION-CONFIG-VARIANT>VARIANT-PRE-COMPILE</IMPLEMENTATION-CONFIG-VARIANT>
+					<CONTAINERS>
+						<ECUC-CONTAINER-VALUE>
+							<SHORT-NAME>OsInclude</SHORT-NAME>
+							<DEFINITION-REF DEST="ECUC-PARAM-CONF-CONTAINER-DEF">/AUTOSAR/EcucDefs/Os/OsInclude</DEFINITION-REF>
+							<PARAMETER-VALUES>
+								<ECUC-TEXTUAL-PARAM-VALUE>
+									<DEFINITION-REF DEST="ECUC-STRING-PARAM-DEF">/AUTOSAR/EcucDefs/Os/OsInclude/OsIncludeFileName</DEFINITION-REF>
+									<VALUE>target_serial.h</VALUE>
+								</ECUC-TEXTUAL-PARAM-VALUE>
+							</PARAMETER-VALUES>
+						</ECUC-CONTAINER-VALUE>
+					</CONTAINERS>
+				</ECUC-MODULE-CONFIGURATION-VALUES>
+			</ELEMENTS>
+		</AR-PACKAGE>
+	</AR-PACKAGES>
+</AUTOSAR>
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.h	(revision 172)
@@ -0,0 +1,101 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJISOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_serial.h 62 2014-09-08 12:19:38Z ertl-honda $
+ */
+
+/*
+ *		ã·ãªã¢ã«I/Oããã¤ã¹ï¼SIOï¼ãã©ã¤ãï¼RH850F1H_PBç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_SERIAL_H
+#define TOPPERS_TARGET_SERIAL_H
+
+/*
+ *   ãã¼ã¬ã¼ãã¬ã¸ã¹ã¿ã¸ã®è¨­å®å¤ MainOSC=16MHz, 115200bps
+ */
+#define RLIN3xLWBR_VAL   0xf0 /* 1/1 åå¨ */
+#define RLIN3xLBRP01_VAL 8    /* 9(9+1)åå¨  source clock / ããªã¹ã±ã¼ã© / BRP01 / 16*/
+
+/*
+ *  SIOã®å²è¾¼ã¿ãã³ãã©ã®ãã¯ã¿çªå·
+ */
+#ifdef RLIN3x_USE_PORT0
+#define INTNO_SIO	(RLIN30_RX_INTNO)         /* å²è¾¼ã¿çªå· */
+#elif defined(RLIN3x_USE_PORT1)
+#define INTNO_SIO	(RLIN31_RX_INTNO)         /* å²è¾¼ã¿çªå· */
+#else
+#error define RLIN3x_USE_PORT0 or RLIN3x_USE_PORT1
+#endif /* RLIN3x_USE_PORT0 */
+#define INTPRI_SIO	2                       /* å²è¾¼ã¿åªå
+åº¦ */
+
+/*
+ *  ãã­ã»ããµä¾å­ã¢ã¸ã¥ã¼ã«
+ */
+#include "v850_gcc/uart_rlin.h"
+
+#endif /* TOPPERS_TARGET_SERIAL_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_serial.yaml	(revision 172)
@@ -0,0 +1,71 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2014 by Witz Corporation, JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: target_serial.yaml 35 2014-07-17 14:00:37Z ertl-honda $
+#
+
+Ecuc:
+  Os:
+    OsInclude:
+      OsIncludeFileName: target_serial.h
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_svc.h	(revision 172)
@@ -0,0 +1,69 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+
+#ifndef TOPPERS_TARGET_SVC_H
+#define TOPPERS_TARGET_SVC_H
+
+#ifdef USE_CCRH
+/*
+ *  target_config.cããã®ã¤ã³ã¯ã«ã¼ãã¬ã¼ã
+ */
+#include "v850_ccrh/prc_svc.h"
+#else /* USECCRH */
+#include "v850_gcc/prc_svc.h"
+#endif /* USECCRH */
+
+#endif /* TOPPERS_TARGET_SVC_H */
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_syslog.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_syslog.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_syslog.h	(revision 172)
@@ -0,0 +1,65 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2014-2015 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_syslog.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ã·ã¹ã­ã°æ©è½ã®ãã­ã»ããµä¾å­é¨
+ */
+
+#ifndef TOPPERS_TARGET_SYSLOG_H
+#define TOPPERS_TARGET_SYSLOG_H
+
+#include "v850_gcc/prc_syslog.h"
+
+#endif /* TOPPERS_TARGET_SYSLOG_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_sysmod.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_sysmod.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_sysmod.h	(revision 172)
@@ -0,0 +1,107 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_sysmod.h 35 2014-07-17 14:00:37Z ertl-honda $
+ */
+
+/*
+ *		ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã®ã¿ã¼ã²ããä¾å­é¨ï¼RH850F1H_PBç¨ï¼
+ *
+ *  ã·ã¹ãã ã¢ã¸ã¥ã¼ã«ã®ã¿ã¼ã²ããä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ããã¡ã¤ã«
+ *  ãã®ãã¡ã¤ã«ã®å
+å®¹ã¯ï¼ã³ã³ãã¼ãã³ãè¨è¿°ãã¡ã¤ã«ã«è¨è¿°ããï¼
+ *  ãã®ãã¡ã¤ã«ã¯ç¡ããªãè¦è¾¼ã¿
+ */
+#ifndef TOPPERS_TARGET_SYSMOD_H
+#define TOPPERS_TARGET_SYSMOD_H
+
+#include "v850_gcc/prc_sil.h"
+
+/*
+ *  èµ·åã¡ãã»ã¼ã¸ã®ã¿ã¼ã²ããã·ã¹ãã å
+ */
+#if defined(DUAL_PE1)
+#define TARGET_NAME	"RH850F1H_PB_PE1"
+#elif defined(DUAL_PE2)
+#define TARGET_NAME	"RH850F1H_PB_PE2"
+#elif defined(PE1_NM)
+#define TARGET_NAME	"RH850F1H_PE1_NM"
+#elif defined(PE1_VM)
+#define TARGET_NAME	"RH850F1H_PE1_VM"
+#elif defined(PE1_NM_PRI)
+#define TARGET_NAME	"RH850F1H_PE1_NM_PRI"
+#else
+#define TARGET_NAME	"RH850F1H_PB"
+#endif
+
+/*
+ *  ã·ã¹ãã ã­ã°ã®ä½ã¬ãã«åºåã®ããã®æå­åºå
+ *
+ *  ã¿ã¼ã²ããä¾å­ã®æ¹æ³ã§ï¼æå­cãè¡¨ç¤º/åºå/ä¿å­ãã
+ */
+extern void target_fput_log(char8 c);
+
+#endif /* TOPPERS_TARGET_SYSMOD_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_test.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_test.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_test.h	(revision 172)
@@ -0,0 +1,113 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_test.h 35 2014-07-17 14:00:37Z ertl-honda $
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼RH850F1H_PBç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_TEST_H
+#define TOPPERS_TARGET_TEST_H
+
+/*
+ *  sample1ã§ä½¿ç¨ããã¢ã©ã¼ã ã®å¨æï¼ç´1ç§ï¼
+ */
+#define COUNTER_MIN_CYCLE	((uint32) 8000000)
+
+/*
+ *  sample1ã§ä½¿ç¨ããCPUä¾å¤
+ */
+#define RAISE_CPU_EXCEPTION		Asm("trap 0x6" ::: "memory")
+
+/*
+ *  å²è¾¼ã¿ã®çºç
+ */
+LOCAL_INLINE void
+Sample1RaiseInterrupt(InterruptNumberType intno)
+{
+	uint32 eic_address;
+
+	eic_address = EIC_ADDRESS(intno);
+	sil_wrh_mem((void *)eic_address,
+				(sil_reh_mem((void *)eic_address)  | 0x1000));
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+LOCAL_INLINE void
+Sample1ClearIntRequest(InterruptNumberType intno)
+{
+	uint32 eic_address;
+
+	eic_address = EIC_ADDRESS(intno);
+	sil_wrh_mem((void *)eic_address ,
+				(sil_reh_mem((void *)eic_address)  & ~0x1000));
+}
+
+#endif /* TOPPERS_TARGET_TEST_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_gcc/target_user.txt	(revision 172)
@@ -0,0 +1,65 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼RH850F1H_PBã¿ã¼ã²ããä¾å­é¨(GCCç)ããã¥ã¢ã«ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯RH850F1H_PBã¿ã¼ã²ããä¾å­é¨ã®æ
+å ±ãè¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2014-2016 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: target_user.txt 62 2014-09-08 12:19:38Z ertl-honda $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+æ¬ã¿ã¼ã²ããä¾å­é¨ã¯GHSçã®ããã«ç¨æãã¦ãããã®ã§ããï¼GCCçã¨ãã¦ã¯
+ãµãã¼ããã¦ããªãï¼
+
+å¤æ´å±¥æ­´
+2015/04/07
+ã»taget_test.h
+  COUNTER_MIN_CYCLEã®å®ç¾©ãè¿½å ï¼
+ã»Makefile.target
+  ãã¬ã¼ã¹ã­ã°ã®è¨­å®ãåé¤ï¼  
+
+ä»¥ä¸ 
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/E_PACKAGE
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/E_PACKAGE	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/E_PACKAGE	(revision 172)
@@ -0,0 +1,9 @@
+E_PACKAGE atk2-sc3_rh850f1h_pb_ghs
+VERSION %date
+
+INCLUDE MANIFEST
+INCLUDE ../../MANIFEST
+INCLUDE ../../target/rh850f1h_pb_gcc/MANIFEST
+INCLUDE ../../arch/v850_gcc/MANIFEST
+INCLUDE ../../arch/v850_ghs/MANIFEST
+INCLUDE ../../arch/ghs/MANIFEST
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/MANIFEST	(revision 172)
@@ -0,0 +1,13 @@
+PACKAGE atk2-sc3
+
+E_PACKAGE
+MANIFEST
+Makefile.target
+target.tf
+target_test.h
+target_user.txt
+target_opt.tf
+target_svc.h
+target_mem.tf
+sample1.arxml.patch
+readme.txt
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/Makefile.target
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/Makefile.target	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/Makefile.target	(revision 172)
@@ -0,0 +1,238 @@
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+#  $Id: Makefile.target 46 2014-07-19 15:40:08Z ertl-honda $
+#
+
+#
+#		Makefile ã®ã¿ã¼ã²ããä¾å­é¨ï¼FL-850/FL4ç¨ï¼
+#
+
+#
+#  ãã¼ãåã®å®ç¾©
+#
+BOARD = rh850f1h_pb
+
+#
+#  GCCç¨ã®ãã¡ã¤ã«ã®ãã£ã¬ã¯ããª
+#
+TARGETDIR_GCC := $(SRCDIR)/target/$(BOARD)_gcc
+
+#
+#  ã¢ã¼ã­ãã¯ãã£æå®
+#
+ARCH = V850E3V5
+
+#
+#  ã³ã¢ã¿ã¤ãæå®
+#
+CORETYPE = RH850G3M
+
+#
+#  ãã¼ããã­ã¼ããä½¿ç¨ããã
+#
+USE_HARD_FLOAT = true
+
+#
+#  ãã¼ãæ¯ã«è¨­å®ãç°ãªãé 
+ç®
+#
+CDEFS := $(CDEFS) -DTOPPERS_LABEL_ASM
+
+PE_CONFIG = PE1_ONLY
+
+ifeq ($(PE_CONFIG),PE1_ONLY)
+    CFG1_OUT_LDSCRIPT = $(SRCDIR)/arch/v850_ghs/rh850_f1h_6m_pe1only.ld
+    CDEFS := $(CDEFS) -DPE1_ONLY
+    CDEFS := $(CDEFS) -DHWC_USE_UNIT0
+    CDEFS := $(CDEFS) -DRLIN3x_USE_PORT0
+    CFGNAME := $(CFGNAME) target_mem_pe1only
+endif
+
+ifeq ($(PE_CONFIG),PE2_ONLY)
+    CFG1_OUT_LDSCRIPT = $(SRCDIR)/arch/v850_ghs/rh850_f1h_6m_pe2only.ld
+    CDEFS := $(CDEFS) -DPE2_ONLY
+    CDEFS := $(CDEFS) -DHWC_USE_UNIT1
+    CDEFS := $(CDEFS) -DRLIN3x_USE_PORT1
+    CFGNAME := $(CFGNAME) target_mem_pe2only
+endif
+
+
+ifeq ($(PE_CONFIG),DUAL_PE1)
+    CFG1_OUT_LDSCRIPT = $(SRCDIR)/arch/v850_ghs/rh850_f1h_6m_pe1only.ld
+    CDEFS := $(CDEFS) -DDUAL_PE1
+    CDEFS := $(CDEFS) -DHWC_USE_UNIT0
+    CDEFS := $(CDEFS) -DRLIN3x_USE_PORT0
+    CDEFS := $(CDEFS) -DINIT_IBD_FOR_PE2
+endif
+
+ifeq ($(PE_CONFIG),DUAL_PE2)
+    CFG1_OUT_LDSCRIPT = $(SRCDIR)/arch/v850_ghs/rh850_f1h_6m_pe2only.ld
+    CDEFS := $(CDEFS) -DDUAL_PE2
+    CDEFS := $(CDEFS) -DHWC_USE_UNIT1
+    CDEFS := $(CDEFS) -DRLIN3x_USE_PORT1
+    CDEFS := $(CDEFS) -DOMIT_CLOCK_INIT
+endif
+
+#
+#  PE1ã§ãã¤ãã£ããã·ã³ã¨ãã¦åä½ããã
+#
+ifeq ($(PE_CONFIG),PE1_NM)
+    CFG1_OUT_LDSCRIPT = $(SRCDIR)/target/rh850f1h_pb_ghs/rh850_f1h_6m_pe1_nm.ld
+    CDEFS := $(CDEFS) -DPE1_NM
+    CDEFS := $(CDEFS) -DHWC_USE_UNIT0
+    CDEFS := $(CDEFS) -DRLIN3x_USE_PORT0
+endif
+
+
+#
+#  PE1ã§ãã¤ãã£ããã·ã³ã¨ãã¦åä½ããã
+#
+ifeq ($(PE_CONFIG),PE1_NM_PRI)
+    CFG1_OUT_LDSCRIPT = $(SRCDIR)/target/rh850f1h_pb_ghs/rh850_f1h_6m_pe1_nm.ld
+    CDEFS := $(CDEFS) -DPE1_NM_PRI
+    CDEFS := $(CDEFS) -DHWC_USE_UNIT0
+    CDEFS := $(CDEFS) -DRLIN3x_USE_PORT0
+endif
+
+#
+#  PE1ã§VMä¸ã§åä½ããã
+#
+ifeq ($(PE_CONFIG),PE1_VM)
+    CFG1_OUT_LDSCRIPT = $(SRCDIR)/target/rh850f1h_pb_ghs/rh850_f1h_6m_pe1_vm.ld
+    CDEFS := $(CDEFS) -DPE1_VM
+    CDEFS := $(CDEFS) -DHWC_USE_UNIT1
+    CDEFS := $(CDEFS) -DRLIN3x_USE_PORT1
+    CDEFS := $(CDEFS) -DOMIT_CLOCK_INIT
+endif
+
+#
+#  ä½¿ç¨ããUARTã®ãã¼ã
+#
+#CDEFS := $(CDEFS) -DRLIN3x_USE_PORT0
+#CDEFS := $(CDEFS) -DRLIN3x_USE_PORT1
+
+#
+#  åããã¡ã¤ã«ããã£ãå ´åã«ARMCCä¾å­é¨ã®ãã¡ã¤ã«ãä½¿ç¨ããããã«ããã«ï¼
+#  GCCä¾å­é¨ã®ãã¡ã¤ã«ãå¾ã§æå®ããï¼
+#
+INCLUDES := $(INCLUDES) -I$(TARGETDIR) -I$(TARGETDIR_GCC)
+
+#
+#  ãµãã¼ãå½ä»¤æ¯ã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+#
+# ãã¼ãã«
+COPTS := $(COPTS)
+
+#
+#  ã«ã¼ãã«ã«é¢ããå®ç¾©
+#
+KERNEL_DIR := $(KERNEL_DIR) $(TARGETDIR) $(TARGETDIR_GCC)
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS) target_config.o tauj_hw_counter.o rh850_f1h.o
+
+#
+#  ã·ã¹ãã ã¿ã¤ãã«é¢ããè¨­å®
+#
+ifeq ($(ENABLE_SYS_TIMER),true)
+      CDEFS := $(CDEFS) -DTOPPERS_ENABLE_SYS_TIMER
+      KERNEL_COBJS := $(KERNEL_COBJS) taua_timer.o
+endif
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSMOD_DIR := $(SYSMOD_DIR) $(TARGETDIR) $(TARGETDIR_GCC)
+SYSMOD_COBJS := $(SYSMOD_COBJS) uart_rlin.o
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³è¨­å®
+#
+ifeq ($(findstring target_timer,$(CFGNAME)),target_timer)
+  CFGNAME := $(CFGNAME) taua_timer
+endif
+ifeq ($(findstring target_serial,$(CFGNAME)),target_serial)
+  CFGNAME := $(CFGNAME) uart
+endif
+
+#
+#  ä¾å­é¢ä¿ã®å®ç¾©
+#
+Os_Lcfg.timestamp: $(TARGETDIR_GCC)/target.tf
+$(OBJFILE): $(TARGETDIR_GCC)/target_mem.tf
+offset.h: $(TARGETDIR_GCC)/target_offset.tf
+
+#
+#  ãªãã»ãããã¡ã¤ã«çæã®ããã®å®ç¾©
+#
+OFFSET_TF := $(TARGETDIR_GCC)/target_offset.tf
+
+#
+#  ãã­ã»ããµä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(SRCDIR)/arch/v850_ghs/Makefile.prc
+
+#
+#  å®è¡ã¢ã¸ã¥ã¼ã«ã®ã­ã¼ãï¼å®è¡
+#
+run: $(OBJNAME).exe
+	@sh $(SRCDIR)/arch/v850_gcc/autorun/exe.sh $(SRCDIR) $(TARGET)
+
+urun: $(OBJNAME).exe
+	@sh $(SRCDIR)/arch/v850_gcc/autorun/exe.sh $(SRCDIR) $(TARGET) &
+	@ruby $(SRCDIR)/arch/v850_gcc/autorun/com_port.rb
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/readme.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/readme.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/readme.txt	(revision 172)
@@ -0,0 +1,8 @@
+sample1.arxmlã«ï¼æ¬ãã£ã¬ã¯ããªã«å­å¨ãã
+ããããã¡ã¤ã«ãããã¦ããsample1ããã«ããã¦ãã ããï¼
+
+ã¾ãï¼target_user.txtã«ããã¨ããï¼
+Makefileã®éå½¢ã¯sampleä»¥ä¸ã®ãã®ã§ã¯ãªãï¼ ./arch/v850_ghs/Makefile.sample 
+ãsampleä»¥ä¸ã«Makefileã¨ãã¦ã³ãã¼ãã¦ä½¿ç¨
+ãã¦ãã ããï¼
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/sample1.arxml.patch
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/sample1.arxml.patch	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/sample1.arxml.patch	(revision 172)
@@ -0,0 +1,11 @@
+--- sample/sample1.arxml
++++ sample/sample1.arxml
+@@ -64,7 +64,7 @@
+ 							<REFERENCE-VALUES>
+ 								<ECUC-REFERENCE-VALUE>
+ 									<DEFINITION-REF DEST="ECUC-REFERENCE-DEF">/AUTOSAR/EcucDefs/Os/OsLinkSection/OsLinkSectionMemoryRegionRef</DEFINITION-REF>
+-									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/RAM</VALUE-REF>
++									<VALUE-REF DEST="ECUC-CONTAINER-VALUE">/Ecuc/Os/INTRAM</VALUE-REF>
+ 								</ECUC-REFERENCE-VALUE>
+ 							</REFERENCE-VALUES>
+ 						</ECUC-CONTAINER-VALUE>
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target.tf	(revision 172)
@@ -0,0 +1,132 @@
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$  Copyright (C) 2012-2015 by Center for Embedded Computing Systems
+$              Graduate School of Information Science, Nagoya Univ., JAPAN
+$  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+$  Copyright (C) 2012-2013 by Spansion LLC, USA
+$  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+$  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+$  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+$  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+$  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+$
+$  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+$  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+$  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+$  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+$      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+$      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+$  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+$      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+$      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+$      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+$      ã¨ï¼
+$    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+$        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+$    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+$        å ±åãããã¨ï¼
+$  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+$      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+$      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+$      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+$      å
+è²¬ãããã¨ï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+$  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+$  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+$  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+$
+$  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+$  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$  ã®è²¬ä»»ãè² ããªãï¼
+$
+$  $Id: target.tf 46 2014-07-19 15:40:08Z ertl-honda $
+$
+
+$ 
+$  arch/gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $TAB$.vector : AT(0) {$NL$
+    $TAB$$TAB$*("*.reset.text")$NL$
+    $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+	$TAB$.call_table_data ALIGN (4) :$NL$
+	$TAB${$NL$
+	$TAB$PROVIDE(__ctbp = .);$NL$
+	$TAB$$TAB$*(.call_table_data)$NL$
+	$TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+	$NL$
+	$TAB$.call_table_text :$NL$
+	$TAB${$NL$
+	$TAB$$TAB$*(.call_table_text)$NL$
+	$TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$ 
+$TARGET_PAGE_SIZE_STR = 32$
+$TARGET_SEC_ALIGN_STR = 32$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = { ".text",  "\"*.text\"",  "\"*.text.*\"" }$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = { ".rodata",  "\"*.rodata\"",  "\"*.rodata.*\"" }$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = { ".data",  "\"*.data\"",  "\"*.data.*\"" }$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = { ".bss",  "\"*.bss\"",  "\"*.bss.*\"", "COMMON" }$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = { ".rosdata",  "\"*.rosdata\"",  "\"*.rosdata.*\"" }$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = { ".sdata",  "\"*.sdata\"",  "\"*.sdata.*\"" }$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = { ".sbss",  "\"*.sbss\"",  "\"*.sbss.*\"", "SMALLCOMMON" }$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$
+$  ãã­ã»ããµä¾å­ãã³ãã¬ã¼ãã®ã¤ã³ã¯ã«ã¼ã
+$
+$INCLUDE "v850_ghs/prc.tf"$
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_mem.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_mem.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_mem.tf	(revision 172)
@@ -0,0 +1,66 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$ =====================================================================
+
+$FUNCTION START_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("___start_", ARGV[1]))$
+$END$
+
+$FUNCTION LIMIT_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("___limit_", ARGV[1]))$
+$END$
+
+$INCLUDE "v850_gcc/prc_mem.tf"$
+
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_opt.tf
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_opt.tf	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_opt.tf	(revision 172)
@@ -0,0 +1,116 @@
+$ ======================================================================
+$
+$  TOPPERS ATK2
+$      Toyohashi Open Platform for Embedded Real-Time Systems
+$      Automotive Kernel Version 2
+$
+$   Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+$   ã®è²¬ä»»ãè² ããªãï¼
+$
+$  
+$ =====================================================================
+
+$INCLUDE "cfg2_out.tf"$
+
+$ 
+$  arch/v850_gcc/ldscript.tfã®ã¿ã¼ã²ããä¾å­é¨
+$ 
+
+$ 
+$  ã«ã¼ãã«ãç®¡çããªãã»ã¯ã·ã§ã³ãåºåãã
+$  ã¿ã¼ã²ããä¾å­ã§å¿
+è¦ãªã»ã¯ã·ã§ã³
+$ 
+$FUNCTION GENERATE_SECTION_FIRST$
+    $TAB$.vector : AT(0) {$NL$
+    $TAB$$TAB$*("*.reset.text")$NL$
+    $TAB$} > $REG.REGNAME[STANDARD_ROM]$$NL$
+    $NL$
+$END$
+
+$ 
+$  ãã¼ã¸ãµã¤ãºã¨ã¢ã©ã¤ã³ã¡ã³ãã®å¶ç´
+$  PAGE: MPUã®ã¢ã©ã¤ã³ã¡ã³ãå¶ç´ã16byte
+$  SEC: ãã¼ã¿RAMã®åæåæã«ã¯16byteåä½ã§åæåããå¿
+è¦ããã
+$ 
+$TARGET_PAGE_SIZE_STR = 16$
+$TARGET_SEC_ALIGN_STR = 16$
+
+$
+$  ãªã³ã«ã®ããã®ã»ã¯ã·ã§ã³è¨è¿°ã®çæ
+$
+$FUNCTION SECTION_DESCRIPTION$
+	$IF EQ(ARGV[1], ".text")$
+		$RESULT = { ".text",  "\"*.text\"",  "\"*.text.*\"" }$
+	$ELIF EQ(ARGV[1], ".rodata")$
+		$RESULT = { ".rodata",  "\"*.rodata\"",  "\"*.rodata.*\"" }$
+	$ELIF EQ(ARGV[1], ".data")$
+		$RESULT = { ".data",  "\"*.data\"",  "\"*.data.*\"" }$
+	$ELIF EQ(ARGV[1], ".bss")$
+		$RESULT = { ".bss",  "\"*.bss\"",  "\"*.bss.*\"", "COMMON" }$
+	$ELIF EQ(ARGV[1], ".rosdata")$
+		$RESULT = { ".rosdata",  "\"*.rosdata\"",  "\"*.rosdata.*\"" }$
+	$ELIF EQ(ARGV[1], ".sdata")$
+		$RESULT = { ".sdata",  "\"*.sdata\"",  "\"*.sdata.*\"" }$
+	$ELIF EQ(ARGV[1], ".sbss")$
+		$RESULT = { ".sbss",  "\"*.sbss\"",  "\"*.sbss.*\"", "SMALLCOMMON" }$
+	$ELSE$
+		$RESULT = ARGV[1]$
+	$END$
+$END$
+
+$FUNCTION START_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("___start_", ARGV[1]))$
+$END$
+
+$FUNCTION LIMIT_SYMBOL$
+	$RESULT = SYMBOL(CONCAT("___limit_", ARGV[1]))$
+$END$
+
+$INCLUDE "v850_ghs/prc_opt.tf"$
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_svc.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_svc.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_svc.h	(revision 172)
@@ -0,0 +1,62 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *	
+ *	Copyright (C) 2013 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ãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *	ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *	ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *	ã®è²¬ä»»ãè² ããªãï¼
+ *	
+ */
+
+
+#ifndef TOPPERS_TARGET_SVC_H
+#define TOPPERS_TARGET_SVC_H
+
+#include "v850_ghs/prc_svc.h"
+
+#endif /* TOPPERS_TARGET_SVC_H */
+
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_test.h
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_test.h	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_test.h	(revision 172)
@@ -0,0 +1,114 @@
+/*
+ *  TOPPERS ATK2
+ *      Toyohashi Open Platform for Embedded Real-Time Systems
+ *      Automotive Kernel Version 2
+ *
+ *  Copyright (C) 2012-2014 by Center for Embedded Computing Systems
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *  Copyright (C) 2012-2014 by FUJI SOFT INCORPORATED, JAPAN
+ *  Copyright (C) 2012-2013 by Spansion LLC, USA
+ *  Copyright (C) 2012-2013 by NEC Communication Systems, Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+ *  Copyright (C) 2012-2014 by Renesas Electronics Corporation, JAPAN
+ *  Copyright (C) 2012-2014 by Sunny Giken Inc., JAPAN
+ *  Copyright (C) 2012-2014 by TOSHIBA CORPORATION, JAPAN
+ *  Copyright (C) 2012-2014 by Witz Corporation, JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+ *  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+ *  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+ *  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+ *
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: target_test.h 187 2015-06-25 03:39:04Z t_ishikawa $
+ */
+
+/*
+ *		ãã¹ããã­ã°ã©ã ã®ã¿ã¼ã²ããä¾å­å®ç¾©ï¼FL-850/F1Lç¨ï¼
+ */
+
+#ifndef TOPPERS_TARGET_TEST_H
+#define TOPPERS_TARGET_TEST_H
+
+/*
+ *  sample1ã§ä½¿ç¨ããã¢ã©ã¼ã ã®å¨æï¼ç´1ç§ï¼
+ */
+#define COUNTER_MIN_CYCLE	((uint32) 8000000)
+
+/*
+ *  sample1ã§ä½¿ç¨ããä¾å¤
+ */
+#define RAISE_CPU_EXCEPTION		Asm("trap 0x6")     /* FIXME */
+
+/*
+ *  å²è¾¼ã¿ã®çºç
+ */
+LOCAL_INLINE void
+Sample1RaiseInterrupt(InterruptNumberType intno)
+{
+	uint32 eic_address;
+
+	eic_address = EIC_ADDRESS(intno);
+	sil_wrh_mem((void *)eic_address,
+				(sil_reh_mem((void *)eic_address)  | 0x1000));
+}
+
+/*
+ *  å²è¾¼ã¿è¦æ±ã®ã¯ãªã¢
+ */
+LOCAL_INLINE void
+Sample1ClearIntRequest(InterruptNumberType intno)
+{
+	uint32 eic_address;
+
+	eic_address = EIC_ADDRESS(intno);
+	sil_wrh_mem((void *)eic_address ,
+				(sil_reh_mem((void *)eic_address)  & ~0x1000));
+}
+
+
+#endif /* TOPPERS_TARGET_TEST_H */
Index: /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_user.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_user.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/target/rh850f1h_pb_ghs/target_user.txt	(revision 172)
@@ -0,0 +1,184 @@
+
+		TOPPERS/ATK2-SC3
+        ï¼RH850_PBã¿ã¼ã²ããä¾å­é¨(GHSç)ããã¥ã¢ã«ï¼
+
+ãã®ãã­ã¥ã¡ã³ãã¯RH850_PBã¿ã¼ã²ããä¾å­é¨ã®æ
+å ±ãè¨è¿°ãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+TOPPERS ATK2
+    Toyohashi Open Platform for Embedded Real-Time Systems
+    Automotive Kernel Version 2
+
+Copyright (C) 2013-2016 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: target_user.txt 46 2014-07-19 15:40:08Z ertl-honda $
+----------------------------------------------------------------------
+
+âæ¦è¦
+
+RH850_PBã¿ã¼ã²ããä¾å­é¨ï¼RH850_PBä¾å­é¨ï¼ã¯ï¼ã«ããµã¹ã¨ã¬ã¯ãã­ã
+ã¯ã¹ç¤¾ã®RH850/F1Hãæ­è¼ããã«ããµã¹ã¨ã¬ã¯ãã­ãã¯ã¹ç¤¾ãã©ãããã¼ã ã
+ã¼ãããµãã¼ããã¦ããï¼
+
+
+âåä½ç¢ºèªãã¼ã¸ã§ã³
+
+åä½ç¢ºèªãè¡ã£ãã³ã³ãã¤ã©ã®ãã¼ã¸ã§ã³ã¯ãã­ã»ããµä¾å­é¨ã®ã¦ã¼ã¶ã¼ãã
+ã¥ã¢ã«ã«è¨è¼ãã¦ããï¼
+
+
+âã³ã¢æå®
+
+æ¬¡ã®3ç¨®é¡ã®å®è¡ãã¿ã¼ã³ããµãã¼ããã¦ããï¼ããããæå®ã¯Makefileä¸­ã§
+PE_CONFIGã«ä»¥ä¸ã®å¤ãè¨­å®ãããã¨ã§æå®å¯è½ã§ããï¼
+
+1.PE1ã®ã¿å®è¡ : PE1_ONLY
+  ã»PE2ã¯ç¡éã«ã¼ã
+  
+2.PE2ã®ã¿å®è¡ : PE2_ONLY
+  ã»PE1ã¯ç¡éã«ã¼ã
+  
+3.ä¸¡æ¹ã®ã³ã¢ã§å®è¡ï¼
+ 3.1 PE1ç¨ : DUAL_PE1
+ 3.2 PE2ç¨ : DUAL_PE2
+
+
+âã­ã°åºå
+
+ã­ã°åºåã®ããã®UARTEã¯ãã¼ã3ãä½¿ç¨ããï¼ä½¿ç¨ããã¦ãããçªå·ããã¼ã
+çªå·ã¯ï¼ä»¥ä¸ã®ãã¯ã­ãå®ç¾©ãããã¨ã§æå®ããï¼
+ 
+ãã¼ãçªå·
+ ãã¼ã0 : DRLIN3x_USE_PORT0
+ ãã¼ã1 : DRLIN3x_USE_PORT1
+
+ãã¼ã¿ãã©ã¼ãããã¯ï¼
+
+ã»115200bpsããã¼ã¿8bitãããªãã£ãªããã¹ããã1bitããã­ã¼å¶å¾¡ãªã
+
+ã§ããï¼
+
+
+âãµã³ãã«ãã­ã°ã©ã ã§ç¨ããã¿ã¤ã
+
+ã»ãµã³ãã«ãã­ã°ã©ã ã«ã¦ï¼TAUJ0ãªããTAUJ1ãä½¿ç¨ï¼
+  ã©ã¡ããä½¿ç¨ãããã¯Makefileä¸­ã®ãã¯ã­ãæå®å¯è½
+
+   TAUJ0 : HWC_USE_UNIT0
+   TAUJ1 : HWC_USE_UNIT1
+ 
+ã»1åã®ã«ã¦ã³ã¿ã«2ã¤ã®ã¿ã¤ããä½¿ç¨ãã¦ããï¼
+    å·®åã¿ã¤ãï¼ç®çã®æéãè¨­å®ããæã®ç¾å¨æé(ç¾å¨å¤ã¿ã¤ã)ã¨æ¬¡ã®æº
+    äºæéã¨ã®ç¸å¯¾æéãã«ã¦ã³ããããã¨ã§ç®çã®çµ¶å¯¾æéã«æºäºãããã¨
+    ã¨ãã.
+        count mode:count down once
+    ç¾å¨å¤ã¿ã¤ãï¼ã«ã¦ã³ã¿å¨æåã®ãã¼ã¹ã¿ã¤ããå®ç¾(çµ¶å¯¾æéãã«ã¦ã³ã)
+        count mode:continuous count down
+ã»ä½¿ç¨ã«ã¦ã³ã¿æ
+å ±
+    ã«ã¦ã³ã¿åï¼MAIN_HW_COUNTER
+        å·®åã¿ã¤ãï¼TAUJ0
+        ç¾å¨å¤ã¿ã¤ãï¼TAUJ1
+        1ãã£ãã¯å½ããã®ç§æ°ï¼1/TIMER_CLOCK_HZ
+ 
+âãã«ãç°å¢
+
+ãã«ãç°å¢ã¯Windowsä¸ã®Cygwinãä½¿ç¨ããï¼Cygwinã«ã¯æä½éä»¥ä¸ã®ããã±
+ã¼ã¸ãã¤ã³ã¹ãã¼ã«ããå¿
+è¦ãããï¼
+
+ ã»make
+ ã»perl
+ 
+Makefileã®éå½¢ã¯sampleä»¥ä¸ã®ãã®ã§ã¯ãªãï¼ ./arch/v850_ghs/Makefile.sample 
+ãsampleä»¥ä¸ã«Makefileã¨ãã¦ã³ãã¼ãã¦ä½¿ç¨ãããã¨ï¼
+ 
+âãããã°ç°å¢
+
+åä½ç¢ºèªã¯CS+ã§å®æ½ããï¼CS+ã®è¨­å®æ¹æ³ã¯æ¬¡ã®éãã§ããï¼
+
+ 1) CubeSuite+ãèµ·å
+ 2) æ°è¦ãã­ã¸ã§ã¯ããä½æï¼
+    ã¡ãã¥ã¼ãã[ãã¡ã¤ã«] â [æ°è¦ä½æ] â [æ°ãããã­ã¸ã§ã¯ããä½æ]ãé¸æ
+ 3) ãã­ã¸ã§ã¯ãã®ä½æ
+  ãã­ã¸ã§ã¯ãä½æãã¤ã¢ã­ã°å
+ã§ä»¥ä¸ã®è¨­å®ããã¾ãã
+   [1] ãã¤ã¯ã­ã³ã³ãã­ã¼ã©        ï¼RH850ãé¸æ
+   [2] ä½¿ç¨ãããã¤ã¯ã­ã³ã³ãã­ã¼ã©ï¼R7F701503
+   [3] ãã­ã¸ã§ã¯ãã®ç¨®é¡          ï¼ãããã¯å°ç¨
+   [4] ãã­ã¸ã§ã¯ãå              ï¼ä»»æ
+   [5] ä½æå ´æ                    ï¼ä»»æ
+   [6] OKãé¸æ
+   ä¸è¨[5]ã§æå®ãããã©ã«ãå
+ã«ãã­ã¸ã§ã¯ãå.mtpjãã¡ã¤ã«ãä½æãããï¼
+ 4) ãããã¯ãã¼ã«ã®é¸æ
+   [1] ç»é¢å·¦å´ããªã¼å
+ã®RH850ã·ã¥ãã¬ã¼ã¿ãé¸æãå³ã¯ãªãã¯
+   [2] ä½¿ç¨ãããããã¯ãã¼ã«ãé¸æ
+   [3] æ¥ç¶ç¨è¨­å®ã®ã¿ããé¸æ
+   [4] ã¡ã¤ã³ã»ã¯ã­ãã¯å¨æ³¢æ° ã« 16 ãæå®
+ 5) ãã¦ã³ã­ã¼ããã¡ã¤ã«ã®è¨­å®
+   [1] ç»é¢å³å´ã®ã¿ããã[ãã¦ã³ã­ã¼ãã»ãã¡ã¤ã«è¨­å®]ãé¸æ
+   [2] ç»é¢å³å´ã®ãã¦ã³ã­ã¼ããããã¡ã¤ã«ãé¸æ
+   [3] é¸æè¡å³ç«¯[...]ãå·¦ã¯ãªãã¯
+   [4] ãã¦ã³ã­ã¼ãã»ãã¤ã¢ã­ã°å
+ã§[è¿½å ]ãã¿ã³ãé¸æ
+   [5] ãã¦ã³ã­ã¼ãã»ãã¡ã¤ã«æ
+å ±ã®ãã¡ã¤ã«ãé¸æå¾[...]ãå·¦ã¯ãªãã¯
+   [6] ãã¦ã³ã­ã¼ããã¡ã¤ã«ã¯[atk-sc1.exe]ãé¸æ
+   [7] OKãé¸æ
+ 6) ãã¡ã¤ã«ããã¦ã³ã­ã¼ã
+   [1] ã¿ã¼ã²ãããã¼ãã®é»æºãON
+   [2] ã¡ãã¥ã¼ãã[ãããã¯]â[ãããã¯ã»ãã¼ã«ã¸ãã¦ã³ã­ã¼ã]ãé¸æ
+ 7) ãã­ã°ã©ã ã®å®è¡
+   [1] ã¡ãã¥ã¼ãã[ãããã¯]â[ãªã¹ã¿ã¼ã]ãé¸æ
+      ã¿ã¼ããã«ç»é¢ã«[Input Command:]ã¨è¡¨ç¤ºãåºãã°æ­£å¸¸ã«åä½ãã¦ãã ï¼
+ ä¸è¨æé ã® 2)ã5)ã¯æ°è¦ã«ãã­ã¸ã§ã¯ããä½æããæã®ã¿å®è¡ï¼
+ 
+
+âå¤æ´å±¥æ­´
+2015/04/07
+ã»taget_test.h
+  COUNTER_MIN_CYCLEã®å®ç¾©ãè¿½å ï¼
+
+2013/11/10
+ æ°è¦ä½æ
+ 
+ä»¥ä¸ 
Index: /atk2-sc3-1.4.0-ntisr/utils/abrex/MANIFEST
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/abrex/MANIFEST	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/abrex/MANIFEST	(revision 172)
@@ -0,0 +1,5 @@
+MANIFEST
+abrex.rb
+readme.txt
+param_info.yaml
+sample.yaml
Index: /atk2-sc3-1.4.0-ntisr/utils/abrex/abrex.rb
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/abrex/abrex.rb	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/abrex/abrex.rb	(revision 172)
@@ -0,0 +1,1108 @@
+#!ruby -Ku
+#
+#  ABREX
+#      AUTOSAR BSW and RTE XML Generator
+#
+#  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+#  Copyright (C) 2013-2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2014-2015 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2013-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+#  Copyright (C) 2013-2015 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2015 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2015 by Witz Corporation
+#  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: abrex.rb 571 2015-12-21 05:01:59Z t_ishikawa $
+#
+
+if ($0 == __FILE__)
+  TOOL_ROOT = File.expand_path(File.dirname(__FILE__) + "/")
+  $LOAD_PATH.unshift(TOOL_ROOT)
+end
+
+require "pp"
+require "yaml"
+require "optparse"
+require "kconv.rb"
+require "rexml/document.rb"
+include REXML
+
+######################################################################
+# å®æ°å®ç¾©
+######################################################################
+VERSION       = "1.1.0"
+VER_INFO      = " Generated by ABREX Ver. #{VERSION} "
+XML_ROOT_PATH = "/AUTOSAR/EcucDefs/"
+XML_EDITION   = "4.2.0"
+XML_SNAME     = "SHORT-NAME"
+XML_PARAM     = "PARAMETER-VALUES"
+XML_REFER     = "REFERENCE-VALUES"
+XML_SUB       = "SUB-CONTAINERS"
+XML_AUTOSAR_FIXED_ATT = {"xmlns"              => "http://autosar.org/schema/r4.0",
+                         "xmlns:xsi"          => "http://www.w3.org/2001/XMLSchema-instance",
+                         "xsi:schemaLocation" => "http://autosar.org/schema/r4.0 AUTOSAR_4-0-3_STRICT.xsd"}
+
+# ãã©ã¡ã¼ã¿ãã¼ã¿åç¨®å¥æ ¼ç´ããã·ã¥
+# (ããä»¥å¤ã¯ãã¹ã¦ECUC-NUMERICAL-PARAM-VALUE)
+XML_VALUE_TYPE = {"ECUC-REFERENCE-DEF"               => "ECUC-REFERENCE-VALUE",
+                  "ECUC-FOREIGN-REFERENCE-DEF"       => "ECUC-REFERENCE-VALUE",
+                  "ECUC-SYMBOLIC-NAME-REFERENCE-DEF" => "ECUC-REFERENCE-VALUE",
+                  "ECUC-INSTANCE-REFERENCE-DEF"      => "ECUC-INSTANCE-REFERENCE-VALUE",
+                  "ECUC-CHOICE-REFERENCE-DEF"        => "ECUC-CHOICE-REFERENCE-DEF",
+                  "ECUC-ENUMERATION-PARAM-DEF"       => "ECUC-TEXTUAL-PARAM-VALUE",
+                  "ECUC-STRING-PARAM-DEF"            => "ECUC-TEXTUAL-PARAM-VALUE",
+                  "ECUC-MULTILINE-STRING-PARAM-DEF"  => "ECUC-TEXTUAL-PARAM-VALUE",
+                  "ECUC-FUNCTION-NAME-DEF"           => "ECUC-TEXTUAL-PARAM-VALUE",
+                  "ECUC-LINKER-SYMBOL-DEF"           => "ECUC-TEXTUAL-PARAM-VALUE"}
+
+# ã¤ã³ã¹ã¿ã³ã¹åç
+§åã®ç¹å¥ã³ã³ãã
+XML_INSTANCE_REF_CONTAINER = {"EcucPartitionSoftwareComponentInstanceRef" =>
+                                {"CONTEXT-ELEMENT-REF" => "ROOT-SW-COMPOSITION-PROTOTYPE",
+                                 "TARGET-REF" => "SW-COMPONENT-PROTOTYPE"}}
+
+######################################################################
+# YAML â XML å®è¡æ©è½
+######################################################################
+def YamlToXml(aArgData, sEcuExtractRef)
+  # åãã©ã¡ã¼ã¿ã®ãã¼ã¿åå®ç¾©(-pãªãã·ã§ã³ã§çæãããã®ãä½¿ç¨ãã)
+  sFileName = "#{TOOL_ROOT}/param_info.yaml"
+  if (!File.exist?(sFileName))
+    abort("#{sFileName} not found !!")
+  end
+  hParamInfo = YAML.load_file(sFileName)
+  # ããã·ã¥ã§ãªã(YAMLã§ãªã)å ´åã¨ã©ã¼
+  if (!hParamInfo.is_a?(Hash))
+    abort("not YAML file !! [#{sFileName}]")
+  end
+
+  # å¤é¨åç
+§å
+ã®ãã¼ã¿åæ ¼ç´ããã·ã¥ãåé¢
+  $hForeignRefType = hParamInfo.delete(:FOREIGN_REF_TYPE)
+
+  # é¸æåã®ã³ã³ããæ ¼ç´é
+åãåé¢
+  $aChoiceContainer = hParamInfo.delete(:ECUC_CHOICE_CONTAINER_DEF)
+
+  # ã¤ã³ã¹ã¿ã³ã¹åç
+§å
+ã®ãã¼ã¿åãä¿æ
+  $aInstanceRefType = hParamInfo["ECUC-INSTANCE-REFERENCE-DEF"]
+
+  # ã³ã³ããåå¤æãã¼ãã«
+  $hEcuc = {}
+  $hDest = {}
+
+  hParamInfo.each{|sType, aParam|
+    aParam.each{|sName|
+      if (XML_VALUE_TYPE.has_key?(sType))
+        $hEcuc[sName] = XML_VALUE_TYPE[sType]
+      else
+        $hEcuc[sName] = "ECUC-NUMERICAL-PARAM-VALUE"
+      end
+      $hDest[sName] = sType
+    }
+  }
+
+  # åç
+§åã®ãã©ã¡ã¼ã¿ä¸è¦§
+  $hReferenceParam = hParamInfo["ECUC-REFERENCE-DEF"] + hParamInfo["ECUC-FOREIGN-REFERENCE-DEF"] + hParamInfo["ECUC-SYMBOLIC-NAME-REFERENCE-DEF"] + hParamInfo["ECUC-INSTANCE-REFERENCE-DEF"]
+
+  # ä¸ããããå
+¨YAMLããã¼ã¸ãã
+  hYaml = {}
+  sArxmlName = nil
+  aArgData.each{|sFileName|
+    # ãã¡ã¤ã«ãå­å¨ããªãå ´åã¨ã©ã¼
+    if (!File.exist?(sFileName))
+      abort("Argument error !! [#{sFileName}]")
+    end
+
+    # åºåãã¡ã¤ã«åä½æ(è¤æ°ããå ´åï¼æåã®ãã¡ã¤ã«åãæ¡ç¨ãã)
+    if (File.extname(sFileName) == ".yaml")
+      if (sArxmlName.nil?())
+        sArxmlName = File.dirname(sFileName) + "/" + File.basename(sFileName, ".yaml") + ".arxml"
+      end
+    else
+      abort("not YAML file name !! [#{sFileName}]")
+    end
+
+    hTmpData = YAML.load(File.read(sFileName).toutf8())
+    # ããã·ã¥ã§ãªã(YAMLã§ãªã)å ´åã¨ã©ã¼
+    if (!hTmpData.is_a?(Hash))
+      abort("not YAML file !! [#{sFileName}]")
+    end
+
+    # èª­ã¿è¾¼ãã ãã¼ã¿ããã¼ã¸ãã¦ãã
+    YamlToXml_merge_hash(hYaml, hTmpData)
+  }
+
+  cXmlInfo = Document.new()
+  cXmlInfo.add(XMLDecl.new("1.0", "UTF-8"))
+  REXML::Comment.new(VER_INFO, cXmlInfo)
+  cXmlAutosar = cXmlInfo.add_element("AUTOSAR", XML_AUTOSAR_FIXED_ATT)
+  cXmlArPackages = cXmlAutosar.add_element("AR-PACKAGES")
+
+  # IMPLEMENTATION-DATA-TYPEæ ¼ç´ããã·ã¥ãåé¢ãã¦å
+ã«ç»é²
+  hImplDataType = hYaml.delete("IMPLEMENTATION-DATA-TYPE")
+  if (!hImplDataType.nil?())
+    cXmlArPackage = cXmlArPackages.add_element("AR-PACKAGE")
+    cXmlArPackage.add_element(XML_SNAME).add_text("ImplementationDataTypes")
+    cXmlElements = cXmlArPackage.add_element("ELEMENTS")
+    hImplDataType.each{|sShortName, hData|
+      cXmlEcucModuleConfVal = cXmlElements.add_element("IMPLEMENTATION-DATA-TYPE")
+      cXmlEcucModuleConfVal.add_element(XML_SNAME).add_text(sShortName)
+      cXmlEcucModuleConfVal.add_element("CATEGORY").add_text(hData["CATEGORY"])
+    }
+  end
+
+  aModulePaths = []
+  hYaml.each{|sPackageName, hPackageData|
+    cXmlArPackage = cXmlArPackages.add_element("AR-PACKAGE")
+    cXmlArPackage.add_element(XML_SNAME).add_text(sPackageName)
+    cXmlElements = cXmlArPackage.add_element("ELEMENTS")
+
+    hPackageData.each{|sEcucModuleName, hEcucModuleData|
+      aModulePaths.push("/#{sPackageName}/#{sEcucModuleName}")
+      cXmlEcucModuleConfVal = cXmlElements.add_element("ECUC-MODULE-CONFIGURATION-VALUES")
+      cXmlEcucModuleConfVal.add_element(XML_SNAME).add_text(sEcucModuleName)
+      cXmlEcucModuleConfVal.add_element("DEFINITION-REF", {"DEST" => "ECUC-MODULE-DEF"}).add_text(XML_ROOT_PATH + sEcucModuleName)
+      cXmlEcucModuleConfVal.add_element("ECUC-DEF-EDITION").add_text(XML_EDITION)
+      cXmlEcucModuleConfVal.add_element("IMPLEMENTATION-CONFIG-VARIANT").add_text("VARIANT-PRE-COMPILE")
+      cXmlContainers = cXmlEcucModuleConfVal.add_element("CONTAINERS")
+
+      # åãã©ã¡ã¼ã¿ç¨ã³ã³ãããä½æãã
+      hEcucModuleData.each{|sShortName, hParamInfo|
+        # DefinitionRefè£å®
+        if (!hParamInfo.has_key?("DefinitionRef"))
+          hParamInfo["DefinitionRef"] = sShortName
+        end
+
+        cContainer = YamlToXml_make_container(sShortName, hParamInfo, XML_ROOT_PATH + sEcucModuleName)
+        cXmlContainers.add_element(cContainer)
+      }
+    }
+  }
+
+  # ECU-EXTRACT-REFæå®ãããå ´åã<ECUC-VALUE-COLLECTION>ãè¿½å ãã
+  if (!sEcuExtractRef.nil?())
+    cXmlArPackage = cXmlArPackages.add_element("AR-PACKAGE")
+    cXmlArPackage.add_element(XML_SNAME).add_text("EcucValueCollection")
+    cXmlElements = cXmlArPackage.add_element("ELEMENTS")
+    cXmlEcucValueCollection = cXmlElements.add_element("ECUC-VALUE-COLLECTION")
+    cXmlEcucValueCollection.add_element(XML_SNAME).add_text("EcucValueCollection")
+    cXmlEcucValueCollection.add_element("ECU-EXTRACT-REF", {"DEST" => "SYSTEM"}).add_text(sEcuExtractRef)
+    cXmlEcucValues = cXmlEcucValueCollection.add_element("ECUC-VALUES")
+    aModulePaths.each{|sPath|
+      cTemp = cXmlEcucValues.add_element("ECUC-MODULE-CONFIGURATION-VALUES-REF-CONDITIONAL")
+      cTemp.add_element("ECUC-MODULE-CONFIGURATION-VALUES-REF", {"DEST" => "ECUC-MODULE-CONFIGURATION-VALUES"}).add_text(sPath)
+    }
+  end
+
+  # XMLæå­åçæ
+  sXmlCode = String.new()
+  cXmlInfo.write(sXmlCode, 2, false)
+
+  # XMLå®£è¨ã®å±æ§ã®ã³ã¼ãã¼ã·ã§ã³ãããã«ã«åºæ¥ãªã(?)ããï¼ããã§ç½®æãã
+  sXmlCode.gsub!("'", "\"")
+
+  # ããã«ã³ã¼ãã¼ã·ã§ã³ã&quot;ã«å¤æãããã®ãææ­¢ã§ããªã(?)ããï¼ããã§ç½®æãã
+  sXmlCode.gsub!("&quot;", "\"")
+
+  # å¤ãå®ç¾©ããé¨åã ãã¤ã³ãã³ããå
+¥ããªãããã«åºæ¥ãªã(?)ããï¼ããã§ç½®æãã
+  sXmlCode.gsub!(/>\n[\s]+([\w\.\[\]\(\)\+-\/\*~&;\s]*?)\n[\s]+</, ">\\1<")
+
+  # ã¤ã³ãã³ããã¿ãã«åºæ¥ãªã(?)ããï¼ããã§ç½®æãã
+  sXmlCode.gsub!("  ", "\t")
+
+  # ãã¡ã¤ã«åºå
+  #puts(sXmlCode)
+  File.open(sArxmlName, "w") {|io|
+    io.puts(sXmlCode)
+  }
+
+  puts("Generated #{sArxmlName}")
+end
+
+# ããã·ã¥ãã¼ã¸é¢æ°
+def YamlToXml_merge_hash(hBase, hAdd)
+  hAdd.each{|sKey, xVal|
+    # è¿½å å
+ã«ã­ã¼ãå­å¨ããªããã°ï¼ãã®ã¾ã¾è¿½å ããã®ã¿
+    if (!hBase.has_key?(sKey))
+      hBase[sKey] = xVal
+    # åãã­ã¼ã§å¤ãéãå ´å
+    elsif (hBase[sKey] != hAdd[sKey])
+      # ããã·ã¥åå£«ã§ããã°ï¼åå¸°ã§è¿½å 
+      if (hBase[sKey].is_a?(Hash) && hAdd[sKey].is_a?(Hash))
+        YamlToXml_merge_hash(hBase[sKey], hAdd[sKey])
+      # è¿½å å
+ãé
+åã§ããã°ï¼é
+åã«åããã¦è¿½å 
+      elsif (hBase[sKey].is_a?(Array))
+        if (hAdd[sKey].is_a?(Array))
+          hBase[sKey].concat(hAdd[sKey])
+        else
+          hBase[sKey].push(hAdd[sKey])
+        end
+      # è¿½å å
+ãé
+åã§ãªããã°ï¼é
+åã«ãã¦ããè¿½å 
+      elsif (hAdd[sKey].is_a?(Array))
+        hBase[sKey] = [hBase[sKey]]
+        hBase[sKey].concat(hAdd[sKey])
+      # ã©ã¡ããé
+åã§ãªãå ´åï¼é
+åã¨ãã¦ä¸¡æ¹ããã¼ã¸
+      else
+        hBase[sKey] = [hBase[sKey]]
+        hBase[sKey].push(hAdd[sKey])
+      end
+    else
+      # åããã©ã¡ã¼ã¿ã®å ´åï¼ä½ãããªã
+    end
+  }
+end
+
+# ã³ã³ããä½æé¢æ°
+def YamlToXml_make_container(sShortName, hParamInfo, sPath)
+  # ä¸å¾"ECUC-CONTAINER-VALUE"ãå
+¥ããç¶æ
+ã§åæå
+  cContainer = Element.new().add_element("ECUC-CONTAINER-VALUE")
+
+  # ã·ã§ã¼ããã¼ã è¿½å 
+  cContainer.add_element(XML_SNAME).add_text(sShortName)
+
+  # ã³ã³ããã¾ã§ã®ãã¹è¿½å 
+  if ($aChoiceContainer.include?(hParamInfo["DefinitionRef"]))
+    cContainer.add_element("DEFINITION-REF", {"DEST" => "ECUC-CHOICE-CONTAINER-DEF"}).add_text("#{sPath}/#{hParamInfo["DefinitionRef"]}")
+  else
+    cContainer.add_element("DEFINITION-REF", {"DEST" => "ECUC-PARAM-CONF-CONTAINER-DEF"}).add_text("#{sPath}/#{hParamInfo["DefinitionRef"]}")
+  end
+
+  # åãã©ã¡ã¼ã¿è¨­å®(ãã©ã¡ã¼ã¿ãç¡ãå ´åã¯ä¸è¦)
+  hCheck= {}
+  if (hParamInfo.size() != 1)
+    hCheck[XML_PARAM] = false
+    hCheck[XML_REFER] = false
+    hCheck[XML_SUB] = false
+
+    # ã¾ãåç
+§åï¼ãµãã³ã³ããä»¥å¤ãçæ(AUTOSARã¹ã­ã¼ãå¶ç´)
+    hParamInfo.each{|sParamName, sahValue|
+      if ((sParamName == "DefinitionRef") || (sahValue.is_a?(Hash)))
+        next
+      end
+
+      # åç
+§åï¼ãµãã³ã³ããä»¥å¤ã®ãã©ã¡ã¼ã¿
+      if (!$hReferenceParam.include?(sParamName))
+        # ãã©ã¡ã¼ã¿åãã§ãã¯
+        if (!$hEcuc.has_key?(sParamName) || !$hDest.has_key?(sParamName))
+          abort("Unknown parameter: #{sParamName}")
+        end
+
+        if (hCheck[XML_PARAM] == false)
+          cContainer.add_element(XML_PARAM)
+          hCheck[XML_PARAM] = true
+        end
+
+        # å¤éåº¦*å¯¾å¿
+        aTemp = []
+        if (sahValue.is_a?(Array))
+          aTemp = sahValue
+        else
+          aTemp.push(sahValue)
+        end
+        aTemp.each{|sVal|
+          cParamContainer_ = Element.new()
+          cParamContainer = cParamContainer_.add_element($hEcuc[sParamName])
+          cParamContainer.add_element("DEFINITION-REF", {"DEST" => $hDest[sParamName]}).add_text("#{sPath}/#{hParamInfo["DefinitionRef"]}/#{sParamName}")
+          cParamContainer.add_element("VALUE").add_text(sVal.to_s())
+          cContainer.elements[XML_PARAM].add_element(cParamContainer)
+        }
+      end
+    }
+
+    # æ¬¡ã«åç
+§åãçæ(AUTOSARã¹ã­ã¼ãå¶ç´)
+    hParamInfo.each{|sParamName, sahValue|
+      if ((sParamName == "DefinitionRef") || (sahValue.is_a?(Hash)))
+        next
+      end
+
+      # ã¤ã³ã¹ã¿ã³ã¹åç
+§åã®å ´å
+      if ($aInstanceRefType.include?(sParamName))
+        if (!sahValue.is_a?(Array))
+          abort("#{sParamName} must be Array !!")
+        end
+        # æªãµãã¼ãã³ã³ããã¯çæã§ããªãããã¨ã©ã¼ã¨ãã
+        if (!XML_INSTANCE_REF_CONTAINER.has_key?(sParamName))
+          abort("#{sParamName} is not supported !!")
+        end
+        if (hCheck[XML_REFER] == false)
+          cContainer.add_element(XML_REFER)
+          hCheck[XML_REFER] = true
+        end
+
+        # å¤éåº¦*å¯¾å¿(2æ¬¡å
+é
+åããã§ãã¯)
+        aTemp = []
+        if (sahValue[0].is_a?(Array))
+          aTemp = sahValue
+        else
+          aTemp.push(sahValue)
+        end
+        aTemp.each{|aVal|
+          cParamContainer_ = Element.new()
+          cParamContainer = cParamContainer_.add_element($hEcuc[sParamName])
+          cParamContainer.add_element("DEFINITION-REF", {"DEST" => $hDest[sParamName]}).add_text("#{sPath}/#{hParamInfo["DefinitionRef"]}/#{sParamName}")
+          cInstanceRef = cParamContainer.add_element("VALUE-IREF")
+          aVal.each{|hVal|
+            XML_INSTANCE_REF_CONTAINER[sParamName].each{|sParam, sDest|
+              if (hVal.has_key?(sParam))
+                cInstanceRef.add_element(sParam, {"DEST" => sDest}).add_text(hVal[sParam].to_s())
+              end
+            }
+          }
+          cContainer.elements[XML_REFER].add_element(cParamContainer)
+        }
+
+      # åç
+§åã®å ´å
+      elsif ($hReferenceParam.include?(sParamName))
+        if (hCheck[XML_REFER] == false)
+          cContainer.add_element(XML_REFER)
+          hCheck[XML_REFER] = true
+        end
+
+        # å¤éåº¦*å¯¾å¿
+        aTemp = []
+        if (sahValue.is_a?(Array))
+          aTemp = sahValue
+        else
+          aTemp.push(sahValue)
+        end
+        aTemp.each{|sVal|
+          cParamContainer_ = Element.new()
+          cParamContainer = cParamContainer_.add_element($hEcuc[sParamName])
+          cParamContainer.add_element("DEFINITION-REF", {"DEST" => $hDest[sParamName]}).add_text("#{sPath}/#{hParamInfo["DefinitionRef"]}/#{sParamName}")
+          if (!$hForeignRefType.nil? && $hForeignRefType.has_key?(sParamName))
+            cParamContainer.add_element("VALUE-REF", {"DEST" => $hForeignRefType[sParamName]}).add_text(sVal.to_s())
+          else
+            cParamContainer.add_element("VALUE-REF", {"DEST" => "ECUC-CONTAINER-VALUE"}).add_text(sVal.to_s())
+          end
+          cContainer.elements[XML_REFER].add_element(cParamContainer)
+        }
+      end
+    }
+
+    # æå¾ã«ãµãã³ã³ãããçæ
+    hParamInfo.each{|sParamName, sahValue|
+      if ((sParamName == "DefinitionRef") || (!sahValue.is_a?(Hash)))
+        next
+      end
+
+      if (hCheck[XML_SUB] == false)
+        cContainer.add_element(XML_SUB)
+        hCheck[XML_SUB] = true
+      end
+
+      # DefinitionRefè£å®
+      if (!sahValue.has_key?("DefinitionRef"))
+        sahValue["DefinitionRef"] = sParamName
+      end
+
+      # åå¸°ã§ãµãã³ã³ãããä½æãã
+      cContainer.elements[XML_SUB].add_element(YamlToXml_make_container(sParamName, sahValue, "#{sPath}/#{hParamInfo["DefinitionRef"]}"))
+    }
+  end
+
+  return cContainer
+end
+
+
+######################################################################
+# XML â YAML å®è¡æ©è½
+######################################################################
+def XmlToYaml(sFirstFile, aExtraFile)
+  aExtraFile.unshift(sFirstFile)
+  aExtraFile.each{|sFileName|
+    # ãã¡ã¤ã«ãå­å¨ããªãå ´åã¨ã©ã¼
+    if (!File.exist?(sFileName))
+      abort("Argument error !! [#{sFileName}]")
+    end
+
+    # åºåãã¡ã¤ã«åä½æ
+    if (File.extname(sFileName) == ".arxml")
+      sYamlName = File.dirname(sFileName) + "/" + File.basename(sFileName, ".arxml") + ".yaml"
+    else
+      abort("not ARXML file !! [#{sFileName}]")
+    end
+
+    # XMLã©ã¤ãã©ãªã§ã®èª­ã¿è¾¼ã¿
+    cXmlData = REXML::Document.new(open(sFileName))
+
+    hResult = {}
+
+    cXmlData.elements.each("AUTOSAR/AR-PACKAGES/AR-PACKAGE"){|cElement1|
+      cElement1.elements.each("ELEMENTS/ECUC-MODULE-CONFIGURATION-VALUES"){|cElement2|
+        sPackageName = cElement1.elements["SHORT-NAME"].text()
+        if (!hResult.has_key?(sPackageName))
+          hResult[sPackageName] = {}
+        end
+
+        sModuleName = cElement2.elements["SHORT-NAME"].text()
+        hResult[sPackageName][sModuleName] = {}
+
+        cElement2.elements.each("CONTAINERS/ECUC-CONTAINER-VALUE"){|cElement3|
+          XmlToYaml_parse_parameter(cElement3, hResult[sPackageName][sModuleName])
+        }
+      }
+    }
+
+    # YAMLãã¡ã¤ã«åºå
+    open(sYamlName, "w") do |io|
+      YAML.dump(hResult, io)
+    end
+
+    # YAMLæ´å½¢å¦ç
+    # ã»å
+é ­ã®åºåãæå­åé¤
+    # ã»ã³ã¼ãã¼ã·ã§ã³ã®åé¤
+    # ã»é
+åã®ã¤ã³ãã³ãæ´å
+    sFileData = File.read(sYamlName)
+    sFileData.gsub!(/^---$/, "")
+    sFileData.gsub!("'", "")
+    sFileData.gsub!(/^(\s+)-(\s.*)$/, "\\1  -\\2")
+    File.write(sYamlName, sFileData)
+
+    puts("Generated #{sYamlName}")
+  }
+end
+
+# ã³ã³ãããã¼ã¹é¢æ°
+def XmlToYaml_parse_parameter(cElement, hTarget)
+  sParamShortName = cElement.elements["SHORT-NAME"].text()
+  sParamDefName = cElement.elements["DEFINITION-REF"].text().split("/")[-1]
+  hTarget[sParamShortName] = {}
+  if (sParamShortName != sParamDefName)
+    hTarget[sParamShortName]["DefinitionRef"] = sParamDefName
+  end
+
+  # ãã©ã¡ã¼ã¿
+  cElement.elements.each("PARAMETER-VALUES"){|cElementC|
+    ["ECUC-NUMERICAL-PARAM-VALUE", "ECUC-TEXTUAL-PARAM-VALUE"].each{|sParamValue|
+      cElementC.elements.each(sParamValue){|cElementG|
+        sName = cElementG.elements["DEFINITION-REF"].text().split("/")[-1]
+        sValue = cElementG.elements["VALUE"].text()
+        # è¤æ°å¤éåº¦å¯¾å¿
+        if (hTarget[sParamShortName].has_key?(sName))
+          if (hTarget[sParamShortName][sName].is_a?(Array))
+            # æ¢ã«è¤æ°ããå ´åã¯é
+åã«è¿½å 
+            hTarget[sParamShortName][sName].push(sValue)
+          else
+            # 1ã¤ã ãå®ç¾©ããã¦ããå ´åã¯é
+åã«å¤æ´
+            sTemp = hTarget[sParamShortName][sName]
+            hTarget[sParamShortName][sName] = [sTemp, sValue]
+          end
+        else
+          hTarget[sParamShortName][sName] = sValue
+        end
+      }
+    }
+  }
+
+  # åç
+§ï¼å¤é¨åç
+§ï¼é¸æåç
+§
+  cElement.elements.each("REFERENCE-VALUES/ECUC-REFERENCE-VALUE"){|cElementC|
+    sName = cElementC.elements["DEFINITION-REF"].text().split("/")[-1]
+    if (cElementC.elements["VALUE-REF"].nil?)
+      abort("<VALUE> is not found in '#{sParamShortName}'")
+    end
+    sValue = cElementC.elements["VALUE-REF"].text()
+    # è¤æ°å¤éåº¦å¯¾å¿
+    if (hTarget[sParamShortName].has_key?(sName))
+      if (hTarget[sParamShortName][sName].is_a?(Array))
+        # æ¢ã«è¤æ°ããå ´åã¯é
+åã«è¿½å 
+        hTarget[sParamShortName][sName].push(sValue)
+      else
+        # 1ã¤ã ãå®ç¾©ããã¦ããå ´åã¯é
+åã«å¤æ´
+        sTemp = hTarget[sParamShortName][sName]
+        hTarget[sParamShortName][sName] = [sTemp, sValue]
+      end
+    else
+      hTarget[sParamShortName][sName] = sValue
+    end
+  }
+
+  # ã¤ã³ã¹ã¿ã³ã¹åç
+§
+  cElement.elements.each("REFERENCE-VALUES/ECUC-INSTANCE-REFERENCE-VALUE"){|cElementC|
+    sName = cElementC.elements["DEFINITION-REF"].text().split("/")[-1]
+    hTarget[sParamShortName][sName] = []
+    hTarget[sParamShortName][sName].push({"CONTEXT-ELEMENT-REF" => cElementC.elements["VALUE-IREF"].elements["CONTEXT-ELEMENT-REF"].text()})
+    hTarget[sParamShortName][sName].push({"TARGET-REF" => cElementC.elements["VALUE-IREF"].elements["TARGET-REF"].text()})
+  }
+
+  # ãµãã³ã³ãã(åå¸°å¼åºã)
+  cElement.elements.each("SUB-CONTAINERS/ECUC-CONTAINER-VALUE"){|cElementC|
+    XmlToYaml_parse_parameter(cElementC, hTarget[sParamShortName])
+  }
+end
+
+
+######################################################################
+# AUTOSARãã©ã¡ã¼ã¿æ
+å ±ãã¡ã¤ã«ä½æ
+######################################################################
+def MakeParamInfo(sFileName)
+  # ãã¡ã¤ã«ãå­å¨ããªãå ´åã¨ã©ã¼
+  if (!File.exist?(sFileName))
+    abort("Argument error !! [#{sFileName}]")
+  end
+
+  sParamFileName = File.dirname(sFileName) + "/param_info.yaml"
+
+  # èª­ã¿è¾¼ã¿å¯¾è±¡ã¢ã¸ã¥ã¼ã«
+  aTargetModule = ["Rte", "Os", "Com", "PduR", "CanIf", "Can", "EcuC", "EcuM", "WdgM", "WdgIf", "Wdg", "Dem"]
+
+  # XMLã©ã¤ãã©ãªã§ã®èª­ã¿è¾¼ã¿
+  cXmlData = REXML::Document.new(open(sFileName))
+
+  # å¤é¨åç
+§å
+ã®ãã¼ã¿åæ ¼ç´ããã·ã¥
+  $hForeignRefType = {}
+
+  # é¸æåã®ã³ã³ããæ ¼ç´é
+å
+  $aChoiceContainer = []
+
+  # ãã¼ã¹çµææ ¼ç´ããã·ã¥åæå(NCESä»æ§ã³ã³ããã¯äºãè¨­å®)
+  sNcesContainer = <<-EOS
+ECUC-ENUMERATION-PARAM-DEF:
+  - OsMemorySectionInitialize
+  - OsIsrInterruptSource
+  - OsInterCoreInterruptInterruptSource
+  - OsSpinlockLockMethod
+  - WdgTriggerMode
+  - WdgTimeoutReaction
+ECUC-INTEGER-PARAM-DEF:
+  - OsMasterCoreId
+  - OsHookStackSize
+  - OsHookStackCoreAssignment
+  - OsOsStackSize
+  - OsOsStackCoreAssignment
+  - OsNonTrustedHookStackSize
+  - OsNonTrustedHookStackCoreAssignment
+  - OsTaskStackSize
+  - OsTaskSystemStackSize
+  - OsIsrInterruptNumber
+  - OsIsrInterruptPriority
+  - OsIsrStackSize
+  - OsTrustedFunctionStackSize
+  - OsInterCoreInterruptStackSize
+  - OsMemoryRegionSize
+  - OsMemoryRegionStartAddress
+  - OsMemoryAreaSize
+  - OsStandardMemoryCoreAssignment
+  - OsIsrMaxFrequency
+  - WdgWindowOpenRate
+ECUC-STRING-PARAM-DEF:
+  - OsIncludeFileName
+  - OsMemoryRegionName
+  - OsMemoryAreaStartAddress
+  - OsMemorySectionName
+  - OsMemoryModuleName
+  - OsLinkSectionName
+  - OsIocPrimitiveDataType
+  - OsIocIncludeFile
+  - OsHookStackStartAddress
+  - OsOsStackStartAddress
+  - OsNonTrustedHookStackStartAddress
+  - OsTaskStackStartAddress
+  - OsTaskSystemStackStartAddress
+  - OsInterCoreInterruptStackStartAddress
+ECUC-BOOLEAN-PARAM-DEF:
+  - OsMemoryRegionWriteable
+  - OsMemoryAreaWriteable
+  - OsMemoryAreaReadable
+  - OsMemoryAreaExecutable
+  - OsMemoryAreaCacheable
+  - OsMemoryAreaDevice
+  - OsMemorySectionWriteable
+  - OsMemorySectionReadable
+  - OsMemorySectionExecutable
+  - OsMemorySectionShort
+  - OsMemorySectionCacheable
+  - OsMemorySectionDevice
+  - OsMemorySectionExport
+  - OsMemoryModuleExport
+  - OsTaskOsInterruptLockMonitor
+  - OsTaskResourceLockMonitor
+ECUC-REFERENCE-DEF:
+  - OsStandardMemoryRomRegionRef
+  - OsStandardMemoryRamRegionRef
+  - OsAppStandardMemoryRomRegionRef
+  - OsAppStandardMemoryRamRegionRef
+  - OsMemorySectionMemoryRegionRef
+  - OsLinkSectionMemoryRegionRef
+  - OsResourceLinkedResourceRef
+  - OsCounterIsrRef
+  - OsAppMemorySectionRef
+  - OsAppMemoryModuleRef
+  - OsAppMemoryAreaRef
+  - OsAppInterCoreInterruptRef
+  - OsInterCoreInterruptAccessingApplication
+  - OsInterCoreInterruptResourceRef
+  - WdgMOsCounterRef
+  - OsSystemCycleTimeWindowRef
+ECUC-FLOAT-PARAM-DEF:
+  - OsSystemCycleTime
+  - OsSystemCycleTimeWindowStart
+  - OsSystemCycleTimeWindowLength
+  - OsOsInterruptLockBudget
+  - OsResourceLockBudget
+  - OsTrustedFunctionExecutionBudget
+  - WdgTimeout
+  - WdgTriggerInterruptPeriod
+EOS
+  $hResult = YAML.load(sNcesContainer)
+
+  cXmlData.elements.each("AUTOSAR/AR-PACKAGES/AR-PACKAGE/AR-PACKAGES/AR-PACKAGE/ELEMENTS/ECUC-MODULE-DEF"){|cElement1|
+    # å¯¾è±¡ã¢ã¸ã¥ã¼ã«ã®ã¿ãå¦çãã
+    if (!aTargetModule.include?(cElement1.elements["SHORT-NAME"].text()))
+      next
+    end
+
+    cElement1.elements.each("CONTAINERS/ECUC-PARAM-CONF-CONTAINER-DEF"){|cElement2|
+      MakeParamInfo_parse_parameter(cElement2)
+    }
+  }
+
+  # ãã©ã¡ã¼ã¿åã§ã½ã¼ãã¨éè¤é¤å»
+  hResultSort = {}
+  $hResult.each{|sType, aParam|
+    hResultSort[sType] = aParam.uniq().sort()
+  }
+
+  # å¤é¨åç
+§å
+ã®ãã¼ã¿åæ ¼ç´ããã·ã¥ãçµå
+  if (!$hForeignRefType.empty?())
+    hResultSort[:FOREIGN_REF_TYPE] = $hForeignRefType
+  end
+
+  # é¸æåã®ã³ã³ããæ ¼ç´é
+åãè¿½å 
+  if (!$aChoiceContainer.empty?())
+    hResultSort[:ECUC_CHOICE_CONTAINER_DEF] = $aChoiceContainer
+  end
+
+  # RteSoftwareComponentInstanceRefã¯å¤é¨åç
+§ã¨ã¤ã³ã¹ã¿ã³ã¹åç
+§ã®
+  # ä¸¡æ¹ã«å«ã¾ãããï¼å¤é¨åç
+§ã¨ãã¦æ±ã
+  hResultSort["ECUC-INSTANCE-REFERENCE-DEF"].delete("RteSoftwareComponentInstanceRef")
+
+  # YAMLãã¡ã¤ã«åºå
+  open(sParamFileName, "w") do |io|
+    YAML.dump(hResultSort, io)
+  end
+
+  puts("Generated #{sParamFileName}")
+end
+
+# ãµãã³ã³ããåå¸°ãã¼ã¹é¢æ°
+def MakeParamInfo_parse_sub_container(cElement)
+  # "ECUC-PARAM-CONF-CONTAINER-DEF"ãç»å ´ããã¾ã§åå¸°ãã
+  cElement.elements.each{|cElementC|
+    # CHOICEã¯ããã«ãã¹ããã
+    if (cElementC.name == "ECUC-CHOICE-CONTAINER-DEF")
+      $aChoiceContainer.push(cElementC.elements[XML_SNAME].text())
+      MakeParamInfo_parse_sub_container(cElementC)
+    elsif (cElementC.name == "ECUC-PARAM-CONF-CONTAINER-DEF")
+      MakeParamInfo_parse_parameter(cElementC)
+    else
+      MakeParamInfo_parse_sub_container(cElementC)
+    end
+  }
+end
+
+# ã³ã³ãããã¼ã¹é¢æ°
+def MakeParamInfo_parse_parameter(cElement)
+  # ãã©ã¡ã¼ã¿
+  cElement.elements.each("PARAMETERS"){|cElementC|
+    cElementC.elements.each{|cElementG|
+      # ååºã®ãã¼ã¿åå¦ç
+      if (!$hResult.has_key?(cElementG.name))
+        $hResult[cElementG.name] = []
+      end
+
+      # åå¾ãããã©ã¡ã¼ã¿åãæ ¼ç´ãã
+      $hResult[cElementG.name].push(cElementG.elements["SHORT-NAME"].text())
+    }
+  }
+
+  # åç
+§
+  cElement.elements.each("REFERENCES/ECUC-REFERENCE-DEF"){|cElementC|
+    $hResult["ECUC-REFERENCE-DEF"].push(cElementC.elements["SHORT-NAME"].text())
+  }
+
+  # å¤é¨åç
+§
+  cElement.elements.each("REFERENCES/ECUC-FOREIGN-REFERENCE-DEF"){|cElementC|
+    # ååºã®ãã¼ã¿åå¦ç
+    if (!$hResult.has_key?("ECUC-FOREIGN-REFERENCE-DEF"))
+      $hResult["ECUC-FOREIGN-REFERENCE-DEF"] = []
+    end
+    $hResult["ECUC-FOREIGN-REFERENCE-DEF"].push(cElementC.elements["SHORT-NAME"].text())
+    $hForeignRefType[cElementC.elements["SHORT-NAME"].text()] = cElementC.elements["DESTINATION-TYPE"].text()
+  }
+
+  # é¸æåç
+§
+  cElement.elements.each("REFERENCES/ECUC-CHOICE-REFERENCE-DEF"){|cElementC|
+    # ååºã®ãã¼ã¿åå¦ç
+    if (!$hResult.has_key?("ECUC-CHOICE-REFERENCE-DEF"))
+      $hResult["ECUC-CHOICE-REFERENCE-DEF"] = []
+    end
+    $hResult["ECUC-CHOICE-REFERENCE-DEF"].push(cElementC.elements["SHORT-NAME"].text())
+  }
+
+  # ã·ã³ãã«åç
+§
+  cElement.elements.each("REFERENCES/ECUC-SYMBOLIC-NAME-REFERENCE-DEF"){|cElementC|
+    # ååºã®ãã¼ã¿åå¦ç
+    if (!$hResult.has_key?("ECUC-SYMBOLIC-NAME-REFERENCE-DEF"))
+      $hResult["ECUC-SYMBOLIC-NAME-REFERENCE-DEF"] = []
+    end
+    $hResult["ECUC-SYMBOLIC-NAME-REFERENCE-DEF"].push(cElementC.elements["SHORT-NAME"].text())
+  }
+
+  # ã¤ã³ã¹ã¿ã³ã¹åç
+§
+  cElement.elements.each("REFERENCES/ECUC-INSTANCE-REFERENCE-DEF"){|cElementC|
+    # ååºã®ãã¼ã¿åå¦ç
+    if (!$hResult.has_key?("ECUC-INSTANCE-REFERENCE-DEF"))
+      $hResult["ECUC-INSTANCE-REFERENCE-DEF"] = []
+    end
+    $hResult["ECUC-INSTANCE-REFERENCE-DEF"].push(cElementC.elements["SHORT-NAME"].text())
+  }
+
+  # ãµãã³ã³ãã(åå¸°å¼åºã)
+  cElement.elements.each("SUB-CONTAINERS"){|cElementC|
+    MakeParamInfo_parse_sub_container(cElementC)
+  }
+end
+
+
+######################################################################
+# ã¸ã§ãã¬ã¼ã¿ç¨csvãã¡ã¤ã«ã®çæ
+######################################################################
+def MakeCsv(sFileName, sTargetModule)
+  # ãã¡ã¤ã«ãå­å¨ããªãå ´åã¨ã©ã¼
+  if (!File.exist?(sFileName))
+    abort("Argument error !! [#{sFileName}]")
+  end
+
+  sCsvFileName = File.dirname(sFileName) + "/" + sTargetModule + ".csv"
+
+  # XMLã©ã¤ãã©ãªã§ã®èª­ã¿è¾¼ã¿
+  cXmlData = REXML::Document.new(open(sFileName))
+
+  $hResult = {}
+  $sNowContainer = ""
+
+  cXmlData.elements.each("AUTOSAR/AR-PACKAGES/AR-PACKAGE/AR-PACKAGES/AR-PACKAGE/ELEMENTS/ECUC-MODULE-DEF"){|cElement1|
+    # å¯¾è±¡ã¢ã¸ã¥ã¼ã«ã®ã¿ãå¦çãã
+    if (cElement1.elements["SHORT-NAME"].text() != sTargetModule)
+      next
+    end
+
+    cElement1.elements.each("CONTAINERS/ECUC-PARAM-CONF-CONTAINER-DEF"){|cElement2|
+      $sContainer = cElement2.elements["SHORT-NAME"].text()
+      $hResult[$sContainer] = MakeCsv_add_parameter_info(cElement2, nil)
+      MakeCsv_parse_parameter(cElement2)
+    }
+  }
+
+  sModulePath = "/AUTOSAR/EcucDefs/#{sTargetModule}"
+  sCsvData = "#{sModulePath},,,1\n"
+
+  hDataTypeTable = {"ECUC-REFERENCE-DEF"               => "REF",
+                    "ECUC-FOREIGN-REFERENCE-DEF"       => "REF",
+                    "ECUC-CHOICE-REFERENCE-DEF"        => "REF",
+                    "ECUC-SYMBOLIC-NAME-REFERENCE-DEF" => "REF",
+                    "ECUC-INSTANCE-REFERENCE-DEF"      => "REF",
+                    "ECUC-BOOLEAN-PARAM-DEF"           => "BOOLEAN",
+                    "ECUC-INTEGER-PARAM-DEF"           => "INT",
+                    "ECUC-FUNCTION-NAME-DEF"           => "FUNCTION",
+                    "ECUC-ENUMERATION-PARAM-DEF"       => "ENUM",
+                    "ECUC-STRING-PARAM-DEF"            => "STRING",
+                    "ECUC-FLOAT-PARAM-DEF"             => "FLOAT",
+                    "ECUC-LINKER-SYMBOL-DEF"           => "STRING",
+                    nil                                => ""}
+
+  $hResult.each{|sParam, aInfo|
+    if (!hDataTypeTable.has_key?(aInfo[0]))
+      abort("[#{__FILE__}] #{__LINE__}: #{aInfo[0]}")
+    end
+    if ((aInfo[1] == "1") && (aInfo[2] == "1"))
+      sCsvData += "#{sModulePath}/#{sParam},#{sParam.split("/")[-1]},#{hDataTypeTable[aInfo[0]]},1\n"
+    else
+      sCsvData += "#{sModulePath}/#{sParam},#{sParam.split("/")[-1]},#{hDataTypeTable[aInfo[0]]},#{aInfo[1]},#{aInfo[2]}\n"
+    end
+  }
+
+  File.open(sCsvFileName, "w") {|io|
+    io.puts(sCsvData)
+  }
+
+  puts("Generated #{sCsvFileName}")
+end
+
+# ãã©ã¡ã¼ã¿æ
+å ±è¿½å é¢æ°
+def MakeCsv_add_parameter_info(cElement, sName = cElement.name)
+  # ãã©ã¡ã¼ã¿æ¯ã«ï¼åã»å¤éåº¦ä¸éï¼ä¸éã®æ
+å ±ãåå¾
+  sLower = nil
+  if (!cElement.elements["LOWER-MULTIPLICITY"].nil?)
+    sLower = cElement.elements["LOWER-MULTIPLICITY"].text()
+  else
+    abort("[#{__FILE__}] #{__LINE__}")
+  end
+  sUpper = nil
+  if (!cElement.elements["UPPER-MULTIPLICITY"].nil?)
+    sUpper = cElement.elements["UPPER-MULTIPLICITY"].text()
+  elsif (!cElement.elements["UPPER-MULTIPLICITY-INFINITE"].nil? && (cElement.elements["UPPER-MULTIPLICITY-INFINITE"].text() == "true"))
+    sUpper = "*"
+  else
+    abort("[#{__FILE__}] #{__LINE__}")
+  end
+
+  return [sName, sLower, sUpper]
+end
+
+# ãµãã³ã³ããåå¸°ãã¼ã¹é¢æ°
+def MakeCsv_parse_sub_container(cElement)
+  # "ECUC-PARAM-CONF-CONTAINER-DEF"ãç»å ´ããã¾ã§åå¸°ãã
+  cElement.elements.each{|cElementC|
+    # CHOICEã¯ããã«ãã¹ããã
+    if (cElementC.name == "ECUC-CHOICE-CONTAINER-DEF")
+      $sContainer += "/#{cElementC.elements["SHORT-NAME"].text()}"
+      $hResult[$sContainer] = MakeCsv_add_parameter_info(cElementC, nil)
+      MakeCsv_parse_sub_container(cElementC)
+
+      aTemp = $sContainer.split("/")
+      aTemp.pop()
+      $sContainer = aTemp.join("/")
+    elsif (cElementC.name == "ECUC-PARAM-CONF-CONTAINER-DEF")
+      $sContainer += "/#{cElementC.elements["SHORT-NAME"].text()}"
+      $hResult[$sContainer] = MakeCsv_add_parameter_info(cElementC, nil)
+      MakeCsv_parse_parameter(cElementC)
+
+      aTemp = $sContainer.split("/")
+      aTemp.pop()
+      $sContainer = aTemp.join("/")
+    else
+      MakeCsv_parse_sub_container(cElementC)
+    end
+  }
+end
+
+# ã³ã³ãããã¼ã¹é¢æ°
+def MakeCsv_parse_parameter(cElement)
+  # ãã©ã¡ã¼ã¿
+  cElement.elements.each("PARAMETERS"){|cElementC|
+    cElementC.elements.each{|cElementG|
+      sParamName = "#{$sContainer}/#{cElementG.elements["SHORT-NAME"].text()}"
+      $hResult[sParamName] = MakeCsv_add_parameter_info(cElementG)
+    }
+  }
+
+  # åç
+§
+  cElement.elements.each("REFERENCES/ECUC-REFERENCE-DEF"){|cElementC|
+    sParamName = "#{$sContainer}/#{cElementC.elements["SHORT-NAME"].text()}"
+    $hResult[sParamName] = MakeCsv_add_parameter_info(cElementC)
+  }
+
+  # å¤é¨åç
+§
+  cElement.elements.each("REFERENCES/ECUC-FOREIGN-REFERENCE-DEF"){|cElementC|
+    sParamName = "#{$sContainer}/#{cElementC.elements["SHORT-NAME"].text()}"
+    $hResult[sParamName] = MakeCsv_add_parameter_info(cElementC)
+  }
+
+  # é¸æåç
+§
+  cElement.elements.each("REFERENCES/ECUC-CHOICE-REFERENCE-DEF"){|cElementC|
+    sParamName = "#{$sContainer}/#{cElementC.elements["SHORT-NAME"].text()}"
+    $hResult[sParamName] = MakeCsv_add_parameter_info(cElementC)
+  }
+
+  # ã·ã³ãã«ãã¼ã åç
+§
+  cElement.elements.each("REFERENCES/ECUC-SYMBOLIC-NAME-REFERENCE-DEF"){|cElementC|
+    sParamName = "#{$sContainer}/#{cElementC.elements["SHORT-NAME"].text()}"
+    $hResult[sParamName] = MakeCsv_add_parameter_info(cElementC)
+  }
+
+  # ã¤ã³ã¹ã¿ã³ã¹åç
+§
+  cElement.elements.each("REFERENCES/ECUC-INSTANCE-REFERENCE-DEF"){|cElementC|
+    sParamName = "#{$sContainer}/#{cElementC.elements["SHORT-NAME"].text()}"
+    $hResult[sParamName] = MakeCsv_add_parameter_info(cElementC)
+  }
+
+  # ãµãã³ã³ãã(åå¸°å¼åºã)
+  cElement.elements.each("SUB-CONTAINERS"){|cElementC|
+    MakeCsv_parse_sub_container(cElementC)
+  }
+end
+
+
+######################################################################
+# ãªãã·ã§ã³å¦ç
+######################################################################
+lMode = :YamlToXml
+sEcuExtractRef = nil
+cOpt = OptionParser.new(banner="Usage: abrex.rb [options]... [yaml|xml files]...", 18)
+cOpt.version = VERSION
+sOptData = nil
+sBswName = nil
+cOpt.on("-i XML_FILE", "ARXML to YAML conversion") {|xVal|
+  sOptData = xVal
+  lMode = :XmlToYaml
+}
+cOpt.on("-p XML_FILE", "Generate 'param_info.yaml' from AUTOSAR Ecu Configuration Parameters file") {|xVal|
+  sOptData = xVal
+  lMode = :MakeParamInfo
+}
+cOpt.on("-c XML_FILE", "Generate '{BSW_NAME}.csv' from AUTOSAR Ecu Configuration Parameters file") {|xVal|
+  sOptData = xVal
+  lMode = :MakeCsv
+}
+cOpt.on("-b BSW_NAME", "set a BSW Module Name (for '-c' additional optipn)") {|xVal|
+  sBswName = xVal
+  lMode = :MakeCsv
+}
+cOpt.on("-e ECU-EXTRACT-REF", "set a ECU-EXTRACT-REF path if <ECUC-VALUE-COLLECTION> is needed") {|xVal|
+  sEcuExtractRef = xVal
+  lMode = :YamlToXml
+}
+cOpt.on("-v", "--version", "show version information"){
+  puts(cOpt.ver())
+  exit(1)
+}
+cOpt.on("-h", "--help", "show help (this)"){
+  puts(cOpt.help())
+  exit(1)
+}
+
+begin
+  aArgData = cOpt.parse(ARGV)
+rescue OptionParser::ParseError
+  puts(cOpt.help())
+  exit(1)
+end
+
+if (((lMode == :YamlToXml) && aArgData.empty?()) ||
+    ((lMode != :YamlToXml) && sOptData.nil?()))
+  puts(cOpt.help())
+  exit(1)
+end
+
+if ((lMode == :MakeCsv) && sBswName.nil?())
+  puts(cOpt.help())
+  exit(1)
+end
+
+
+######################################################################
+# ãªãã·ã§ã³ã«å¾ã£ã¦åå¦çãå®è¡
+######################################################################
+case lMode
+  when :YamlToXml
+    YamlToXml(aArgData, sEcuExtractRef)
+  when :XmlToYaml
+    XmlToYaml(sOptData, aArgData)
+  when :MakeParamInfo
+    MakeParamInfo(sOptData)
+  when :MakeCsv
+    MakeCsv(sOptData, sBswName)
+end
Index: /atk2-sc3-1.4.0-ntisr/utils/abrex/param_info.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/abrex/param_info.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/abrex/param_info.yaml	(revision 172)
@@ -0,0 +1,799 @@
+--- 
+ECUC-STRING-PARAM-DEF: 
+- CanIfInitCfgSet
+- CanIfPublicCddHeaderFile
+- ComSignalDataInvalidValue
+- ComSignalInitValue
+- DemHeaderFileInclusion
+- EcuMModuleID
+- EcuMModuleService
+- OsHookStackStartAddress
+- OsIncludeFileName
+- OsInterCoreInterruptStackStartAddress
+- OsIocIncludeFile
+- OsIocInitValue
+- OsIocPrimitiveDataType
+- OsLinkSectionName
+- OsMemoryAreaStartAddress
+- OsMemoryModuleName
+- OsMemoryRegionName
+- OsMemorySectionName
+- OsNonTrustedHookStackStartAddress
+- OsOsStackStartAddress
+- OsTaskStackStartAddress
+- OsTaskSystemStackStartAddress
+- RteSectionInitializationPolicy
+- WdgMWatchdogName
+:ECUC_CHOICE_CONTAINER_DEF: 
+- ComGwDestination
+- ComGwSource
+- DemDebounceAlgorithmClass
+- DemDataElementClass
+- OsAlarmAction
+ECUC-FUNCTION-NAME-DEF: 
+- CanIfDispatchUserCheckTrcvWakeFlagIndicationName
+- CanIfDispatchUserClearTrcvWufFlagIndicationName
+- CanIfDispatchUserConfirmPnAvailabilityName
+- CanIfDispatchUserCtrlBusOffName
+- CanIfDispatchUserCtrlModeIndicationName
+- CanIfDispatchUserTrcvModeIndicationName
+- CanIfDispatchUserValidateWakeupEventName
+- CanIfRxPduUserRxIndicationName
+- CanIfTxPduUserTxConfirmationName
+- CanLPduReceiveCalloutFunction
+- ComErrorNotification
+- ComIPduCallout
+- ComIPduCounterErrorNotification
+- ComIPduTriggerTransmitCallout
+- ComInvalidNotification
+- ComNotification
+- ComTimeoutNotification
+- DemCallbackClearEventAllowedFnc
+- DemCallbackDTCStatusChangedFnc
+- DemCallbackEventDataChangedFnc
+- DemCallbackEventStatusChangedFnc
+- DemCallbackGetFDCFnc
+- DemCallbackInitMForEFnc
+- DemCallbackInitMForFFnc
+- DemDataElementReadFnc
+- OsAlarmCallbackName
+- OsIocReceiverPullCB
+- OsTrustedFunctionName
+- RteVfbTraceFunction
+- WdgTriggerLocation
+ECUC-FLOAT-PARAM-DEF: 
+- CanMainFunctionBusoffPeriod
+- CanMainFunctionModePeriod
+- CanMainFunctionReadPeriod
+- CanMainFunctionWakeupPeriod
+- CanMainFunctionWritePeriod
+- CanTTControllerNTUConfig
+- CanTTControllerSyncDeviation
+- CanTimeoutDuration
+- ComFirstTimeout
+- ComGwTimeBase
+- ComMinimumDelayTime
+- ComRxTimeBase
+- ComTimeout
+- ComTxModeRepetitionPeriod
+- ComTxModeTimeOffset
+- ComTxModeTimePeriod
+- ComTxTimeBase
+- DemDebounceTimeFailedThreshold
+- DemDebounceTimePassedThreshold
+- DemTaskTime
+- EcuMAlarmClockTimeOut
+- EcuMMainFunctionPeriod
+- EcuMNvramReadallTimeout
+- EcuMNvramWriteallTimeout
+- EcuMRunMinimumDuration
+- EcuMValidationTimeout
+- OsIsrAllInterruptLockBudget
+- OsIsrExecutionBudget
+- OsIsrOsInterruptLockBudget
+- OsIsrResourceLockBudget
+- OsIsrTimeFrame
+- OsOsInterruptLockBudget
+- OsResourceLockBudget
+- OsSecondsPerTick
+- OsSystemCycleTime
+- OsSystemCycleTimeWindowLength
+- OsSystemCycleTimeWindowStart
+- OsTaskAllInterruptLockBudget
+- OsTaskExecutionBudget
+- OsTaskOsInterruptLockBudget
+- OsTaskResourceLockBudget
+- OsTaskTimeFrame
+- OsTimeValue
+- OsTrustedFunctionExecutionBudget
+- RteActivationOffset
+- RteBswActivationOffset
+- RteExpectedActivationOffset
+- RteExpectedTickDuration
+- WdgInitialTimeout
+- WdgMDeadlineMax
+- WdgMDeadlineMin
+- WdgMSupervisionCycle
+- WdgMaxTimeout
+- WdgTimeout
+- WdgTriggerInterruptPeriod
+ECUC-FOREIGN-REFERENCE-DEF: 
+- ComSystemTemplateSignalGroupRef
+- ComSystemTemplateSystemSignalRef
+- OsIocDataTypeRef
+- PduRBswModuleRef
+- PredefinedVariantRef
+- RteBswEventRef
+- RteBswExclusiveAreaRef
+- RteBswImplementationRef
+- RteBswModuleConfigurationRef
+- RteBswProvidedModeGroupRef
+- RteBswReleasedTriggerRef
+- RteBswRequiredModeGroupRef
+- RteBswRequiredTriggerRef
+- RteBswTriggerSourceRef
+- RteCalibrationSwAddrMethodRef
+- RteComponentTypeRef
+- RteEventRef
+- RteExclusiveAreaRef
+- RteImplementationRef
+- RteModeSchtblMapBswProvidedModeGroupRef
+- RteModeSchtblMapModeDeclarationRef
+- RteModeSchtblMapSwcPortRef
+- RtePostBuildUsedPredefinedVariant
+- RteSoftwareComponentInstanceRef
+- RteSwNvRamMappingRef
+- RteSwcTriggerSourceRef
+- RteVariableReadAccessRef
+- RteVariableWriteAccessRef
+- SysTPduToFrameMappingRef
+ECUC-ENUMERATION-PARAM-DEF: 
+- CanBusoffProcessing
+- CanHandleType
+- CanIdType
+- CanIfDispatchUserCheckTrcvWakeFlagIndicationUL
+- CanIfDispatchUserClearTrcvWufFlagIndicationUL
+- CanIfDispatchUserConfirmPnAvailabilityUL
+- CanIfDispatchUserCtrlBusOffUL
+- CanIfDispatchUserCtrlModeIndicationUL
+- CanIfDispatchUserTrcvModeIndicationUL
+- CanIfDispatchUserValidateWakeupEventUL
+- CanIfHrhRangeRxPduRangeCanIdType
+- CanIfPrivateSoftwareFilterType
+- CanIfPublicHandleTypeEnum
+- CanIfRxPduCanIdType
+- CanIfRxPduUserRxIndicationUL
+- CanIfTxPduCanIdType
+- CanIfTxPduType
+- CanIfTxPduUserTxConfirmationUL
+- CanObjectType
+- CanRxProcessing
+- CanTTControllerOperationMode
+- CanTTHardwareObjectTriggerType
+- CanTTIRQProcessing
+- CanTxProcessing
+- CanWakeupProcessing
+- ComDataInvalidAction
+- ComFilterAlgorithm
+- ComIPduDirection
+- ComIPduSignalProcessing
+- ComIPduType
+- ComRxDataTimeoutAction
+- ComSignalEndianness
+- ComSignalType
+- ComTransferProperty
+- ComTxIPduClearUpdateBit
+- ComTxModeMode
+- DemAgingCycleCounterProcessing
+- DemClearDTCBehavior
+- DemDTCSeverity
+- DemEventCombinationSupport
+- DemEventDestination
+- DemEventKind
+- DemEventOBDReadinessGroup
+- DemEventSignificance
+- DemExtendedDataCapture
+- DemExtendedDataRecordUpdate
+- DemFreezeFrameCapture
+- DemIUMPRGroup
+- DemIndicatorBehaviour
+- DemIndicatorFailureCycleSource
+- DemInternalDataElement
+- DemOccurrenceCounterProcessing
+- DemOperationCycleProcessing
+- DemOperationCycleType
+- DemRatioIdType
+- DemStatusBitHandlingTestFailedSinceLastClear
+- DemTypeOfDTCSupported
+- DemTypeOfFreezeFrameRecordNumeration
+- EcuMDefaultState
+- OsAlarmAutostartType
+- OsCounterType
+- OsInterCoreInterruptInterruptSource
+- OsIocFunctionImplementationKind
+- OsIsrCategory
+- OsIsrInterruptSource
+- OsMemorySectionInitialize
+- OsResourceProperty
+- OsScalabilityClass
+- OsScheduleTableAutostartType
+- OsScheduleTblSyncStrategy
+- OsSpinlockLockMethod
+- OsStatus
+- OsTaskSchedule
+- PduIdTypeEnum
+- PduLengthTypeEnum
+- PduRDestPduDataProvision
+- RteCalibrationSupport
+- RteExclusiveAreaImplMechanism
+- RteGenerationMode
+- RteInitializationStrategy
+- RteIocInteractionReturnValue
+- RteOptimizationMode
+- RteOsSchedulePoint
+- WdgDefaultMode
+- WdgMWatchdogMode
+- WdgRunArea
+- WdgTimeoutReaction
+- WdgTriggerMode
+:FOREIGN_REF_TYPE: 
+  RteExclusiveAreaRef: EXCLUSIVE-AREA
+  RteEventRef: RTE-EVENT
+  RteBswRequiredModeGroupRef: MODE-DECLARATION-GROUP-PROTOTYPE
+  PredefinedVariantRef: PREDEFINED-VARIANT
+  RteCalibrationSwAddrMethodRef: SW-ADDR-METHOD
+  RteSwcTriggerSourceRef: INTERNAL-TRIGGERING-POINT
+  RteModeSchtblMapBswProvidedModeGroupRef: MODE-DECLARATION-GROUP-PROTOTYPE
+  RteBswRequiredTriggerRef: TRIGGER
+  RteBswProvidedModeGroupRef: MODE-DECLARATION-GROUP-PROTOTYPE
+  RteBswTriggerSourceRef: BSW-INTERNAL-TRIGGERING-POINT
+  OsIocDataTypeRef: IMPLEMENTATION-DATA-TYPE
+  RteSoftwareComponentInstanceRef: SW-COMPONENT-PROTOTYPE
+  RteModeSchtblMapSwcPortRef: P-PORT-PROTOTYPE
+  RteModeSchtblMapModeDeclarationRef: MODE-DECLARATION
+  RteVariableReadAccessRef: VARIABLE-ACCESS
+  RteBswReleasedTriggerRef: TRIGGER
+  RteVariableWriteAccessRef: VARIABLE-ACCESS
+  RteComponentTypeRef: SW-COMPONENT-TYPE
+  RtePostBuildUsedPredefinedVariant: PREDEFINED-VARIANT
+  RteBswModuleConfigurationRef: MODULE-CONFIGURATION
+  PduRBswModuleRef: ECUC-MODULE-CONFIGURATION-VALUES
+  SysTPduToFrameMappingRef: PDU-TO-FRAME-MAPPING
+  RteBswEventRef: BSW-EVENT
+  ComSystemTemplateSystemSignalRef: I-SIGNAL-TO-I-PDU-MAPPING
+  RteBswExclusiveAreaRef: EXCLUSIVE-AREA
+  RteImplementationRef: SWC-IMPLEMENTATION
+  RteSwNvRamMappingRef: SWC-SERVICE-DEPENDENCY
+  RteBswImplementationRef: BSW-IMPLEMENTATION
+  ComSystemTemplateSignalGroupRef: I-SIGNAL-TO-I-PDU-MAPPING
+ECUC-CHOICE-REFERENCE-DEF: 
+- ComGwSignalRef
+- DemAgingCycleRef
+- DemDataElementClassRef
+- DemDidDataElementClassRef
+- DemOBDInputAcceleratorPaddleInformation
+- DemOBDInputAmbientPressure
+- DemOBDInputAmbientTemperature
+- DemOBDInputDistanceInformation
+- DemOBDInputEngineSpeed
+- DemOBDInputEngineTemperature
+- DemOBDInputProgrammingEvent
+- DemOBDInputVehicleSpeed
+- DemPidDataElementClassRef
+- EcuMFixedModuleConfigurationRef
+- EcuMFlexModuleConfigurationRef
+- WdgExternalContainerRef
+ECUC-INTEGER-PARAM-DEF: 
+- CanControllerBaseAddress
+- CanControllerBaudRate
+- CanControllerId
+- CanControllerPropSeg
+- CanControllerSeg1
+- CanControllerSeg2
+- CanControllerSyncJumpWidth
+- CanFilterMaskValue
+- CanIdValue
+- CanIfBufferSize
+- CanIfCtrlId
+- CanIfHrhRangeRxPduLowerCanId
+- CanIfHrhRangeRxPduUpperCanId
+- CanIfPublicNumberOfCanHwUnits
+- CanIfRxPduCanId
+- CanIfRxPduCanIdRangeLowerCanId
+- CanIfRxPduCanIdRangeUpperCanId
+- CanIfRxPduDlc
+- CanIfRxPduId
+- CanIfTTMaxIsrDelay
+- CanIfTTTxJoblistTimeMark
+- CanIfTrcvId
+- CanIfTxPduCanId
+- CanIfTxPduDlc
+- CanIfTxPduId
+- CanIndex
+- CanObjectId
+- CanTTControllerApplWatchdogLimit
+- CanTTControllerCycleCountMax
+- CanTTControllerExpectedTxTrigger
+- CanTTControllerInitialRefOffset
+- CanTTControllerInterruptEnable
+- CanTTControllerTimeMasterPriority
+- CanTTControllerTxEnableWindowLength
+- CanTTControllerWatchTriggerGapTimeMark
+- CanTTControllerWatchTriggerTimeMark
+- CanTTHardwareObjectBaseCycle
+- CanTTHardwareObjectCycleRepetition
+- CanTTHardwareObjectTimeMark
+- CanTTHardwareObjectTriggerId
+- CanTTRxJoblistTimeMark
+- ComBitPosition
+- ComBitSize
+- ComConfigurationId
+- ComFilterMask
+- ComFilterMax
+- ComFilterMin
+- ComFilterOffset
+- ComFilterPeriod
+- ComFilterX
+- ComHandleId
+- ComIPduCounterSize
+- ComIPduCounterStartPosition
+- ComIPduCounterThreshold
+- ComIPduGroupHandleId
+- ComIPduHandleId
+- ComIPduReplicationQuorum
+- ComSignalLength
+- ComSupportedIPduGroups
+- ComTxIPduUnusedAreasDefault
+- ComTxModeNumberOfRepetitions
+- ComUpdateBitPosition
+- DemAgingCycleCounterThreshold
+- DemBswErrorBufferSize
+- DemDTCFunctionalUnit
+- DemDataElementDataSize
+- DemDebounceCounterDecrementStepSize
+- DemDebounceCounterFailedThreshold
+- DemDebounceCounterIncrementStepSize
+- DemDebounceCounterJumpDownValue
+- DemDebounceCounterJumpUpValue
+- DemDebounceCounterPassedThreshold
+- DemDidIdentifier
+- DemDtcStatusAvailabilityMask
+- DemEnableConditionId
+- DemEventFailureCycleCounterThreshold
+- DemEventId
+- DemEventPriority
+- DemExtendedDataRecordNumber
+- DemFreezeFrameRecordNumber
+- DemGroupDTCs
+- DemImmediateNvStorageLimit
+- DemIndicatorFailureCycleCounterThreshold
+- DemIndicatorHealingCycleCounterThreshold
+- DemIndicatorID
+- DemMaxNumberEventEntryMirror
+- DemMaxNumberEventEntryPermanent
+- DemMaxNumberEventEntryPrimary
+- DemMaxNumberEventEntrySecondary
+- DemMaxNumberFreezeFrameRecords
+- DemMaxNumberPrestoredFF
+- DemObdDTC
+- DemPidIdentifier
+- DemStorageConditionId
+- DemUdsDTC
+- EcuMAlarmClockId
+- EcuMConfigConsistencyHash
+- EcuMDivisor
+- EcuMFixedUser
+- EcuMFlexUser
+- EcuMResetModeId
+- EcuMShutdownCauseId
+- EcuMShutdownTargetId
+- EcuMSleepModeId
+- EcuMWakeupSourceId
+- OsAlarmAlarmTime
+- OsAlarmCycleTime
+- OsApplicationCoreAssignment
+- OsCounterMaxAllowedValue
+- OsCounterMinCycle
+- OsCounterTicksPerBase
+- OsEventMask
+- OsHookStackCoreAssignment
+- OsHookStackSize
+- OsInterCoreInterruptStackSize
+- OsIocBufferLength
+- OsIocDataPropertyIndex
+- OsIocSenderId
+- OsIsrInterruptNumber
+- OsIsrInterruptPriority
+- OsIsrMaxFrequency
+- OsIsrStackSize
+- OsMasterCoreId
+- OsMemoryAreaSize
+- OsMemoryRegionSize
+- OsMemoryRegionStartAddress
+- OsNonTrustedHookStackCoreAssignment
+- OsNonTrustedHookStackSize
+- OsNumberOfCores
+- OsOsStackCoreAssignment
+- OsOsStackSize
+- OsScheduleTableDuration
+- OsScheduleTableMaxLengthen
+- OsScheduleTableMaxShorten
+- OsScheduleTableStartValue
+- OsScheduleTblExpPointOffset
+- OsScheduleTblExplicitPrecision
+- OsStandardMemoryCoreAssignment
+- OsTaskActivation
+- OsTaskPriority
+- OsTaskStackSize
+- OsTaskSystemStackSize
+- OsTrustedFunctionStackSize
+- PduLength
+- PduRConfigurationId
+- PduRDefaultValueElement
+- PduRDefaultValueElementBytePosition
+- PduRDestPduHandleId
+- PduRMaxTpBufferNumber
+- PduRMaxTxBufferNumber
+- PduRPduMaxLength
+- PduRRoutingPathGroupId
+- PduRSourcePduHandleId
+- PduRTpBufferLength
+- PduRTpThreshold
+- PduRTxBufferDepth
+- RteBswPositionInTask
+- RteBswTriggerSourceQueueLength
+- RteCodeVendorId
+- RtePositionInTask
+- RteToolChainSignificantCharacters
+- RteTriggerSourceQueueLength
+- WdgIfDeviceIndex
+- WdgIndex
+- WdgMCallerId
+- WdgMCheckpointId
+- WdgMExpectedAliveIndications
+- WdgMExpiredSupervisionCycleTol
+- WdgMFailedAliveSupervisionRefCycleTol
+- WdgMMaxMargin
+- WdgMMinMargin
+- WdgMModeId
+- WdgMSupervisedEntityId
+- WdgMSupervisionReferenceCycle
+- WdgMTriggerConditionValue
+- WdgWindowOpenRate
+ECUC-REFERENCE-DEF: 
+- CanControllerDefaultBaudrate
+- CanControllerRef
+- CanCounterRef
+- CanCpuClockRef
+- CanFilterMaskRef
+- CanIfBufferHthRef
+- CanIfCtrlDrvInitHohConfigRef
+- CanIfCtrlDrvNameRef
+- CanIfHrhCanCtrlIdRef
+- CanIfHthCanCtrlIdRef
+- CanIfInitRefCfgSet
+- CanIfRxPduBswSchExclAreaIdRef
+- CanIfRxPduHrhIdRef
+- CanIfRxPduRef
+- CanIfTTRxHwObjectTriggerIdRef
+- CanIfTTTxHwObjectTriggerIdRef
+- CanIfTxPduBswSchExclAreaIdRef
+- CanIfTxPduBufferRef
+- CanIfTxPduRef
+- CanMainFunctionRWPeriodRef
+- CanSupportTTCANRef
+- ComGwIPduRef
+- ComIPduGroupGroupRef
+- ComIPduGroupRef
+- ComIPduReplicaRef
+- ComIPduSignalGroupRef
+- ComIPduSignalRef
+- ComPduIdRef
+- DemDTCClassRef
+- DemDiagnosticEventRef
+- DemDidClassRef
+- DemEnableConditionGroupRef
+- DemEnableConditionRef
+- DemEventFailureCycleRef
+- DemExtendedDataClassRef
+- DemExtendedDataRecordClassRef
+- DemFreezeFrameClassRef
+- DemFreezeFrameRecNumClassRef
+- DemIndicatorFailureCycleRef
+- DemIndicatorHealingCycleRef
+- DemIndicatorRef
+- DemMILIndicatorRef
+- DemOperationCycleRef
+- DemStorageConditionGroupRef
+- DemStorageConditionRef
+- EcuMDefaultAppMode
+- EcuMFlexEcucPartitionRef
+- EcuMOSResource
+- OsAlarmAccessingApplication
+- OsAlarmActivateTaskRef
+- OsAlarmAppModeRef
+- OsAlarmCounterRef
+- OsAlarmIncrementCounterRef
+- OsAlarmSetEventRef
+- OsAlarmSetEventTaskRef
+- OsAppAlarmRef
+- OsAppCounterRef
+- OsAppEcucPartitionRef
+- OsAppInterCoreInterruptRef
+- OsAppIsrRef
+- OsAppMemoryAreaRef
+- OsAppMemoryModuleRef
+- OsAppMemorySectionRef
+- OsAppScheduleTableRef
+- OsAppStandardMemoryRamRegionRef
+- OsAppStandardMemoryRomRegionRef
+- OsAppTaskRef
+- OsCounterAccessingApplication
+- OsCounterIsrRef
+- OsGptChannelRef
+- OsInterCoreInterruptAccessingApplication
+- OsInterCoreInterruptResourceRef
+- OsIocReceivingOsApplicationRef
+- OsIocSendingOsApplicationRef
+- OsIsrResourceLockResourceRef
+- OsIsrResourceRef
+- OsLinkSectionMemoryRegionRef
+- OsMemorySectionMemoryRegionRef
+- OsResourceAccessingApplication
+- OsResourceLinkedResourceRef
+- OsRestartTask
+- OsSchTblAccessingApplication
+- OsScheduleTableActivateTaskRef
+- OsScheduleTableAppModeRef
+- OsScheduleTableCounterRef
+- OsScheduleTableSetEventRef
+- OsScheduleTableSetEventTaskRef
+- OsSpinlockAccessingApplication
+- OsSpinlockSuccessor
+- OsStandardMemoryRamRegionRef
+- OsStandardMemoryRomRegionRef
+- OsSystemCycleTimeWindowRef
+- OsTaskAccessingApplication
+- OsTaskAppModeRef
+- OsTaskEventRef
+- OsTaskResourceLockResourceRef
+- OsTaskResourceRef
+- PduRDestPduRef
+- PduRDestTxBufferRef
+- PduRSrcPduRef
+- RteActivationOsAlarmRef
+- RteActivationOsSchTblRef
+- RteActivationOsTaskRef
+- RteBswExclusiveAreaOsResourceRef
+- RteBswMappedToTaskRef
+- RteBswProvidedModeGrpModInstRef
+- RteBswReleasedTriggerModInstRef
+- RteBswUsedOsAlarmRef
+- RteBswUsedOsEventRef
+- RteBswUsedOsSchTblExpiryPointRef
+- RteExclusiveAreaOsResourceRef
+- RteMappedToTaskRef
+- RteModeScheduleTableRef
+- RteModeSchtblMapBswInstanceRef
+- RteModeSchtblMapSwcInstanceRef
+- RteUsedOsAlarmRef
+- RteUsedOsEventRef
+- RteUsedOsSchTblExpiryPointRef
+- RteVirtuallyMappedToTaskRef
+- WdgMEcucPartitionRef
+- WdgMOsApplicationRef
+- WdgMOsCounterRef
+ECUC-SYMBOLIC-NAME-REFERENCE-DEF: 
+- CanIfCtrlCanCtrlRef
+- CanIfHrhCanHandleTypeRef
+- CanIfHrhIdSymRef
+- CanIfHthCanHandleTypeRef
+- CanIfHthIdSymRef
+- CanIfTrcvCanTrcvRef
+- CanWakeupSourceRef
+- DemFunctionIdRef
+- DemNvRamBlockIdRef
+- DemSecondaryFunctionIdRef
+- ECUM_E_ALL_RUN_REQUESTS_KILLED
+- ECUM_E_CONFIGURATION_DATA_INCONSISTENT
+- ECUM_E_RAM_CHECK_FAILED
+- EcuMAlarmClockUser
+- EcuMAlarmWakeupSource
+- EcuMComMChannelRef
+- EcuMComMCommunicationAllowedList
+- EcuMDefaultResetModeRef
+- EcuMDefaultSleepModeRef
+- EcuMGoDownAllowedUserRef
+- EcuMNormalMcuModeRef
+- EcuMResetReasonRef
+- EcuMSetClockAllowedUserRef
+- EcuMSleepModeMcuModeRef
+- EcuMSleepModeRef
+- EcuMSuccessorRef
+- EcuMTTIIWakeupSourceRef
+- EcuMWakeupSourceMask
+- RteNvmBlockRef
+- WDGM_E_IMPROPER_CALLER
+- WDGM_E_MONITORING
+- WDGM_E_SET_MODE
+- WDG_E_DISABLE_REJECTED
+- WDG_E_MODE_FAILED
+- WdgIfDriverRef
+- WdgMAliveSupervisionCheckpointRef
+- WdgMDeadlineStartRef
+- WdgMDeadlineStopRef
+- WdgMExternalCheckpointFinalRef
+- WdgMExternalCheckpointInitialRef
+- WdgMExternalTransitionDestRef
+- WdgMExternalTransitionSourceRef
+- WdgMInitialMode
+- WdgMInternalCheckpointFinalRef
+- WdgMInternalCheckpointInitialRef
+- WdgMInternalTransitionDestRef
+- WdgMInternalTransitionSourceRef
+- WdgMLocalStatusSupervisedEntityRef
+- WdgMTriggerWatchdogRef
+- WdgMWatchdogDeviceRef
+ECUC-INSTANCE-REFERENCE-DEF: 
+- DemDataElementInstanceRef
+- EcucPartitionSoftwareComponentInstanceRef
+- RteSwcTriggerSourceRef
+ECUC-LINKER-SYMBOL-DEF: 
+- RteNvmRamBlockLocationSymbol
+- RteNvmRomBlockLocationSymbol
+- RteVfbTraceClientPrefix
+ECUC-BOOLEAN-PARAM-DEF: 
+- CanChangeBaudrateApi
+- CanControllerActivation
+- CanDevErrorDetection
+- CanHardwareCancellation
+- CanIdenticalIdCancellation
+- CanIfCtrlDrvTxCancellation
+- CanIfCtrlWakeupSupport
+- CanIfHrhSoftwareFilter
+- CanIfPrivateDlcCheck
+- CanIfPublicCancelTransmitSupport
+- CanIfPublicChangeBaudrateSupport
+- CanIfPublicDevErrorDetect
+- CanIfPublicMultipleDrvSupport
+- CanIfPublicPnSupport
+- CanIfPublicReadRxPduDataApi
+- CanIfPublicReadRxPduNotifyStatusApi
+- CanIfPublicReadTxPduNotifyStatusApi
+- CanIfPublicSetDynamicTxIdApi
+- CanIfPublicTxBuffering
+- CanIfPublicTxConfirmPollingSupport
+- CanIfPublicVersionInfoApi
+- CanIfPublicWakeupCheckValidByNM
+- CanIfPublicWakeupCheckValidSupport
+- CanIfRxPduReadData
+- CanIfRxPduReadNotifyStatus
+- CanIfSupportTTCAN
+- CanIfTTJoblist
+- CanIfTrcvWakeupSupport
+- CanIfTxPduPnFilterPdu
+- CanIfTxPduReadNotifyStatus
+- CanMultiplexedTransmission
+- CanTTControllerExternalClockSynchronisation
+- CanTTControllerGlobalTimeFiltering
+- CanTTControllerLevel2
+- CanTTControllerTURRestore
+- CanTTControllerTimeMaster
+- CanVersionInfoApi
+- CanWakeupSupport
+- ComConfigurationUseDet
+- ComEnableMDTForCyclicTransmission
+- ComIPduCancellationSupport
+- ComRetryFailedTransmitRequests
+- ComVersionInfoApi
+- DemAgingAllowed
+- DemConsiderPtoStatus
+- DemDTCSuppressionSupport
+- DemDataElementUsePort
+- DemDebounceCounterBasedSupport
+- DemDebounceCounterJumpDown
+- DemDebounceCounterJumpUp
+- DemDebounceTimeBasedSupport
+- DemDevErrorDetect
+- DemEnableConditionStatus
+- DemEnableConditionSupport
+- DemEventDisplacementSupport
+- DemFFPrestorageSupported
+- DemImmediateNvStorage
+- DemOBDSupport
+- DemOperationCycleStatusStorage
+- DemPTOSupport
+- DemStatusBitStorageTestFailed
+- DemStorageConditionStatus
+- DemStorageConditionSupport
+- DemTriggerDcmReports
+- DemTriggerDltReports
+- DemTriggerFiMReports
+- DemTriggerMonitorInitBeforeClearOk
+- DemVersionInfoApi
+- EcuMAlarmClockPresent
+- EcuMDevErrorDetect
+- EcuMEnableDefBehaviour
+- EcuMIncludeComM
+- EcuMIncludeDem
+- EcuMIncludeDet
+- EcuMIncludeNvM
+- EcuMIncludeNvramMgr
+- EcuMResetLoopDetection
+- EcuMSleepModeSuspend
+- EcuMTTIIEnabled
+- EcuMVersionInfoApi
+- EcuMWakeupSourcePolling
+- EcucPartitionBswModuleExecution
+- OsAppErrorHook
+- OsAppShutdownHook
+- OsAppStartupHook
+- OsErrorHook
+- OsMemoryAreaCacheable
+- OsMemoryAreaDevice
+- OsMemoryAreaExecutable
+- OsMemoryAreaReadable
+- OsMemoryAreaWriteable
+- OsMemoryModuleExport
+- OsMemoryRegionWriteable
+- OsMemorySectionCacheable
+- OsMemorySectionDevice
+- OsMemorySectionExecutable
+- OsMemorySectionExport
+- OsMemorySectionReadable
+- OsMemorySectionShort
+- OsMemorySectionWriteable
+- OsPostTaskHook
+- OsPreTaskHook
+- OsProtectionHook
+- OsScheduleTableRepeating
+- OsShutdownHook
+- OsStackMonitoring
+- OsStartupHook
+- OsTaskOsInterruptLockMonitor
+- OsTaskResourceLockMonitor
+- OsTrusted
+- OsUseGetServiceId
+- OsUseParameterAccess
+- OsUseResScheduler
+- PartitionCanBeRestarted
+- PduRCancelReceive
+- PduRCancelTransmit
+- PduRChangeParameterRequestApi
+- PduRCommunicationInterface
+- PduRDevErrorDetect
+- PduRIsEnabledAtInit
+- PduRIsMinimumRouting
+- PduRLowerModule
+- PduRRetransmission
+- PduRTransmissionConfirmation
+- PduRTransportProtocol
+- PduRTriggertransmit
+- PduRTxConfirmation
+- PduRUpperModule
+- PduRUseTag
+- PduRVersionInfoApi
+- PduRZeroCostOperation
+- RteBswImmediateRestart
+- RteCalibrationSupportEnabled
+- RteCoherentAccess
+- RteDevErrorDetect
+- RteDevErrorDetectUninit
+- RteImmediateBufferUpdate
+- RteImmediateRestart
+- RteMeasurementSupport
+- RteSchMVersionInfoApi
+- RteUseComShadowSignalApi
+- RteValueRangeCheckEnabled
+- RteVfbTraceEnabled
+- WdgDevErrorDetect
+- WdgDisableAllowed
+- WdgIfDevErrorDetect
+- WdgIfVersionInfoApi
+- WdgMDefensiveBehavior
+- WdgMDemStoppedSupervisionReport
+- WdgMDevErrorDetect
+- WdgMImmediateReset
+- WdgMOffModeEnabled
+- WdgMVersionInfoApi
+- WdgVersionInfoApi
Index: /atk2-sc3-1.4.0-ntisr/utils/abrex/readme.txt
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/abrex/readme.txt	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/abrex/readme.txt	(revision 172)
@@ -0,0 +1,281 @@
+
+	ABREX - AUTOSAR BSW and RTE XML Generator -
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ABREXãä½¿ç¨ããããã«å¿
+è¦ãªäºé 
+ãèª¬æãããã®ã§ããï¼
+
+----------------------------------------------------------------------
+ABREX
+    AUTOSAR BSW and RTE XML Generator
+
+Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+            Graduate School of Information Science, Nagoya Univ., JAPAN
+Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+Copyright (C) 2013-2015 by FUJI SOFT INCORPORATED, JAPAN
+Copyright (C) 2014-2015 by NEC Communication Systems, Ltd., JAPAN
+Copyright (C) 2013-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+Copyright (C) 2013-2015 by Sunny Giken Inc., JAPAN
+Copyright (C) 2013-2015 by TOSHIBA CORPORATION, JAPAN
+Copyright (C) 2013-2015 by Witz Corporation
+Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+
+ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã® (1)ã(3)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ãã­ã¥ã¡
+ã³ãï¼æ¬ãã­ã¥ã¡ã³ããæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+(1) æ¬ãã­ã¥ã¡ã³ããå©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶
+    ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ãã­ã¥ã¡ã³ãä¸­ã«å«ã¾ãã¦
+    ãããã¨ï¼
+(2) æ¬ãã­ã¥ã¡ã³ããæ¹å¤ããå ´åã«ã¯ï¼ãã­ã¥ã¡ã³ããæ¹å¤ããæ¨ã®è¨è¿°
+    ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡ã³ãä¸­ã«å«ãããã¨ï¼ãã ãï¼æ¹å¤å¾ã®ãã­ã¥ã¡
+    ã³ããï¼TOPPERSãã­ã¸ã§ã¯ãæå®ã®éçºææç©ã§ããå ´åã«ã¯ï¼ãã®é
+    ãã§ã¯ãªãï¼
+(3) æ¬ãã­ã¥ã¡ã³ãã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³
+    ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼ã¾ãï¼
+    æ¬ãã­ã¥ã¡ã³ãã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãçç±ã«åºã¥
+    ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»æ§
+ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§ã¯ãª
+ãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©ç¨ãã
+è
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+
+æ¬ãã­ã¥ã¡ã³ãã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ãã
+ã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ãã­ã¥ã¡ã³ãã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®çã«å¯¾ã
+ãé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ãã­ã¥ã¡ã³ãã®å©ç¨
+ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² 
+ããªãï¼
+
+$Id: readme.txt 571 2015-12-21 05:01:59Z t_ishikawa $
+----------------------------------------------------------------------
+
+âââââââââââââââââââââââââââââââââââ
+(1) ABREXæ¦è¦
+âââââââââââââââââââââââââââââââââââ
+
+ABREXã¯ï¼OSï¼COMãå§ãã¨ããBSWã¨ï¼RTEã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+(XML)ãçæãããã¼ã«ã§ããï¼YAMLãã©ã¼ãããã§è¨è¿°ããã³ã³ãã£ã®ã¥ã¬ã¼
+ã·ã§ã³æ
+å ±ãå
+¥åã¨ãã¦ï¼å¯¾å¿ããXMLãçæããï¼
+
+âââââââââââââââââââââââââââââââââââ
+(2) ä½¿ãæ¹
+âââââââââââââââââââââââââââââââââââ
+âââââââââââââââââââââââââââââââââââ
+(2.1) åä½ç°å¢
+âââââââââââââââââââââââââââââââââââ
+
+ABREXã¯Rubyã«ãã£ã¦è¨è¿°ããã¦ããããï¼Rubyã®å®è¡ç°å¢ãå¿
+è¦ã§ããï¼
+Cygwinã«å«ã¾ããä»¥ä¸ã®ãã¼ã¸ã§ã³ã®Rubyã§åä½ç¢ºèªæ¸ã¿ã§ããï¼
+
+ruby 1.9.3p327 (2012-11-10 revision 37606) [i386-cygwin]
+
+âââââââââââââââââââââââââââââââââââ
+(2.2) ã³ã³ããæ
+å ±ã®çæ
+âââââââââââââââââââââââââââââââââââ
+â»æ¬æé ã¯æ¢ã«param_info.yamlãå­å¨ããå ´åï¼ä¸è¦ã§ãã
+
+-pãªãã·ã§ã³ã«ï¼AUTOSARããå
+¬éããã¦ããECUã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã©
+ã¡ã¼ã¿ã³ã³ããæ
+å ±ãã¡ã¤ã«(*)ãå¼æ°ã¨ãã¦ä¸ãï¼å®è¡ããï¼
+(*)http://www.autosar.org
+   Methodology and Templates -> Templates -> Standard Specifications
+    -> AUTOSAR_MOD_ECUConfigurationParameters.zip
+   è§£åããã¨"AUTOSAR_MOD_ECUConfigurationParameters.arxml"ã¨ãªã
+
+$ ruby abrex.rb -p AUTOSAR_MOD_ECUConfigurationParameters.arxml
+
+åãã©ã¡ã¼ã¿ã³ã³ããã®ãã¼ã¿åï¼å¤é¨åç
+§åã®åç
+§å
+æ
+å ±ãªã©ãï¼
+param_info.yamlã«åºåãããï¼
+
+âââââââââââââââââââââââââââââââââââ
+(2.3) YAMLãã¡ã¤ã«ã®ä½æ
+âââââââââââââââââââââââââââââââââââ
+çæãããXMLãã¡ã¤ã«ã®æ
+å ±ãYAMLãã©ã¼ãããã§è¨è¿°ããï¼
+ã»æä¸ä½ã®ã¬ã¤ã¤ãããã±ã¼ã¸åï¼ãã®æ¬¡ãECUã¢ã¸ã¥ã¼ã«åã¨ãªãï¼
+ã»ECUã¢ã¸ã¥ã¼ã«åã®ä¸ã«è©²å½ã¢ã¸ã¥ã¼ã«ã«å«ã¾ãããã©ã¡ã¼ã¿åãã­ã¼ã¨ãã¦ï¼
+  ãã©ã¡ã¼ã¿ã³ã³ããã¨å¤ãããã·ã¥å½¢å¼ã§è¨è¿°ããï¼
+ã»ãµãã³ã³ããã¯ï¼ããã·ã¥ããã¹ããããã¨ã§è¡¨ç¾ããï¼
+ã»ã³ã³ããã¸ã®åç
+§ã¯ï¼YAMLãã¡ã¤ã«ã«å®ç¾©ããããã±ã¼ã¸åã«å¾ã£ã¦ãã¹ã
+  è¨è¿°ããï¼
+
+â OSã®ä¾
+
+Os:
+  Os:
+    MainApp:
+      DefinitionRef: OsAppMode
+    OsOS:
+      OsStackMonitoring: 1
+      OsStatus: EXTENDED
+      OsUseGetServiceId: 1
+      OsUseParameterAccess: 1
+      OsScalabilityClass: SC1
+      OsHooks:
+        OsErrorHook: 0
+        OsPostTaskHook: 0
+        OsPreTaskHook: 0
+        OsProtectionHook: 0
+        OsShutdownHook: 0
+        OsStartupHook: 0
+      OsHookStack:
+        OsHookStackSize: 1024
+      OsOsStack:
+        OsOsStackSize: 1024
+    TASK1:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 10
+      OsTaskSchedule: FULL
+      OsTaskStackSize: 1024
+      OsTaskEventRef: /Os/Os/EVENT1
+      OsTaskAutostart:
+        OsTaskAppModeRef: /Os/Os/MainApp
+    EVENT1:
+      DefinitionRef: OsEvent
+
+âââââââââââââââââââââââââââââââââââ
+(2.4) XMLãã¡ã¤ã«ã®çæ
+âââââââââââââââââââââââââââââââââââ
+ä½æããYAMLãã¡ã¤ã«ãå¼æ°ã¨ãã¦ï¼abrex.rbãå®è¡ããï¼
+
+$ ruby abrex.rb ./sample.yaml
+
+å
+¥åããYAMLãã¡ã¤ã«ã®æ
+å ±ã«å¯¾å¿ããXMLãã¡ã¤ã«ãï¼å
+¥åãã¡ã¤ã«åã®æ¡å¼µ
+å­ãarxmlã«å¤æ´ãããã¡ã¤ã«ã«åºåãããï¼
+â»ä¸è¨ä¾ã®å ´åï¼sample.arxml
+
+ã»(2.1)ã§çæããparam_info.yamlã«å«ã¾ããªãã­ã¼åãç»å ´ããå ´åï¼ã¨ã©
+  ã¼çµäºããï¼
+ã»ãµãã³ã³ããåã¯param_info.yamlã«å«ã¾ããï¼YAMLãã¡ã¤ã«ã«è¨è¿°ããåç§°
+  ãæ­£ãããã®ã¨ãã¦ï¼ãµãã³ã³ãããçæããï¼
+ã»è¨­å®å¤ã®å¦¥å½æ§ç­ã®ãã§ãã¯ã¯ä¸åè¡ããªãï¼
+
+å¼æ°ã®YAMLãã¡ã¤ã«ã¯è¤æ°æå®ãããã¨ãã§ãï¼ãã¹ã¦ã®YAMLãã¡ã¤ã«ã®æ
+å ±
+ããã¼ã¸ããXMLãã¡ã¤ã«ãçæããï¼åããã¹ã®ã³ã³ãããç°ãªããã¡ã¤ã«ã«
+å­å¨ããå ´åï¼1ã¤ã®ã³ã³ããã«ãã¼ã¸ããï¼ä¾ãã°ï¼ä»¥ä¸ã®a.yamlã¨b.yamlã
+å
+¥åããå ´åï¼MAIN_HW_COUNTERã«ã¯ä¸¡æ¹ã®ãã¡ã¤ã«ã«æå®ããããã¹ã¦ã®ãã©
+ã¡ã¼ã¿ãè¨­å®ãããXMLãã¡ã¤ã«ã¨ãªãï¼
+
+ï¼a.yamlï¼
+Os:
+  Os:
+    MAIN_HW_COUNTER:
+      DefinitionRef: OsCounter
+      OsCounterMaxAllowedValue: 0x7FFFFFFF
+      OsCounterTicksPerBase: 10
+      OsCounterMinCycle: 4000
+      OsCounterType: HARDWARE
+      OsSecondsPerTick: 1.666666e-08
+      OsCounterIsrRef: /Os/Os/ISR1
+
+ï¼b.yamlï¼
+Os:
+  Os:
+    MAIN_HW_COUNTER:
+      OsCounterAccessingApplication: OSAP1
+
+â»åããã¹ã®ãã©ã¡ã¼ã¿ãè¤æ°ã®ãã¡ã¤ã«ã«å«ã¾ããå ´åã¯ï¼å¤éåº¦ã*ã¨å¤æ­
+  ãã¦ï¼è¤æ°ã®ã³ã³ãããçæããï¼(ãã©ã¡ã¼ã¿æ¯ã®å¤éåº¦æ
+å ±ã¯ä¿æããªã)
+
+âââââââââââââââââââââââââââââââââââ
+(3) ãã®ä»ã®æ©è½
+âââââââââââââââââââââââââââââââââââ
+âââââââââââââââââââââââââââââââââââ
+(3.1) XMLããYAMLãä½æãã(éå¤æ)
+âââââââââââââââââââââââââââââââââââ
+ABREXã§ã¯ï¼ä½ææ¸ã¿ã®XMLãã¡ã¤ã«ããï¼YAMLãã¡ã¤ã«ãä½æãããã¨ãåºæ¥
+ãï¼-iãªãã·ã§ã³ã«ï¼AUTOSARæºæ ã®XMLãå¼æ°ã¨ãã¦ä¸ãï¼å®è¡ããï¼
+
+$ ruby abrex.rb -i sample.arxml
+
+å
+¥åããXMLãã¡ã¤ã«ã®æ
+å ±ã«å¯¾å¿ããYAMLãã¡ã¤ã«ãï¼å
+¥åãã¡ã¤ã«åã®æ¡å¼µ
+å­ãyamlã«å¤æ´ãããã¡ã¤ã«ã«åºåãããï¼
+â»ä¸è¨ä¾ã®å ´åï¼sample.yaml
+
+âââââââââââââââââââââââââââââââââââ
+(3.2) ã¸ã§ãã¬ã¼ã¿ç¨csvãã¡ã¤ã«ã®çæ
+âââââââââââââââââââââââââââââââââââ
+TOPPERS/ATK2ã§ä½¿ç¨ããã¸ã§ãã¬ã¼ã¿(cfg.exe)ã¯XMLã³ã³ããæ
+å ±ãCSVãã¡ã¤
+ã«ã§ä¸ããå¿
+è¦ããããï¼ECUã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã©ã¡ã¼ã¿ã³ã³ããæ
+å ±
+ãã¡ã¤ã«ããçæãããã¨ãå¯è½ã§ããï¼-cãªãã·ã§ã³ã«ï¼ECUã³ã³ãã£ã®ã¥ã¬
+ã¼ã·ã§ã³ãã©ã¡ã¼ã¿ã³ã³ããæ
+å ±ãã¡ã¤ã«ãå¼æ°ã¨ãã¦ä¸ãï¼-bãªãã·ã§ã³ã«ï¼
+çæããå¯¾è±¡ã®ã¢ã¸ã¥ã¼ã«å(*)ãå¼æ°ã¨ãã¦ä¸ãï¼å®è¡ããï¼
+
+(*)http://www.autosar.org
+   Software Architecture -> General -> AUTOSAR_TR_BSWModuleList.pdf
+   ä¸è¨ãã¡ã¤ã«ã«è¦å®ããã¦ããModule abbreviationã§æå®ããï¼
+
+$ ruby abrex.rb -b Com -c AUTOSAR_MOD_ECUConfigurationParameters.arxml
+
+æå®ããå¯¾è±¡ã®ã¢ã¸ã¥ã¼ã«åã®CSVãã¡ã¤ã«ã«åºåãããï¼
+â»ä¸è¨ä¾ã®å ´åï¼Com.csv
+
+ï¼æ³¨æäºé 
+ï¼
+çæããCSVãã¡ã¤ã«ã®ã³ã³ããã®ç­ç¸®åã¯ï¼ã³ã³ããåããã®ã¾ã¾ä½¿ç¨ããï¼
+å¾ã£ã¦ï¼åãåç§°ã®ã³ã³ãããç°ãªãã³ã³ããã®ãµãã³ã³ããã¨ãã¦å­å¨ãã
+å ´åã¯ï¼ã¸ã§ãã¬ã¼ã¿å®è¡æã«åºå¥ã§ããªããªãï¼ãã®å ´åï¼æåã§åºå¥ã§ã
+ãããã«ä¿®æ­£ããå¿
+è¦ãããï¼
+
+(ä¾)Comã®ComTxModeFalseã¨ComTxModeTrueã«å«ã¾ããComTxModeã³ã³ãã
+/AUTOSAR/EcucDefs/Com/ComConfig/ComIPdu/ComTxIPdu/ComTxModeFalse/ComTxMode,ComTxMode,,1
+/AUTOSAR/EcucDefs/Com/ComConfig/ComIPdu/ComTxIPdu/ComTxModeTrue/ComTxMode,ComTxMode,,1
+
+âââââââââââââââââââââââââââââââââââ
+(4) æ³¨æäºé 
+
+âââââââââââââââââââââââââââââââââââ
+âââââââââââââââââââââââââââââââââââ
+(4.1) ECUã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã©ã¡ã¼ã¿ã³ã³ããæ
+å ±ãã¡ã¤ã«ã®èª¤è¨ä¿®æ­£
+âââââââââââââââââââââââââââââââââââ
+ã³ã³ããæ
+å ±ã®çæ(æ¬ãã­ã¥ã¡ã³ãã®2.2ç« ãåç
+§)ã«ããã¦ä½¿ç¨ãã¦ããï¼
+ECUã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã©ã¡ã¼ã¿ã³ã³ããæ
+å ±ãã¡ã¤ã«ã§ãã
+AUTOSAR_MOD_ECUConfigurationParameters.arxmlã®èª¤è¨ãä¿®æ­£ããå¿
+è¦ãããï¼
+
+ç¾å¨å¤æãã¦ããèª¤è¨ãä»¥ä¸ã«ç¤ºãï¼
+
+ã»(èª¤)WdgMInternallCheckpointFinalRef
+  (æ­£)WdgMInternalCheckpointFinalRef
+
+
+ä»¥ä¸
Index: /atk2-sc3-1.4.0-ntisr/utils/abrex/sample.yaml
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/abrex/sample.yaml	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/abrex/sample.yaml	(revision 172)
@@ -0,0 +1,134 @@
+#
+#  ABREX
+#      AUTOSAR BSW and RTE XML Generator
+#
+#  Copyright (C) 2013-2015 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2014-2015 by AISIN COMCRUISE Co., Ltd., JAPAN
+#  Copyright (C) 2013-2015 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2014-2015 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2013-2015 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2014-2015 by SCSK Corporation, JAPAN
+#  Copyright (C) 2013-2015 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2013-2015 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2013-2015 by Witz Corporation
+#  Copyright (C) 2015 by SUZUKI MOTOR CORPORATION
+#
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
+#  æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥çè²¡ç£æ¨©ãè¨±è«¾ãããã®ã§
+#  ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
+#  ç¨ããè
+ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
+#
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+#
+# $Id: sample.yaml 571 2015-12-21 05:01:59Z t_ishikawa $
+#
+
+IMPLEMENTATION-DATA-TYPE:
+  uint8:
+    CATEGORY: VALUE
+  uint32:
+    CATEGORY: VALUE
+
+Os:
+  Os:
+    OsInclude:
+      OsIncludeFileName: Rte.h
+    MainApp:
+      DefinitionRef: OsAppMode
+    OsOS:
+      OsStackMonitoring: true
+      OsUseGetServiceId: true
+      OsUseParameterAccess: true
+      OsStatus: EXTENDED
+      OsScalabilityClass: SC1
+      OsHooks:
+        OsErrorHook: false
+        OsPostTaskHook: false
+        OsPreTaskHook: false
+        OsProtectionHook: false
+        OsShutdownHook: false
+        OsStartupHook: false
+      OsHookStack:
+        OsHookStackSize: 1024
+      OsOsStack:
+        OsOsStackSize: 1024
+    TASK1:
+      DefinitionRef: OsTask
+      OsTaskActivation: 1
+      OsTaskPriority: 10
+      OsTaskStackSize: 1024
+      OsTaskSchedule: FULL
+      OsTaskEventRef: /Os/Os/EVENT1
+      OsTaskAutostart:
+        OsTaskAppModeRef: /Os/Os/MainApp
+    EVENT1:
+      DefinitionRef: OsEvent
+Rte:
+  Rte:
+    RteBswGeneral:
+      RteSchMVersionInfoApi: 0
+    RteGeneration:
+      RteCodeVendorId: 0
+      RteDevErrorDetect: 1
+      RteDevErrorDetectUninit: 1
+      RteMeasurementSupport: 0
+      RteValueRangeCheckEnabled: 0
+      RteVfbTraceEnabled: 0
+      RteCalibrationSupport: NONE
+      RteGenerationMode: COMPATIBILITY_MODE
+      RteOptimizationMode: MEMORY
+    ApplicationSwComponentType1:
+      DefinitionRef: RteSwComponentInstance
+      RteSoftwareComponentInstanceRef: /OneRunnable/CompositionSwComponentType1/ApplicationSwComponentType1
+      TimingEvent1:
+        DefinitionRef: RteEventToTaskMapping
+        RteImmediateRestart: 0
+        RtePositionInTask: 1
+        RteEventRef: /OneRunnable/ApplicationSwComponentType1/SwcInternalBehavior1/TimingEvent1
+        RteMappedToTaskRef: /Os/Os/TASK1
+        RteUsedOsEventRef: /Os/Os/EVENT1
Index: /atk2-sc3-1.4.0-ntisr/utils/applyrename
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/applyrename	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/applyrename	(revision 172)
@@ -0,0 +1,124 @@
+#! /usr/bin/perl
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2004-2011 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プロジェクトを
+#      免責すること．
+# 
+#  本ソフトウェアは，AUTOSAR（AUTomotive Open System ARchitecture）仕
+#  様に基づいている．上記の許諾は，AUTOSARの知的財産権を許諾するもので
+#  はない．AUTOSARは，AUTOSAR仕様に基づいたソフトウェアを商用目的で利
+#  用する者に対して，AUTOSARパートナーになることを求めている．
+#
+#  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+#  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+#  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+#  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+#  の責任を負わない．
+# 
+#  @(#) $Id: applyrename 2253 2011-09-11 01:23:40Z ertl-hiro $
+# 
+
+#
+#  ファイルにリネームを適用する
+#
+sub applyrename
+{
+	local($infile) = @_;
+	local($outfile) = $infile.".new";
+	local($line);
+
+	open(INFILE, "< ".$infile) || die;
+	open(OUTFILE, "> ".$outfile) || die;
+
+	while ($line = <INFILE>) {
+		$line =~ s/\b(_?)($syms)\b/$1_kernel_$2/gc;
+		print OUTFILE $line;
+	}
+
+	close(INFILE);
+	close(OUTFILE);
+
+	if (`cmp $infile $outfile`) {
+		rename($infile, $infile.".bak");
+		rename($outfile, $infile);
+		print STDERR "Modified: ",$infile,"\n";
+	}
+	else {
+		unlink($outfile);
+	}
+}
+
+#
+#  エラーチェック
+#
+if ($#ARGV < 1) {
+	die "Usage: appyrename <prefix> <filelist>\n";
+}
+
+#
+#  初期化
+#
+@syms = ();
+$name = $ARGV[0];
+
+#
+#  シンボルリストを読み込む
+#
+$deffile = $name."_rename.def";
+open(INFILE, $deffile) || die "Cannot open $deffile";
+while ($line = <INFILE>) {
+	chomp $line;
+	if ($line =~ /^#(.*)$/) {
+		# do nothing
+	}
+	elsif ($line =~ /^INCLUDE[ \t]+(.*)$/) {
+		# do nothing
+	}
+	elsif ($line ne "") {
+		@syms = (@syms, $line)
+	}
+}
+close(INFILE);
+
+#
+#  正規表現を作る
+#
+$syms = join("|", @syms);
+
+#
+#  ファイルにリネームを適用する
+#
+shift @ARGV;
+foreach $infile (@ARGV) {
+	# ファイルでなければスキップ
+	next unless (-f $infile);
+
+	applyrename($infile) if ($infile ne $deffile);
+}
Index: /atk2-sc3-1.4.0-ntisr/utils/genrename
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/genrename	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/genrename	(revision 172)
@@ -0,0 +1,254 @@
+#! /usr/bin/perl
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2005-2011 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プロジェクトを
+#      免責すること．
+# 
+#  本ソフトウェアは，AUTOSAR（AUTomotive Open System ARchitecture）仕
+#  様に基づいている．上記の許諾は，AUTOSARの知的財産権を許諾するもので
+#  はない．AUTOSARは，AUTOSAR仕様に基づいたソフトウェアを商用目的で利
+#  用する者に対して，AUTOSARパートナーになることを求めている．
+#
+#  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+#  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+#  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+#  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+#  の責任を負わない．
+# 
+#  @(#) $Id: genrename 2253 2011-09-11 01:23:40Z ertl-hiro $
+# 
+
+#
+#  先頭につける文字列
+#
+sub prefix_string {
+	local($sym) = @_;
+
+	if ($sym =~ /[a-z]/) {
+		return("_kernel_");
+	}
+	else {
+		return("_KERNEL_");
+	}
+}
+
+#
+#  リネーム定義を生成する
+#
+sub generate_define
+{
+	local($sym, $prefix) = @_;
+
+	print FILE "#define ",$prefix,$sym;
+	print FILE "\t" if (length($prefix.$sym) < 4);
+	print FILE "\t" if (length($prefix.$sym) < 8);
+	print FILE "\t" if (length($prefix.$sym) < 12);
+	print FILE "\t" if (length($prefix.$sym) < 16);
+	print FILE "\t" if (length($prefix.$sym) < 20);
+	print FILE "\t" if (length($prefix.$sym) < 24);
+	print FILE "\t",$prefix,prefix_string($sym),$sym,"\n";
+}
+
+#
+#  リネーム解除を生成する
+#
+sub generate_undef
+{
+	local($sym, $prefix) = @_;
+
+	print FILE "#undef ",$prefix,$sym,"\n";
+}
+
+#
+#  インクルードディレクティブを生成する
+#
+sub generate_include
+{
+	local($file, $prefix) = @_;
+
+	$file =~ s/([>"])$/_$prefix.h$1/;
+	$includes .= "#include ".$file."\n";
+}
+
+#
+#  エラーチェック
+#
+if ($#ARGV != 0) {
+	die "Usage: genrename <prefix>\n";
+}
+
+#
+#  初期化
+#
+@syms = ();
+$name = $ARGV[0];
+$NAME = $name; $NAME =~ y/a-z/A-Z/;
+
+$infile = $name."_rename.def";
+$header_defsym = "TOPPERS_".$NAME."_RENAME_H";
+
+#
+#  シンボルリストを読み込む
+#
+open(INFILE, $infile) || die "Cannot open $infile";
+while ($line = <INFILE>) {
+	chomp $line;
+	@syms = (@syms, $line);
+}
+close(INFILE);
+
+#
+#  ???_rename.h を生成する
+#
+$includes = "";
+$file = $name."_rename.h";
+open(FILE, "> ".$file);
+
+print FILE <<END;
+/* This file is generated from $infile by genrename. */
+
+#ifndef $header_defsym
+#define $header_defsym
+
+END
+
+foreach $sym (@syms) {
+	if ($sym =~ /^#(.*)$/) {
+		print FILE "/*\n";
+		print FILE " * ",$1,"\n";
+		print FILE " */\n";
+	}
+	elsif ($sym =~ /^INCLUDE[ \t]+(.*)$/) {
+		generate_include($1, "rename");
+	}
+	elsif ($sym ne "") {
+		generate_define($sym, "");
+	}
+	else {
+		print FILE "\n";
+	}
+}
+
+print FILE <<END;
+
+#ifdef TOPPERS_LABEL_ASM
+
+END
+
+foreach $sym (@syms) {
+	if ($sym =~ /^#(.*)$/) {
+		print FILE "/*\n";
+		print FILE " * ",$1,"\n";
+		print FILE " */\n";
+	}
+	elsif ($sym =~ /^INCLUDE[ \t]+(.*)$/) {
+		# do nothing
+	}
+	elsif ($sym ne "") {
+		generate_define($sym, "_");
+	}
+	else {
+		print FILE "\n";
+	}
+}
+
+print FILE <<END;
+
+#endif /* TOPPERS_LABEL_ASM */
+
+$includes
+#endif /* $header_defsym */
+END
+
+#
+#  ???_unrename.h を生成する
+#
+$includes = "";
+$file = $name."_unrename.h";
+open(FILE, "> ".$file);
+
+print FILE <<END;
+/* This file is generated from $infile by genrename. */
+
+/* This file is included only when $name\_rename.h has been included. */
+#ifdef $header_defsym
+#undef $header_defsym
+
+END
+
+foreach $sym (@syms) {
+	if ($sym =~ /^#(.*)$/) {
+		print FILE "/*\n";
+		print FILE " * ",$1,"\n";
+		print FILE " */\n";
+	}
+	elsif ($sym =~ /^INCLUDE[ \t]+(.*)$/) {
+		generate_include($1, "unrename");
+	}
+	elsif ($sym ne "") {
+		generate_undef($sym, "");
+	}
+	else {
+		print FILE "\n";
+	}
+}
+
+print FILE <<END;
+
+#ifdef TOPPERS_LABEL_ASM
+
+END
+
+foreach $sym (@syms) {
+	if ($sym =~ /^#(.*)$/) {
+		print FILE "/*\n";
+		print FILE " * ",$1,"\n";
+		print FILE " */\n";
+	}
+	elsif ($sym =~ /^INCLUDE[ \t]+(.*)$/) {
+		# do nothing
+	}
+	elsif ($sym ne "") {
+		generate_undef($sym, "_");
+	}
+	else {
+		print FILE "\n";
+	}
+}
+
+print FILE <<END;
+
+#endif /* TOPPERS_LABEL_ASM */
+
+$includes
+#endif /* $header_defsym */
+END
+
+close(FILE);
Index: /atk2-sc3-1.4.0-ntisr/utils/gensvc_atk
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/gensvc_atk	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/gensvc_atk	(revision 172)
@@ -0,0 +1,398 @@
+#! /usr/bin/perl
+#
+#  TOPPERS ATK2
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+#      Automotive Kernel Version 2
+#
+#  Copyright (C) 2001 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2005-2014 by Center for Embedded Computing Systems
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+#  Copyright (C) 2011-2014 by FUJI SOFT INCORPORATED, JAPAN
+#  Copyright (C) 2011-2013 by Spansion LLC, USA
+#  Copyright (C) 2011-2013 by NEC Communication Systems, Ltd., JAPAN
+#  Copyright (C) 2011-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
+#  Copyright (C) 2011-2014 by Renesas Electronics Corporation, JAPAN
+#  Copyright (C) 2011-2014 by Sunny Giken Inc., JAPAN
+#  Copyright (C) 2011-2014 by TOSHIBA CORPORATION, JAPAN
+#  Copyright (C) 2011-2014 by Witz Corporation, JAPAN
+#
+#  上記著作権者は，以下の(1)〜(4)の条件を満たす場合に限り，本ソフトウェ
+#  ア（本ソフトウェアを改変したものを含む．以下同じ）を使用・複製・改
+#  変・再配布（以下，利用と呼ぶ）することを無償で許諾する．
+#  (1) 本ソフトウェアをソースコードの形で利用する場合には，上記の著作
+#      権表示，この利用条件および下記の無保証規定が，そのままの形でソー
+#      スコード中に含まれていること．
+#  (2) 本ソフトウェアを，ライブラリ形式など，他のソフトウェア開発に使
+#      用できる形で再配布する場合には，再配布に伴うドキュメント（利用
+#      者マニュアルなど）に，上記の著作権表示，この利用条件および下記
+#      の無保証規定を掲載すること．
+#  (3) 本ソフトウェアを，機器に組み込むなど，他のソフトウェア開発に使
+#      用できない形で再配布する場合には，次のいずれかの条件を満たすこ
+#      と．
+#    (a) 再配布に伴うドキュメント（利用者マニュアルなど）に，上記の著
+#        作権表示，この利用条件および下記の無保証規定を掲載すること．
+#    (b) 再配布の形態を，別に定める方法によって，TOPPERSプロジェクトに
+#        報告すること．
+#  (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
+#      害からも，上記著作権者およびTOPPERSプロジェクトを免責すること．
+#      また，本ソフトウェアのユーザまたはエンドユーザからのいかなる理
+#      由に基づく請求からも，上記著作権者およびTOPPERSプロジェクトを
+#      免責すること．
+# 
+#  本ソフトウェアは，AUTOSAR（AUTomotive Open System ARchitecture）仕
+#  様に基づいている．上記の許諾は，AUTOSARの知的財産権を許諾するもので
+#  はない．AUTOSARは，AUTOSAR仕様に基づいたソフトウェアを商用目的で利
+#  用する者に対して，AUTOSARパートナーになることを求めている．
+#
+#  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+#  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+#  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+#  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+#  の責任を負わない．
+#
+#  $Id: gensvc_atk 6172 2012-11-16 00:10:34Z fsi-dankei $
+#
+
+#
+#  サービスコールインタフェース生成プログラム
+#
+#  サービスコール定義ファイル（svc.def）を読み込んで，以下のファイルを
+#  カレントディレクトリに生成する．それぞれのディレクトリへの移動は手動
+#  で行うこと．
+#
+#	svc_table.c → kernel/ に置く
+#	kernel_fncode.h → include/ に置く
+#	svc_funccall.h → include/ に置く
+#	tool_svc.h → arch/gcc/ に置く
+#
+
+#  大域変数の初期化
+
+$max_svcid = 0;
+@allfncdlist = ();
+@fncdlist = ();
+%flagstable = ();
+%typetable = ();
+%prototable = ();
+%nametable = ();
+%fnotable = ();
+%argstable = ();
+%argnotable = ();
+%tfntable = ();
+
+#
+#  1行読み込み（行番号をカウント）
+#
+sub getline {
+	local($line);
+
+	$line = <>;
+	$lineno++;
+	return($line);
+}
+
+#
+#  エラー出力
+#
+sub error {
+	local($msg) = @_;
+
+	print STDERR $msg," at line ",$lineno,".\n";
+	exit(1);
+}
+
+sub eof_error {
+	print STDERR "Unexpected EOF.\n";
+	exit(1);
+}
+
+#
+#  定義ファイルの読み込み
+#
+$lineno = 0;
+$next_fncd = 1;
+$next_tfn = 0;
+while ($line = getline()) {
+	chop $line;
+
+	# コメントの削除
+	$line =~ s/#.*$//;
+
+	# 空行のスキップ
+	next if ($line =~ /^[ \t]*$/);
+
+	# 継続行（行末が '\' の行）の処理
+	while ($line =~ /^(.*)\\$/) {
+		$line = $1;
+		unless ($line1 = getline()) {
+			eof_error();
+		}
+		chop $line1;
+		$line .= $line1;
+	}
+
+	# サービスコール定義の解析
+	unless ($line =~ /^(-?[0-9]*)[ \t]+([^ \t]+)[ \t]*(.*)$/) {
+		error("Syntax error Definition 121");
+	}
+
+	$fncd = $1;
+	$flags = $2;
+	$proto = $3;
+	$proto =~ s/([^ \t])[ \t]+$/\1/;
+	$proto =~ s/[ \t]+/ /g;
+
+	# 機能コードをチェック
+	if ($fncd eq "") {
+		$fncd = $next_fncd;
+	}
+	elsif ($fncd != $next_fncd) {
+		print STDERR "Function code skipped at line: ",$lineno,"\n";
+	}
+
+	# 次の機能コードの計算
+	$next_fncd = $fncd + 1;
+
+	# 未サポートのサービスコールのスキップ
+	if ($flags !~ /^[SPLNI]/) {
+		if ($proto =~ /^([A-Za-z_]+)[ \t]+(([a-z_]+)\((.*)\))$/) {
+			push(@allfncdlist, $fncd);
+			$nametable{$fncd} = $3;
+		}
+		elsif ($proto =~ /^([a-z_]+)$/) {
+			push(@allfncdlist, $fncd);
+			$nametable{$fncd} = $1;
+		}
+		next;
+	}
+
+	if ($flags !~ /^N/) {
+		$tfntable{$fncd} = $next_tfn;
+		$next_tfn = $next_tfn + 1;
+	}
+
+	# 機能コードの最大値の計算
+	$max_svcid = $next_tfn - 1 if ($max_svcid < $next_tfn - 1);
+
+	# サービスコールリストに登録
+	push(@allfncdlist, $fncd);
+	push(@fncdlist, $fncd);
+
+# デバッグ用出力
+print STDERR "proto ",$proto,"\n";
+print STDERR "fncd ",$fncd,"\n";
+print STDERR "flags ",$flags,"\n";
+
+	# サービスコール定義の文法チェック
+	unless ($proto =~ /^([A-Za-z0-9_]+)[ \t]+(([A-Za-z0-9_]+)\((.*)\))$/) {
+		error("Syntax error 169");
+	}
+
+	$flagstable{$fncd} = $flags;
+	$typetable{$fncd}  = $1;
+	$prototable{$fncd} = $2;
+	$nametable{$fncd}  = $3;
+	$argstable{$fncd}  = $4;
+	$argno = 0;
+	foreach $arg (split(/, */, $argstable{$fncd})) {
+		# "変数の型 変数名" のチェック
+		unless ($arg =~ /^([A-Za-z0-9_* ]+)( +|\*)([a-z_]+)$/) {
+			# "..." 可変引数リストのチェック
+			unless ($arg =~ /.../){
+				error("Syntax error 178");
+			}
+		}
+		$argno++;
+	}
+	$argnotable{$fncd} = $argno;
+}
+$num_fncd = +$max_svcid;
+
+#
+#	svc_table.cの生成
+#
+open(FILE, "> svc_table.c");
+print FILE <<END_OF_HEADER;
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#include "kernel_int.h"
+
+void * const svc_table[TMAX_SVCID + 1] = {
+END_OF_HEADER
+
+# ジャンプテーブルの生成
+foreach $fncd (@allfncdlist) {
+	if ($flagstable{$fncd}) {
+		if ($flagstable{$fncd} !~ /^N/) {
+			$entry = $nametable{$fncd};
+			print FILE "\t(void *) &",$entry,",\n";
+		}
+	}
+}
+
+print FILE <<END_OF_TAILER;
+	TARGET_SVC_TABLE
+};
+END_OF_TAILER
+
+#
+#	kernel_fncode.hの生成
+#
+
+open(FILE, "> kernel_fncode.h");
+print FILE <<END_OF_HEADER;
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#ifndef TOPPERS_KERNEL_FNCODE_H
+#define TOPPERS_KERNEL_FNCODE_H
+
+#define TMAX_SVCID ($max_svcid + TARGET_SVC_NUM)
+
+END_OF_HEADER
+
+foreach $fncd (@allfncdlist) {
+	$name = $nametable{$fncd};
+	$name =~ y/a-z/A-Z/;
+	$tfn = $tfntable{$fncd};
+	#print $tfn,"\n";
+	if ($flagstable{$fncd} !~ /^[NI]/) {
+		print FILE "#define TFN_",$name," ",$tfn,"\n";
+	}
+}
+
+print FILE <<END_OF_TAILER;
+
+#endif /* TOPPERS_KERNEL_FNCODE_H */
+END_OF_TAILER
+close(FILE);
+
+#
+#	svc_funccall.hの生成
+#
+# 関数呼出しで呼び出す場合のインタフェース
+open(FILE, "> svc_funccall.h");
+print FILE <<END_OF_HEADER;
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#ifndef TOPPERS_SVC_FUNCCALL_H
+#define TOPPERS_SVC_FUNCCALL_H
+
+#define SVC_CALL(system_service) _kernel_ ## system_service
+
+#ifdef TOPPERS_SVC_FUNCCALL
+END_OF_HEADER
+
+foreach $fncd (@fncdlist) {
+	if ($flagstable{$fncd} !~ /^[I]/) {
+		$name = $nametable{$fncd};
+		if ($name) {
+			print FILE "#define ",$name," (_kernel_",$name,")\n";
+		}
+	}
+}
+
+print FILE <<END_OF_SEPARATOR;
+#endif
+
+#ifndef TOPPERS_MACRO_ONLY
+
+END_OF_SEPARATOR
+
+foreach $fncd (@fncdlist) {
+	$proto = $prototable{$fncd};
+	$proto =~ s/\(\)/(void)/;
+	if ($flagstable{$fncd} !~ /^I/) {
+		print FILE "extern ",$typetable{$fncd}," _kernel_",$proto,";\n";
+	}
+}
+
+print FILE <<END_OF_TRAILER;
+
+#endif /* TOPPERS_MACRO_ONLY */
+#endif /* TOPPERS_SVC_FUNCCALL */
+END_OF_TRAILER
+close(FILE);
+
+#
+#	tool_svc.hの生成
+#
+# ソフトウェア割込みで呼び出す場合のインタフェース
+#
+# CallTrustedFunction() は 引数チェックを行うので直接記述する．
+#  呼出元のメモリアクセスの可能性があるので，"m" 属性とする．
+#
+open(FILE, "> tool_svc.h");
+print FILE <<END_OF_HEADER;
+/*  This file is generated from svc.def by gensvc_atk. */
+
+#ifndef TOPPERS_TOOL_SVC_H
+#define TOPPERS_TOOL_SVC_H
+
+#define SVC_TRAP(system_service) _trap_ ## system_service
+
+#ifndef TOPPERS_SVC_FUNCCALL
+END_OF_HEADER
+
+foreach $fncd (@fncdlist) {
+	if ($flagstable{$fncd} !~ /^[I]/) {
+		$name = $nametable{$fncd};
+		if ($name) {
+			print FILE "#define ",$name," _trap_",$name,"\n";
+		}
+	}
+}
+
+print FILE <<END_OF_HEADER2;
+#endif
+
+#ifndef TOPPERS_MACRO_ONLY
+
+END_OF_HEADER2
+
+foreach $fncd (@fncdlist) {
+	# 関数ヘッダの生成
+	if ($flagstable{$fncd} !~ /^[I]/) {
+		$proto = $prototable{$fncd};
+		print FILE "LOCAL_INLINE ",$typetable{$fncd},"\n";
+		$proto =~ s/\(\)/(void)/;
+		print FILE "_trap_", $proto,"\n";
+
+		# 関数本体の生成
+		print FILE "{\n";
+
+		if ($flagstable{$fncd} =~ /N/) {
+			print FILE "\treturn;\n";
+		} else {
+			print FILE "\tCAL_SVC_",$argnotable{$fncd};
+			print FILE "M" if ($flagstable{$fncd} !~ /n/);
+			print FILE "N" if ($flagstable{$fncd} =~ /n/);
+			print FILE "(";
+			print FILE $typetable{$fncd},", ";
+
+			$name = $nametable{$fncd};
+			$name =~ y/a-z/A-Z/;
+			print FILE "TFN_",$name;
+
+			foreach $arg (split(/, */, $argstable{$fncd})) {
+				if ($arg =~ /^([A-Za-z0-9_* ]+) +([A-Za-z0-9_]+)$/) {
+					print FILE ", ", $1, ", ", $2;
+				}
+				elsif ($arg =~ /^([A-Za-z0-9_* ]+\*)([A-Za-z0-9_]+)$/) {
+					print FILE ", ", $1, ", ", $2;
+				}
+			}
+			print FILE ");\n";
+		}
+
+		print FILE "}\n";
+		print FILE "\n";
+	}
+}
+
+print FILE <<END_OF_TAILER;
+#endif /* TOPPERS_MACRO_ONLY */
+
+#endif /* TOPPERS_TOOL_SVC_H */
+END_OF_TAILER
+close(FILE);
Index: /atk2-sc3-1.4.0-ntisr/utils/gentest
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/gentest	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/gentest	(revision 172)
@@ -0,0 +1,334 @@
+#! /usr/bin/perl
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2007-2012 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プロジェクトを
+#      免責すること．
+# 
+#  本ソフトウェアは，AUTOSAR（AUTomotive Open System ARchitecture）仕
+#  様に基づいている．上記の許諾は，AUTOSARの知的財産権を許諾するもので
+#  はない．AUTOSARは，AUTOSAR仕様に基づいたソフトウェアを商用目的で利
+#  用する者に対して，AUTOSARパートナーになることを求めている．
+#
+#  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+#  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+#  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+#  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+#  の責任を負わない．
+# 
+#  $Id: gentest 2417 2012-09-07 08:16:42Z ertl-hiro $
+# 
+
+#
+#		テストプログラム生成ツール
+#
+
+$infile = $ARGV[0];
+
+%parampos = (
+	"get_pri" => 2,
+	"get_inf" => 1,
+	"ref_tsk" => 2,
+	"ref_tex" => 2,
+	"ref_sem" => 2,
+	"ref_flg" => 2,
+	"ref_dtq" => 2,
+	"ref_pdq" => 2,
+	"ref_mbx" => 2,
+	"ref_mtx" => 2,
+	"ref_mpf" => 2,
+	"get_tim" => 1,
+	"get_utm" => 1,
+	"ref_cyc" => 2,
+	"ref_alm" => 2,
+	"get_tid" => 1,
+	"iget_tid" => 1,
+	"get_ipm" => 1,
+);
+
+%paramtype = (
+	"get_pri" => "PRI",
+	"get_inf" => "intptr_t",
+	"ref_tsk" => "T_RTSK",
+	"ref_tex" => "T_RTEX",
+	"ref_sem" => "T_RSEM",
+	"ref_flg" => "T_RFLG",
+	"ref_dtq" => "T_RDTQ",
+	"ref_pdq" => "T_RPDQ",
+	"ref_mbx" => "T_RMBX",
+	"ref_mtx" => "T_RMTX",
+	"ref_mpf" => "T_RMPF",
+	"get_tim" => "SYSTIM",
+	"get_utm" => "SYSUTM",
+	"ref_cyc" => "T_RCYC",
+	"ref_alm" => "T_RALM",
+	"get_tid" => "ID",
+	"iget_tid" => "ID",
+	"get_ipm" => "PRI",
+);
+
+sub gen_var_def {
+	local($svc_call) = @_;
+	local($svcname, @params);
+	local($typename, $varname);
+
+	if ($svc_call =~ /^([a-z_]+)\((.*)\)$/) {
+		$svcname = $1;
+		@params = split(/\s*,\s*/, $2);
+
+		if ($parampos{$svcname}) {
+			$varname = $params[@parampos{$svcname} - 1];
+			$varname =~ s/^\&//;
+			$typename = $paramtype{$svcname};
+			${$TASKVAR{$tskid}}{$typename} = ${varname};
+		}
+	}
+}
+
+sub gen_svc_call {
+	local($svc_call, $error_code_string) = @_;
+	local($error_code);
+
+	$TASKCODE{$tskid} .= $indentstr;
+	$TASKCODE{$tskid} .= sprintf("ercd = %s;\n", $svc_call);
+	gen_var_def($svc_call);
+
+	if ($error_code_string eq "") {
+		$TASKCODE{$tskid} .= $indentstr;
+		$TASKCODE{$tskid} .= sprintf("check_ercd(ercd, E_OK);\n");
+	}
+	elsif ($error_code_string =~ /^\-\>\s*noreturn$/) {
+		# do nothing.
+	}
+	else {
+		$error_code = $error_code_string;
+		$error_code =~ s/^\-\>\s*([A-Z_]*)$/$1/;
+		$TASKCODE{$tskid} .= $indentstr;
+		$TASKCODE{$tskid} .= sprintf("check_ercd(ercd, %s);\n", $error_code);
+	}
+}
+
+sub parse_line {
+	local($line) = @_;
+
+	while ($line =~ s/\\$//) {
+		$line1 = <INFILE>;
+		chomp $line1;
+		$line1 =~ s/^\s*\*\s*//;
+		$line1 =~ s/\s*\/\/.*$//;
+		$line1 =~ s/\s*\.\.\..*$//;
+		$line .= $line1;
+	}
+
+	if ($line =~ /^\.\./) {
+		# do nothing.
+	}
+	elsif ($line =~ /^==\s*((TASK|ALM|CPUEXC|EXTSVC)[0-9]*)(.*)$/) {
+		$startflag = 1;
+		$tskid = $1;
+		$line2 = $3;
+		if ($line2 =~ /^\-TEX(.*)$/) {
+			$tskid = $tskid."-TEX";
+			$line2 = $1;
+		}
+		if ($line2 =~ /^\-([0-9]+)(.*)$/) {
+			$tskcount = $1;
+			$line3 = $2;
+			$indentstr = "\t\t";
+			if (!$TASKCOUNT{$tskid}) {
+				$TASKCOUNT{$tskid} = 0;
+				if ($tskid =~ /^TASK([0-9]*)$/) {
+					$countvar = "task$1_count";
+				}
+				elsif ($tskid =~ /^TASK([0-9]*)-TEX$/) {
+					$countvar = "tex_task$1_count";
+				}
+				elsif ($tskid =~ /^ALM([0-9]*)$/) {
+					$countvar = "alarm$1_count";
+				}
+				elsif ($tskid =~ /^CPUEXC([0-9]*)$/) {
+					$countvar = "cpuexc$1_count";
+				}
+				elsif ($tskid =~ /^EXTSVC([0-9]*)$/) {
+					$countvar = "extsvc$1_count";
+				}
+				$TASKCOUNTVAR{$tskid} = $countvar;
+			}
+			if ($tskcount == $TASKCOUNT{$tskid} + 1) {
+				if ($tskcount > 1) {
+					$TASKCODE{$tskid} .= "\n".$indentstr;
+					$TASKCODE{$tskid} .= sprintf("check_point(0);\n\n");
+				}
+				$TASKCOUNT{$tskid} = $tskcount;
+				$TASKCODE{$tskid} .= sprintf("\tcase %d:", $tskcount);
+			}
+			elsif ($tskcount != $TASKCOUNT{$tskid} && $line3 !~ /^-/) {
+				printf STDERR "Subtask count error: %s-%s\n",$tskid,$tskcount;
+			}
+		}
+		else {
+			$tskcount = "";
+			$indentstr = "\t";
+		}
+	}
+	elsif (!$startflag) {
+		# do nothing.
+	}
+	elsif ($line =~ /^([0-9]+)\:\s*END$/) {
+		$check_no = $1;
+		$TASKCODE{$tskid} .= "\n".$indentstr;
+		$TASKCODE{$tskid} .= sprintf("check_finish(%d);\n", $check_no);
+		$endflag = 1;
+	}
+	else {
+		if ($line =~ /^([0-9]+)\:\s*(.*)/) {
+			$check_no = $1;
+			$line = $2;
+			$TASKCODE{$tskid} .= "\n".$indentstr;
+			$TASKCODE{$tskid} .= sprintf("check_point(%d);\n", $check_no);
+		}
+		if ($line =~ /^(assert\(.*\))$/) {
+			$assert_string = $1;
+			$TASKCODE{$tskid} .= $indentstr;
+			$TASKCODE{$tskid} .= sprintf("check_%s;\n", $assert_string);
+		}
+		elsif ($line =~ /^(state(_i)?\(.*\))$/) {
+			$state_string = $1;
+			$TASKCODE{$tskid} .= $indentstr;
+			$TASKCODE{$tskid} .= sprintf("check_%s;\n", $state_string);
+		}
+		elsif ($line =~ /^call\((.*)\)$/ || $line =~ /^DO\((.*)\)$/) {
+			$call_string = $1;
+			$TASKCODE{$tskid} .= "\n".$indentstr;
+			$TASKCODE{$tskid} .= sprintf("%s;\n", $call_string);
+		}
+		elsif ($line =~ /^MISSING$/) {
+			# do nothing.
+		}
+		elsif ($line =~ /^RETURN((\(.*\))?)$/) {
+			$return_string = $1;
+			$TASKCODE{$tskid} .= "\n".$indentstr;
+			$TASKCODE{$tskid} .= "return".$return_string.";\n";
+		}
+		elsif ($line =~ /^GOTO\((.*)\)$/) {
+			$goto_string = $1;
+			$TASKCODE{$tskid} .= "\n".$indentstr;
+			$TASKCODE{$tskid} .= sprintf("goto %s;\n", $goto_string);
+		}
+		elsif ($line =~ /^LABEL\((.*)\)$/) {
+			$label_string = $1;
+			$indent_string = $indentstr;
+			$indent_string =~ s/\t$//;
+			$TASKCODE{$tskid} .= "\n".$indent_string;
+			$TASKCODE{$tskid} .= sprintf("%s:", $label_string);
+		}
+		elsif ($line =~ /^([a-z_]+\(.*\))\s*(\-\>\s*[A-Za-z_]*)?\s*$/) {
+			$svc_call = $1;
+			$error_code_string = $2;
+			$TASKCODE{$tskid} .= "\n";
+			gen_svc_call($svc_call, $error_code_string);
+		}
+		else {
+			print STDERR "Error: ",$line,"\n";
+		}
+	}
+}
+
+#
+#  スクリプトファイル読込み処理
+#
+$startflag = 0;
+$endflag = 0;
+open(INFILE, $infile) || die "Cannot open $infile";
+while (($line = <INFILE>) && !$endflag) {
+	chomp $line;
+	$line =~ s/^\s*\*\s*//;
+	$line =~ s/\s*\/\/.*$//;
+	$line =~ s/\s*\.\.\..*$//;
+	next unless($line);
+	parse_line($line);
+}
+close(INFILE);
+
+#
+#  タスクコードの出力
+#
+sub output_task {
+	if ($TASKCOUNT{$tskid}) {
+		printf "\nstatic uint_t\t%s = 0;\n", $TASKCOUNTVAR{$tskid};
+	}
+	if ($tskid =~ /^TASK([0-9]*)$/) {
+		print "\nvoid\n";
+		print "task$1(intptr_t exinf)\n";
+	}
+	elsif ($tskid =~ /^TASK([0-9]*)-TEX$/) {
+		print "\nvoid\n";
+		print "tex_task$1(TEXPTN texptn, intptr_t exinf)\n";
+	}
+	elsif ($tskid =~ /^ALM([0-9]*)$/) {
+		print "\nvoid\n";
+		print "alarm$1_handler(intptr_t exinf)\n";
+	}
+	elsif ($tskid =~ /^CPUEXC([0-9]*)$/) {
+		print "\nvoid\n";
+		print "cpuexc$1_handler(void *p_excinf)\n";
+	}
+	elsif ($tskid =~ /^EXTSVC([0-9]*)$/) {
+		print "\nER_UINT\n";
+		print "extsvc$1_routine(intptr_t par1, intptr_t par2, intptr_t par3,\n";
+		print "\t\t\t\t\t\t\t\tintptr_t par4, intptr_t par5, ID cdmid)\n";
+	}
+	print "{\n";
+	print "\tER\t\tercd;\n";
+	foreach $typename (keys(%{$TASKVAR{$tskid}})) {
+		print "\t",$typename, (length($typename) < 4 ? "\t\t" : "\t"),
+								${$TASKVAR{$tskid}}{$typename},";\n";
+	}
+	if ($TASKCOUNT{$tskid}) {
+		printf "\n\tswitch (++%s) {\n", $TASKCOUNTVAR{$tskid};
+	}
+	print $TASKCODE{$tskid};
+	if ($TASKCOUNT{$tskid}) {
+		printf "\n\t\tcheck_point(0);\n";
+		printf "\t}\n";
+	}
+	else {
+		print "\n";
+	}
+	print "\tcheck_point(0);\n";
+	if ($tskid =~ /^EXTSVC([0-9]*)$/) {
+		print "\treturn(E_SYS);\n";
+	}
+	print "}\n";
+}
+
+#
+#  テストプログラム出力処理
+#
+foreach $tskid (sort(keys(%TASKCODE))) {
+	output_task();
+}
Index: /atk2-sc3-1.4.0-ntisr/utils/makedep
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/makedep	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/makedep	(revision 172)
@@ -0,0 +1,184 @@
+#! /usr/bin/perl
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  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
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  上記著作権者は，以下の(1)〜(4)の条件を満たす場合に限り，本ソフトウェ
+#  ア（本ソフトウェアを改変したものを含む．以下同じ）を使用・複製・改
+#  変・再配布（以下，利用と呼ぶ）することを無償で許諾する．
+#  (1) 本ソフトウェアをソースコードの形で利用する場合には，上記の著作
+#      権表示，この利用条件および下記の無保証規定が，そのままの形でソー
+#      スコード中に含まれていること．
+#  (2) 本ソフトウェアを，ライブラリ形式など，他のソフトウェア開発に使
+#      用できる形で再配布する場合には，再配布に伴うドキュメント（利用
+#      者マニュアルなど）に，上記の著作権表示，この利用条件および下記
+#      の無保証規定を掲載すること．
+#  (3) 本ソフトウェアを，機器に組み込むなど，他のソフトウェア開発に使
+#      用できない形で再配布する場合には，次のいずれかの条件を満たすこ
+#      と．
+#    (a) 再配布に伴うドキュメント（利用者マニュアルなど）に，上記の著
+#        作権表示，この利用条件および下記の無保証規定を掲載すること．
+#    (b) 再配布の形態を，別に定める方法によって，TOPPERSプロジェクトに
+#        報告すること．
+#  (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
+#      害からも，上記著作権者およびTOPPERSプロジェクトを免責すること．
+#      また，本ソフトウェアのユーザまたはエンドユーザからのいかなる理
+#      由に基づく請求からも，上記著作権者およびTOPPERSプロジェクトを
+#      免責すること．
+# 
+#  本ソフトウェアは，AUTOSAR（AUTomotive Open System ARchitecture）仕
+#  様に基づいている．上記の許諾は，AUTOSARの知的財産権を許諾するもので
+#  はない．AUTOSARは，AUTOSAR仕様に基づいたソフトウェアを商用目的で利
+#  用する者に対して，AUTOSARパートナーになることを求めている．
+#
+#  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+#  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+#  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+#  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+#  の責任を負わない．
+# 
+#  @(#) $Id: makedep 2264 2011-10-27 04:22:01Z ertl-hiro $
+# 
+
+use Getopt::Std;
+
+#  オプションの定義
+#
+#  -C <cc_path>		Cコンパイラのコマンド名
+#  -O <cc_opts>		Cコンパイラ/CPPに渡すオプション
+#  -X				ソースファイルを強制的にCヘッダファイルと見なす
+#
+#  -T <target>		ターゲット名（のリスト）
+#  -D <t_dir>		ターゲットのディレクトリ名を指定する（-Tを用いた場
+#					合は無効）
+#  -d				ターゲットのディレクトリ部を保持する（-Tを用いた場
+#					合は無効）
+#  -S				複数のターゲットがある依存ルールを，ターゲット毎に
+#					分割する（こうしないと対応できないmakeがあるらしい）
+#
+#  -R <dirname>		Cygwin環境におけるルートディレクトリ名を指定する
+#					（デフォルトはcygdrive）
+
+#
+#  オプションの処理
+#
+getopt("COTDR");
+
+$cc_path = $opt_C;
+$cc_opts = $opt_O;
+
+if ($opt_T) {
+	$target_name = $opt_T;
+}
+elsif ($opt_D) {
+	$target_dir = $opt_D;
+}
+elsif (!$opt_d) {
+	$target_dir = "";
+}
+
+if ($opt_R) {
+	$cygwin_root = $opt_R;
+}
+else {
+	$cygwin_root = "cygdrive";
+}
+
+#
+#  Cygwin環境の判別
+#
+if ($^O eq 'cygwin') {
+	$cygwin = 1;
+}
+
+#
+#  %dependlist に作られた依存関係を出力する
+#
+sub output_dependlist {
+	local($target) = @_;
+	local($column, $len, $file);
+
+	print $target, ": ";
+	$column = length($target) + 2;
+
+	foreach $file (keys(%dependlist)) {
+		$len = length($file) + 1;
+		if ($column > 8 && $column + $len >= 70) {
+			print "\\\n\t";
+			$column = 8;
+		}
+		$column += $len;
+		print "$file ";
+	}
+	print "\n";
+}
+
+#
+#  $file の依存関係を %dependlist に作る
+#
+sub makedepend_one {
+	local($file) = @_;
+	local($command, $input, $dir, $filename);
+
+	$command = "$cc_path -E $cc_opts";
+	if ($opt_X) {
+		$command .= " -x c-header";
+	}
+	unless (open(INPUT, "$command $file |")) {
+		print STDERR "makedep: can't open $file\n";
+		exit(1);
+	}
+	while ($line = <INPUT>) {
+		if ($line =~ /^\#[a-zA-Z]*\s*([0-9]+)\s*\"([^\"]+)\"/) {
+			$filename = $2;
+			$filename =~ s/ /\\ /g;
+			if ($filename !~ /^\<.*\>$/ && $filename !~ /\/$/) {
+				if ($cygwin) {
+					$filename =~ s/\\\\/\//g;
+					$filename =~ s/^([a-zA-Z]):/\/$cygwin_root\/$1/;
+				}
+				$dependlist{$filename} = 1;
+			}
+		}
+	}
+	unless (close(INPUT)) {
+		print STDERR "makedep: can't execute $command\n";
+		exit(1);
+	}
+}
+
+#
+#  メインルーチン
+#
+foreach $file (@ARGV) {
+	%dependlist = ();
+	makedepend_one($file);
+	if (%dependlist) {
+		if ($target_name) {
+			if ($opt_S) {
+				foreach $target (split(/[ \t]+/, $target_name)) {
+					output_dependlist($target);
+				}
+			}
+			else {
+				output_dependlist($target_name);
+			}
+		}
+		else {
+			$target = $file;
+			$target =~ s/(.*)\.(.*)/$1.o/;
+			if (defined($target_dir)) {
+				$target =~ s/^.*\/([^\/]+)$/$1/;
+				if ($target_dir) {
+					$target = $target_dir."/".$target;
+				}
+			}
+			output_dependlist($target);
+		}
+	}
+}
Index: /atk2-sc3-1.4.0-ntisr/utils/makerelease
===================================================================
--- /atk2-sc3-1.4.0-ntisr/utils/makerelease	(revision 172)
+++ /atk2-sc3-1.4.0-ntisr/utils/makerelease	(revision 172)
@@ -0,0 +1,161 @@
+#! /usr/bin/perl
+#
+#  TOPPERS Software
+#      Toyohashi Open Platform for Embedded Real-Time Systems
+# 
+#  Copyright (C) 2006-2011 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プロジェクトを
+#      免責すること．
+# 
+#  本ソフトウェアは，AUTOSAR（AUTomotive Open System ARchitecture）仕
+#  様に基づいている．上記の許諾は，AUTOSARの知的財産権を許諾するもので
+#  はない．AUTOSARは，AUTOSAR仕様に基づいたソフトウェアを商用目的で利
+#  用する者に対して，AUTOSARパートナーになることを求めている．
+#
+#  本ソフトウェアは，無保証で提供されているものである．上記著作権者お
+#  よびTOPPERSプロジェクトは，本ソフトウェアに関して，特定の使用目的
+#  に対する適合性も含めて，いかなる保証も行わない．また，本ソフトウェ
+#  アの利用により直接的または間接的に生じたいかなる損害に関しても，そ
+#  の責任を負わない．
+# 
+#  @(#) $Id: makerelease 2253 2011-09-11 01:23:40Z ertl-hiro $
+# 
+
+use Cwd;
+
+$cwd = getcwd();
+$cwd =~ s/^.*[\/\\]([^\/\\]+)$/$1/;
+$prefix = "./".$cwd;
+
+@file_list = ();
+%file_list = ();
+
+if ($#ARGV >= 0) {
+	$arg1 = $ARGV[0];
+	$arg1 =~ s/\.\///;
+}
+else {
+	$arg1 = "MANIFEST";
+}
+
+sub gen_path
+{
+	local($base, $path) = @_;
+
+	while ($path =~ /^..\/(.*)$/) {
+		$path = $1;
+		$base =~ s/(\/?)[^\/]*\/$/$1/;
+	}
+	return($base.$path);
+}
+
+sub read_file {
+	local($filename) = @_;
+	local($fh, $dirname);
+
+	if ($filename =~ /^(.*\/)[^\/]*$/) {
+		$dirname = $1;
+	}
+	else {
+		$dirname = "";
+	}
+
+	open($fh, $filename) || die "Cannot open $filename";
+	while ($line = <$fh>) {
+		chomp $line;
+		$line =~ s/\r$//;
+		$line =~ s/[ \t]*\#.*$//;
+		next if ($line =~ /^[ \t]*$/);
+
+		if ($line =~ /^E_PACKAGE[ \t]+(.*)$/) {
+			if ($package) {
+				die "Duplicated E_PACKAGE directive.";
+			}
+			else {
+				$package = $1;
+				$e_package = 1;
+			}
+		}
+		elsif ($line =~ /^PACKAGE[ \t]+(.*)$/) {
+			if ($package) {
+				if (!$e_package && $package != $1) {
+					die "Inconsistent PACKAGE directive.";
+				}
+			}
+			else {
+				$package = $1;
+			}
+		}
+		elsif ($line =~ /^VERSION[ \t]+(.*)$/) {
+			if ($version) {
+				if (!$e_package && $version != $1) {
+					die "Inconsistent VERSION directive.";
+				}
+			}
+			else {
+				$version = $1;
+				if ($version =~ /%date/) {
+					@current_time = localtime();
+					$vdate = sprintf("%04d%02d%02d", $current_time[5]+1900,
+										$current_time[4]+1, $current_time[3]);
+					$version =~ s/%date/$vdate/;
+				}
+			}
+		}
+		elsif ($line =~ /^INCLUDE[ \t]+(.*)$/) {
+			read_file(gen_path($dirname, $1));
+		}
+		else {
+			$filename = $prefix."/".$dirname.$line;
+			while ($filename =~ s|/[^/]+/\.\./|/|) {}
+			if ($file_list{$filename}) {
+				die "$filename is duplicated.";
+			}
+			else {
+				push(@file_list, $filename);
+				$file_list{$filename} = $filename;
+			}
+		}
+	}
+	close($fh);
+}
+
+read_file($arg1);
+unless ($package) {
+	die "PACKAGE/E_PACKAGE directive not found.";
+}
+unless ($version) {
+	die "VERSION directive not found.";
+}
+
+if (! -d "RELEASE") {
+	mkdir("RELEASE");
+}
+
+$archive_name = $package."-".$version.".tar.gz";
+$file_list = join(" ", @file_list);
+$command = "tar cvfz RELEASE/$archive_name -C .. $file_list\n";
+die if (system($command));
+print STDERR "== RELEASE/$archive_name is generated. ==\n";
