Index: asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/.cproject
===================================================================
--- asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/.cproject	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/.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.1216939361" 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.540335225" isAbstract="false" osList="all" superClass="com.renesas.cdt.managedbuild.gcc.core.targetPlatform"/>
-							<builder buildPath="${workspace_loc:/app6_hot_water_pot}/Debug" id="com.renesas.cdt.managedbuild.gcc.core.builder.439102208" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="false" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
+							<builder buildPath="${workspace_loc:/app6_hot_water_pot}/Debug" id="com.renesas.cdt.managedbuild.gcc.core.builder.439102208" 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.1024280160" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen">
 								<option id="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary.1144202648" 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"/>
@@ -91,5 +91,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">
@@ -106,5 +106,5 @@
 							<option id="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize.1168710633" 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.1876106175" isAbstract="false" osList="all" superClass="com.renesas.cdt.managedbuild.gcc.core.targetPlatform"/>
-							<builder buildPath="${workspace_loc:/app6_hot_water_pot}/DebugCitrus" id="com.renesas.cdt.managedbuild.gcc.core.builder.1796295428" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="false" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
+							<builder buildPath="${workspace_loc:/app6_hot_water_pot}/DebugCitrus" id="com.renesas.cdt.managedbuild.gcc.core.builder.1796295428" 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.1665728023" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen">
 								<option id="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary.1889854330" 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"/>
@@ -160,5 +160,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">
@@ -175,5 +175,5 @@
 							<option id="com.renesas.cdt.managedbuild.gcc.core.option.debug.warnStackSize.927887230" 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.796976276" isAbstract="false" osList="all" superClass="com.renesas.cdt.managedbuild.gcc.core.targetPlatform"/>
-							<builder buildPath="${workspace_loc:/app6_hot_water_pot}/DebugEther" id="com.renesas.cdt.managedbuild.gcc.core.builder.505980419" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="GCC for Renesas Builder" parallelBuildOn="false" superClass="com.renesas.cdt.managedbuild.gcc.core.builder"/>
+							<builder buildPath="${workspace_loc:/app6_hot_water_pot}/DebugEther" id="com.renesas.cdt.managedbuild.gcc.core.builder.505980419" 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.1631836614" name="Library Generator" superClass="com.renesas.cdt.managedbuild.gcc.rx.tool.libgen">
 								<option id="com.renesas.cdt.managedbuild.gcc.rx.option.selectlibrary.1777057244" 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"/>
@@ -224,4 +224,6 @@
 	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
 	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="DebugEther"/>
+		<configuration configurationName="DebugCitrus"/>
 		<configuration configurationName="Debug">
 			<resource resourceType="PROJECT" workspacePath="/app6_hot_water_pot"/>
Index: asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/Debug/Makefile
===================================================================
--- asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/Debug/Makefile	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/Debug/Makefile	(revision 364)
@@ -167,5 +167,5 @@
 	CDEFS := -DTOPPERS_OMIT_TECS $(CDEFS)
 endif
-CDEFS := $(CDEFS) -DDHCP4_CLI_CFG -DUSE_PING -DUSE_RESOLVER -DUSE_NETAPP_SUBR -DECHONET_USE_MALLOC -DRamDisk=binary_______ntshell_src_rom_fs_bin_start
+CDEFS := $(CDEFS) -DDHCP4_CLI_CFG -DUSE_PING -DUSE_RESOLVER -DUSE_NETAPP_SUBR -DNOUSE_MPF_NET_BUF -DECHONET_USE_MALLOC -DRamDisk=binary_______ntshell_src_rom_fs_bin_start
 INCLUDES := -I. -I$(SRCDIR)/include -I$(SRCDIR) \
 	-I$(SRCDIR)/../btstack/include \
@@ -175,5 +175,5 @@
 	-I$(SRCDIR)/../usbhost/src \
 	$(INCLUDES)
-LDFLAGS := $(LDFLAGS) -Wl,-Map=$(OBJNAME).map,--cref -L.
+LDFLAGS := $(LDFLAGS) -L.
 LIBS := $(LIBS) $(CXXLIBS)
 CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
@@ -209,34 +209,35 @@
 endif
 
