Index: asp3_tinet_ecnl_rx/trunk/bnep_bridge/.cproject
===================================================================
--- asp3_tinet_ecnl_rx/trunk/bnep_bridge/.cproject	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/bnep_bridge/.cproject	(revision 364)
@@ -22,5 +22,5 @@
 			<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
 				<option id="toolchain.id" value="RENESAS_GCC_RX"/>
-				<option id="toolchain.version" value="4.8.4.201703"/>
+				<option id="toolchain.version" value="4.8.4.201803"/>
 			</storageModule>
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -37,5 +37,5 @@
 							<option id="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize.1809108923" name="Warn if stack size exceeds the limit (-Wstack-usage) (H')" superClass="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize" useByScannerDiscovery="false" value="100" valueType="string"/>
 							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.renesas.cdt.managedbuild.gcc.core.targetPlatform.1675556141" isAbstract="false" osList="all" superClass="com.renesas.cdt.managedbuild.gcc.core.targetPlatform"/>
-							<builder buildPath="${workspace_loc:/bnep_bridge}/Debug" id="com.renesas.cdt.managedbuild.gcc.core.builder.1493716846" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="false" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
+							<builder buildPath="${workspace_loc:/bnep_bridge}/Debug" id="com.renesas.cdt.managedbuild.gcc.core.builder.1493716846" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
 							<tool id="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen.941811569" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen">
 								<option id="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary.51731195" name="Select Library" superClass="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary" useByScannerDiscovery="true" value="com.renesas.cdt.managedbuild.gcc.core.option.librarygenerator.settings.selectLibrary.newLib" valueType="enumerated"/>
Index: asp3_tinet_ecnl_rx/trunk/bnep_bridge/Debug/Makefile
===================================================================
--- asp3_tinet_ecnl_rx/trunk/bnep_bridge/Debug/Makefile	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/bnep_bridge/Debug/Makefile	(revision 364)
@@ -153,4 +153,6 @@
 endif
 
+TINETDIR = 
+
 #
 #  共通コンパイルオプションの定義
@@ -174,5 +176,5 @@
 	-I$(SRCDIR)/../usbhost/src \
 	$(INCLUDES)
-LDFLAGS := $(LDFLAGS) -Wl,-Map=$(OBJNAME).map,--cref -L.
+LDFLAGS := $(LDFLAGS) -L.
 LIBS := $(LIBS) $(CXXLIBS)
 CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
@@ -204,5 +206,4 @@
 endif
 
-TINETDIR = 
 ifdef TINETDIR
 	#
@@ -210,8 +211,8 @@
 	#
 	NO_USE_TINET_LIBRARY = true
-	
+
 	#  ネットワークインタフェースの選択、何れか一つ選択する。
 	NET_IF = ether
-	
+
 	#  イーサネット・ディバイスドライバの選択
 	NET_DEV = if_rx62n
@@ -255,10 +256,12 @@
 all: tecs | $(DEPDIR)
 #	@$(MAKE) check
-	@$(MAKE) check $(OBJNAME).bin
+#	@$(MAKE) check $(OBJNAME).bin
 #	@$(MAKE) check $(OBJNAME).srec
+	@$(MAKE) check $(OBJNAME).mot
 else
 #all: check
-all: check $(OBJNAME).bin
+#all: check $(OBJNAME).bin
 #all: check $(OBJNAME).srec
+all: check $(OBJNAME).mot
 endif
 
@@ -424,4 +427,11 @@
 
 #
+#  並列makeのための依存関係の定義
+#
+$(APPL_OBJS) $(SYSSVC_OBJS): | kernel_cfg.timestamp
+$(APPL_ASMOBJS) $(SYSSVC_ASMOBJS) $(KERNEL_ASMOBJS) $(CFG_ASMOBJS): \
+														| offset.timestamp
+
+#
 #  特別な依存関係の定義
 #
@@ -432,5 +442,5 @@
 #
 $(OBJFILE): $(ALL_OBJS) $(LIBS_DEP)
