Index: /HelloMruby/tags/HelloMruby-V1.0.0/HelloMruby.cdl
===================================================================
--- /HelloMruby/tags/HelloMruby-V1.0.0/HelloMruby.cdl	(revision 79)
+++ /HelloMruby/tags/HelloMruby-V1.0.0/HelloMruby.cdl	(revision 79)
@@ -0,0 +1,92 @@
+/*
+ * HelloMruby.cdl
+ *
+ *  +------------------------------------+          +-------------------+          +-----------+
+ *  | mruby object                       |          |  TECS::TsHello    |          |           |
+ *  |buddyBridge=                        | sHello   |  nMruby::tsHello  |  sHello  |  tBuddy   |
+ *  | TECS::TsHello.new( "BuddyBridge" ) |=========>|   BuddyBridge     |----------|>  Buddy   |
+ *  |                                    | ã®é¢æ°ç¾¤ |                   |cTECS eEnt|           |
+ *  |                                    |          |                   |          |           |
+ *  +------------------------------------+          +-------------------+          +-----------+
+ *
+ *ã»ã·ã°ããã£è¨è¿°
+ *
+ *   sHello â¦ é¢æ°ã¤ã³ã¿ãã§ã¼ã¹ã®å®ç¾©
+ *             æ
+£ç¿ã¨ãã¦æ¥é ­æå­ s ãä»å ãã
+ * 
+ *    ã·ã°ããã£ sHelloã«ã¯ 2 ã¤ã®é¢æ° myMessage ã¨ yourMessage ãããã
+ *
+ *ã»ã»ã«ã¿ã¤ãè¨è¿°
+ *
+ *   nMruby::tsHello   â¦ ããªãã¸ã»ã«ã®ã»ã«ã¿ã¤ã (MrubyBridgePlugin ã«ããçæ)
+ *                        ã·ã°ããã£ sHello ãããªãã¸ããã»ã«ã¿ã¤ã
+ *   tBuddy            â¦ å¼ã³å
+ã®ã»ã«ã¿ã¤ã
+ *
+ */
+
+import( <cygwin_kernel.cdl> );
+import( <tSysLog.cdl> );
+import( "MyMrubyVM.cdl" );
+
+// TracePlugin ãä½¿ç¨ããå ´åå¿
+è¦
+//   cell tKernel Kernel{};
+//   cell tSysLog SysLog{};
+
+// ã·ã°ããã£ sHello
+signature sHello {
+	ER  myMessage( [in,string]const char_t *buf );
+	ER  yourMessage( [out,string(len)]char_t *buf, [in]int32_t len );
+};
+
+// ã»ã«ã¿ã¤ã tBuddy
+celltype tBuddy {
+	entry sHello eEnt;
+};
+
+// ã»ã« Buddy
+cell tBuddy Buddy
+{
+};
+
+/*
+ * ã·ã°ããã£ãã©ã°ã¤ã³ MrubyBridgePlugin ã®å¼ã³åºãã
+ *
+ * MrubyBridgePlugin ã«ãã
+ * ã»ããªãã¸ã®ã»ã«ã¿ã¤ã nMruby::tsHello ã®å®ç¾©ã 
+ *   gen/tmp_MrubyBridgePlugin_0.cdl ã«çæãããã
+ *   sHello ã®é¨åã¯ãã·ã°ããã£åã
+ * ã»ã»ã«ã¿ã¤ãã³ã¼ã gen/nMruby_tsHello.c ã«ãmruby ã® 
+ *   TECS::TsHello ã¯ã©ã¹å®ç¾©ã³ã¼ããçæãããã
+ */
+generate( MrubyBridgePlugin, sHello, "" );
+
+/*
+ * ããªãã¸ã»ã«ã®è¨­ç½®
+ *
+ * mruby ãããTECS::TsHello ã¯ã©ã¹ã® Bridge ã¨ãã¦åç
+§ãããã
+ *   ex) bridge = TECS::TsHello.new( "BuddyBridge" )
+ *
+ * cTECS ã® signatureãããªãã¡ sHello ã®é¢æ°ããmruby ã®ã¯ã©ã¹ TECS::TsHello
+ * ã®ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ããã¨ãã¦å®ç¾©ãããå¼ã³åºããã¨ãã§ããã
+ *   ex) bridge.sayHello( 3 )
+ */
+cell nMruby::tsHello BuddyBridge {
+	// [through(TracePlugin,"")]
+		cTECS = Buddy.eEnt;
+};
+
+cell tPosixMrubyVM MrubyVMTask{
+	cInit = VM_TECSInitializer.eInitialize;
+
+	argc = 2;
+	argv = { "HelloMruby.exe", "HelloTECS.rb" };
+
+	priority = 11;
+	stackSize = 4096;
+	taskAttribute = C_EXP( "TA_ACT" );
+};
+
Index: /HelloMruby/tags/HelloMruby-V1.0.0/HelloTECS.rb
===================================================================
--- /HelloMruby/tags/HelloMruby-V1.0.0/HelloTECS.rb	(revision 79)
+++ /HelloMruby/tags/HelloMruby-V1.0.0/HelloTECS.rb	(revision 79)
@@ -0,0 +1,22 @@
+# HelloTECS.rb
+#    Buddy Zð mruby ©çì·é
+
+# (1) ubWZð buddyBridge Éèt¯é
+print "[I create] buddyBridge.\n"
+buddyBridge = TECS::TsHello.new( "BuddyBridge" )
+
+# (2) CharPointer ð¶¬ (·³32Ìzñ)
+len = 32
+buf = TECS::CharPointer.new( len )
+
+# (3) buf ÉbZ[WðÝè
+buf.from_s "Hello TECS! (from mruby)"
+
+# (4) Buddy Ì myMessage ðÄo·
+buddyBridge.myMessage( buf )
+
+# (5) Buddy Ì yourMessage ðÄo·
+buddyBridge.yourMessage( buf, len )
+print "[I received] " + buf.to_s + "\n"
+   # buf Í out øDBuddy ÅÝè³êÄßé
+   # len øÍAç·¾ªAbuf ÌÀÛÌ·³æèå«¢ÆáO­¶
Index: /HelloMruby/tags/HelloMruby-V1.0.0/Makefile
===================================================================
--- /HelloMruby/tags/HelloMruby-V1.0.0/Makefile	(revision 79)
+++ /HelloMruby/tags/HelloMruby-V1.0.0/Makefile	(revision 79)
@@ -0,0 +1,120 @@
+# ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ããèªåçæããã¾ãã
+# Makefile.temp ã¯ gen ã®ä¸ã¤ä¸ã®ãã£ã¬ã¯ããªã«ç§»ãã¦ä½¿ç¨ãã¾ã
+#  % mv Makefile.temp Makefile
+# 
+# clean ã®ããã©ã«ãåä½ã¯ $(GEN_DIR)/Makefile.* ãåé¤ãã¾ã
+#
+# ãã®ãã¡ã¤ã«ã¯ GNU make ã§ gcc ãç¨ã POSIX ç°å¢ã§åä½ããã¢ã¸ã¥ã¼ã«ããã«ãããã®ã«é©åãªããã«çæããã¦ãã¾ã
+# vpath, CFLAGS, OTHER_OBJS ãªã©ãèª¿æ´ããå¿
+è¦ãããããããã¾ãã
+# ä»ã®ç°å¢ãã¿ã¼ã²ããã®å ´åããã®ãã¡ã¤ã«ãå
+ã«å¤æ´ããå¿
+è¦ãããã¾ã
+
+# å¤æ° #_MVAR_#
+# fixed variable (unchangeable by config or plugin)
+TARGET_BASE = HelloMruby
+BASE_DIR = .
+GEN_DIR = $(BASE_DIR)/gen
+INCLUDES = -I $(BASE_DIR)/. -I $(TECSPATH)/../test/cygwin -I $(TECSPATH) -I $(TECSPATH)/mruby -I $(TECSPATH)/posix -I $(TECSPATH)/rpc -I $(MRUBYPATH)/include -I $(GEN_DIR)
+DEFINES =
+
+# end of fixed variable (unchangeable by config or plugin)
+#default C Compiler
+CC = gcc
+
+#default C Compiler options
+CFLAGS = $(INCLUDES) $(DEFINES) -D  "Inline=static inline"
+
+#default Liknker
+LD = gcc
+
+#default Liknker Options
+LDFLAGS = -lmruby -L ../lib
+
+#CHANGE this into suitable path
+MRUBYPATH = ..
+
+#default srource directory
+SRC_DIR = $(BASE_DIR)/src
+
+#default target name
+TARGET = $(TARGET_BASE).exe
+
+#default TECS generator
+TECSGEN_EXE = tecsgen
+# uncomment below if you don't have Ruby. work on only Windows 
+# TECSGEN_EXE = tecsgen.exe
+
+#Time Stamp
+TIMESTAMP = tecsgen.timestamp
+
+#default relocatable object (.o) directory
+_TECS_OBJ_DIR = $(GEN_DIR)/
+
+
+
+# Pre-tecsgen target
+PRE_TECSGEN_TARGET =
+
+# Post-tecsgen target
+POST_TECSGEN_TARGET =
+
+# vpath for C sources and headers
+vpath %.c $(SRC_DIR) $(GEN_DIR)  $(TECSPATH)/../test/cygwin $(TECSPATH) $(TECSPATH)/mruby $(TECSPATH)/posix $(TECSPATH)/rpc $(MRUBYPATH)/include
+vpath %.h $(SRC_DIR) $(GEN_DIR)  $(TECSPATH)/../test/cygwin $(TECSPATH) $(TECSPATH)/mruby $(TECSPATH)/posix $(TECSPATH)/rpc $(MRUBYPATH)/include
+
+# Other objects (out of tecsgen)
+OTHER_OBJS =                      # Add objects out of tecs care.
+# OTHER_OBJS = $(_TECS_OBJ_DIR)vasyslog.o
+# ã«ã¼ã« #_MRUL_#
+allall: tecs
+	make all     # in order to include generated Makefile.tecsgen & Makefile.depend
+
+all : $(TARGET)
+
+
+# depend ã include #_MDEP_#
+-include $(GEN_DIR)/Makefile.tecsgen
+-include $(GEN_DIR)/Makefile.depend
+
+$(TARGET) : $(TIMESTAMP) $(CELLTYPE_COBJS) $(TECSGEN_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS)
+	$(LD) -o $(TARGET) $(TECSGEN_COBJS) $(CELLTYPE_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS) $(LDFLAGS)
+clean :
+	rm -f $(CELLTYPE_COBJS) $(TECSGEN_COBJS) $(PLUGIN_COBJS) $(OTHER_OBJS) $(TARGET)  $(TIMESTAMP)
+	rm -rf $(GEN_DIR)
+
+tecs : $(PRE_TECSGEN_TARGET) $(TIMESTAMP) $(POST_TECSGEN_TARGET)
+
+$(TIMESTAMP) : $(TECS_IMPORTS)
+	$(TECSGEN_EXE)  -I $(TECSPATH)/../test/cygwin HelloMruby.cdl
+	touch $(TIMESTAMP)
+
+# generic target for objs
+$(_TECS_OBJ_DIR)%.o : %.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+
+$(_TECS_OBJ_DIR)tTask.o : tTask.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+$(_TECS_OBJ_DIR)tTaskMain2PosixMain.o : tTaskMain2PosixMain.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+$(_TECS_OBJ_DIR)tBuddy.o : tBuddy.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+$(_TECS_OBJ_DIR)nMruby_tTECSInitializer.o : nMruby_tTECSInitializer.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+$(_TECS_OBJ_DIR)nMruby_tCharPointer.o : nMruby_tCharPointer.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+$(_TECS_OBJ_DIR)nMruby_tMrubyProc.o : nMruby_tMrubyProc.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+$(_TECS_OBJ_DIR)nMruby_tsHello.o : nMruby_tsHello.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
+$(_TECS_OBJ_DIR)nMruby_tsHello_Initializer.o : nMruby_tsHello_Initializer.c
+	$(CC) -c $(CFLAGS) -o $@ $<
+ 
Index: /HelloMruby/tags/HelloMruby-V1.0.0/MyMrubyVM.cdl
===================================================================
--- /HelloMruby/tags/HelloMruby-V1.0.0/MyMrubyVM.cdl	(revision 79)
+++ /HelloMruby/tags/HelloMruby-V1.0.0/MyMrubyVM.cdl	(revision 79)
@@ -0,0 +1,53 @@
+import( <mruby.cdl> );
+
+// main é¢æ°ã®å¼æ°ã®ç¸éãèª¿æ´ããã¢ããã¿ã¼ ã»ã«ã¿ã¤ã
+//   sTaskBody:void main(void) => POSIX:main( argc, argv )
+celltype tTaskMain2PosixMain{
+	entry  sTaskBody      eMain;
+	call   nPosix::sMain  cMain;
+	attr {
+		int     argc;
+		[size_is(argc)]
+			char    **argv;
+	};
+};
+
+[active]
+composite tPosixMrubyVM {
+	[optional]
+		call nMruby::sInitializeBridge cInit;
+	attr {
+		int     argc;
+		[size_is(argc)]
+			char    **argv;
+
+		/*
+		 *  TA_NULL     0x00U   ããã©ã«ãå¤
+		 * 	TA_ACT		0x01U	ã¿ã¹ã¯ã®çææã«ã¿ã¹ã¯ãèµ·åãã
+		 */
+		ATR		taskAttribute = C_EXP("TA_NULL");
+		PRI		priority;
+		SIZE	stackSize;
+		char_t  *name = C_EXP( "\"$id$\"" );
+	};
+
+	cell nMruby::tMrubyProc VM {
+		cInit => composite.cInit;
+	};
+
+	// main é¢æ°ã®å¼æ°ã®ç¸éãèª¿æ´ããã¢ããã¿ã¼ ã»ã«
+	cell tTaskMain2PosixMain ConvMain{
+		cMain = VM.eMain;
+		argc = composite.argc;
+		argv = composite.argv;
+	};
+
+	///  VM ç¨ã¿ã¹ã¯
+	cell tTask VMTask{
+		cBody = ConvMain.eMain;
+		priority = composite.priority;
+		stackSize = composite.stackSize;
+		taskAttribute = composite.taskAttribute;
+		name = composite.name;
+	};
+};
Index: /HelloMruby/tags/HelloMruby-V1.0.0/src/tBuddy.c
===================================================================
--- /HelloMruby/tags/HelloMruby-V1.0.0/src/tBuddy.c	(revision 79)
+++ /HelloMruby/tags/HelloMruby-V1.0.0/src/tBuddy.c	(revision 79)
@@ -0,0 +1,78 @@
+/*
+ * ãã®ãã¡ã¤ã«ã¯ tecsgen ã«ãããã³ãã¬ã¼ãã¨ãã¦èªåçæããã¾ãã
+ * ãã®ãã¡ã¤ã«ãç·¨éãã¦ä½¿ç¨ãããã¨ãæå³ããã¦ãã¾ãã
+ * tecsgen ã®åå®è¡ã«ããä¸æ¸ãããã¦ãã¾ããããéå¸¸
+ *   gen/tBuddy_template.c => src/tBuddy.c
+ * ã®ããã«åå, ãã©ã«ããå¤æ´ãã¦ããä¿®æ­£ãã¾ã
+ */
+/* #[<PREAMBLE>]#
+ * #[<...>]# ãã #[</...>]# ã§å²ã¾ããã³ã¡ã³ãã¯ç·¨éããªãã§ãã ãã
+ * tecsmerge ã«ãããã¼ã¸ã«ä½¿ç¨ããã¾ã
+ *
+ * #[</PREAMBLE>]# */
+
+/* ãã­ãã¿ã¤ãå®£è¨ãå¤æ°ã®å®ç¾©ãããã«æ¸ãã¾ã #_PAC_# */
+#include "tBuddy_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+/* åãå£é¢æ° #_TEPF_# */
+/* #[<ENTRY_PORT>]# eEnt
+ * entry port: eEnt
+ * signature:  sHello
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eEnt_myMessage
+ * name:         eEnt_myMessage
+ * global_name:  tBuddy_eEnt_myMessage
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eEnt_myMessage(CELLIDX idx, const char* buf)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+	printf( "[Buddy received] %s\n", buf );
+
+	return(ercd);
+}
+
+/* #[<ENTRY_FUNC>]# eEnt_yourMessage
+ * name:         eEnt_yourMessage
+ * global_name:  tBuddy_eEnt_yourMessage
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+ER
+eEnt_yourMessage(CELLIDX idx, char_t* buf, int32_t len)
+{
+	ER		ercd = E_OK;
+	CELLCB	*p_cellcb;
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		return(E_ID);
+	} /* end if VALID_IDX(idx) */
+
+	/* ããã«å¦çæ¬ä½ãè¨è¿°ãã¾ã #_TEFB_# */
+#define TECS_MESSAGE   "Hello mruby! (from TECS)"
+	strncpy( buf, TECS_MESSAGE, len );
+
+	return(ercd);
+}
+
+/* #[<POSTAMBLE>]#
+ *   ããããä¸ã«éåãå£é¢æ°ãæ¸ãã¾ã
+ * #[</POSTAMBLE>]#*/
Index: /HelloMruby/tags/HelloMruby-V1.0.0/src/tTaskMain2PosixMain.c
===================================================================
--- /HelloMruby/tags/HelloMruby-V1.0.0/src/tTaskMain2PosixMain.c	(revision 79)
+++ /HelloMruby/tags/HelloMruby-V1.0.0/src/tTaskMain2PosixMain.c	(revision 79)
@@ -0,0 +1,61 @@
+/* #[<PREAMBLE>]#
+ * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
+ * tecsmerge によるマージに使用されます
+ *
+ * 属性アクセスマクロ #_CAAM_#
+ * argc             int              ATTR_argc       
+ * argv             char**           ATTR_argv       
+ *
+ * 呼び口関数 #_TCPF_#
+ * call port : cMain  signature: nPosix_sMain context: task
+ *   int            cMain_main( int argc, const char** argv );
+ *
+ * #[</PREAMBLE>]# */
+
+/* プロトタイプ宣言や変数の定義をここに書きます #_PAC_# */
+#include "tTaskMain2PosixMain_tecsgen.h"
+
+#ifndef E_OK
+#define	E_OK	0		/* success */
+#define	E_ID	(-18)	/* illegal ID */
+#endif
+
+/* 受け口関数 #_TEPF_# */
+/* #[<ENTRY_PORT>]# eMain
+ * entry port: eMain
+ * signature:  sTaskBody
+ * context:    task
+ * #[</ENTRY_PORT>]# */
+
+/* #[<ENTRY_FUNC>]# eMain_main
+ * name:         eMain_main
+ * global_name:  tTaskMain2PosixMain_eMain_main
+ * oneway:       false
+ * #[</ENTRY_FUNC>]# */
+void
+eMain_main(CELLIDX idx)
+{
+	CELLCB	*p_cellcb;
+	int     i;
+
+	if (VALID_IDX(idx)) {
+		p_cellcb = GET_CELLCB(idx);
+	}
+	else {
+		/* エラー処理コードをここに記述します */
+	} /* end if VALID_IDX(idx) */
+
+	/* ここに処理本体を記述します #_TEFB_# */
+	fputs( "[tTaskMain2PosixMain] calling main: ", stdout );
+	for( i = 0; i < ATTR_argc; i++ ){
+		fputs( ATTR_argv[i], stdout );
+		putchar( ' ' );
+	}
+	putchar( '\n' );
+
+	(void)cMain_main( ATTR_argc, ATTR_argv );
+}
+
+/* #[<POSTAMBLE>]#
+ *   これより下に非受け口関数を書きます
+ * #[</POSTAMBLE>]#*/