-
-#
-#  ネットワークサービスの定義
-#
-NO_USE_TINET_LIBRARY = true
-
-#  ネットワークインタフェースの選択、何れか一つ選択する。
-NET_IF = ether
-
-#  イーサネット・ディバイスドライバの選択
-NET_DEV = if_btusb
-
-#  ネットワーク層の選択
-#SUPPORT_INET6 = true
-SUPPORT_INET4 = true
-
-#  API に組込む機能の選択
-#API_CFG_IP4MAPPED_ADDR = true
-
-#  トランスポート層の選択
-SUPPORT_TCP = true
-SUPPORT_UDP = true
-
-# IGMPを有効に設定
-SUPPORT_IGMP = true
-
-#
-#  ネットワークサービスの Makefile のインクルード
-#
-include $(SRCDIR)/$(TINETDIR)/Makefile.tinet
+ifdef TINETDIR
+	#
+	#  ネットワークサービスの定義
+	#
+	NO_USE_TINET_LIBRARY = true
+
+	#  ネットワークインタフェースの選択、何れか一つ選択する。
+	NET_IF = ether
+
+	#  イーサネット・ディバイスドライバの選択
+	NET_DEV = if_btusb
+
+	#  ネットワーク層の選択
+	#SUPPORT_INET6 = true
+	SUPPORT_INET4 = true
+
+	#  API に組込む機能の選択
+	#API_CFG_IP4MAPPED_ADDR = true
+
+	#  トランスポート層の選択
+	SUPPORT_TCP = true
+	SUPPORT_UDP = true
+
+	# IGMPを有効に設定
+	SUPPORT_IGMP = true
+
+	#
+	#  ネットワークサービスの Makefile のインクルード
+	#
+	include $(SRCDIR)/$(TINETDIR)/Makefile.tinet
+endif
 
 #
@@ -258,10 +259,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
 
@@ -271,6 +274,11 @@
 #  コンフィギュレータに関する定義
 #
-CFG_TRB := -T $(TINET_ROOT)/tinet.trb:tcpip -T ../../ntshell/echonet/echonet.trb:echonet -T $(TARGETDIR)/target_kernel.trb:kernel
-CFG_TABS := --api-table $(TINET_ROOT)/tcpip_api.def:tcpip \
+ifndef TINETDIR
+  CFG_TRB := -T $(TARGETDIR)/target_kernel.trb
+  CFG_TABS := --api-table $(SRCDIR)/kernel/kernel_api.def \
+			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+else
+  CFG_TRB := -T $(TINET_ROOT)/tinet.trb:tcpip -T ../../ntshell/echonet/echonet.trb:echonet -T $(TARGETDIR)/target_kernel.trb:kernel
+  CFG_TABS := --api-table $(TINET_ROOT)/tcpip_api.def:tcpip \
 			--api-table ../../ntshell/echonet/echonet_api.def:echonet \
 			--api-table $(SRCDIR)/kernel/kernel_api.def:kernel \
@@ -278,4 +286,5 @@
 			--symval-table ../../ntshell/echonet/echonet_sym.def \
 			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+endif
 CFG_ASMOBJS := $(CFG_ASMOBJS)
 CFG_COBJS := kernel_cfg.o echonet_cfg.o $(CFG_COBJS)
@@ -423,4 +432,11 @@
 
 #
+#  並列makeのための依存関係の定義
+#
+$(APPL_OBJS) $(SYSSVC_OBJS): | kernel_cfg.timestamp
+$(APPL_ASMOBJS) $(SYSSVC_ASMOBJS) $(KERNEL_ASMOBJS) $(CFG_ASMOBJS): \
+														| offset.timestamp
+
+#
 #  特別な依存関係の定義
 #
@@ -431,5 +447,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)
@@ -460,4 +476,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/app6_hot_water_pot/DebugCitrus/Makefile
===================================================================
--- asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/DebugCitrus/Makefile	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/DebugCitrus/Makefile	(revision 364)
@@ -167,5 +167,5 @@
 	CDEFS := -DTOPPERS_OMIT_TECS $(CDEFS)
 endif
-CDEFS := $(CDEFS) -DDHCP4_CLI_CFG -DUSE_PING -DUSE_RESOLVER -DUSE_NETAPP_SUBR -DECHONET_USE_MALLOC -DRamDisk=binary_______ntshell_src_rom_fs_bin_start
+CDEFS := $(CDEFS) -DDHCP4_CLI_CFG -DUSE_PING -DUSE_RESOLVER -DUSE_NETAPP_SUBR -DNOUSE_MPF_NET_BUF -DECHONET_USE_MALLOC -DRamDisk=binary_______ntshell_src_rom_fs_bin_start
 INCLUDES := -I. -I$(SRCDIR)/include -I$(SRCDIR) \
 	-I$(SRCDIR)/../btstack/include \