-	$(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) \
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) -Wl,-Map=$(OBJNAME).map,--cref \
 			$(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
 			-Wl,--start-group $(ALL_LIBS) -Wl,--end-group $(END_OBJS)
@@ -461,4 +471,7 @@
 $(OBJNAME).srec: $(OBJFILE)
 	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
+
+$(OBJNAME).mot: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).mot
 
 #
Index: asp3_tinet_ecnl_rx/trunk/bnep_bridge/src/main.c
===================================================================
--- asp3_tinet_ecnl_rx/trunk/bnep_bridge/src/main.c	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/bnep_bridge/src/main.c	(revision 364)
@@ -117,7 +117,42 @@
 static void main_timeout();
 
+extern int ntshell_exit;
+
 int uart_read(char *buf, int cnt, void *extobj)
 {
-	return serial_rea_dat(SIO_PORTID, (char *)buf, cnt);
+	struct main_t *obj = (struct main_t *)extobj;
+	int result;
+	ER ret;
+	int timer;
+
+	obj->prev = obj->now;
+
+	/* タイマー取得 */
+	timer = main_get_timer();
+
+	/* 待ち */
+	ret = serial_trea_dat(SIO_PORTID, buf, cnt, timer);
+	if ((ret < 0) && (ret != E_OK) && (ret != E_TMOUT)) {
+		syslog(LOG_NOTICE, "tslp_tsk ret: %s %d", itron_strerror(ret), timer);
+		ntshell_exit = 1;
+		return -1;
+	}
+	result = (int)ret;
+
+	ret = get_tim(&obj->now);
+	if (ret != E_OK) {
+		syslog(LOG_NOTICE, "get_tim ret: %s", itron_strerror(ret));
+		ntshell_exit = 1;
+		return -1;
+	}
+
+			/* 時間経過 */
+	int elapse = obj->now - obj->prev;
+	main_progress(elapse);
+
+	/* タイムアウト処理 */
+	main_timeout();
+
+	return result;
 }
 
@@ -125,19 +160,4 @@
 {
 	return serial_wri_dat(SIO_PORTID, buf, cnt);
-}
-
-unsigned char ntstdio_xi(struct ntstdio_t *handle)
-{
-	char buf[1];
-	if(serial_rea_dat(SIO_PORTID, buf, 1) != 1)
-		return -EIO;
-	return buf[0];
-}
-
-void ntstdio_xo(struct ntstdio_t *handle, unsigned char c)
-{
-	char buf[1];
-	buf[0] = c;
-	serial_wri_dat(SIO_PORTID, buf, 1);
 }
 
@@ -154,5 +174,5 @@
 	main_initialize();
 
-	ntshell_init(&ntshell, uart_read, uart_write, cmd_execute, NULL);
+	ntshell_init(&ntshell, uart_read, uart_write, cmd_execute, &main_obj);
 	ntshell_set_prompt(&ntshell, "NTShell>");
 	ntshell_execute(&ntshell);
@@ -172,5 +192,10 @@
 	ER ret;
 
-	ntshell_task_init();
+#ifdef TOPPERS_OMIT_TECS
+	serial_opn_por(SIO_PORTID);
+#endif
+	serial_ctl_por(SIO_PORTID, IOCTL_FCSND | IOCTL_FCRCV);
+
+	ntshell_task_init(uart_read, uart_write, &main_obj);
 
 	main_obj.timer = TMO_FEVR;
Index: asp3_tinet_ecnl_rx/trunk/bnep_bridge/src/main.cfg
===================================================================
--- asp3_tinet_ecnl_rx/trunk/bnep_bridge/src/main.cfg	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/bnep_bridge/src/main.cfg	(revision 364)
@@ -47,4 +47,5 @@
 INCLUDE("if_rx62n.cfg");
 INCLUDE("ntshell_main.cfg");
+INCLUDE("mbed_api.cfg");
 
 CRE_TSK(MAIN_TASK, { TA_ACT, 0, main_task, MAIN_PRIORITY, MAIN_STACK_SIZE, NULL });
