Index: /rubycfg_ssp/alarm.trb
===================================================================
--- /rubycfg_ssp/alarm.trb	(revision 283)
+++ /rubycfg_ssp/alarm.trb	(revision 283)
@@ -0,0 +1,128 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: alarm.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		ã¢ã©ã¼ã éç¥æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class AlarmObject < KernelObject
+  def initialize()
+    super("alm", "alarm")
+  end
+
+  def prepare()
+    $cfgData[@api].sort.each do |key, params|
+      # almatrãç¡å¹ã®å ´åï¼E_RSATRï¼
+      #ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+      if (params[:almatr] & ~($TA_STA)) != 0
+        error_illegal_id("E_RSATR", params, :almatr, :almid)
+      end
+    end
+  end
+
+  def generateData()
+
+    if $cfgData[:CRE_ALM].size() > 0
+
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      prepare()
+                                                                                                
+      # ã¢ã©ã¼ã ãã³ãã©ã¢ãã¬ã¹(almhdr)
+      $kernelCfgC.append("const ALMHDR\t_kernel_alminib_almhdr[TNUM_ALMID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(#{id[1][:almhdr]})")
+      end
+      $kernelCfgC.add("};")
+
+      # ã¢ã©ã¼ã ãã³ãã©æ¡å¼µæ
+å ±(exinf)
+      $kernelCfgC.append("const intptr_t\t_kernel_alminib_exinf[TNUM_ALMID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        exinf = id[1][:exinf]
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(intptr_t)(#{exinf})")
+      end
+      $kernelCfgC.add2("};")
+    else
+      # ãªãã¸ã§ã¯ãã1ã¤ããªãå ´å
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ALMHDR, _kernel_alminib_almhdr);") 
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const intptr_t, _kernel_alminib_exinf);") 
+    end
+
+    # ã¢ã©ã¼ã ãã³ãã©ã®ã¿ã¤ã ã¤ãã³ãIDãªãã»ãã
+    $kernelCfgC.add2("const uint_t _kernel_almevtid_offset = #{$cfgData[:CRE_CYC].size};")
+
+    # ã¢ã©ã¼ã ãã³ãã©ã®åä½ç¶æ
+
+    $kernelCfgC.add2("uint16_t\t_kernel_almcb_almact;")
+  end
+end
+
+#
+#  ã¢ã©ã¼ã éç¥ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Alarm Notification Functions")
+
+if $cfgData[:CRE_ALM].size() > $TMAX_MAXALM
+  error("The number of CRE_ALM must be equal to or less than #{$TMAX_MAXALM}")
+end
+
+AlarmObject.new.generate()
Index: /rubycfg_ssp/banner.trb
===================================================================
--- /rubycfg_ssp/banner.trb	(revision 283)
+++ /rubycfg_ssp/banner.trb	(revision 283)
@@ -0,0 +1,89 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+#
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: core_kernel.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+# 
+
+#
+#  ããã¼åºåç¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«
+#
+
+KERNEL_NAME = 'TOPPERS/SSP Kernel'
+
+MAJOR_VERSION = ($TKERNEL_PRVER >> 12) & 0x0f
+MINOR_VERSION = ($TKERNEL_PRVER >> 4) & 0xff
+PATCH_VERSION = ($TKERNEL_PRVER & 0x0f) 
+
+AUTHOR = <<EOS
+\t\t"Copyright (C) 2010 by Meika Sugimoto\\n" \\
+\t\t"Copyright (C) 2010 by Naoki Saito\\n"\t\\
+\t\t"            Nagoya Municipal Industrial Research Institute, JAPAN\\n" \\
+EOS
+
+$kernelCfgC.add("#ifndef TARGET_COPYRIGHT")
+$kernelCfgC.add("#define TARGET_COPYRIGHT")
+$kernelCfgC.add2("#endif /* TARGET_COPYRIGHT */")
+
+$kernelCfgC.add("#ifndef TARGET_NAME")
+$kernelCfgC.add("#define TARGET_NAME")
+$kernelCfgC.add2("#endif /* TARGET_NAME */")
+
+BANNER = <<EOS
+"\\n" "#{KERNEL_NAME} " "#{sprintf("%d.%X.%d", MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)} " \\
+\t\t" for " TARGET_NAME " (" __DATE__ " , " __TIME__ ")\\n" \\
+#{AUTHOR}\t\tTARGET_COPYRIGHT "\\n";
+EOS
+
+$kernelCfgC.append("const char banner[] = #{BANNER}")
+$kernelCfgC.add("const int32_t banner_size = sizeof(banner) / sizeof(banner[0]);")
+ 
Index: /rubycfg_ssp/cyclic.trb
===================================================================
--- /rubycfg_ssp/cyclic.trb	(revision 283)
+++ /rubycfg_ssp/cyclic.trb	(revision 283)
@@ -0,0 +1,177 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: cyclic.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		å¨æéç¥æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class CyclicObject < KernelObject
+  def initialize()
+    super("cyc", "cyclic")
+  end
+
+  def prepare()
+    $cfgData[@api].sort.each do |key, params|
+
+      # cycatrãç¡å¹ã®å ´åï¼E_RSATRï¼
+      #ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+      if (params[:cycatr] & ~($TA_STA)) != 0
+        error_illegal_id("E_RSATR", params, :cycatr, :cycid)
+      end
+
+      # (0 < cyctim && cyctim <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼
+      if !(0 < params[:cyctim] && params[:cyctim] <= $TMAX_RELTIM)
+        error_illegal_id("E_PAR", params, :cyctim, :cycid)
+      end
+
+      # (0 <= cycphs && cycphs <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼
+      if !(0 <= params[:cycphs] && params[:cycphs] <= $TMAX_RELTIM)
+        error_illegal_id("E_PAR", params, :cycphs, :cycid)
+      end
+
+      # ä½ç¸ã0ãã¤ï¼å±æ§ã TA_STA ã®å ´å(è­¦å)
+      if params[:cycphs] == 0 && (params[:cycatr] & $TA_STA) != 0
+        warning("cycphs==0 is not recommended when TA_STA is set to cycatr in CRE_CYC")
+      end
+    end
+  end
+
+  def generateData()
+    if $cfgData[:CRE_CYC].size() > 0
+
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      prepare()
+
+      # å¨æãã³ãã©å±æ§(cycatr)
+      cycact = 0
+      $cfgData[@api].each.with_index do |id, index|
+        if (id[1][:cycatr] & $TA_STA != 0)
+          cycact = cycact | (1 << (id[0] - 1))
+        end
+      end
+      $kernelCfgC.add("const uint16_t\t_kernel_cycinib_cycact = #{cycact};")
+
+      # å¨æãã³ãã©æ¡å¼µæ
+å ±(exinf)
+      $kernelCfgC.append("const intptr_t\t_kernel_cycinib_exinf[TNUM_CYCID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        exinf = id[1][:exinf]
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(intptr_t)(#{exinf})")
+      end
+      $kernelCfgC.add("};")
+
+      # å¨æãã³ãã©ã¢ãã¬ã¹(cychdr)
+      $kernelCfgC.append("const CYCHDR\t_kernel_cycinib_cychdr[TNUM_CYCID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(#{id[1][:cychdr]})")
+      end
+      $kernelCfgC.add("};")
+
+      # å¨æãã³ãã©å¨æ(cyctim)
+      $kernelCfgC.append("const RELTIM\t_kernel_cycinib_cyctim[TNUM_CYCID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(#{id[1][:cyctim]})")
+      end
+      $kernelCfgC.add("};")
+
+      # å¨æãã³ãã©ä½ç¸(cycphs)
+      $kernelCfgC.append("const RELTIM\t_kernel_cycinib_cycphs[TNUM_CYCID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(#{id[1][:cycphs]})")
+      end
+      $kernelCfgC.add("};")
+
+      # å¨æãã³ãã©ã®æ¬¡åèµ·åæå»
+      $kernelCfgC.add("EVTTIM\t_kernel_cyccb_evttim[TNUM_CYCID];")
+    else
+      # ãªãã¸ã§ã¯ãã1ã¤ããªãå ´å
+      $kernelCfgC.add("const uint16_t _kernel_cycinib_cycact = 0;") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const intptr_t, _kernel_cycinib_exinf);") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const CYCHDR, _kernel_cycinib_cychdr);") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const RELTIM, _kernel_cycinib_cyctim);") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const RELTIM, _kernel_cycinib_cycphs);") 
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(EVTTIM, _kernel_cyccb_evttim);") 
+    end
+
+    # å¨æãã³ãã©ã®ã¿ã¤ã ã¤ãã³ãIDãªãã»ãã
+    # å¨æãã³ãã©ã®ã¿ã¤ã ã¤ãã³ãIDã¯0ããéå§
+    $kernelCfgC.add2("const uint_t _kernel_cycevtid_offset = 0;")
+
+    # å¨æãã³ãã©ã®åä½ç¶æ
+
+    $kernelCfgC.add2("uint16_t\t_kernel_cyccb_cycact;")
+  end
+end
+
+#
+#  å¨æéç¥ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Cyclic Notification Functions")
+
+# ã¨ã³ããªãTMAX_MAXCYCå(kernel.hã§å®ç¾©)ããå¤ãå ´åã¯ã¨ã©ã¼ã¨ãã
+if $cfgData[:CRE_CYC].size() > $TMAX_MAXCYC
+  error("The number of CRE_CYC must be equal to or less than #{$TMAX_MAXCYC}")
+end
+
+CyclicObject.new.generate()
Index: /rubycfg_ssp/dataqueue.trb
===================================================================
--- /rubycfg_ssp/dataqueue.trb	(revision 283)
+++ /rubycfg_ssp/dataqueue.trb	(revision 283)
@@ -0,0 +1,154 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: dataqueue.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		ãã¼ã¿ã­ã¥ã¼æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class DataqueueObject < KernelObject
+  def initialize()
+    super("dtq", "dataqueue")
+  end
+
+  def prepare()
+    $cfgData[@api].sort.each do |key, params|
+      # dtqatrãç¡å¹ã®å ´åï¼E_RSATRï¼
+      #ï¼TA_NULLä»¥å¤ã®å ´åï¼
+      if params[:dtqatr] != $TA_NULL
+        error_illegal_id("E_RSATR", params, :dtqatr, :dtqid)
+      end
+
+      # dtqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼
+      if params[:dtqmb] != "NULL"
+        error_illegal_id("E_NOSPT", params, :dtqmb, :dtqid)
+      end
+
+      # ãã¼ã¿ã­ã¥ã¼ãµã¤ãºdtqcntã0ã®å ´å(E_PAR)
+      if params[:dtqcnt] == 0
+        error_illegal_id("E_PAR", params, :dtqcnt, :dtqid)
+      end
+    end
+  end
+
+  def generateData()
+    if $cfgData[:CRE_DTQ].size() > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      prepare()
+
+      # ãã¼ã¿ã­ã¥ã¼é å
+      $cfgData[@api].each.with_index do |id, index|
+        $kernelCfgC.add("static intptr_t _kernel_dtqmb_#{id[1][:dtqid].str}[#{id[1][:dtqcnt]}];")
+      end
+
+      #
+      # ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
+      #
+
+      # ãã¼ã¿ã­ã¥ã¼å±æ§(dtqatr)
+      $kernelCfgC.append("const ATR\t_kernel_dtqinib_atr[TNUM_DTQID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        dtqatr = id[1][:dtqatr]
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(#{dtqatr.str})")
+      end
+      $kernelCfgC.add("};")
+
+      # ãã¼ã¿ã­ã¥ã¼ãµã¤ãº(dtqcnt)
+      $kernelCfgC.append("const uint8_t\t_kernel_dtqinib_size[TNUM_DTQID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        $kernelCfgC.append(",") if index > 0 
+        $kernelCfgC.append("(#{id[1][:dtqcnt].str})")
+      end 
+      $kernelCfgC.add("};")
+
+      # ãã¼ã¿ã­ã¥ã¼ç®¡çé å(data)
+      $kernelCfgC.append("intptr_t * const\t_kernel_dtqinib_data[TNUM_DTQID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(_kernel_dtqmb_#{id[1][:dtqid].str})")
+      end
+      $kernelCfgC.add2("};")
+
+      #
+      #  ãã¼ã¿ã­ã¥ã¼ã³ã³ãã­ã¼ã«ãã­ãã¯
+      #
+      $kernelCfgC.add(<<EOS)
+uint8_t _kernel_dtqcb_count[TNUM_DTQID];
+uint8_t _kernel_dtqcb_head[TNUM_DTQID];
+uint8_t _kernel_dtqcb_tail[TNUM_DTQID];
+EOS
+
+    else
+      # ãªãã¸ã§ã¯ãã1ã¤ããªãå ´å
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ATR, _kernel_dtqinib_atr);") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(intptr_t * const, _kernel_dtqinib_data);") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const uint8_t, _kernel_dtqinib_size);") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(uint8_t, _kernel_dtqcb_count);") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(uint8_t, _kernel_dtqcb_head);") 
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(uint8_t, _kernel_dtqcb_tail);") 
+    end
+  end
+end
+
+#
+#  ãã¼ã¿ã­ã¥ã¼ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Dataqueue Functions")
+DataqueueObject.new.generate()
Index: /rubycfg_ssp/eventflag.trb
===================================================================
--- /rubycfg_ssp/eventflag.trb	(revision 283)
+++ /rubycfg_ssp/eventflag.trb	(revision 283)
@@ -0,0 +1,126 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: eventflag.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		ã¤ãã³ããã©ã°æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class EventflagObject < KernelObject
+  def initialize()
+    super("flg", "eventflag")
+  end
+
+  def prepare()
+    $cfgData[@api].sort.each do |key, params|
+      # flgatrãç¡å¹ã®å ´åï¼E_RSATRï¼
+      #ï¼TA_CLRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+      if (params[:flgatr] & ~($TA_CLR)) != 0
+        error_illegal_id("E_RSATR", params, :flgatr, :flgid)
+      end
+
+      # iflgptnãFLGPTNã«æ ¼ç´ã§ããªãå ´åï¼E_PARï¼
+      if (params[:iflgptn] & ~((1 << $TBIT_FLGPTN) - 1)) != 0
+        error_wrong_id("E_PAR", params, :iflgptn, :flgid, "too large")
+      end
+    end
+  end
+
+  def generateData()
+    #
+    #  ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+    #
+    if $cfgData[:CRE_FLG].size() > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      prepare()
+
+      # ã¤ãã³ããã©ã°å±æ§(flgatr)
+      $kernelCfgC.append("const ATR\t_kernel_flginib_atr[TNUM_FLGID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        flgatr = id[1][:flgatr]
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(#{flgatr.str})")
+      end
+      $kernelCfgC.add("};")
+
+      # ã¤ãã³ããã©ã°ãã¿ã¼ã³ã®åæå¤(iflgptn)
+      $kernelCfgC.append("const FLGPTN\t_kernel_flginib_iflgptn[TNUM_FLGID] = {")
+      $cfgData[@api].each.with_index do |id, index|
+        $kernelCfgC.append(",") if index > 0 
+        $kernelCfgC.append("(#{id[1][:iflgptn].str})")
+      end 
+      $kernelCfgC.add("};")
+
+      # ã¤ãã³ããã©ã°ã®ç¾å¨ã®ãã©ã°ãã¿ã¼ã³ãæ ¼ç´ããå¤æ°
+      $kernelCfgC.add2("FLGPTN\t_kernel_flgcb_flgptn[TNUM_FLGID];")
+
+    else
+      # ãªãã¸ã§ã¯ãã1ã¤ããªãå ´å
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ATR, _kernel_flginib_atr);") 
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const FLGPTN, _kernel_flginib_iflgptn);")
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(FLGPTN, _kernel_flgcb_flgptn);")
+    end
+  end
+end
+
+#
+#  ã¤ãã³ããã©ã°ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Eventflag Functions")
+EventflagObject.new.generate()
Index: /rubycfg_ssp/exception.trb
===================================================================
--- /rubycfg_ssp/exception.trb	(revision 283)
+++ /rubycfg_ssp/exception.trb	(revision 283)
@@ -0,0 +1,142 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: exception.trb 663 2016-02-27 04:45:50Z ertl-hiro $
+# 
+
+#
+#		CPUä¾å¤ç®¡çæ©è½ã®çæã¹ã¯ãªãã
+#
+
+#
+#  kernel_cfg.cã®çæ
+#
+$kernelCfgC.comment_header("CPU Exception Management Functions")
+
+#
+#  CPUä¾å¤ãã³ãã©ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:DEF_EXC].each do |key, params|
+  # excnoãCPUä¾å¤ãã³ãã©çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  if $EXCNO_VALID.index(params[:excno]).nil?
+    error_illegal("E_PAR", params, :excno)
+  end
+
+  # excatrãç¡å¹ã®å ´åï¼E_RSATRï¼
+  #ï¼TARGET_EXCATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:excatr] & ~($TARGET_EXCATR)) != 0
+    error_illegal_sym("E_RSATR", params, :excatr, :excno)
+  end
+end
+
+#
+#  CPUä¾å¤ãã³ãã©ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_EXCEPTION
+  #
+  #  å®ç¾©ããCPUä¾å¤ãã³ãã©ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_EXCNO	#{$cfgData[:DEF_EXC].size}
+const uint_t _kernel_tnum_excno = TNUM_EXCNO;
+EOS
+
+  if $cfgData[:DEF_EXC].size != 0
+    #
+    #  CPUä¾å¤ãã³ãã©ã®ã¨ã³ããª
+    #
+    $cfgData[:DEF_EXC].each do |key, params|
+      $kernelCfgC.add("EXCHDR_ENTRY(#{params[:excno]}, " \
+						"#{params[:excno].val}, #{params[:exchdr]})")
+    end
+    $kernelCfgC.add("")
+
+    #
+    #  CPUä¾å¤ãã³ãã©åæåãã­ãã¯
+    #
+    $kernelCfgC.append("const EXCNO _kernel_excinib_excno[TNUM_EXCNO] = {")
+    $cfgData[:DEF_EXC].each_with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(#{params[:excno]})")
+    end
+    $kernelCfgC.add("};")
+
+    $kernelCfgC.append("const ATR _kernel_excinib_excatr[TNUM_EXCNO] = {")
+    $cfgData[:DEF_EXC].each_with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(#{params[:excatr]})") 
+    end
+    $kernelCfgC.add("};")
+
+    $kernelCfgC.append("const FP _kernel_excinib_entry[TNUM_EXCNO] = {")
+    $cfgData[:DEF_EXC].each_with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(FP)(EXC_ENTRY(#{params[:excno]}, #{params[:exchdr]}))")
+    end
+    $kernelCfgC.add2("};")
+
+  else
+    $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const EXCNO, _kernel_excinib_excno);")
+    $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ATR, _kernel_excinib_excatr);")
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const FP, _kernel_excinib_entry);")
+  end
+end
+
+#
+#  CPUä¾å¤ç®¡çæ©è½åæåé¢æ°ã®è¿½å 
+#
+$initializeFunctions.push("_kernel_initialize_exception();")
Index: /rubycfg_ssp/install.sh
===================================================================
--- /rubycfg_ssp/install.sh	(revision 283)
+++ /rubycfg_ssp/install.sh	(revision 283)
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+set -eu
+
+SCRIPT_DIR=$(cd $(dirname $0);pwd)
+
+if [ $# -lt 1 ]; then
+  echo "usage: install.sh dest_ssp_dir"
+  exit 1
+else
+  SSPDIR=$1
+fi
+
+install -p -m 0755 ${SCRIPT_DIR}/{prc_check.trb,prc_kernel.trb,prc_sym.def} ${SSPDIR}/arch/arm_m_gcc
+install -p -m 0755 ${SCRIPT_DIR}/{alarm.trb,cyclic.trb,dataqueue.trb,eventflag.trb} ${SSPDIR}/extension
+install -p -m 0755 ${SCRIPT_DIR}/{exception.trb,interrupt.trb,kernel.trb,kernel_api.def,kernel_check.trb,kernel_sym.def,task.trb} ${SSPDIR}/kernel
+install -p -m 0755 ${SCRIPT_DIR}/{banner.trb,syssvc_sym.def} ${SSPDIR}/syssvc
+install -p -m 0755 ${SCRIPT_DIR}/{target_check.trb,target_kernel.cfg,target_kernel.trb} ${SSPDIR}/target/cq_frk_fm3_gcc
+
+(cd ${SSPDIR} && patch -p1 < ${SCRIPT_DIR}/ssp_ruby.patch)
+
+exit 0
Index: /rubycfg_ssp/interrupt.trb
===================================================================
--- /rubycfg_ssp/interrupt.trb	(revision 283)
+++ /rubycfg_ssp/interrupt.trb	(revision 283)
@@ -0,0 +1,431 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: interrupt.trb 678 2016-03-06 02:36:09Z ertl-hiro $
+# 
+
+#
+#		å²è¾¼ã¿ç®¡çæ©è½ã®çæã¹ã¯ãªãã
+#
+
+$kernelCfgC.comment_header("Interrupt Management Functions")
+
+#
+#  ãã¬ã¼ã¹ã­ã°ãã¯ã­ã®ããã©ã«ãå®ç¾©
+#
+$kernelCfgC.add(<<EOS)
+#ifndef LOG_ISR_ENTER
+#define LOG_ISR_ENTER(intno)
+#endif /* LOG_ISR_ENTER */
+
+#ifndef LOG_ISR_LEAVE
+#define LOG_ISR_LEAVE(intno)
+#endif /* LOG_ISR_LEAVE */
+EOS
+
+#
+#  CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·ã®ã
+#  ãã©ã«ãå®ç¾©
+#
+if $INTNO_CREISR_VALID.nil?
+  $INTNO_CREISR_VALID = $INTNO_VALID
+end
+if $INHNO_CREISR_VALID.nil?
+  $INHNO_CREISR_VALID = $INHNO_VALID
+end
+
+#
+#  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿åªå
+åº¦ã®ããã©ã«ãå®ç¾©
+# 
+if $INTPRI_CFGINT_VALID.nil?
+  $INTPRI_CFGINT_VALID = $TMIN_INTPRI.upto($TMAX_INTPRI).to_a
+end
+
+#
+#  å²è¾¼ã¿çªå·ã¨å²è¾¼ã¿ãã³ãã©çªå·ã®å¤æãã¼ãã«ã®ä½æ
+#
+if $INTNO_CREISR_VALID.length != $INHNO_CREISR_VALID.length
+  error_exit("length of `INTNO_CREISR_VALID' is different from" \
+									" length of `INHNO_CREISR_VALID'")
+end
+$toInhnoVal = {}
+$toIntnoVal = {}
+inhno_creisr_valid = $INHNO_CREISR_VALID.dup
+$INTNO_CREISR_VALID.each do |intnoVal|
+  inhnoVal = inhno_creisr_valid.shift
+  $toInhnoVal[intnoVal] = inhnoVal
+  $toIntnoVal[inhnoVal] = intnoVal
+end
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:CFG_INT].each do |key, params|
+  #	intnoãå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  if $INTNO_VALID.index(params[:intno]).nil?
+    error_illegal("E_PAR", params, :intno)
+  end
+
+  #	intatrãç¡å¹ã®å ´åï¼E_RSATRï¼
+  #ï¼TA_ENAINTï¼TA_EDGEï¼TARGET_INTATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:intatr] & ~($TA_ENAINT|$TA_EDGE|$TARGET_INTATR)) != 0
+    error_illegal_sym("E_RSATR", params, :intatr, :intno)
+  end
+
+  #	intpriãCFG_INTã«å¯¾ããå²è¾¼ã¿åªå
+åº¦ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  if $INTPRI_CFGINT_VALID.index(params[:intpri]).nil?
+    error_illegal_sym("E_PAR", params, :intpri, :intno)
+  end
+
+  # ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRIã
+  #	ããå°ããå¤ãæå®ãããªãã£ãå ´åï¼E_OBJï¼
+  if !$INTNO_FIX_NONKERNEL.nil?
+    if !$INTNO_FIX_NONKERNEL.index(params[:intno]).nil?
+      if params[:intpri] >= $TMIN_INTPRI
+        error_ercd("E_OBJ", params, "%%intno must have higher priority " \
+											"than TMIN_INTPRI in %apiname")
+      end
+    end
+  end
+
+  #	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRIãã
+  #	ãå°ããå¤ãæå®ãããå ´åï¼E_OBJï¼
+  if !$INTNO_FIX_KERNEL.nil?
+    if !$INTNO_FIX_KERNEL.index(params[:intno]).nil?
+      if params[:intpri] < $TMIN_INTPRI
+        error_ercd("E_OBJ", params, "%%intno must have lower or equal " \
+									"priority to TMIN_INTPRI in %apiname")
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãã³ãã©ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:DEF_INH].each do |key, params|
+  # inhnoãå²è¾¼ã¿ãã³ãã©çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  if $INHNO_VALID.index(params[:inhno]).nil?
+    error_illegal("E_PAR", params, :inhno)
+  end
+
+  # inhatrãç¡å¹ã®å ´åï¼E_RSATRï¼
+  #ï¼TARGET_INHATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:inhatr] & ~($TARGET_INHATR)) != 0
+    error_illegal_sym("E_RSATR", params, :inhatr, :inhno)
+  end
+
+  #	ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNELã
+  #	æå®ããã¦ããªãå ´åï¼E_RSATRï¼
+  if !$INHNO_FIX_NONKERNEL.nil?
+    if !$INHNO_FIX_NONKERNEL.index(params[:inhno]).nil?
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        error_ercd("E_RSATR", params, "%%inhno must be " \
+								"non-kernel interrupt in %apiname")
+      end
+    end
+  end
+
+  #	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNELãæ
+  #	å®ããã¦ããå ´åï¼E_RSATRï¼
+  if !$INHNO_FIX_KERNEL.nil?
+    if !$INHNO_FIX_KERNEL.index(params[:inhno]).nil?
+      if (params[:inhatr] & $TA_NONKERNEL) != 0
+        error_ercd("E_RSATR", params, "%%inhno must not be " \
+								"non-kernel interrupt in %apiname")
+      end
+    end
+  end
+
+  if $toIntnoVal.has_key?(params[:inhno].val)
+    intnoVal = $toIntnoVal[params[:inhno].val]
+
+    # inhnoã«å¯¾å¿ããintnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼
+    if !$cfgData[:CFG_INT].has_key?(intnoVal)
+      error_ercd("E_OBJ", params, "intno `#{intnoVal}' corresponding to " \
+					"%%inhno in %apiname is not configured with CFG_INT")
+    else
+      intnoParams = $cfgData[:CFG_INT][intnoVal]
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        # inhatrã«TA_NONKERNELãæå®ããã¦ãããï¼inhnoã«å¯¾å¿ããintno
+        # ã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIãããå°
+        # ããå ´åï¼E_OBJï¼
+        if intnoParams[:intpri] < $TMIN_INTPRI
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+				"configured for %%inhno must be lower or equal to TMIN_INTPRI")
+        end
+      else
+        # inhatrã«TA_NONKERNELãæå®ããã¦ããï¼inhnoã«å¯¾å¿ããintnoã«
+        # å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIä»¥ä¸ã§ãã
+        # å ´åï¼E_OBJï¼
+        if intnoParams[:intpri] >= $TMIN_INTPRI
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+					"configured for %%inhno must be higher than TMIN_INTPRI")
+        end
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ã«é¢ããã¨ã©ã¼ãã§ãã¯ã¨å²è¾¼ã¿ãã³ãã©ã®çæ
+#
+$cfgData[:ATT_ISR].sort.each do |key, params|
+  #	isratrãç¡å¹ã®å ´åï¼E_RSATRï¼
+  #ï¼TARGET_ISRATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:isratr] & ~($TARGET_ISRATR)) != 0
+    error_illegal("E_RSATR", params, "isratr")
+  end
+
+  #	intnoãATT_ISRã«å¯¾ããå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  if $INTNO_ATTISR_VALID.index(params[:intno]).nil?
+    error_illegal("E_PAR", params, "intno")
+  end
+
+  #	(TMIN_ISRPRI <= isrpri && isrpri <= TMAX_ISRPRI)ã§ãªãå ´åï¼E_PARï¼
+  if !($TMIN_ISRPRI <= params[:isrpri] && params[:isrpri] <= $TMAX_ISRPRI)
+    error_illegal("E_PAR", params, "isrpri")
+  end
+end
+
+$INTNO_ATTISR_VALID.each do |intnoVal|
+  # å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRã®ãªã¹ãã®ä½æ
+  isrParamsList = []
+  $cfgData[:ATT_ISR].sort.each do |key, params|
+    if params[:intno] == intnoVal
+      isrParamsList.push(params)
+    end
+  end
+
+  #	å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRãå­å¨ããå ´å
+  if isrParamsList.size > 0
+    inhnoVal = $toInhnoVal[intnoVal]
+
+    # intnoã«å¯¾å¿ããinhnoã«å¯¾ãã¦DEF_INHãããå ´åï¼E_OBJï¼
+    if $cfgData[:DEF_INH].has_key?(inhnoVal)
+      inhnoParams = $cfgData[:DEF_INH][inhnoVal]
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+					"is duplicated with inhno #{inhnoParams[:inhno]}")
+    end
+
+    # intnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼
+    if !$cfgData[:CFG_INT].has_key?(intnoVal)
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+									"is not configured with CFG_INT")
+    else
+      intnoParams = $cfgData[:CFG_INT][intnoVal]
+
+      #	intnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIããã
+      #	å°ããå ´åï¼E_OBJï¼
+      if intnoParams[:intpri] < $TMIN_INTPRI
+        error_ercd("E_OBJ", isrParamsList[0],
+						"intpri `#{intnoParams[:intpri]}' configured for " \
+						"%%intno with CFG_INT in higher than TMIN_INTPRI")
+      end
+    end
+
+    # æ¬¡ã®DEF_INHã«ç¸å½ãããã¼ã¿ãçæ
+    # DEF_INH(inhno, { TA_NULL, _kernel_inthdr_<intno> } );
+    $cfgData[:DEF_INH][inhnoVal] = {
+      inhno: NumStr.new(inhnoVal),
+      inhatr: NumStr.new($TA_NULL, "TA_NULL"),
+      inthdr: "_kernel_inthdr_#{intnoVal}"
+    }
+
+    # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç¨ã®å²è¾¼ã¿ãã³ãã©
+    $kernelCfgC.add("void")
+    $kernelCfgC.add("_kernel_inthdr_#{intnoVal}(void)")
+    $kernelCfgC.add("{")
+
+    if isrParamsList.size > 1
+      $kernelCfgC.add("\tPRI saved_ipm;")
+      $kernelCfgC.add
+      $kernelCfgC.add("\ti_begin_int(#{intnoVal});")
+      $kernelCfgC.add("\tsaved_ipm = i_get_ipm();")
+    else
+      $kernelCfgC.add("\ti_begin_int(#{intnoVal});")
+    end
+
+    # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ãåªå
+åº¦é ã«å¼ã³åºã
+    i = 0		# stable sortãè¡ãããã®å¤æ°
+    isrParamsList.sort_by {|params| [ params[:isrpri].val, i += 1 ]} \
+										.each_with_index do |params, index|
+      if index > 0
+        $kernelCfgC.add
+        $kernelCfgC.add("\tif (i_sense_lock()) {")
+        $kernelCfgC.add("\t\ti_unlock_cpu();")
+        $kernelCfgC.add2("\t}")
+        $kernelCfgC.add("\ti_set_ipm(saved_ipm);")
+      end
+      $kernelCfgC.add("\tLOG_ISR_ENTER(#{intnoVal});")
+      $kernelCfgC.add("\t((ISR)(#{params[:isr]}))" \
+						"((intptr_t)(#{params[:exinf]}));")
+      $kernelCfgC.add("\tLOG_ISR_LEAVE(#{intnoVal});")
+    end
+    $kernelCfgC.add("\ti_end_int(#{intnoVal});")
+    $kernelCfgC.add2("}")
+  end
+end
+
+#
+#  å²è¾¼ã¿ãã³ãã©ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INHINIB_TABLE
+  #
+  #  å®ç¾©ããå²è¾¼ã¿ãã³ãã©ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_INHNO	#{$cfgData[:DEF_INH].size}
+const uint_t _kernel_tnum_inhno = TNUM_INHNO;
+EOS
+
+  if $cfgData[:DEF_INH].size != 0
+    #
+    #  å²è¾¼ã¿ãã³ãã©ã®ã¨ã³ããª
+    #
+    $cfgData[:DEF_INH].each do |key, params|
+      $kernelCfgC.add("INTHDR_ENTRY(#{params[:inhno]}, " \
+				"#{params[:inhno].val}, #{params[:inthdr]})")
+    end
+    $kernelCfgC.add("")
+
+    #
+    #  å²è¾¼ã¿ãã³ãã©åæåãã­ãã¯
+    #
+    $kernelCfgC.append("const INHNO\t_kernel_inhinib_inhno[TNUM_INHNO] = {")
+    $cfgData[:DEF_INH].each.with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(#{params[:inhno]})")
+    end
+    $kernelCfgC.add("};")
+
+    $kernelCfgC.append("const ATR\t_kernel_inhinib_inhatr[TNUM_INHNO] = {")
+    $cfgData[:DEF_INH].each.with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(#{params[:inhatr]})")
+    end
+    $kernelCfgC.add("};")
+
+    $kernelCfgC.append("const FP\t_kernel_inhinib_entry[TNUM_INHNO] = {")
+    $cfgData[:DEF_INH].each.with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(FP)(INT_ENTRY(#{params[:inhno]}, #{params[:inthdr]}))")
+    end
+    $kernelCfgC.add2("};")
+  else
+    $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const INHNO, _kernel_inhinib_inhno);")
+    $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ATR, _kernel_inhinib_inhatr);") 
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const FP, _kernel_inhinib_entry);") 
+  end
+end
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INTINIB_TABLE
+
+  #
+  #  è¨­å®ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_INTNO	#{$cfgData[:CFG_INT].size}
+const uint_t _kernel_tnum_intno = TNUM_INTNO;
+EOS
+
+  #
+  #  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯
+  #
+  if $cfgData[:CFG_INT].size != 0
+    $kernelCfgC.append("const INTNO _kernel_intinib_intno[TNUM_INTNO] = {")
+    $cfgData[:CFG_INT].each_with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(#{params[:intno]})")
+    end
+    $kernelCfgC.add("};")
+
+    $kernelCfgC.append("const ATR _kernel_intinib_intatr[TNUM_INTNO] = {")
+    $cfgData[:CFG_INT].each_with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(#{params[:intatr]})")
+    end
+    $kernelCfgC.add("};")
+
+    $kernelCfgC.append("const PRI _kernel_intinib_intpri[TNUM_INTNO] = {")
+    $cfgData[:CFG_INT].each_with_index do |(key, params), index|
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(#{params[:intpri]})")
+    end
+    $kernelCfgC.add2("};")
+
+  else
+    $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const INTNO, _kernel_intinib_intno);")
+    $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ATR, _kernel_intinib_intatr);")
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const PRI, _kernel_intinib_intpri);")
+  end
+end
+
+#
+#  å²è¾¼ã¿ç®¡çæ©è½åæåé¢æ°ã®è¿½å 
+#
+$initializeFunctions.push("_kernel_initialize_interrupt();")
Index: /rubycfg_ssp/kernel.trb
===================================================================
--- /rubycfg_ssp/kernel.trb	(revision 283)
+++ /rubycfg_ssp/kernel.trb	(revision 283)
@@ -0,0 +1,417 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#               Nagoya Municipal Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel.trb 670 2016-03-03 15:08:11Z ertl-hiro $
+# 
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+#
+$timeStampFileName = "kernel_cfg.timestamp"
+
+#
+#  kernel_cfg.hã®å
+é ­é¨åã®çæ
+#
+$kernelCfgH = GenFile.new("kernel_cfg.h")
+$kernelCfgH.add(<<EOS)
+/* kernel_cfg.h */
+#ifndef TOPPERS_KERNEL_CFG_H
+#define TOPPERS_KERNEL_CFG_H
+EOS
+
+#
+#  kernel_cfg.cã®å
+é ­é¨åã®çæ
+#
+$kernelCfgC = GenFile.new("kernel_cfg.c")
+$kernelCfgC.add(<<EOS)
+/* kernel_cfg.c */
+#include "kernel/kernel_int.h"
+#include "kernel_cfg.h"
+
+#ifndef TOPPERS_EMPTY_LABEL
+#define TOPPERS_EMPTY_LABEL(x,y) x y[0]
+#endif
+EOS
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+#
+$kernelCfgC.comment_header("Include Directives")
+$includeFiles.each do |file|
+  $kernelCfgC.add("#include #{file}")
+end
+$kernelCfgC.add()
+
+#
+#  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+#
+#  ã¹ã¿ãã¯é åã®å®ç¾©åã¨ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºè¨è¿°ãé
+åã§è¿ãï¼
+#
+unless defined? AllocStack()
+  def AllocStack(stack, size)
+    # å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ãã
+    $kernelCfgC.add("static STK_T #{stack}[COUNT_STK_T(#{size})];")
+    return("ROUND_STK_T(#{size})")
+  end
+end
+
+#
+#  ã«ã¼ãã«ãªãã¸ã§ã¯ãã«é¢ããæ
+å ±ã®çæï¼ä»®æ³ã¯ã©ã¹ï¼
+#
+class KernelObject
+  def initialize(obj, object)
+    @obj = obj
+    @OBJ = obj.tr("a-z", "A-Z")
+    @object = object
+    @objid = (obj + "id").to_sym
+    @api = "CRE_#{@OBJ}".to_sym
+  end
+
+  # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©çæ
+  def generateIdMacro()
+    $cfgData[@api].sort.each do |key, params|
+      $kernelCfgH.add("#define #{params[@objid]}\t#{params[@objid].val}")
+    end
+    $kernelCfgH.add()
+  end
+
+  def generate()
+    # kernel_cfg.hã®çæ
+    $kernelCfgH.add("#define TNUM_#{@OBJ}ID\t#{$cfgData[@api].size}")
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+    generateIdMacro()
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
+    if $USE_EXTERNAL_ID
+      $cfgData[@api].sort.each do |key, params|
+        $kernelCfgC.add("const ID #{params[@objid]}_id" \
+                         " = #{params[@objid].val};")
+      end
+      $kernelCfgC.add()
+    end
+
+    # ãªãã¸ã§ã¯ãIDçªå·ã®æå¤§å¤
+    $kernelCfgC.add2("const ID _kernel_tmax_#{@obj}id" \
+                      " = (TMIN_#{@OBJ}ID + TNUM_#{@OBJ}ID - 1);")
+
+    # ãã¼ã¿æ§é ã®çæ
+    if respond_to?(:generateData)
+      generateData()
+    end
+
+    if $cfgData[@api].size() > 0
+      # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+      $initializeFunctions.push("_kernel_initialize_#{@object}();")
+    end
+  end
+end
+
+#
+#  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+#
+$initializeFunctions = []
+IncludeTrb("kernel/task.trb")
+IncludeTrb("extension/eventflag.trb")
+IncludeTrb("extension/dataqueue.trb")
+IncludeTrb("extension/cyclic.trb")
+IncludeTrb("extension/alarm.trb")
+IncludeTrb("kernel/interrupt.trb")
+IncludeTrb("kernel/exception.trb")
+
+#
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.comment_header("Stack Area for Non-task Context")
+
+# éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã¹ã¿ãã¯é åã®ãµã¤ãº
+$istksz = 0
+
+# DEF_ICSã®ã¨ã³ããªãå­å¨ãããï¼
+if $cfgData[:DEF_ICS].size == 0
+  # ãªãå ´åï¼ãµã¤ãºã¯æ¢å®å¤(DEFAULT_ISTKSZ)ãä½¿ã
+  $kernelCfgC.add2("#define TOPPERS_ISTKSZ	DEFAULT_ISTKSZ")
+  $istksz = $DEFAULT_ISTKSZ
+else
+  # DEF_ICS ã®ã¨ã³ããªãããå ´å
+
+  # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼
+  if $cfgData[:DEF_ICS].size > 1
+    error("E_OBJ: too many DEF_ICS")
+  end
+
+  params = $cfgData[:DEF_ICS][1]
+
+  # istksz ã« 0 ãæå®ããå ´åï¼E_PARï¼
+  if params[:istksz] == 0
+    error_wrong("E_PAR", params, :istksz, "size is 0")
+  # istk ã¯å¸¸ã« NULL ã§ãã (E_PAR)
+  elsif params[:istk] != "NULL"
+    error_wrong("E_PAR", params, :istk, "must be NULL")
+  end
+
+  $istksz = params[:istksz]
+  $kernelCfgC.add2("#define TOPPERS_ISTKSZ\t(#{$istksz})")
+end
+
+#
+#  å
+±æã¹ã¿ãã¯é å
+#      SSPã§ã¯ãã¹ã¦ã®å¦çåä½ã®ã¹ã¿ãã¯ãå
+±æããããï¼
+#      ããã§ã·ã¹ãã å
+¨ä½ã®ã¹ã¿ãã¯é åãç¢ºä¿ããï¼
+#
+
+#
+#  å
+±æã¹ã¿ãã¯ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã«æåãããã©ãã
+#  DEF_STK å¦çä¸­ã«ã¨ã©ã¼ãçºçããå ´åï¼ãã®å¤æ°ã false ã«ãªãï¼
+#
+$defstk_success = true
+
+$kernelCfgC.comment_header("Stack Area for System")
+
+# å
+±æã¹ã¿ãã¯ã®ãµã¤ãº
+$stksz = 0
+
+stk_str = ""
+stksz_str = ""
+
+# DEF_STK ã®ã¨ã³ããªãå­å¨ãããï¼
+if $cfgData[:DEF_STK].size == 0
+  # (1) DEF_STK ã®ã¨ã³ããªããªãå ´å
+  stk_str = "_kernel_stack"
+  stksz_str = AllocStack(stk_str, "TOPPERS_TSTKSZ+TOPPERS_ISTKSZ")
+
+  $stksz = $tstksz + $istksz
+else
+  # (2) DEF_STK ã®ã¨ã³ããªãããå ´å
+
+  # éçAPIãDEF_STKããè¤æ°ããï¼E_OBJï¼
+  if $cfgData[:DEF_STK].size > 1
+    $defstk_success = false
+    error("E_OBJ: too many DEF_STK")
+  end
+
+  params = $cfgData[:DEF_STK][1]
+
+  # DEF_STK ã® stksz ã§ 0 ãæå®ããå ´å(E_PAR)
+  if params[:stksz] == 0
+    $defstk_success = false
+    error_wrong("E_PAR", params, :stksz, "not allowed")
+  end
+
+  $stksz = params[:stksz]
+
+  if params[:stk] == "NULL"
+    # stk ã NULL ã®å ´åï¼ã¹ã¿ãã¯é åãèªåå²ä»ã 
+    stk_str = "_kernel_stack"
+    stksz_str = AllocStack(stk_str, "#{$stksz}")
+  else
+    # stk ã NULL ä»¥å¤ã®å ´åï¼ã¢ããªå´ã§ã¹ã¿ãã¯é åãç¨æããå ´åï¼ 
+
+    # stksz ãã¿ã¼ã²ããæ¯ã«å®ã¾ãã¢ã©ã¤ã¡ã³ããµã¤ãºã®åæ°ã«ã¢ã©ã¤ã¡ã³ãããã¦ããªãå ´åï¼E_PARï¼
+    if (defined? $CHECK_STKSZ_ALIGN) && (($stksz & ($CHECK_STKSZ_ALIGN - 1)) != 0)
+      $defstk_success = false
+      error_wrong("E_PAR", params, :stksz, "not aligned")
+    end
+
+    stk_str = params[:stk]
+    stksz_str = $stksz
+  end
+end
+
+#
+# å
+±æã¹ã¿ãã¯ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.add(<<EOS)
+#define TOPPERS_STK          (#{stk_str})
+#define TOPPERS_STKSZ        (#{stksz_str})
+
+const SIZE\t_kernel_stksz = TOPPERS_STKSZ;
+STK_T *const\t_kernel_stk = TOPPERS_STK;
+
+#ifdef TOPPERS_ISTKPT
+STK_T *const\t_kernel_istkpt = TOPPERS_ISTKPT(TOPPERS_STK, TOPPERS_STKSZ);
+#endif /* TOPPERS_ISTKPT */
+EOS
+
+#
+#  åªå
+åº¦å²ãå½ã¦ããã³ã¹ã¿ãã¯è¨­å®ã«é¢ããçµæãæ¨æºåºåã¸è¡¨ç¤º
+#  ãã®éï¼ã¹ã¿ãã¯ãµã¤ãºã®æå®å¤ãå®éã®å²å½ã¦ãµã¤ãºããå¤§ããããç¢ºèªããï¼
+#
+if $defepr_success && $defstk_success
+  result_str = <<EOS
+=====================================
+Stack size configuration result:
+\tEstimated task stack size = #{$tstksz}
+\tSpecified interrupt stack size = #{$istksz}(value=#{sprintf("%d", $istksz)})
+\tAllocated total stack size = #{$stksz}(value=#{sprintf("%d", $stksz)})
+EOS
+
+  print(result_str)
+  if $tstksz + $istksz > $stksz
+    print("\t!!!WARNING!!!: Estimated stack size is more than the allocated stack size.")
+    warning("Estimated stack size is more than the allocated stack size.")
+  end
+  print("=====================================\n")
+end
+
+#
+#  ã¿ã¤ã ã¤ãã³ãç®¡ç
+#
+tnum_tmevt = $cfgData[:CRE_CYC].size + $cfgData[:CRE_ALM].size
+$kernelCfgC.comment_header("Time Event Management")
+$kernelCfgC.add(<<EOS)
+#define TNUM_TMEVT #{sprintf("%d", tnum_tmevt)}
+
+const uint_t _kernel_tnum_tmevt_queue = TNUM_TMEVT;
+
+QUEUE _kernel_tmevt_queue[TNUM_TMEVT+1];
+EVTTIM _kernel_tmevt_time[TNUM_TMEVT];
+CBACK _kernel_tmevt_callback[TNUM_TMEVT];
+uintptr_t _kernel_tmevt_arg[TNUM_TMEVT];
+EOS
+
+if tnum_tmevt > 0
+  # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+  $initializeFunctions.unshift("_kernel_initialize_time_event();")
+end
+
+#
+#  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
+#
+$kernelCfgC.comment_header("Module Initialization Function")
+$kernelCfgC.append(<<EOS)
+void
+_kernel_initialize_object(void)
+{
+EOS
+$initializeFunctions.each do |func|
+  $kernelCfgC.add("\t#{func}")
+end
+$kernelCfgC.add2("}")
+
+#
+#  åæåã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Initialization Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_INI].each do |key, params|
+  # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:iniatr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
+  end
+end
+
+# åæåã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_inirtn(void)
+{
+EOS
+$cfgData[:ATT_INI].each do |key, params|
+  $kernelCfgC.add("\t((INIRTN)(#{params[:inirtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  çµäºå¦çã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Termination Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_TER].each do |key, params|
+  # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:teratr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
+  end
+end
+
+# çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_terrtn(void)
+{
+EOS
+$cfgData[:ATT_TER].reverse_each do |key, params|
+  $kernelCfgC.add("\t((TERRTN)(#{params[:terrtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  kernel_cfg.hã®æ«å°¾é¨åã®çæ
+#
+$kernelCfgH.append(<<EOS)
+#endif /* TOPPERS_KERNEL_CFG_H */
+EOS
Index: /rubycfg_ssp/kernel_api.def
===================================================================
--- /rubycfg_ssp/kernel_api.def	(revision 283)
+++ /rubycfg_ssp/kernel_api.def	(revision 283)
@@ -0,0 +1,14 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +atskpri .stksz &stk }
+DEF_EPR %tskid* { +exepri }
+CRE_FLG #flgid* { .flgatr .iflgptn }
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb }
+CRE_CYC #cycid* { .cycatr &exinf &cychdr .cyctim .cycphs }
+CRE_ALM #almid* { .almatr &exinf &almhdr }
+CFG_INT .intno* { .intatr +intpri }
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk }
+DEF_STK { .stksz &stk }
+ATT_ISR { .isratr &exinf .intno &isr +isrpri }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: /rubycfg_ssp/kernel_check.trb
===================================================================
--- /rubycfg_ssp/kernel_check.trb	(revision 283)
+++ /rubycfg_ssp/kernel_check.trb	(revision 283)
@@ -0,0 +1,143 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel_check.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+#  
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯ãªãã
+#
+
+# 
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+# 
+$timeStampFileName = "check.timestamp"
+
+# 
+#  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
+# 
+tinib_task = SYMBOL("_kernel_tinib_task")
+$cfgData[:CRE_TSK].sort.each do |key, params|
+  task = PEEK(tinib_task, $sizeof_TASK)
+
+  # ã¿ã¹ã¯ã®å
+é ­çªå°ã®ãã§ãã¯
+  if (task & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && task == 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "null")
+  end
+
+  tinib_task += $sizeof_TASK
+end
+
+# 
+#  å¨æéç¥ã«é¢ãããã§ãã¯
+# 
+cycinib_cychdr = SYMBOL("_kernel_cycinib_cychdr")
+$cfgData[:CRE_CYC].sort.each do |key, params|
+  cychdr = PEEK(cycinib_cychdr, $sizeof_CYCHDR)
+
+  # å¨æãã³ãã©å
+é ­çªå°ã®ãã§ãã¯
+  if (cychdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :cychdr, :cycid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && cychdr == 0
+    error_wrong_id("E_PAR", params, :cychdr , :cycid, "null")
+  end
+
+  cycinib_cychdr += $sizeof_CYCHDR
+end
+
+# 
+#  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
+# 
+alminib_almhdr = SYMBOL("_kernel_alminib_almhdr")
+$cfgData[:CRE_ALM].sort.each do |key, params|
+  almhdr = PEEK(alminib_almhdr, $sizeof_ALMHDR)
+
+  # ã¢ã©ã¼ã ãã³ãã©å
+é ­çªå°ã®ãã§ãã¯
+  if (almhdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :almhdr, :almid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && almhdr == 0
+    error_wrong_id("E_PAR", params, :almhdr , :almid, "null")
+  end
+
+  alminib_almhdr += $sizeof_ALMHDR
+end
+
+# 
+#  å
+±æã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
+# 
+stkAddr = SYMBOL("_kernel_stk")
+if !stkAddr.nil?
+  stk = PEEK(stkAddr, $sizeof_void_ptr)
+
+  # å
+±æã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯
+  if (stk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_STK][1], :stk, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && stk == 0
+    error_wrong("E_PAR", $cfgData[:DEF_STK][1], :stk, "null")
+  end
+end
Index: /rubycfg_ssp/kernel_sym.def
===================================================================
--- /rubycfg_ssp/kernel_sym.def	(revision 283)
+++ /rubycfg_ssp/kernel_sym.def	(revision 283)
@@ -0,0 +1,51 @@
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_RSTR
+TA_STA
+TA_CLR
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+DEFAULT_ISTKSZ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXCYC
+TMAX_MAXALM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+sizeof_ID,sizeof(ID)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_SIZE,sizeof(SIZE)
+sizeof_ATR,sizeof(ATR)
+sizeof_PRI,sizeof(PRI)
+sizeof_void_ptr,sizeof(void*)
+sizeof_VP,sizeof(void*)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_FP,sizeof(FP)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_EXCNO,sizeof(EXCNO)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+sizeof_TASK,sizeof(TASK)
+sizeof_CYCHDR,sizeof(CYCHDR)
+sizeof_ALMHDR,sizeof(ALMHDR)
Index: /rubycfg_ssp/prc_check.trb
===================================================================
--- /rubycfg_ssp/prc_check.trb	(revision 283)
+++ /rubycfg_ssp/prc_check.trb	(revision 283)
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+# 
+#		ãã¹3ã®çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+# 
+#  $Id: core_check.trb 730 2016-04-03 02:04:52Z ertl-hiro $
+#
+
+#
+#  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+IncludeTrb("kernel/kernel_check.trb")
+
+#
+#  å²è¾¼ã¿ãã³ãã©ãã¼ãã«ã«é¢ãããã§ãã¯
+#
+# DEF_INHã§ç»é²ããå²è¾¼ã¿ãã³ãã©ã®ã¿ãã§ãã¯ããï¼éã«è¨ãã¨ï¼ã³ã³ãã£
+# ã®ã¥ã¬ã¼ã¿ã§çæããå²è¾¼ã¿ãã³ãã©ãï¼default_int_handlerã®ãã§ãã¯ã¯
+# è¡ããªãï¼
+#
+inhinib_entry = SYMBOL("_kernel_inhinib_entry")
+$cfgData[:DEF_INH].each do |key, params|
+  inthdr = PEEK(inhinib_entry, $sizeof_FP)
+
+  #	å²è¾¼ã¿ãã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯
+  if (inthdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :inthdr, :inhno, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && inthdr == 0
+    error_wrong_id("E_PAR", params, :inthdr, :inhno, "null")
+  end
+
+  inhinib_entry += $sizeof_FP
+end
+
+#
+#  CPUä¾å¤ãã³ãã©ãã¼ãã«ã«é¢ãããã§ãã¯
+#
+# DEF_EXCã§ç»é²ããCPUä¾å¤ãã³ãã©ã®ã¿ãã§ãã¯ããï¼éã«è¨ãã¨ï¼
+# default_exc_handlerã®ãã§ãã¯ã¯è¡ããªãï¼
+#
+excinib_entry = SYMBOL("_kernel_excinib_entry")
+$cfgData[:DEF_EXC].each do |key, params|
+  exchdr = PEEK(excinib_entry, $sizeof_FP)
+
+  # CPUä¾å¤ãã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯
+  if (exchdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :exchdr, :excno, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && exchdr == 0
+    error_wrong_id("E_PAR", params, :exchdr, :excno, "null")
+  end
+
+  excinib_entry += $sizeof_FP
+end
Index: /rubycfg_ssp/prc_kernel.trb
===================================================================
--- /rubycfg_ssp/prc_kernel.trb	(revision 283)
+++ /rubycfg_ssp/prc_kernel.trb	(revision 283)
@@ -0,0 +1,195 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+#
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: core_kernel.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+# 
+
+#
+#		ãã¹2ã®çæã¹ã¯ãªããã®ã³ã¢ä¾å­é¨ï¼ARMç¨ï¼
+#
+
+#
+#  æå¹ãªå²è¾¼ã¿çªå·ï¼å²è¾¼ã¿ãã³ãã©çªå·
+#
+$INTNO_VALID = Array(15..$TMAX_INTNO)
+$INHNO_VALID = $INTNO_VALID
+
+#
+#  æå¹ãªCPUä¾å¤ãã³ãã©çªå·
+#
+$EXCNO_VALID = [ 2, 3, 4, 5, 6, 11, 12, 14 ]
+
+#
+#  ATT_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·
+#
+$INTNO_ATTISR_VALID = $INTNO_VALID
+$INHNO_ATTISR_VALID = $INHNO_VALID
+
+#
+#  DEF_INT/DEF_EXCã§ä½¿ç¨ã§ããå²è¾¼ã¿ãã³ãã©çªå·ï¼CPUä¾å¤ãã³ãã©çªå·
+#
+$INHNO_DEFINH_VALID = $INHNO_VALID
+$EXCNO_DEFEXC_VALID = $EXCNO_VALID
+
+#
+#  ãã§ãã¯æ¹æ³ã®æå®
+#
+$CHECK_STKSZ_ALIGN = 8
+
+#
+#  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨å²è¾¼ã¿åªå
+åº¦
+#
+$INTNO_CFGINT_VALID = $INTNO_VALID
+$INTPRI_CFGINT_VALID = Array(-(1 << $TBITW_IPRI)..-1)
+
+#
+#  å²è¾¼ã¿å±æ§ä¸­ã®ã¿ã¼ã²ããä¾å­ã«ç¨ããããã
+#
+#$TARGET_INTATR =
+
+#
+#  ã¿ã¼ã²ããéä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
+#
+IncludeTrb("kernel/kernel.trb")
+
+$kernelCfgC.comment_header("Target-dependent Definitions (ARM-M)")
+
+#
+#  å²è¾¼ã¿ãã¯ã¿ãã¼ãã«
+#
+$kernelCfgC.comment_header("Interrupt Vector Table")
+
+$kernelCfgC.add("extern void kernel_svc_handler(void);")
+$kernelCfgC.add
+$kernelCfgC.add("__attribute__ ((section(\".vector\")))")
+$kernelCfgC.add("const FP _kernel_vector_table[] = {")
+$kernelCfgC.add("\t(FP)(TOPPERS_ISTKPT(TOPPERS_STK, TOPPERS_STKSZ)),   // 0 The initial stack pointer")
+$kernelCfgC.add("\t(FP)_start,                 // 1 The reset handler")
+
+(2..14).each do |excno|
+  if excno == 11
+    $kernelCfgC.append("\t(FP)(kernel_svc_handler),      // 11 SVCall handler")
+  else
+    $kernelCfgC.append("\t(FP)(_kernel_exc_entry),")
+  end
+  $kernelCfgC.add(" /* #{excno} */")
+end
+
+$INTNO_VALID.each do |inhno|
+  if ($cfgData[:DEF_INH].has_key?(inhno)) && ($cfgData[:CFG_INT][inhno][:intpri] < $TIPM_LOCK)
+    $kernelCfgC.append("\t(FP)(#{$cfgData[:DEF_INH][inhno][:inthdr]})")
+  else
+    $kernelCfgC.append("\t(FP)(_kernel_int_entry)")
+  end
+  $kernelCfgC.add(", /* #{inhno} */")
+end
+
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  CPUä¾å¤ãã³ãã©ãã¼ãã«
+#
+$kernelCfgC.comment_header("CPU Exception Handler Table")
+
+$kernelCfgC.add("const FP _kernel_exc_tbl[] = {")
+(0..14).each do |excno|
+  if $cfgData[:DEF_EXC].has_key?(excno)
+    $kernelCfgC.append("\t(FP)(#{$cfgData[:DEF_EXC][excno][:exchdr]})")
+  else
+    $kernelCfgC.append("\t(FP)(_kernel_default_exc_handler)")
+  end
+  $kernelCfgC.add(", /* #{excno} */")
+end
+
+$INTNO_VALID.each do |inhno|
+  if ($cfgData[:DEF_INH].has_key?(inhno)) && ($cfgData[:CFG_INT][inhno][:intpri] < $TIPM_LOCK)
+    $kernelCfgC.append("\t(FP)(#{$cfgData[:DEF_INH][inhno][:inthdr]})")
+  else
+    $kernelCfgC.append("\t(FP)(_kernel_default_int_handler)")
+  end
+  $kernelCfgC.add(", /* #{inhno} */")
+end
+
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  _kernel_bitpat_cfgintã®çæ
+#
+
+if ($TMAX_INTNO & 0x0f) == 0
+  bitpat_cfgint_num = ($TMAX_INTNO >> 4)
+else
+  bitpat_cfgint_num = ($TMAX_INTNO >> 4) + 1
+end
+
+$kernelCfgC.add("const uint32_t _kernel_bitpat_cfgint[#{bitpat_cfgint_num}] = {")
+
+(0..(bitpat_cfgint_num-1)).each do |num|
+  bitpat_cfgint = 0
+  ((num*32)..(num*32+31)).each do |inhno|
+    if $cfgData[:DEF_INH].has_key?(inhno)
+      bitpat_cfgint = bitpat_cfgint | (1 << (inhno & 0x01f))
+    end
+  end
+  $kernelCfgC.add("\tUINT32_C(0x#{sprintf("%08x", bitpat_cfgint)}),")
+end
+
+$kernelCfgC.add2("};")
+
Index: /rubycfg_ssp/prc_sym.def
===================================================================
--- /rubycfg_ssp/prc_sym.def	(revision 283)
+++ /rubycfg_ssp/prc_sym.def	(revision 283)
@@ -0,0 +1,3 @@
+TMAX_INTNO
+TIPM_LOCK,,signed 
+TBITW_IPRI
Index: /rubycfg_ssp/ssp_ruby.patch
===================================================================
--- /rubycfg_ssp/ssp_ruby.patch	(revision 283)
+++ /rubycfg_ssp/ssp_ruby.patch	(revision 283)
@@ -0,0 +1,259 @@
+diff -x .git -uprN ssp_2/arch/arm_m_gcc/Makefile.prc ssp_3/arch/arm_m_gcc/Makefile.prc
+--- ssp_2/arch/arm_m_gcc/Makefile.prc	2014-03-18 09:28:35.000000000 +0900
++++ ssp_3/arch/arm_m_gcc/Makefile.prc	2017-04-28 16:40:20.000000000 +0900
+@@ -18,17 +18,17 @@ LIBS := $(LIBS)  -lgcc
+ #
+ #  ã«ã¼ãã«ã«é¢ããå®ç¾©
+ #
+-KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/arch/$(PRC)_$(TOOL)
++KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/arch/$(PRC)_$(TOOL)
+ KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) prc_support.o
+ KERNEL_COBJS := $(KERNEL_COBJS) prc_config.o prc_timer.o
+ 
+ #
+ #  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+ #
+-CFG_TABS := $(CFG_TABS) --cfg1-def-table $(SRCDIR)/arch/$(PRC)_$(TOOL)/prc_def.csv
++CFG_TABS := $(CFG_TABS) --symval-table $(SRCDIR)/arch/$(PRC)_$(TOOL)/prc_sym.def
+ 
+ #
+ #  ä¾å­é¢ä¿ã®å®ç¾©
+ #
+-cfg1_out.c: $(SRCDIR)/arch/$(PRC)_$(TOOL)/prc_def.csv
++cfg1_out.c: $(SRCDIR)/arch/$(PRC)_$(TOOL)/prc_sym.def
+ kernel_cfg.timestamp: $(SRCDIR)/arch/$(PRC)_$(TOOL)/prc.tf
+diff -x .git -uprN ssp_2/sample/Makefile ssp_3/sample/Makefile
+--- ssp_2/sample/Makefile	2017-05-01 19:47:04.000000000 +0900
++++ ssp_3/sample/Makefile	2017-05-02 13:53:32.000000000 +0900
+@@ -1,5 +1,5 @@
+ #
+-#  TOPPERS/ASP Kernel
++#  TOPPERS/SSP Kernel
+ #      Toyohashi Open Platform for Embedded Real-Time Systems/
+ #      Advanced Standard Profile Kernel
+ # 
+@@ -7,6 +7,8 @@
+ #                              Toyohashi Univ. of Technology, JAPAN
+ #  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+ #              Graduate School of Information Science, Nagoya Univ., JAPAN
++#   Copyright (C) 2017 by Naoki Saito
++#              Nagoya Municipal Industrial Research Institute, JAPAN
+ # 
+ #  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ #  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+@@ -108,7 +110,7 @@ TECSGEN = @(TECSGEN)
+ #
+ #  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®å®ç¾©
+ #
+-OBJNAME = asp
++OBJNAME = ssp
+ ifdef OBJEXT
+ 	OBJFILE = $(OBJNAME).$(OBJEXT)
+ 	CFG1_OUT = cfg1_out.$(OBJEXT)
+@@ -163,7 +165,7 @@ ifdef OMIT_TECS
+ 	CDEFS := -DTOPPERS_OMIT_TECS $(CDEFS)
+ endif
+ CDEFS := $(CDEFS) @(CDEFS)
+-INCLUDES := -I. -I$(SRCDIR)/include $(INCLUDES) -I$(SRCDIR)
++INCLUDES := -I. -I$(SRCDIR)/include -I$(SRCDIR)/arch $(INCLUDES) -I$(SRCDIR)
+ LDFLAGS := $(LDFLAGS) @(LDFLAGS)
+ LIBS := $(LIBS) $(CXXLIBS)
+ CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+@@ -184,7 +186,7 @@ ifdef USE_CXX
+ else
+ 	APPL_COBJS := @(APPLOBJS)
+ endif
+-APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o t_perror.o strerror.o
++APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o 
+ APPL_CFLAGS := $(APPL_CFLAGS)
+ ifdef APPLDIRS
+ 	INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIRS),-I$(dir))
+@@ -197,11 +199,18 @@ SYSSVC_DIRS := $(TECSGENDIR) $(SRCDIR)/t
+ 				$(SYSSVC_DIRS) $(SRCDIR)/syssvc
+ SYSSVC_ASMOBJS := $(SYSSVC_ASMOBJS)
+ SYSSVC_COBJS := $(INIT_TECS_COBJ) $(TECS_COBJS) $(SYSSVC_COBJS) \
+-				@(SYSSVCOBJS) $(CXXRTS)
++				@(SYSSVCOBJS) $(CXXRTS) banner.o serial.o syslog.o logtask.o
+ SYSSVC_CFLAGS := $(SYSSVC_CFLAGS)
+ INCLUDES := $(INCLUDES) -I$(TECSGENDIR) -I$(SRCDIR)/tecs_kernel
+ 
+ #
++#  æ¡å¼µããã±ã¼ã¸ã«é¢ããå®ç¾©
++#
++
++EXTPKG_DIR := $(EXTPKG_DIR) $(SRCDIR)/extension
++
++
++#
+ #  ã¿ã¼ã²ãããã¡ã¤ã«
+ #
+ .PHONY: all
+@@ -219,17 +228,6 @@ endif
+ ##### ä»¥ä¸ã¯ç·¨éããªããã¨ #####
+ 
+ #
+-#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
+-#
+-CFG_TABS := --api-table $(SRCDIR)/kernel/kernel_api.def \
+-			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+-CFG_ASMOBJS := $(CFG_ASMOBJS)
+-CFG_COBJS := kernel_cfg.o $(CFG_COBJS)
+-CFG_OBJS := $(CFG_ASMOBJS) $(CFG_COBJS)
+-CFG2_OUT_SRCS := kernel_cfg.h kernel_cfg.c $(CFG2_OUT_SRCS)
+-CFG_CFLAGS := -DTOPPERS_CB_TYPE_ONLY $(CFG_CFLAGS)
+-
+-#
+ #  ã«ã¼ãã«ã«é¢ããå®ç¾©
+ #
+ #  KERNEL_ASMOBJS: ã«ã¼ãã«ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãã¢ã»ã³ããªè¨èªã®
+@@ -244,7 +242,7 @@ CFG_CFLAGS := -DTOPPERS_CB_TYPE_ONLY $(C
+ KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/kernel
+ KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+ KERNEL_COBJS := $(KERNEL_COBJS)
+-KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel
++KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel -I$(EXTPKG_DIR)
+ 
+ #
+ #  ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+@@ -277,12 +275,24 @@ ifndef TARGET_KERNEL_CFG
+ endif
+ 
+ #
++#  ã³ã³ãã£ã­ï¾ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
++#
++CFG_TABS := --api-table $(SRCDIR)/kernel/kernel_api.def \
++                        --symval-table $(SRCDIR)/kernel/kernel_sym.def \
++                        --symval-table $(SRCDIR)/syssvc/syssvc_sym.def $(CFG_TABS)
++CFG_ASMOBJS := $(CFG_ASMOBJS)
++CFG_COBJS := kernel_cfg.o $(CFG_COBJS)
++CFG_OBJS := $(CFG_ASMOBJS) $(CFG_COBJS)
++CFG2_OUT_SRCS := kernel_cfg.h kernel_cfg.c $(CFG2_OUT_SRCS)
++CFG_CFLAGS := -DTOPPERS_CB_TYPE_ONLY $(SYSSVC_CFLAGS) $(KERNEL_CFLAGS) $(CFG_CFLAGS)
++
++#
+ #  ã½ã¼ã¹ãã¡ã¤ã«ã®ãããã£ã¬ã¯ããªã«é¢ããå®ç¾©
+ #
+-vpath %.c $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+-vpath %.S $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+-vpath %.cfg $(APPL_DIRS)
+-vpath %.cdl $(APPL_DIRS)
++vpath %.c $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS) $(EXTPKG_DIR)
++vpath %.S $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS) $(EXTPKG_DIR)
++vpath %.cfg $(APPL_DIRS) $(EXTPKG_DIR)
++vpath %.cdl $(APPL_DIRS) $(EXTPKG_DIR)
+ 
+ #
+ #  ã³ã³ãã¤ã«ã®ããã®å¤æ°ã®å®ç¾©
+@@ -330,7 +340,7 @@ $(TECSGEN_TIMESTAMP): $(APPL_CDL) $(TECS
+ #
+ cfg1_out.c cfg1_out.db: cfg1_out.timestamp ;
+ cfg1_out.timestamp: $(APPL_CFG) $(TECSGEN_TIMESTAMP)
+-	$(CFG) --pass 1 --kernel asp $(INCLUDES) $(CFG_TABS) \
++	$(CFG) --pass 1 --kernel ssp $(INCLUDES) $(CFG_TABS) \
+ 						-M $(DEPDIR)/cfg1_out_c.d $(TARGET_KERNEL_CFG) $<
+ 
+ $(CFG1_OUT): $(START_OBJS) cfg1_out.o $(END_OBJS) $(HIDDEN_OBJS)
+@@ -345,14 +355,14 @@ cfg1_out.srec: $(CFG1_OUT)
+ 
+ $(CFG2_OUT_SRCS) cfg2_out.db: kernel_cfg.timestamp ;
+ kernel_cfg.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
+-	$(CFG) --pass 2 --kernel asp $(INCLUDES) -T $(TARGET_KERNEL_TRB)
++	$(CFG) --pass 2 --kernel ssp $(INCLUDES) -T $(TARGET_KERNEL_TRB)
+ 
+ #
+ #  ãªãã»ãããã¡ã¤ã«ï¼offset.hï¼ã®çæè¦å
+ #
+ $(OFFSET_H): offset.timestamp ;
+ offset.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
+-	$(CFG) --pass 2 -O --kernel asp $(INCLUDES) -T $(TARGET_OFFSET_TRB) \
++	$(CFG) --pass 2 -O --kernel ssp $(INCLUDES) -T $(TARGET_OFFSET_TRB) \
+ 				--rom-symbol cfg1_out.syms --rom-image cfg1_out.srec
+ 
+ #
+@@ -400,7 +410,7 @@ $(OBJNAME).srec: $(OBJFILE)
+ .PHONY: check
+ check: check.timestamp ;
+ check.timestamp: cfg2_out.db $(OBJNAME).syms $(OBJNAME).srec
+-	$(CFG) --pass 3 --kernel asp -O $(INCLUDES) -T $(TARGET_CHECK_TRB) \
++	$(CFG) --pass 3 --kernel ssp -O $(INCLUDES) -T $(TARGET_CHECK_TRB) \
+ 				--rom-symbol $(OBJNAME).syms --rom-image $(OBJNAME).srec
+ 	@echo "configuration check passed"
+ 
+diff -x .git -uprN ssp_2/sample/sample1.cfg ssp_3/sample/sample1.cfg
+--- ssp_2/sample/sample1.cfg	2014-03-18 09:28:35.000000000 +0900
++++ ssp_3/sample/sample1.cfg	2017-05-01 17:35:31.000000000 +0900
+@@ -4,7 +4,6 @@
+ 
+ #include "sample1.h"
+ 
+-INCLUDE("target_timer.cfg");
+ INCLUDE("syssvc/serial.cfg");
+ INCLUDE("syssvc/banner.cfg");
+ INCLUDE("syssvc/syslog.cfg");
+diff -x .git -uprN ssp_2/target/cq_frk_fm3_gcc/Makefile.target ssp_3/target/cq_frk_fm3_gcc/Makefile.target
+--- ssp_2/target/cq_frk_fm3_gcc/Makefile.target	2014-05-08 11:47:23.000000000 +0900
++++ ssp_3/target/cq_frk_fm3_gcc/Makefile.target	2017-05-01 19:32:34.000000000 +0900
+@@ -1,6 +1,7 @@
+ #
+ #		Makefile ã®ã¿ã¼ã²ããä¾å­é¨(CQ-FRM-FM3ç¨)
+ #
++OMIT_OFFSET_H = true
+ 
+ #
+ #  ãã¼ãåï¼ãã­ã»ããµåï¼éçºç°å¢åã®å®ç¾©
+@@ -39,7 +40,7 @@ COPTS := $(COPTS) -mcpu=cortex-m3 -mthum
+ #
+ #  ã«ã¼ãã«ã«é¢ããå®ç¾©
+ #
+-KERNEL_DIR := $(KERNEL_DIR) $(TARGETDIR)
++KERNEL_DIRS := $(KERNEL_DIRS) $(TARGETDIR)
+ KERNEL_ASMOBJS := $(KERNEL_ASMOBJS) target_support.o 
+ KERNEL_COBJS := $(KERNEL_COBJS) target_config.o target_serial.o
+ KERNEL_CFLAGS := $(KERNEL_CFLAGS) -fno-strict-aliasing -mcpu=cortex-m3 -mthumb
+@@ -47,21 +48,21 @@ KERNEL_CFLAGS := $(KERNEL_CFLAGS) -fno-s
+ #
+ #  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+ #
+-SYSSVC_DIR := $(SYSSVC_DIR)
++SYSSVC_DIRS := $(SYSSVC_DIRS)
+ SYSSVC_COBJS := $(SYSSVC_COBJS)
+ SYSSVC_CFLAGS := $(SYSSVC_CFLAGS) -mcpu=cortex-m3 -mthumb
+ 
+ #
+ #  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿é¢ä¿ã®å¤æ°ã®å®ç¾©
+ #
+-CFG_TABS := $(CFG_TABS) --cfg1-def-table $(TARGETDIR)/target_def.csv
++CFG_TABS := $(CFG_TABS) 
+ 
+ #
+ #  ãã¬ã¼ã¹ã­ã°ã«é¢ããè¨­å®
+ #
+ ifeq ($(ENABLE_TRACE),true)
+ 	COPTS := $(COPTS) -DTOPPERS_ENABLE_TRACE
+-	KERNEL_DIR := $(KERNEL_DIR) $(SRCDIR)/arch/logtrace
++	KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/arch/logtrace
+ 	KERNEL_COBJS := $(KERNEL_COBJS) trace_config.o trace_dump.o
+ endif
+ 
+@@ -95,18 +96,13 @@ 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
+-
+ LDFLAGS := -nostdlib $(LDFLAGS) --entry _start
+ 
+ #
+ #  ä¾å­é¢ä¿ã®å®ç¾©
+ #
+-cfg1_out.c: $(TARGETDIR)/target_def.csv
+-kernel_cfg.timestamp: $(TARGETDIR)/target.tf
+-$(OBJFILE): $(TARGETDIR)/target_check.tf
++kernel_cfg.timestamp: $(TARGETDIR)/target_kernel.trb
++check.timestamp: $(TARGETDIR)/target_check.trb
+ 
+ #
+ #  ãã­ã»ããµä¾å­é¨ã®ã¤ã³ã¯ã«ã¼ã
Index: /rubycfg_ssp/syssvc_sym.def
===================================================================
--- /rubycfg_ssp/syssvc_sym.def	(revision 283)
+++ /rubycfg_ssp/syssvc_sym.def	(revision 283)
@@ -0,0 +1,1 @@
+TKERNEL_PRVER
Index: /rubycfg_ssp/target_check.trb
===================================================================
--- /rubycfg_ssp/target_check.trb	(revision 283)
+++ /rubycfg_ssp/target_check.trb	(revision 283)
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+#
+#		ãã¹3ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
+#
+
+IncludeTrb("prc_check.trb")
Index: /rubycfg_ssp/target_kernel.trb
===================================================================
--- /rubycfg_ssp/target_kernel.trb	(revision 283)
+++ /rubycfg_ssp/target_kernel.trb	(revision 283)
@@ -0,0 +1,7 @@
+# -*- coding: utf-8 -*-
+#
+#		ãã¹2ã®çæã¹ã¯ãªããã®ã¿ã¼ã²ããä¾å­é¨
+#
+
+IncludeTrb("prc_kernel.trb")
+IncludeTrb("syssvc/banner.trb")
Index: /rubycfg_ssp/task.trb
===================================================================
--- /rubycfg_ssp/task.trb	(revision 283)
+++ /rubycfg_ssp/task.trb	(revision 283)
@@ -0,0 +1,403 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/SSP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#   Copyright (C) 2017 by Naoki Saito
+#              Nagoya Municipal Industrial Research Institute, JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: task.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+#
+
+class TaskObject < KernelObject
+  def initialize()
+    super("tsk", "task")
+    @tsk_apri_list = []
+    @tsk_epri_list = []
+    @reallocate_atskpri = {}
+    @reallocate_etskpri = {}
+    @higher_pri_tsklist = {}
+    @stacksize_of_tasks = {}
+  end
+
+  # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+  def generateIdMacro()
+    # ã¿ã¹ã¯IDãèµ·ååªå
+åº¦(atskpri)ã®é«ãé ã« reallocate_atskpri ã¸å²ãå½ã¦ã¦å®ç¾©ã kernel_cfg.h ã¸åºå
+
+    ($cfgData[:CRE_TSK].sort_by {|e| e[1][:atskpri].val}).each.with_index(1) do |e, index|
+      @tsk_apri_list.push(e[0])
+      @reallocate_atskpri[e[0]] = index 
+      $kernelCfgH.add("#define #{e[1][:tskid].str} #{index}")
+
+      # DEF_EPR ã§å®ç¾©ããã¦ããªãã¿ã¹ã¯ã®å®è¡æåªå
+åº¦ãèµ·ååªå
+åº¦ã«è¨­å®ãã
+      epri = $cfgData[:DEF_EPR].find {|i| i[1][:tskid].val == e[1][:tskid].val}
+      if epri
+        @tsk_epri_list.push(epri[1][:exepri].val)
+      else
+        @tsk_epri_list.push(e[1][:atskpri].val)
+      end 
+    end
+
+    $kernelCfgH.add()
+  end
+
+  #
+  #  æå®ããã¿ã¹ã¯ã«å¯¾ããã¹ã¿ãã¯ä½¿ç¨éã®æå¤§ãè¨ç®
+  #    å¼æ°ï¼tskidï¼ã¿ã¹ã¯ID(å
+é¨è¡¨ç¾ï¼èµ·åæåªå
+åº¦ã®å
+é¨è¡¨ç¾ã«ç­ãã)
+  #    è¿å¤ï¼å½è©²ã¿ã¹ã¯ã«è¶³ãããã¹ã¿ãã¯ä½¿ç¨éã®æå¤§å¤ï¼
+  #          ãã®å¤ã¯ï¼å½è©²ã¿ã¹ã¯ã®å®è¡éå§ããçµäºã¾ã§ã®éã«
+  #          ãã®ã¿ã¹ã¯ã«å¯¾ããããªã¨ã³ãããèæ
+®ãã¦ã¹ã¿ãã¯ä½¿ç¨éã
+  #          è¨ç®ããå ´åã«ï¼å¯è½æ§ã®ããçµã¿åããã®ä¸­ã§æå¤§ã¨ãªãå¤ãè¿ãï¼
+  #
+  def calc_stksz(tskid, nest_level=1)
+    higher_pri_maxstksz = 0
+    calculated_stack_size = 0
+    stksz = 0
+    taskEntry = $cfgData[@api][tskid]
+
+    $kernelCfgC.add(" * " + ("\t" * nest_level) + "Calculation Start (Task ID = #{taskEntry[:tskid].str}, StackSize = #{taskEntry[:stksz]})")
+
+    if @stacksize_of_tasks[tskid]
+      # è¨ç®ãæ¢ã«å®äºãã¦ããå ´åï¼è¨ç®ãã¹ã­ãããã
+      $kernelCfgC.add(" * " + ("\t" * nest_level) + "SKIP(max_stksz[#{taskEntry[:tskid].str}] = #{@stacksize_of_tasks[tskid]})")
+      stksz = @stacksize_of_tasks[tskid]
+    else
+      # å®äºãã¦ããªãå ´å
+      $kernelCfgC.append(" * " + ("\t" * nest_level) + "Task list with higher priority than #{taskEntry[:tskid].str} = ")
+      @higher_pri_tsklist[tskid].each.with_index do |id, index|
+        $kernelCfgC.append(",") if index > 0
+        $kernelCfgC.append("(#{$cfgData[@api][id][:tskid].str})")
+      end
+      $kernelCfgC.add()
+
+      # å¤æ°ã®åæå
+      higher_pri_maxstksz = 0
+
+      # å½è©²ã¿ã¹ã¯ID ã®å®è¡æåªå
+åº¦ããé«ãèµ·ååªå
+åº¦ãæã¤ã¿ã¹ã¯ãå­å¨ããå ´å
+      if @higher_pri_tsklist[tskid].size > 0
+        # ããããã®é«åªå
+åº¦ã¿ã¹ã¯ã«å¯¾ãï¼ã¹ã¿ãã¯è¨ç®ãå®è¡ãã
+        @higher_pri_tsklist[tskid].each do |id|
+          calculated_stack_size = calc_stksz(id, nest_level+1)
+          # æããµã¤ãºãå¤§ãããã®ã ããè¦ãã¦ãã
+          if higher_pri_maxstksz < calculated_stack_size
+            higher_pri_maxstksz = calculated_stack_size
+          end
+        end
+      end
+
+      $kernelCfgC.add(" * " + ("\t" * nest_level) + "higher_pri_maxstksz[#{taskEntry[:tskid].str}] = #{higher_pri_maxstksz}")
+
+      # é«åªå
+åº¦ã¿ã¹ã¯ã®ã¹ã¿ãã¯ä½¿ç¨éã«ï¼å½è©²ã¿ã¹ã¯ã®ä½¿ç¨éãå ç®ãã
+      stksz = higher_pri_maxstksz + taskEntry[:stksz]
+
+      # å½è©²ã¿ã¹ã¯IDã«å¯¾ãã¦è¨ç®æ¸ã¿ã§ãããã¨ãè¨é²
+      @stacksize_of_tasks[tskid] = stksz
+      $kernelCfgC.add(" * " + ("\t" * nest_level) + "DONE(stksz[#{taskEntry[:tskid].str}] = #{stksz})")
+    end
+
+    # è¦ç©ããã®æå¤§ãè¿ã
+    return stksz
+  end
+
+  # äºåã®ãã§ãã¯
+  def prepare()
+
+    $cfgData[@api].sort.each do |key, params|
+
+      # tskatrãç¡å¹ï¼E_RSATRï¼
+      #ï¼TA_ACTï¼TA_RSTRï¼TA_NULLï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+      if (params[:tskatr] & ~($TA_ACT|$TA_RSTR|$TARGET_TSKATR)) != 0
+        error_illegal_id("E_RSATR", params, :tskatr, :tskid)
+      end
+
+      # (TMIN_TPRI <= atskpri && atskpri <= TMAX_TPRI)ã§ãªãå ´å
+      if !($TMIN_TPRI <= params[:atskpri] && params[:atskpri] <= $TMAX_TPRI)
+        error_illegal_id("E_PAR", params, :atskpri, :tskid)
+      end
+
+      # atskpri ãéè¤ããå ´å (E_PAR)
+      @tsk_apri_list.each do |id|
+        if (params[:tskid].val != id) && (params[:atskpri] == $cfgData[@api][id][:atskpri])
+          error_illegal_id("E_PAR", params, :atskpri, :tskid)
+        end
+      end
+
+      # å®è¡æåªå
+åº¦
+      if $cfgData[:DEF_EPR][params[:tskid].val]
+        # exepri ã¯ TMIN_TPRI ä»¥ä¸ ãã¤ TMAX_TPRI ä»¥ä¸(E_PAR)
+        exepri = $cfgData[:DEF_EPR][params[:tskid].val][:exepri]
+        if $TMIN_TPRI > exepri || $TMAX_TPRI < exepri
+          $defepr_success = false
+          error_illegal_id("E_PAR", params, :exepri, :tskid)
+        end
+
+        # exepri ã¯ atskpri ä»¥ä¸ã®å¤ããã¤(åªå
+åº¦ãé«ã) (E_ILUSE)
+        if exepri > params[:atskpri]
+          $defepr_success = false
+          error_illegal_id("E_ILUSE", params, :exepri, :tskid)
+        end
+      end
+
+      # stkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+      # ãããå°ããå ´å
+      if params[:stksz] < $TARGET_MIN_STKSZ
+        error_ercd("E_PAR", params, "stksz is too small.")
+      end
+
+      # ã¹ã¿ãã¯ã®å
+é ­çªå°(stk)
+      # å
+¨ã¦ã®å¦çåä½ã®ã¹ã¿ãã¯ã¯å
+±æãããï¼
+      # ãã®ããï¼ã¹ã¿ãã¯ãµã¤ãºã«é¢ãããã§ãã¯ã¯
+      # å
+±æã¹ã¿ãã¯è¨­å®ã®ã¨ããã§ã¾ã¨ãã¦è¡ãï¼
+      if params[:stk] != "NULL"
+        error_ercd("E_PAR", params, "stk must be NULL.")
+      end
+    end
+  end
+
+  # ãã¼ã¿æ§é ã®çæ
+  def generateData()
+
+    # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+    prepare()
+
+    #
+    # ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+    #
+    init_rdypmap = 0
+
+    # ã¿ã¹ã¯å±æ§(tskatr)
+    $kernelCfgC.append("const ATR\t_kernel_tinib_tskatr[TNUM_TSKID] = {")
+    @tsk_apri_list.each.with_index do |id, index|
+      tskatr = $cfgData[@api][id][:tskatr]
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(#{tskatr.str})")
+      if tskatr & $TA_ACT != 0
+        init_rdypmap = init_rdypmap + (1 << index)
+      end
+    end
+    $kernelCfgC.add("};")
+
+    $kernelCfgC.add("const uint_t\t_kernel_init_rdypmap = #{init_rdypmap}U;")
+
+    # æ¡å¼µæ
+å ±(exinf)
+    $kernelCfgC.append("const intptr_t\t_kernel_tinib_exinf[TNUM_TSKID] = {")
+    @tsk_apri_list.each.with_index do |id, index|
+      exinf = $cfgData[@api][id][:exinf]
+      $kernelCfgC.append(",") if index > 0
+      $kernelCfgC.append("(intptr_t)(#{exinf})")
+    end
+    $kernelCfgC.add("};")
+
+    # èµ·åçªå°(task)
+    $kernelCfgC.append("const TASK\t_kernel_tinib_task[TNUM_TSKID] = {")
+    @tsk_apri_list.each.with_index do |id, index|
+      task = $cfgData[@api][id][:task]
+      $kernelCfgC.append(",") if index > 0 
+      $kernelCfgC.append("(#{task})")
+    end 
+    $kernelCfgC.add("};")
+
+    # å®è¡æåªå
+åº¦(etskpri)
+    $kernelCfgC.append("const uint_t\t_kernel_tinib_epriority[TNUM_TSKID] = {")
+    @tsk_apri_list.each.with_index do |id, index|
+      begin
+        epri = @tsk_epri_list[index]
+        @tsk_apri_list.each do |id2|
+          if epri <= $cfgData[@api][id2][:atskpri]
+            $kernelCfgC.append(",") if index > 0
+            $kernelCfgC.append("INT_PRIORITY(#{@reallocate_atskpri[id2]})")
+            @reallocate_etskpri[id] = @reallocate_atskpri[id2]
+            break
+          end
+        end
+        raise "the exepri of #{$cfgData[@api][id][:tskid].str}  is invalid." if !@reallocate_etskpri[id]
+      rescue => e
+        error_exit(e.message + " Abort.")
+      end
+    end
+    $kernelCfgC.add("};")
+
+    #
+    # åªå
+åº¦å²ãå½ã¦çµæãåºå
+    #
+    $kernelCfgC.add("/*")
+    $kernelCfgC.add(" * Configuration result of task priority:")
+    @tsk_apri_list.each do |id|
+      $kernelCfgC.append(" * \t#{$cfgData[@api][id][:tskid]}:\tIPRI = #{@reallocate_atskpri[id]}")
+      $kernelCfgC.add(", EXEPRI = #{@reallocate_etskpri[id]}")
+    end
+    $kernelCfgC.add2(" */")
+
+    #
+    #  ã¿ã¹ã¯ã®æå¤§ã¹ã¿ãã¯ä½¿ç¨éã®è¨ç®
+    #
+    
+    # æ¨æ§é ã®ãã¼ã¿ä½æ
+    $root_apri = []
+    (@reallocate_atskpri.sort_by {|id| id[1]}).reverse_each do |id|
+      # åã¿ã¹ã¯æ¯ã«ï¼ãã®å®è¡æåªå
+åº¦ãããé«ãèµ·åæåªå
+åº¦ããã¤ã¿ã¹ã¯ã®ãªã¹ããä½ã
+      # ããã¯ããªã¨ã³ãããããå¯è½æ§ã®ããã¿ã¹ã¯ã®ãªã¹ãã¨ãªãï¼
+      @higher_pri_tsklist[id[0]] = []
+      (@reallocate_atskpri.sort_by {|id| id[1]}).reverse_each do |id2|
+        if @reallocate_etskpri[id[0]] > id2[1]
+          @higher_pri_tsklist[id[0]].push(id2[0])
+        end
+      end
+    end
+
+    # ããªã¨ã³ããããã»ãããé¢ä¿ãç¤ºãæ¨æ§é ã®æ ¹(root)ã¨ãªãã¿ã¹ã¯ã®æ¢ç´¢
+    #   å¯¾è±¡ã¿ã¹ã¯(id)ã®èµ·åæåªå
+åº¦(reallocate_atskpri[id]ããä½ã
+    #   (å¤ã¨ãã¦ã¯å¤§ãã)èµ·åæåªå
+åº¦ããã¤ã¿ã¹ã¯ã® higher_pri_tsklist ã«
+    #   å¯¾è±¡ã¿ã¹ã¯(id)ãå«ã¾ããªããã°ï¼æ ¹ã¨ãªã
+    (@reallocate_atskpri.sort_by {|id| id[1]}).reverse_each do |id|
+      $is_root = true
+      (@reallocate_atskpri.sort_by {|id| id[1]}).reverse_each do |id2|
+        if $is_root && (@reallocate_atskpri[id[0]] < @reallocate_atskpri[id2[0]])
+          if @higher_pri_tsklist[id2[0]].index(id[0])
+            $is_root = false
+          end
+        end
+      end
+      if $is_root
+        $root_apri.push(id)
+      end
+    end
+
+    #
+    #  åºåéå§ 
+    #
+    $kernelCfgC.add("/* \n * Task Stack Size Estimation:")
+
+    # æ ¹ã¨ãªãã¿ã¹ã¯ã«å¯¾ãï¼ãã®æå¤§ã¿ã¹ã¯ä½¿ç¨éãè¨ç®ãï¼ãªã¹ãã¸è¿½å ãã
+    $tstksz = 0
+    $stksz_estimated = []
+    $root_apri.each do |id|
+       $stksz_estimated.push(calc_stksz(id[1]))
+    end
+
+    # ã¿ã¹ã¯ã®ã¹ã¿ãã¯ä½¿ç¨éã®æå¤§å¤ãæ±ºå®
+    # ãªã¹ãä¸­ã®è¦ç´ ã®æå¤§å¤ãã¿ã¹ã¯ã®æå¤§ã¹ã¿ãã¯ä½¿ç¨éã¨ãªãï¼
+    $tstksz = 0
+    $stksz_estimated.each do |size|
+        if size > $tstksz
+                $tstksz = size
+        end
+    end
+
+    # ç¢ºèª
+    $kernelCfgC.add2(<<EOS)
+ * List of Estimated Total Stack Sizes of Tasks = #{$stksz_estimated}
+ * Estimated Maximum Total Stack Size of Tasks = #{$tstksz}
+ */
+#define TOPPERS_TSTKSZ          (#{$tstksz})
+EOS
+
+    #
+    #  åªå
+åº¦å²ãå½ã¦çµæãæ¨æºåºåã¸è¡¨ç¤º
+    #
+    puts <<~EOS
+      =====================================
+      Task priority configuration result: 
+    EOS
+    @reallocate_atskpri.each do |e|
+      puts "\t#{$cfgData[@api][e[0]][:tskid].str}:\tIPRI = #{e[1]}, EXEPRI = #{@reallocate_etskpri[e[0]]}\n"
+    end
+    puts "====================================="
+
+
+  end
+end
+
+#
+#  ã¿ã¹ã¯ç®¡çã«é¢ããæ
+å ±ã®çæ
+#
+
+# å®è¡æåªå
+åº¦ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ã«æåãããã©ãã
+$defepr_success = true
+
+$kernelCfgC.comment_header("Task Management Functions")
+if $cfgData[:CRE_TSK].size() == 0
+  error("no task is registered")
+end
+
+TaskObject.new.generate()
+