@@ -175,5 +175,5 @@
 	-I$(SRCDIR)/../usbhost/src \
 	$(INCLUDES)
-LDFLAGS := $(LDFLAGS) -Wl,-Map=$(OBJNAME).map,--cref -L.
+LDFLAGS := $(LDFLAGS) -L.
 LIBS := $(LIBS) $(CXXLIBS)
 CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
@@ -209,34 +209,35 @@
 endif
 
-
-#
-#  ネットワークサービスの定義
-#
-NO_USE_TINET_LIBRARY = true
-
-#  ネットワークインタフェースの選択、何れか一つ選択する。
-NET_IF = ether
-
-#  イーサネット・ディバイスドライバの選択
-NET_DEV = if_btusb
-
-#  ネットワーク層の選択
-#SUPPORT_INET6 = true
-SUPPORT_INET4 = true
-
-#  API に組込む機能の選択
-#API_CFG_IP4MAPPED_ADDR = true
-
-#  トランスポート層の選択
-SUPPORT_TCP = true
-SUPPORT_UDP = true
-
-# IGMPを有効に設定
-SUPPORT_IGMP = true
-
-#
-#  ネットワークサービスの Makefile のインクルード
-#
-include $(SRCDIR)/$(TINETDIR)/Makefile.tinet
+ifdef TINETDIR
+	#
+	#  ネットワークサービスの定義
+	#
+	NO_USE_TINET_LIBRARY = true
+
+	#  ネットワークインタフェースの選択、何れか一つ選択する。
+	NET_IF = ether
+
+	#  イーサネット・ディバイスドライバの選択
+	NET_DEV = if_btusb
+
+	#  ネットワーク層の選択
+	#SUPPORT_INET6 = true
+	SUPPORT_INET4 = true
+
+	#  API に組込む機能の選択
+	#API_CFG_IP4MAPPED_ADDR = true
+
+	#  トランスポート層の選択
+	SUPPORT_TCP = true
+	SUPPORT_UDP = true
+
+	# IGMPを有効に設定
+	SUPPORT_IGMP = true
+
+	#
+	#  ネットワークサービスの Makefile のインクルード
+	#
+	include $(SRCDIR)/$(TINETDIR)/Makefile.tinet
+endif
 
 #
@@ -258,10 +259,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
 
@@ -271,6 +274,11 @@
 #  コンフィギュレータに関する定義
 #
-CFG_TRB := -T $(TINET_ROOT)/tinet.trb:tcpip -T ../../ntshell/echonet/echonet.trb:echonet -T $(TARGETDIR)/target_kernel.trb:kernel
-CFG_TABS := --api-table $(TINET_ROOT)/tcpip_api.def:tcpip \
+ifndef TINETDIR
+  CFG_TRB := -T $(TARGETDIR)/target_kernel.trb
+  CFG_TABS := --api-table $(SRCDIR)/kernel/kernel_api.def \
+			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+else
+  CFG_TRB := -T $(TINET_ROOT)/tinet.trb:tcpip -T ../../ntshell/echonet/echonet.trb:echonet -T $(TARGETDIR)/target_kernel.trb:kernel
+  CFG_TABS := --api-table $(TINET_ROOT)/tcpip_api.def:tcpip \
 			--api-table ../../ntshell/echonet/echonet_api.def:echonet \
 			--api-table $(SRCDIR)/kernel/kernel_api.def:kernel \
@@ -278,4 +286,5 @@
 			--symval-table ../../ntshell/echonet/echonet_sym.def \
 			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+endif
 CFG_ASMOBJS := $(CFG_ASMOBJS)
 CFG_COBJS := kernel_cfg.o echonet_cfg.o $(CFG_COBJS)
@@ -423,4 +432,11 @@
 
 #
+#  並列makeのための依存関係の定義
+#
+$(APPL_OBJS) $(SYSSVC_OBJS): | kernel_cfg.timestamp
+$(APPL_ASMOBJS) $(SYSSVC_ASMOBJS) $(KERNEL_ASMOBJS) $(CFG_ASMOBJS): \
+														| offset.timestamp
+
+#
 #  特別な依存関係の定義
 #
@@ -431,5 +447,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)
@@ -460,4 +476,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/app6_hot_water_pot/DebugEther/Makefile
===================================================================
--- asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/DebugEther/Makefile	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/DebugEther/Makefile	(revision 364)
@@ -165,5 +165,5 @@
 	CDEFS := -DTOPPERS_OMIT_TECS $(CDEFS)
 endif
-CDEFS := $(CDEFS) -DDHCP4_CLI_CFG -DUSE_PING -DUSE_RESOLVER -DUSE_NETAPP_SUBR -DECHONET_USE_MALLOC -DRamDisk=binary_______ntshell_src_rom_fs_bin_start
+CDEFS := $(CDEFS) -DDHCP4_CLI_CFG -DUSE_PING -DUSE_RESOLVER -DUSE_NETAPP_SUBR -DNOUSE_MPF_NET_BUF -DECHONET_USE_MALLOC -DRamDisk=binary_______ntshell_src_rom_fs_bin_start
 INCLUDES := -I. -I$(SRCDIR)/include -I$(SRCDIR) \
 	-I$(SRCDIR)/../btstack/include \
@@ -173,5 +173,5 @@
 	-I$(SRCDIR)/../usbhost/src \
 	$(INCLUDES)
-LDFLAGS := $(LDFLAGS) -Wl,-Map=$(OBJNAME).map,--cref -L.
+LDFLAGS := $(LDFLAGS) -L.
 LIBS := $(LIBS) $(CXXLIBS)
 CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
@@ -207,34 +207,35 @@
 endif
 
-
-#
-#  ネットワークサービスの定義
-#
-NO_USE_TINET_LIBRARY = true
-
-#  ネットワークインタフェースの選択、何れか一つ選択する。
-NET_IF = ether
-
-#  イーサネット・ディバイスドライバの選択
+ifdef TINETDIR
+	#
+	#  ネットワークサービスの定義
+	#
+	NO_USE_TINET_LIBRARY = true
+
+	#  ネットワークインタフェースの選択、何れか一つ選択する。
+	NET_IF = ether
+
+	#  イーサネット・ディバイスドライバの選択
 	NET_DEV = if_rx62n
 
-#  ネットワーク層の選択
-#SUPPORT_INET6 = true
-SUPPORT_INET4 = true
-
-#  API に組込む機能の選択
-#API_CFG_IP4MAPPED_ADDR = true
-
-#  トランスポート層の選択
-SUPPORT_TCP = true
-SUPPORT_UDP = true
-
-# IGMPを有効に設定
-SUPPORT_IGMP = true
-
-#
-#  ネットワークサービスの Makefile のインクルード
-#
-include $(SRCDIR)/$(TINETDIR)/Makefile.tinet
+	#  ネットワーク層の選択
+	#SUPPORT_INET6 = true
+	SUPPORT_INET4 = true
+
+	#  API に組込む機能の選択
+	#API_CFG_IP4MAPPED_ADDR = true
+
+	#  トランスポート層の選択
+	SUPPORT_TCP = true
+	SUPPORT_UDP = true
+
+	# IGMPを有効に設定
+	SUPPORT_IGMP = true
+
+	#
+	#  ネットワークサービスの Makefile のインクルード
+	#
+	include $(SRCDIR)/$(TINETDIR)/Makefile.tinet
+endif
 
 #
@@ -256,10 +257,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
 
@@ -269,6 +272,11 @@
 #  コンフィギュレータに関する定義
 #
-CFG_TRB := -T $(TINET_ROOT)/tinet.trb:tcpip -T ../../ntshell/echonet/echonet.trb:echonet -T $(TARGETDIR)/target_kernel.trb:kernel
-CFG_TABS := --api-table $(TINET_ROOT)/tcpip_api.def:tcpip \
+ifndef TINETDIR
+  CFG_TRB := -T $(TARGETDIR)/target_kernel.trb
+  CFG_TABS := --api-table $(SRCDIR)/kernel/kernel_api.def \
+			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+else
+  CFG_TRB := -T $(TINET_ROOT)/tinet.trb:tcpip -T ../../ntshell/echonet/echonet.trb:echonet -T $(TARGETDIR)/target_kernel.trb:kernel
+  CFG_TABS := --api-table $(TINET_ROOT)/tcpip_api.def:tcpip \
 			--api-table ../../ntshell/echonet/echonet_api.def:echonet \
 			--api-table $(SRCDIR)/kernel/kernel_api.def:kernel \
@@ -276,4 +284,5 @@
 			--symval-table ../../ntshell/echonet/echonet_sym.def \
 			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+endif
 CFG_ASMOBJS := $(CFG_ASMOBJS)
 CFG_COBJS := kernel_cfg.o echonet_cfg.o $(CFG_COBJS)
@@ -421,4 +430,11 @@
 
 #
+#  並列makeのための依存関係の定義
+#
+$(APPL_OBJS) $(SYSSVC_OBJS): | kernel_cfg.timestamp
+$(APPL_ASMOBJS) $(SYSSVC_ASMOBJS) $(KERNEL_ASMOBJS) $(CFG_ASMOBJS): \
+														| offset.timestamp
+
+#
 #  特別な依存関係の定義
 #
@@ -429,5 +445,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)
@@ -458,4 +474,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/app6_hot_water_pot/src/echonet_main.c
===================================================================
--- asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/echonet_main.c	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/echonet_main.c	(revision 364)
@@ -318,6 +318,4 @@
 }
 
-bool_t started = false;
-
 void echonet_change_netif_link(uint8_t link_up, uint8_t up)
 {
@@ -327,14 +325,10 @@
 		return;
 
-	if (up && !started) {
-		started = true;
-
-		/* ECHONETミドルウェアを起動 */
-		ret = ecn_sta_svc();
-		if (ret != E_OK)
-			return;
-
-		/* ECHONETミドルウェアを起動するのを待つ */
-		dly_tsk(100);
+	if (up) {
+		/* インスタンスリスト通知の送信 */
+		ret = ecn_ntf_inl();
+		if (ret != E_OK) {
+			syslog(LOG_ERROR, "ecn_ntf_inl");
+		}
 	}
 
@@ -342,5 +336,4 @@
 	uint8_t data[2];
 	data[0] = 0x01;
-	data[1] = up ? 0x01 : 0x02;
 	ret = ecn_brk_wai(data, sizeof(data));
 	if (ret != E_OK) {
@@ -351,4 +344,5 @@
 
 enum main_state_t{
+	main_state_start,
 	main_state_idle,
 	main_state_search,
@@ -357,5 +351,5 @@
 
 int main_timer = TMO_FEVR;
-enum main_state_t main_state = main_state_idle;
+enum main_state_t main_state = main_state_start;
 int main_retry;
 
@@ -377,6 +371,6 @@
 	sil_wrb_mem((uint8_t *)0x0008C02A, 0x7F);
 
-	/* １秒後にブザーを検索 */
-	main_state = main_state_search;
+	/* ECHONETミドルウェアを起動するのを待つ */
+	main_state = main_state_start;
 	main_timer = 1000 * 1000;
 
@@ -390,4 +384,5 @@
 	main_btn2_state = (btn2 & 0x80) != 0;
 
+	/* メインタスクを起動 */
 	ER ret = act_tsk(MAIN_TASK);
 	if (ret != E_OK) {
@@ -557,4 +552,15 @@
 
 	switch(main_state){
+	case main_state_start:
+		/* ECHONETミドルウェアを起動 */
+		ret = ecn_sta_svc();
+		if (ret != E_OK) {
+			syslog(LOG_ERROR, "ecn_sta_svc");
+		}
+
+		/* １秒後にブザーを検索 */
+		main_state = main_state_search;
+		main_timer = 1000 * 1000;
+		break;
 	case main_state_idle:
 		syslog(LOG_ERROR, "timeout faild on main_state_idle");
Index: asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/main.c
===================================================================
--- asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/main.c	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/main.c	(revision 364)
@@ -79,5 +79,7 @@
 
 ID ws_api_mailboxid = MAIN_DATAQUEUE;
+#ifndef NOUSE_MPF_NET_BUF
 ID ws_mempoolid = MPF_NET_BUF_256;
+#endif
 
 #ifdef IF_ETHER_BTUSB
@@ -111,7 +113,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;
 }
 
@@ -119,19 +156,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);
 }
 
@@ -150,5 +172,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);
@@ -168,5 +190,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/app6_hot_water_pot/src/main.cfg
===================================================================
--- asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/main.cfg	(revision 359)
+++ asp3_tinet_ecnl_rx/trunk/app6_hot_water_pot/src/main.cfg	(revision 364)
@@ -54,5 +54,4 @@
 INCLUDE("tinet/tinet_asp.cfg");
 INCLUDE("tinet_main.cfg");
-INCLUDE("netinet/ip_igmp.cfg");
 
 /* DHCP クライアント */
@@ -77,4 +76,7 @@
 INCLUDE("ffarch.cfg");
 
+/* mbed */
+INCLUDE("mbed_api.cfg");
+
 #ifdef IF_ETHER_BTUSB
 INCLUDE("usb_hbth.cfg");
