Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/MANIFEST
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/MANIFEST	(revision 306)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/MANIFEST	(revision 308)
@@ -7,6 +7,4 @@
 nucleo_f401re.h
 stm32f401re.ld
-target.cdl
-target.tf
 target_asm.inc
 target_cfg1_out.h
@@ -19,4 +17,6 @@
 target_rename.def
 target_rename.h
+target_serial.cfg
+target_serial.h
 target_sil.h
 target_stddef.h
@@ -28,8 +28,4 @@
 target_unrename.h
 target_user.txt
-tPutLogTarget.c
-tPutLogTarget.cdl
-tSIOPortTarget.cdl
-tSIOPortTargetMain_inline.h
 
 stm32fcube/stm32f4xx_hal_conf.h
@@ -39,16 +35,16 @@
 stm32fcube/systemclock_config.c
 
-truestudio/asp/asp_debug.launch
-truestudio/asp/Makefile
-truestudio/asp/sample1.c
-truestudio/asp/sample1.cfg
-truestudio/asp/sample1.h
-truestudio/asp/.cproject
-truestudio/asp/.project
+truestudio/asp3/asp_debug.launch
+truestudio/asp3/Makefile
+truestudio/asp3/sample1.c
+truestudio/asp3/sample1.cfg
+truestudio/asp3/sample1.h
+truestudio/asp3/.cproject
+truestudio/asp3/.project
 
-truestudio/asp/.settings/com.atollic.truestudio.debug.hardware_device.prefs
-truestudio/asp/.settings/com.atollic.truestudio.tsp.prefs
-truestudio/asp/.settings/language.settings.xml
-truestudio/asp/.settings/org.eclipse.core.resources.prefs
+truestudio/asp3/.settings/com.atollic.truestudio.debug.hardware_device.prefs
+truestudio/asp3/.settings/com.atollic.truestudio.tsp.prefs
+truestudio/asp3/.settings/language.settings.xml
+truestudio/asp3/.settings/org.eclipse.core.resources.prefs
 
 truestudio/asp/deps/dummy.txt
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/Makefile.target
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/Makefile.target	(revision 306)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/Makefile.target	(revision 308)
@@ -70,5 +70,7 @@
 #  GNUéçºç°å¢ã®ã¿ã¼ã²ããã¢ã¼ã­ãã¯ãã£ã®å®ç¾©
 #
-GCC_TARGET = arm-none-eabi
+ifndef GCC_TARGET
+	GCC_TARGET = arm-none-eabi
+endif
 
 #
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.cproject
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.cproject	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.cproject	(revision 308)
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="com.atollic.truestudio.exe.debug.toolchain.994706796">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.atollic.truestudio.exe.debug.toolchain.994706796" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.atollic.truestudio.exe.debug.toolchain.994706796" name="Debug" parent="org.eclipse.cdt.build.core.emptycfg">
+					<folderInfo id="com.atollic.truestudio.exe.debug.toolchain.994706796.1458753986" name="/" resourcePath="">
+						<toolChain id="com.atollic.truestudio.exe.debug.toolchain.263546786" name="com.atollic.truestudio.exe.debug.toolchain" superClass="com.atollic.truestudio.exe.debug.toolchain">
+							<option id="com.atollic.truestudio.toolchain_options.mcu.351584184" superClass="com.atollic.truestudio.toolchain_options.mcu" value="STM32F401RE" valueType="string"/>
+							<option id="com.atollic.truestudio.toolchain_options.vendor.309024291" superClass="com.atollic.truestudio.toolchain_options.vendor" value="STMicroelectronics" valueType="string"/>
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.atollic.truestudio.exe.debug.toolchain.platform.732634171" isAbstract="false" name="Debug platform" superClass="com.atollic.truestudio.exe.debug.toolchain.platform"/>
+							<builder id="com.atollic.truestudio.exe.debug.toolchain.994706796.2106156440" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make ãã«ãã¼" superClass="org.eclipse.cdt.build.core.settings.default.builder">
+								<outputEntries>
+									<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>
+								</outputEntries>
+							</builder>
+							<tool id="com.atollic.truestudio.exe.debug.toolchain.as.936941308" name="Assembler" superClass="com.atollic.truestudio.exe.debug.toolchain.as">
+								<option id="com.atollic.truestudio.common_options.target.endianess.1946141656" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess"/>
+								<option id="com.atollic.truestudio.common_options.target.mcpu.1621229471" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" value="STM32F401RE" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.instr_set.1978023026" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpucore.12729518" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" value="FPv4-SP-D16" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpu.803506931" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" value="com.atollic.truestudio.common_options.target.fpu.hard" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.as.symbols.defined.939107433" name="Defined symbols" superClass="com.atollic.truestudio.as.symbols.defined" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="STM32F4XX"/>
+									<listOptionValue builtIn="false" value="STM32F40XX"/>
+									<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
+								</option>
+								<option id="com.atollic.truestudio.as.general.incpath.1370645354" name="Include path" superClass="com.atollic.truestudio.as.general.incpath"/>
+								<inputType id="com.atollic.truestudio.as.input.719878238" name="Input" superClass="com.atollic.truestudio.as.input"/>
+							</tool>
+							<tool id="com.atollic.truestudio.exe.debug.toolchain.gcc.1582871452" name="C Compiler" superClass="com.atollic.truestudio.exe.debug.toolchain.gcc">
+								<option id="com.atollic.truestudio.gcc.symbols.defined.500283472" name="Defined symbols" superClass="com.atollic.truestudio.gcc.symbols.defined" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="STM32F4XX"/>
+									<listOptionValue builtIn="false" value="STM32F40XX"/>
+									<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
+								</option>
+								<option id="com.atollic.truestudio.gcc.directories.select.1215100094" name="Include path" superClass="com.atollic.truestudio.gcc.directories.select"/>
+								<option id="com.atollic.truestudio.common_options.target.endianess.1129139636" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess"/>
+								<option id="com.atollic.truestudio.common_options.target.mcpu.342041390" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" value="STM32F401RE" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.instr_set.2062783996" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpucore.1171148681" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" value="FPv4-SP-D16" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpu.925576847" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" value="com.atollic.truestudio.common_options.target.fpu.hard" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.gcc.optimization.prep_garbage.1423722326" name="Prepare dead code removal " superClass="com.atollic.truestudio.gcc.optimization.prep_garbage" value="true" valueType="boolean"/>
+								<option id="com.atollic.truestudio.gcc.optimization.prep_data.1737863831" name="Prepare dead data removal" superClass="com.atollic.truestudio.gcc.optimization.prep_data" value="true" valueType="boolean"/>
+								<option id="com.atollic.truestudio.common_options.target.interwork.2011933745" name="Mix ARM/Thumb" superClass="com.atollic.truestudio.common_options.target.interwork"/>
+								<inputType id="com.atollic.truestudio.gcc.input.1368524114" superClass="com.atollic.truestudio.gcc.input"/>
+							</tool>
+							<tool id="com.atollic.truestudio.exe.debug.toolchain.ld.1611496114" name="C Linker" superClass="com.atollic.truestudio.exe.debug.toolchain.ld">
+								<option id="com.atollic.truestudio.common_options.target.endianess.2117207234" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess"/>
+								<option id="com.atollic.truestudio.common_options.target.mcpu.165900984" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" value="STM32F401RE" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.instr_set.1063391324" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpucore.1488289926" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" value="FPv4-SP-D16" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpu.356799745" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" value="com.atollic.truestudio.common_options.target.fpu.hard" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.ld.general.clib.1150942759" name="Runtime Library:" superClass="com.atollic.truestudio.ld.general.clib" value="com.atollic.truestudio.ld.general.clib.small" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.ld.general.scriptfile.253868832" name="Linker script" superClass="com.atollic.truestudio.ld.general.scriptfile" value="..\stm32f4_flash.ld" valueType="string"/>
+								<option id="com.atollic.truestudio.ld.optimization.do_garbage.1534384175" name="Dead code removal " superClass="com.atollic.truestudio.ld.optimization.do_garbage" value="true" valueType="boolean"/>
+								<inputType id="com.atollic.truestudio.ld.input.1265954697" name="Input" superClass="com.atollic.truestudio.ld.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="com.atollic.truestudio.exe.debug.toolchain.gpp.1622428203" name="C++ Compiler" superClass="com.atollic.truestudio.exe.debug.toolchain.gpp">
+								<option id="com.atollic.truestudio.gpp.symbols.defined.2105989143" name="Defined symbols" superClass="com.atollic.truestudio.gpp.symbols.defined" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="STM32F4XX"/>
+									<listOptionValue builtIn="false" value="STM32F40XX"/>
+									<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
+								</option>
+								<option id="com.atollic.truestudio.gpp.directories.select.1488960133" name="Include path" superClass="com.atollic.truestudio.gpp.directories.select" valueType="includePath">
+									<listOptionValue builtIn="false" value="../src"/>
+									<listOptionValue builtIn="false" value="..\Libraries\CMSIS\Include"/>
+									<listOptionValue builtIn="false" value="..\Libraries\Device\STM32F4xx\Include"/>
+									<listOptionValue builtIn="false" value="..\Libraries\STM32F4xx_StdPeriph_Driver\inc"/>
+								</option>
+								<option id="com.atollic.truestudio.common_options.target.endianess.301327961" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess"/>
+								<option id="com.atollic.truestudio.common_options.target.mcpu.700503725" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" value="STM32F401RE" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.instr_set.1735425198" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpucore.140582671" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" value="FPv4-SP-D16" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpu.1138289895" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" value="com.atollic.truestudio.common_options.target.fpu.hard" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.gpp.optimization.prep_garbage.874440861" name="Prepare dead code removal" superClass="com.atollic.truestudio.gpp.optimization.prep_garbage" value="true" valueType="boolean"/>
+								<option id="com.atollic.truestudio.gpp.optimization.prep_data.1590513331" name="Prepare dead data removal" superClass="com.atollic.truestudio.gpp.optimization.prep_data" value="true" valueType="boolean"/>
+								<option id="com.atollic.truestudio.gpp.optimization.fno_rtti.75088526" name="Disable RTTI" superClass="com.atollic.truestudio.gpp.optimization.fno_rtti"/>
+								<option id="com.atollic.truestudio.gpp.optimization.fno_exceptions.683125550" name="Disable exception handling" superClass="com.atollic.truestudio.gpp.optimization.fno_exceptions"/>
+							</tool>
+							<tool id="com.atollic.truestudio.exe.debug.toolchain.ldcc.663940094" name="C++ Linker" superClass="com.atollic.truestudio.exe.debug.toolchain.ldcc">
+								<option id="com.atollic.truestudio.common_options.target.endianess.757527528" name="Endianess" superClass="com.atollic.truestudio.common_options.target.endianess"/>
+								<option id="com.atollic.truestudio.common_options.target.mcpu.1884896645" name="Microcontroller" superClass="com.atollic.truestudio.common_options.target.mcpu" value="STM32F401RE" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.instr_set.2016270662" name="Instruction set" superClass="com.atollic.truestudio.common_options.target.instr_set" value="com.atollic.truestudio.common_options.target.instr_set.thumb2" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpucore.625419255" name="FPU" superClass="com.atollic.truestudio.common_options.target.fpucore" value="FPv4-SP-D16" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.common_options.target.fpu.1225147924" name="Floating point" superClass="com.atollic.truestudio.common_options.target.fpu" value="com.atollic.truestudio.common_options.target.fpu.hard" valueType="enumerated"/>
+								<option id="com.atollic.truestudio.ld.general.cclib.720739940" name="Runtime Library:" superClass="com.atollic.truestudio.ld.general.cclib"/>
+								<option id="com.atollic.truestudio.ldcc.optimization.do_garbage.1758825518" name="Dead code removal" superClass="com.atollic.truestudio.ldcc.optimization.do_garbage" value="true" valueType="boolean"/>
+								<option id="com.atollic.truestudio.ldcc.general.scriptfile.693005997" name="Linker script" superClass="com.atollic.truestudio.ldcc.general.scriptfile" value="..\stm32f4_flash.ld" valueType="string"/>
+							</tool>
+							<tool id="com.atollic.truestudio.ar.base.1985497481" name="Archiver" superClass="com.atollic.truestudio.ar.base"/>
+							<tool id="com.atollic.truestudio.exe.debug.toolchain.secoutput.1444002170" name="Other" superClass="com.atollic.truestudio.exe.debug.toolchain.secoutput"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="asp.null.1269343850" name="asp"/>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="Debug">
+			<resource resourceType="PROJECT" workspacePath="/asp"/>
+		</configuration>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		<scannerConfigBuildInfo instanceId="com.atollic.truestudio.exe.debug.toolchain.994706796;com.atollic.truestudio.exe.debug.toolchain.994706796.1458753986;com.atollic.truestudio.exe.debug.toolchain.gcc.1582871452;com.atollic.truestudio.gcc.input.1368524114">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.atollic.truestudio.mbs.ARMToolsPerProjectProfileC"/>
+		</scannerConfigBuildInfo>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
+</cproject>
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.project
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.project	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.project	(revision 308)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>asp</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+	<linkedResources>
+		<link>
+			<name>arch</name>
+			<type>2</type>
+			<locationURI>PARENT-4-PROJECT_LOC/arch</locationURI>
+		</link>
+		<link>
+			<name>configure</name>
+			<type>1</type>
+			<locationURI>PARENT-4-PROJECT_LOC/configure</locationURI>
+		</link>
+		<link>
+			<name>include</name>
+			<type>2</type>
+			<locationURI>PARENT-4-PROJECT_LOC/include</locationURI>
+		</link>
+		<link>
+			<name>kernel</name>
+			<type>2</type>
+			<locationURI>PARENT-4-PROJECT_LOC/kernel</locationURI>
+		</link>
+		<link>
+			<name>library</name>
+			<type>2</type>
+			<locationURI>PARENT-4-PROJECT_LOC/library</locationURI>
+		</link>
+		<link>
+			<name>syssvc</name>
+			<type>2</type>
+			<locationURI>PARENT-4-PROJECT_LOC/syssvc</locationURI>
+		</link>
+	</linkedResources>
+</projectDescription>
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/com.atollic.truestudio.debug.hardware_device.prefs
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/com.atollic.truestudio.debug.hardware_device.prefs	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/com.atollic.truestudio.debug.hardware_device.prefs	(revision 308)
@@ -0,0 +1,11 @@
+BOARD=NUCLEO-F401RE
+CODE_LOCATION=FLASH
+ENDIAN=Little-endian
+MCU=STM32F401RE
+MCU_VENDOR=STMicroelectronics
+MODEL=Lite
+PROBE=ST-LINK
+PROJECT_FORMAT_VERSION=2
+TARGET=ARM\u00AE
+VERSION=5.4.0
+eclipse.preferences.version=1
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/com.atollic.truestudio.tsp.prefs
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/com.atollic.truestudio.tsp.prefs	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/com.atollic.truestudio.tsp.prefs	(revision 308)
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+svd_custom_file_path=
+svd_file_path=C\:\\Program Files (x86)\\Atollic\\TrueSTUDIO for ARM 5.4.0\\ide\\plugins\\com.atollic.truestudio.tsp.stm32_1.0.0.201511091338\\tsp\\sfr\\STM32F401xE.svd
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/language.settings.xml
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/language.settings.xml	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/language.settings.xml	(revision 308)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+	<configuration id="com.atollic.truestudio.exe.debug.toolchain.994706796" name="Debug">
+		<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
+			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
+			<provider class="com.atollic.truestudio.mbs.GCCSpecsDetectorAtollicArm" console="false" env-hash="-1397605167352822110" id="com.atollic.truestudio.mbs.provider" keep-relative-paths="false" name="Atollic ARM Tools Language Settings" parameter="${COMMAND} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+				<language-scope id="org.eclipse.cdt.core.gcc"/>
+				<language-scope id="org.eclipse.cdt.core.g++"/>
+			</provider>
+			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
+		</extension>
+	</configuration>
+</project>
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/org.eclipse.core.resources.prefs
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/org.eclipse.core.resources.prefs	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/.settings/org.eclipse.core.resources.prefs	(revision 308)
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/Makefile
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/Makefile	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/Makefile	(revision 308)
@@ -0,0 +1,532 @@
+#
+#  TOPPERS/ASP Kernel
+#      Toyohashi Open Platform for Embedded Real-Time Systems/
+#      Advanced Standard Profile Kernel
+# 
+#  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+#                              Toyohashi Univ. of Technology, JAPAN
+#  Copyright (C) 2006-2016 by Embedded and Real-Time Systems Laboratory
+#              Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#      ã¨ï¼
+#    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#        å ±åãããã¨ï¼
+#  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#      å
+è²¬ãããã¨ï¼
+# 
+#  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#  ã®è²¬ä»»ãè² ããªãï¼
+# 
+#  $Id: Makefile 492 2016-01-10 03:58:54Z ertl-hiro $
+# 
+
+#
+#  ã¿ã¼ã²ããã®æå®ï¼Makefile.targetã§ä¸æ¸ããããã®ãé²ãããï¼
+#
+all:
+
+#
+#  ã¿ã¼ã²ããç¥ç§°ã®å®ç¾©
+#
+TARGET = nucleo_f401re_gcc
+
+#
+#  ã³ã³ãã¤ã©ã®æå®
+#
+GCC_TARGET = arm-atollic-eabi
+
+#
+#  ãã­ã°ã©ãã³ã°è¨èªã®å®ç¾©
+#
+SRCLANG = c
+ifeq ($(SRCLANG),c)
+	LIBS = -lc
+endif
+ifeq ($(SRCLANG),c++)
+	USE_CXX = true
+	CXXLIBS = -lstdc++ -lm -lc
+	CXXRTS = cxxrt.o newlibrt.o
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+SRCDIR = ../../../../
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®æ¡å¼µå­ã®è¨­å®
+#
+OBJEXT = elf
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªï¼libkernel.aï¼ã®ãã£ã¬ã¯ããªå
+#  ï¼ã«ã¼ãã«ã©ã¤ãã©ãªãmakeå¯¾è±¡ã«ããæã¯ï¼ç©ºã«å®ç¾©ããï¼
+#
+KERNEL_LIB = 
+
+#
+#  ã«ã¼ãã«ãé¢æ°åä½ã§ã³ã³ãã¤ã«ãããã©ããã®å®ç¾©
+#
+KERNEL_FUNCOBJS = 
+
+#
+#  ãã¬ã¼ã¹ã­ã°ãåå¾ãããã©ããã®å®ç¾©
+#
+ENABLE_TRACE = 
+
+#
+#  éçºãã¼ã«ï¼ã³ã³ãã¤ã©ç­ï¼ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+DEVTOOLDIR = 
+
+#
+#  ã¦ã¼ãã£ãªãã£ãã­ã°ã©ã ã®åç§°
+#
+CFG = ruby -Eutf-8 $(SRCDIR)/cfg/cfg.rb
+
+#
+#  ãªãã¸ã§ã¯ããã¡ã¤ã«åã®å®ç¾©
+#
+OBJNAME = asp
+ifdef OBJEXT
+	OBJFILE = $(OBJNAME).$(OBJEXT)
+	CFG1_OUT = cfg1_out.$(OBJEXT)
+else
+	OBJFILE = $(OBJNAME)
+	CFG1_OUT = cfg1_out
+endif
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ãç½®ããã£ã¬ã¯ããªã®å®ç¾©
+#
+DEPDIR = deps
+
+#
+#  ã¿ã¼ã²ããä¾å­é¨ã®ãã£ã¬ã¯ããªã®å®ç¾©
+#
+TARGETDIR = $(SRCDIR)/target/$(TARGET)
+
+#
+#  ã¿ã¼ã²ããä¾å­ã®å®ç¾©ã®ã¤ã³ã¯ã«ã¼ã
+#
+include $(TARGETDIR)/Makefile.target
+
+#
+#  å
+±éã³ã³ãã¤ã«ãªãã·ã§ã³ã®å®ç¾©
+#
+COPTS := -g  $(COPTS)
+ifndef OMIT_WARNING_ALL
+	COPTS := -Wall $(COPTS)
+endif
+ifndef OMIT_OPTIMIZATION
+	COPTS := -O2 $(COPTS)
+endif
+CDEFS := $(CDEFS) 
+INCLUDES := -I. -I$(SRCDIR)/include $(INCLUDES) -I$(SRCDIR)
+LDFLAGS := $(LDFLAGS) 
+LIBS := $(LIBS) $(CXXLIBS)
+CFLAGS = $(COPTS) $(CDEFS) $(INCLUDES)
+
+#
+#  ã¢ããªã±ã¼ã·ã§ã³ãã­ã°ã©ã ã«é¢ããå®ç¾©
+#
+APPLNAME = sample1
+APPLDIRS = $(SRCDIR)/sample
+APPL_CFG = sample1.cfg
+
+APPL_DIRS := $(APPLDIRS) $(SRCDIR)/library
+APPL_ASMOBJS :=
+ifdef USE_CXX
+	APPL_CXXOBJS := sample1.o
+	APPL_COBJS :=
+else
+	APPL_COBJS := sample1.o
+endif
+APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o t_perror.o strerror.o
+APPL_CFLAGS := $(APPL_CFLAGS)
+ifdef APPLDIRS
+	INCLUDES := $(INCLUDES) $(foreach dir,$(APPLDIRS),-I$(dir))
+endif
+
+#
+#  ã·ã¹ãã ãµã¼ãã¹ã«é¢ããå®ç¾©
+#
+SYSSVC_DIRS := $(SYSSVC_DIRS) $(SRCDIR)/syssvc
+SYSSVC_ASMOBJS := $(SYSSVC_ASMOBJS)
+SYSSVC_COBJS := $(SYSSVC_COBJS) banner.o syslog.o serial.o logtask.o \
+				 $(CXXRTS)
+SYSSVC_CFLAGS := $(SYSSVC_CFLAGS)
+
+#
+#  ã¿ã¼ã²ãããã¡ã¤ã«ï¼è¤æ°ãåæã«é¸æãã¦ã¯ãªããªãï¼
+#
+.PHONY: all
+all: check
+#all: check $(OBJNAME).bin
+#all: check $(OBJNAME).srec
+
+##### ä»¥ä¸ã¯ç·¨éããªããã¨ #####
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
+#
+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: ã«ã¼ãã«ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãã¢ã»ã³ããªè¨èªã®
+#				   ãªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_COBJS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããï¼ã½ã¼ã¹ãCè¨èªã§ï¼ã½ã¼ã¹
+#				 ãã¡ã¤ã«ã¨1å¯¾1ã«å¯¾å¿ãããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#  KERNEL_LCSRCS: ã«ã¼ãã«ã®ã©ã¤ãã©ãªã«å«ããCè¨èªã®ã½ã¼ã¹ãã¡ã¤ã«ã§ï¼
+#				  1ã¤ã®ã½ã¼ã¹ãã¡ã¤ã«ããè¤æ°ã®ãªãã¸ã§ã¯ããã¡ã¤ã«ãç
+#				  æãããã®ï¼
+#  KERNEL_LCOBJS: ä¸ã®ã½ã¼ã¹ãã¡ã¤ã«ããçæããããªãã¸ã§ã¯ããã¡ã¤ã«ï¼
+#
+KERNEL_DIRS := $(KERNEL_DIRS) $(SRCDIR)/kernel
+KERNEL_ASMOBJS := $(KERNEL_ASMOBJS)
+KERNEL_COBJS := $(KERNEL_COBJS)
+KERNEL_CFLAGS := $(KERNEL_CFLAGS) -I$(SRCDIR)/kernel
+
+#
+#  ã«ã¼ãã«ã®ãã¡ã¤ã«æ§æã®å®ç¾©
+#
+include $(SRCDIR)/kernel/Makefile.kernel
+ifdef KERNEL_FUNCOBJS
+	KERNEL_LCSRCS := $(KERNEL_FCSRCS)
+	KERNEL_LCOBJS := $(foreach file,$(KERNEL_FCSRCS),$($(file:.c=)))
+else
+	KERNEL_CFLAGS := -DALLFUNC $(KERNEL_CFLAGS)
+	KERNEL_COBJS := $(KERNEL_COBJS) \
+					$(foreach file,$(KERNEL_FCSRCS),$(file:.c=.o))
+endif
+ifdef OMIT_OFFSET_H
+	OFFSET_H =
+else
+	OFFSET_H = offset.h
+endif
+ifndef TARGET_OFFSET_TRB
+	TARGET_OFFSET_TRB := $(TARGETDIR)/target_offset.trb
+endif
+ifndef TARGET_KERNEL_TRB
+	TARGET_KERNEL_TRB := $(TARGETDIR)/target_kernel.trb
+endif
+ifndef TARGET_CHECK_TRB
+	TARGET_CHECK_TRB := $(TARGETDIR)/target_check.trb
+endif
+ifndef TARGET_KERNEL_CFG
+	TARGET_KERNEL_CFG := $(TARGETDIR)/target_kernel.cfg
+endif
+
+#
+#  ã½ã¼ã¹ãã¡ã¤ã«ã®ãããã£ã¬ã¯ããªã«é¢ããå®ç¾©
+#
+vpath %.c $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+vpath %.S $(KERNEL_DIRS) $(SYSSVC_DIRS) $(APPL_DIRS)
+vpath %.cfg $(APPL_DIRS)
+
+#
+#  ã³ã³ãã¤ã«ã®ããã®å¤æ°ã®å®ç¾©
+#
+KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
+SYSSVC_OBJS = $(SYSSVC_ASMOBJS) $(SYSSVC_COBJS)
+APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS)
+ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
+											$(END_OBJS) $(HIDDEN_OBJS)
+ALL_LIBS = -lkernel $(LIBS)
+ifdef KERNEL_LIB
+	LIBS_DEP = $(KERNEL_LIB)/libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L$(KERNEL_LIB)
+	REALCLEAN_FILES := libkernel.a $(REALCLEAN_FILES)
+else
+	LIBS_DEP = libkernel.a $(filter %.a,$(LIBS))
+	OBJ_LDFLAGS := $(OBJ_LDFLAGS) -L.
+endif
+
+ifdef TEXT_START_ADDRESS
+	LDFLAGS := $(LDFLAGS) -Wl,-Ttext,$(TEXT_START_ADDRESS)
+endif
+ifdef DATA_START_ADDRESS
+	LDFLAGS := $(LDFLAGS) -Wl,-Tdata,$(DATA_START_ADDRESS)
+endif
+ifdef LDSCRIPT
+	LDFLAGS := $(LDFLAGS) -T $(LDSCRIPT)
+endif
+
+#
+#  ã«ã¼ãã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«ã®çæ
+#
+cfg1_out.c cfg1_out.db: cfg1_out.timestamp ;
+cfg1_out.timestamp: $(APPL_CFG) $(TECSGEN_TIMESTAMP)
+	$(CFG) --pass 1 --kernel asp $(INCLUDES) $(CFG_TABS) \
+						-M $(DEPDIR)/cfg1_out_c.d $(TARGET_KERNEL_CFG) $<
+
+$(CFG1_OUT): $(START_OBJS) cfg1_out.o $(END_OBJS) $(HIDDEN_OBJS)
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(CFG1_OUT_LDFLAGS) -o $(CFG1_OUT) \
+						$(START_OBJS) cfg1_out.o $(END_OBJS)
+
+cfg1_out.syms: $(CFG1_OUT)
+	$(NM) -n $(CFG1_OUT) > cfg1_out.syms
+
+cfg1_out.srec: $(CFG1_OUT)
+	$(OBJCOPY) -O srec -S $(CFG1_OUT) cfg1_out.srec
+
+$(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)
+
+#
+#  ãªãã»ãããã¡ã¤ã«ï¼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) \
+				--rom-symbol cfg1_out.syms --rom-image cfg1_out.srec
+
+#
+#  ã«ã¼ãã«ã©ã¤ãã©ãªãã¡ã¤ã«ã®çæ
+#
+libkernel.a: $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f libkernel.a
+	$(AR) -rcs libkernel.a $(KERNEL_LIB_OBJS)
+	$(RANLIB) libkernel.a
+
+#
+#  ç¹å¥ãªä¾å­é¢ä¿ã®å®ç¾©
+#
+banner.o: $(filter-out banner.o,$(ALL_OBJS)) $(LIBS_DEP)
+
+#
+#  å
+¨ä½ã®ãªã³ã¯
+#
+$(OBJFILE): $(ALL_OBJS) $(LIBS_DEP)
+	$(LINK) $(CFLAGS) $(LDFLAGS) $(OBJ_LDFLAGS) -o $(OBJFILE) \
+			$(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
+			$(ALL_LIBS) $(END_OBJS)
+
+#
+#  ã·ã³ãã«ãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).syms: $(OBJFILE)
+	$(NM) -n $(OBJFILE) > $(OBJNAME).syms
+
+#
+#  ãã¤ããªãã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).bin: $(OBJFILE)
+	$(OBJCOPY) -O binary -S $(OBJFILE) $(OBJNAME).bin
+
+#
+#  Sã¬ã³ã¼ããã¡ã¤ã«ã®çæ
+#
+$(OBJNAME).srec: $(OBJFILE)
+	$(OBJCOPY) -O srec -S $(OBJFILE) $(OBJNAME).srec
+
+#
+#  ã¨ã©ã¼ãã§ãã¯å¦ç
+#
+.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) \
+				--rom-symbol $(OBJNAME).syms --rom-image $(OBJNAME).srec
+	@echo "configuration check passed"
+
+#
+#  ã³ã³ãã¤ã«çµæã®æ¶å»
+#
+.PHONY: clean
+clean:
+	rm -f \#* *~ *.o $(DEPDIR)/*.d $(CLEAN_FILES) check.timestamp
+	rm -f $(OBJFILE) $(OBJNAME).syms $(OBJNAME).srec $(OBJNAME).bin
+	rm -f kernel_cfg.timestamp $(CFG2_OUT_SRCS) cfg2_out.db
+	rm -f offset.timestamp $(OFFSET_H)
+	rm -f cfg1_out.syms cfg1_out.srec $(CFG1_OUT)
+	rm -f cfg1_out.timestamp cfg1_out.c cfg1_out.db
+ifndef KERNEL_LIB
+	rm -f libkernel.a
+endif
+
+.PHONY: cleankernel
+cleankernel:
+	rm -f $(OFFSET_H) $(KERNEL_LIB_OBJS)
+	rm -f $(KERNEL_LIB_OBJS:%.o=$(DEPDIR)/%.d)
+
+.PHONY: realclean
+realclean: clean
+	rm -f $(REALCLEAN_FILES)
+
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ã®ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+#  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ãçæãããã¡ã¤ã«ã¯ï¼å
+±éã®ã³ã³ãã¤ã«ãªãã·ã§ã³
+#  ã®ã¿ãä»ãã¦ã³ã³ãã¤ã«ããï¼
+#
+ALL_CFG_COBJS = $(CFG_COBJS) cfg1_out.o
+ALL_CFG_ASMOBJS = $(CFG_ASMOBJS)
+
+$(ALL_CFG_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(CFG_CFLAGS) $<
+
+$(ALL_CFG_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(CFG_CFLAGS) $<
+
+$(ALL_CFG_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(CFG_CFLAGS) $<
+
+#
+#  ä¾å­é¢ä¿ãã¡ã¤ã«ã®ã¤ã³ã¯ã«ã¼ã
+#
+-include $(DEPDIR)/*.d
+
+#
+#  éçºãã¼ã«ã®ã³ãã³ãåã®å®ç¾©
+#
+ifeq ($(TOOL),gcc)
+	#
+	#  GNUéçºç°å¢ç¨
+	#
+	ifdef GCC_TARGET
+		GCC_TARGET_PREFIX = $(GCC_TARGET)-
+	else
+		GCC_TARGET_PREFIX =
+	endif
+	CC := $(GCC_TARGET_PREFIX)gcc
+	CXX := $(GCC_TARGET_PREFIX)g++
+	AS := $(GCC_TARGET_PREFIX)as
+	LD := $(GCC_TARGET_PREFIX)ld
+	AR := $(GCC_TARGET_PREFIX)ar
+	NM := $(GCC_TARGET_PREFIX)nm
+	RANLIB := $(GCC_TARGET_PREFIX)ranlib
+	OBJCOPY := $(GCC_TARGET_PREFIX)objcopy
+	OBJDUMP := $(GCC_TARGET_PREFIX)objdump
+endif
+
+ifdef DEVTOOLDIR
+	CC := $(DEVTOOLDIR)/$(CC)
+	CXX := $(DEVTOOLDIR)/$(CXX)
+	AS := $(DEVTOOLDIR)/$(AS)
+	LD := $(DEVTOOLDIR)/$(LD)
+	AR := $(DEVTOOLDIR)/$(AR)
+	NM := $(DEVTOOLDIR)/$(NM)
+	RANLIB := $(DEVTOOLDIR)/$(RANLIB)
+	OBJCOPY := $(DEVTOOLDIR)/$(OBJCOPY)
+	OBJDUMP := $(DEVTOOLDIR)/$(OBJDUMP)
+endif
+
+ifdef USE_CXX
+	LINK = $(CXX)
+else
+	LINK = $(CC)
+endif
+
+#
+#  ã³ã³ãã¤ã«ã«ã¼ã«ã®å®ç¾©
+#
+$(KERNEL_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS): %.o:
+	$(CC) -DTOPPERS_$(*F) -o $@ -c -MD -MP -MF $(DEPDIR)/$*.d \
+									$(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_LCOBJS:.o=.s): %.s:
+	$(CC) -DTOPPERS_$(*F) -o $@ -S $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(KERNEL_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(KERNEL_CFLAGS) $<
+
+$(SYSSVC_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(SYSSVC_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(SYSSVC_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(SYSSVC_CFLAGS) $<
+
+$(APPL_COBJS): %.o: %.c
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_COBJS:.o=.s): %.s: %.c
+	$(CC) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS): %.o: %.cpp
+	$(CXX) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_CXXOBJS:.o=.s): %.s: %.cpp
+	$(CXX) -S $(CFLAGS) $(APPL_CFLAGS) $<
+
+$(APPL_ASMOBJS): %.o: %.S
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $(APPL_CFLAGS) $<
+
+#
+#  ããã©ã«ãã³ã³ãã¤ã«ã«ã¼ã«ãä¸æ¸ã
+#
+%.o: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
+
+%.s: %.c
+	@echo "*** Default compile rules should not be used."
+	$(CC) -S $(CFLAGS) $<
+
+%.o: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
+
+%.s: %.cpp
+	@echo "*** Default compile rules should not be used."
+	$(CXX) -S $(CFLAGS) $<
+
+%.o: %.S
+	@echo "*** Default compile rules should not be used."
+	$(CC) -c -MD -MP -MF $(DEPDIR)/$*.d $(CFLAGS) $<
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/asp_debug.launch
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/asp_debug.launch	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/asp_debug.launch	(revision 308)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="com.atollic.hardwaredebug.launch.launchConfigurationType">
+<stringAttribute key="com.atollic.hardwaredebug.jlink_common.cpu_core" value="Cortex-M"/>
+<stringAttribute key="com.atollic.hardwaredebug.jlink_common.device" value="STM32F401RE"/>
+<stringAttribute key="com.atollic.hardwaredebug.jlink_common.endian" value="little"/>
+<stringAttribute key="com.atollic.hardwaredebug.jlink_common.init_speed" value="4000"/>
+<stringAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_script_path" value=""/>
+<booleanAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_script_used" value="false"/>
+<stringAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_trace_port_cfg_path" value=""/>
+<intAttribute key="com.atollic.hardwaredebug.jlink_common.jlink_tracebuffer_size" value="16"/>
+<booleanAttribute key="com.atollic.hardwaredebug.jlink_common.scan_chain_auto" value="true"/>
+<intAttribute key="com.atollic.hardwaredebug.jlink_common.scan_chain_irpre" value="0"/>
+<intAttribute key="com.atollic.hardwaredebug.jlink_common.scan_chain_pos" value="0"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.analyzeCommands" value="# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers&#13;&#10;# Uncomment next line, 2=32 bit, 1=16 bit and 0=8 bit parallelism mode&#13;&#10;#monitor flash set_parallelism_mode 2&#13;&#10;&#13;&#10;# Set character encoding&#13;&#10;set host-charset CP1252&#13;&#10;set target-charset CP1252&#13;&#10;&#13;&#10;# Reset to known state&#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Load the program executable&#13;&#10;load&#9;&#9;&#13;&#10;&#13;&#10;# Reset the chip to get to a known state. Remove &quot;monitor reset&quot; command &#13;&#10;#  if the code is not located at default address and does not run by reset. &#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Enable Debug connection in low power modes (DBGMCU-&gt;CR)&#13;&#10;set *0xE0042004 = (*0xE0042004) | 0x7&#13;&#10;&#13;&#10;# Start the executable&#13;&#10;continue"/>
+<intAttribute key="com.atollic.hardwaredebug.launch.formatVersion" value="2"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.hwinitCommands" value="# ä½¿ç¨ããã¿ã¼ã²ãããã¼ãã¦ã§ã¢ã®åæåãè¨è¿°ãã¦ä¸ãã&#13;&#10;"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.ipAddress" value="localhost"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.jtagDevice" value="ST-LINK"/>
+<intAttribute key="com.atollic.hardwaredebug.launch.portNumber" value="61234"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.remoteCommand" value="target extended-remote"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.runCommands" value="# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers&#13;&#10;# Uncomment next line, 2=32 bit, 1=16 bit and 0=8 bit parallelism mode&#13;&#10;#monitor flash set_parallelism_mode 2&#13;&#10;&#13;&#10;# Set character encoding&#13;&#10;set host-charset CP1252&#13;&#10;set target-charset CP1252&#13;&#10;&#13;&#10;# Reset to known state&#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Load the program executable&#13;&#10;load&#9;&#9;&#13;&#10;&#13;&#10;# Reset the chip to get to a known state. Remove &quot;monitor reset&quot; command &#13;&#10;#  if the code is not located at default address and does not run by reset. &#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Enable Debug connection in low power modes (DBGMCU-&gt;CR)&#13;&#10;set *0xE0042004 = (*0xE0042004) | 0x7&#13;&#10;&#13;&#10;# Set a breakpoint at main().&#13;&#10;tbreak main_task&#13;&#10;&#13;&#10;# Run to the breakpoint.&#13;&#10;#continue"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.serverParam" value="-p 61234 -l 1 -d"/>
+<booleanAttribute key="com.atollic.hardwaredebug.launch.startServer" value="true"/>
+<booleanAttribute key="com.atollic.hardwaredebug.launch.swd_mode" value="true"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.swv_port" value="61235"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.swv_trace_div" value="16"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.swv_trace_hclk" value="16000000"/>
+<booleanAttribute key="com.atollic.hardwaredebug.launch.swv_wait_for_sync" value="true"/>
+<intAttribute key="com.atollic.hardwaredebug.launch.trace_system" value="0"/>
+<booleanAttribute key="com.atollic.hardwaredebug.launch.useRemoteTarget" value="true"/>
+<stringAttribute key="com.atollic.hardwaredebug.launch.verifyCommands" value="# Set flash parallelism mode to 32, 16, or 8 bit when using STM32 F2/F4 microcontrollers&#13;&#10;# Uncomment next line, 2=32 bit, 1=16 bit and 0=8 bit parallelism mode&#13;&#10;#monitor flash set_parallelism_mode 2&#13;&#10;&#13;&#10;# Set character encoding&#13;&#10;set host-charset CP1252&#13;&#10;set target-charset CP1252&#13;&#10;&#13;&#10;# Reset to known state&#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Load the program executable&#13;&#10;load&#9;&#9;&#13;&#10;&#13;&#10;# Reset the chip to get to a known state. Remove &quot;monitor reset&quot; command &#13;&#10;#  if the code is not located at default address and does not run by reset. &#13;&#10;monitor reset&#13;&#10;&#13;&#10;# Enable Debug connection in low power modes (DBGMCU-&gt;CR)&#13;&#10;set *0xE0042004 = (*0xE0042004) | 0x7&#13;&#10;&#13;&#10;# The executable starts automatically"/>
+<booleanAttribute key="com.atollic.hardwaredebug.stlink.enable_logging" value="false"/>
+<stringAttribute key="com.atollic.hardwaredebug.stlink.log_file" value="C:\home\TOPPERS\ASP\asp_1.9.2_utf8\target\nucleo_f401re_gcc\truestudio\st-link_gdbserver_log.txt"/>
+<booleanAttribute key="com.atollic.hardwaredebug.stlink.verify_flash" value="false"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="${TOOLCHAIN_PATH}/arm-atollic-eabi-gdb"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="æ¨æº (Windows)"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
+<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${TOOLCHAIN_PATH}/arm-atollic-eabi-gdb"/>
+<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
+<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
+<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
+<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="asp.elf"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="asp3"/>
+<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.atollic.truestudio.exe.debug.toolchain.994706796"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/asp"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#13;&#10;"/>
+<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
+</launchConfiguration>
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.c
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.c	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.c	(revision 308)
@@ -0,0 +1,570 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ * 
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ * 
+ *  $Id: sample1.c 711 2016-03-29 14:45:54Z ertl-hiro $
+ */
+
+/* 
+ *  ãµã³ãã«ãã­ã°ã©ã (1)ã®æ¬ä½
+ *
+ *  ASPã«ã¼ãã«ã®åºæ¬çãªåä½ãç¢ºèªããããã®ãµã³ãã«ãã­ã°ã©ã ï¼
+ *
+ *  ãã­ã°ã©ã ã®æ¦è¦:
+ *
+ *  ã¦ã¼ã¶ã¤ã³ã¿ãã§ã¼ã¹ãåãæã¤ã¡ã¤ã³ã¿ã¹ã¯ï¼ã¿ã¹ã¯ID: MAIN_TASKï¼åª
+ *  å
+åº¦: MAIN_PRIORITYï¼ã¨ï¼3ã¤ã®ä¸¦è¡å®è¡ãããã¿ã¹ã¯ï¼ã¿ã¹ã¯ID:
+ *  TASK1ãTASK3ï¼åæåªå
+åº¦: MID_PRIORITYï¼ã§æ§æãããï¼ã¾ãï¼èµ·åå¨
+ *  æã2ç§ã®å¨æãã³ãã©ï¼å¨æãã³ãã©ID: CYCHDR1ï¼ãç¨ããï¼
+ *
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯ã¯ï¼task_loopåç©ºã«ã¼ããå®è¡ããåº¦ã«ï¼ã¿ã¹ã¯ã
+ *  å®è¡ä¸­ã§ãããã¨ãããããã¡ãã»ã¼ã¸ãè¡¨ç¤ºããï¼ç©ºã«ã¼ããå®è¡ãã
+ *  ã®ã¯ï¼ç©ºã«ã¼ããªãã§ã¡ãã»ã¼ã¸ãåºåããã¨ï¼å¤éã®ã¡ãã»ã¼ã¸ãåºå
+ *  ããï¼ãã­ã°ã©ã ã®åä½ãç¢ºèªãããããªãããã§ããï¼ã¾ãï¼ä½éãªã·
+ *  ãªã¢ã«ãã¼ããç¨ãã¦ã¡ãã»ã¼ã¸ãåºåããå ´åã«ï¼ãã¹ã¦ã®ã¡ãã»ã¼ã¸
+ *  ãåºåã§ããããã«ï¼ã¡ãã»ã¼ã¸ã®éãå¶éããã¨ããçç±ãããï¼
+ *
+ *  å¨æãã³ãã©ã¯ï¼ä¸ã¤ã®åªå
+åº¦ï¼HIGH_PRIORITYï¼MID_PRIORITYï¼
+ *  LOW_PRIORITYï¼ã®ã¬ãã£ã­ã¥ã¼ãåè»¢ãããï¼ãã­ã°ã©ã ã®èµ·åç´å¾ã¯ï¼
+ *  å¨æãã³ãã©ã¯åæ­¢ç¶æ
+ã«ãªã£ã¦ããï¼
+ *
+ *  ã¡ã¤ã³ã¿ã¹ã¯ã¯ï¼ã·ãªã¢ã«I/Oãã¼ãããã®æå­å
+¥åãè¡ãï¼æå­å
+¥åã
+ *  å¾
+ã£ã¦ããéã¯ï¼ä¸¦è¡å®è¡ãããã¿ã¹ã¯ãå®è¡ããã¦ããï¼ï¼å
+¥åããã
+ *  æå­ã«å¯¾å¿ããå¦çãå®è¡ããï¼å
+¥åãããæå­ã¨å¦çã®é¢ä¿ã¯æ¬¡ã®éãï¼
+ *  Control-Cã¾ãã¯'Q'ãå
+¥åãããã¨ï¼ãã­ã°ã©ã ãçµäºããï¼
+ *
+ *  '1' : å¯¾è±¡ã¿ã¹ã¯ãTASK1ã«åãæããï¼åæè¨­å®ï¼ï¼
+ *  '2' : å¯¾è±¡ã¿ã¹ã¯ãTASK2ã«åãæããï¼
+ *  '3' : å¯¾è±¡ã¿ã¹ã¯ãTASK3ã«åãæããï¼
+ *  'a' : å¯¾è±¡ã¿ã¹ã¯ãact_tskã«ããèµ·åããï¼
+ *  'A' : å¯¾è±¡ã¿ã¹ã¯ã«å¯¾ããèµ·åè¦æ±ãcan_actã«ããã­ã£ã³ã»ã«ããï¼
+ *  'e' : å¯¾è±¡ã¿ã¹ã¯ã«ext_tskãå¼ã³åºããï¼çµäºãããï¼
+ *  't' : å¯¾è±¡ã¿ã¹ã¯ãter_tskã«ããå¼·å¶çµäºããï¼
+ *  '>' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãHIGH_PRIORITYã«ããï¼
+ *  '=' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãMID_PRIORITYã«ããï¼
+ *  '<' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãLOW_PRIORITYã«ããï¼
+ *  'G' : å¯¾è±¡ã¿ã¹ã¯ã®åªå
+åº¦ãget_priã§èª­ã¿åºãï¼
+ *  's' : å¯¾è±¡ã¿ã¹ã¯ã«slp_tskãå¼ã³åºããï¼èµ·åºå¾
+ã¡ã«ãããï¼
+ *  'S' : å¯¾è±¡ã¿ã¹ã¯ã«tslp_tsk(10ç§)ãå¼ã³åºããï¼èµ·åºå¾
+ã¡ã«ãããï¼
+ *  'w' : å¯¾è±¡ã¿ã¹ã¯ãwup_tskã«ããèµ·åºããï¼
+ *  'W' : å¯¾è±¡ã¿ã¹ã¯ã«å¯¾ããèµ·åºè¦æ±ãcan_wupã«ããã­ã£ã³ã»ã«ããï¼
+ *  'l' : å¯¾è±¡ã¿ã¹ã¯ãrel_waiã«ããå¼·å¶çã«å¾
+ã¡è§£é¤ã«ããï¼
+ *  'u' : å¯¾è±¡ã¿ã¹ã¯ãsus_tskã«ããå¼·å¶å¾
+ã¡ç¶æ
+ã«ããï¼
+ *  'm' : å¯¾è±¡ã¿ã¹ã¯ã®å¼·å¶å¾
+ã¡ç¶æ
+ãrsm_tskã«ããè§£é¤ããï¼
+ *  'd' : å¯¾è±¡ã¿ã¹ã¯ã«dly_tsk(10ç§)ãå¼ã³åºããï¼æéçµéå¾
+ã¡ã«ãããï¼
+ *  'x' : å¯¾è±¡ã¿ã¹ã¯ã«ras_terã«ããçµäºè¦æ±ããï¼
+ *  'y' : å¯¾è±¡ã¿ã¹ã¯ã«dis_terãå¼ã³åºããï¼ã¿ã¹ã¯çµäºãç¦æ­¢ããï¼
+ *  'Y' : å¯¾è±¡ã¿ã¹ã¯ã«ena_terãå¼ã³åºããï¼ã¿ã¹ã¯çµäºãè¨±å¯ããï¼
+ *  'r' : 3ã¤ã®åªå
+åº¦ï¼HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITYï¼ã®ã¬
+ *        ãã£ã­ã¥ã¼ãåè»¢ãããï¼
+ *  'c' : å¨æãã³ãã©ãåä½éå§ãããï¼
+ *  'C' : å¨æãã³ãã©ãåä½åæ­¢ãããï¼
+ *  'b' : ã¢ã©ã¼ã ãã³ãã©ã5ç§å¾ã«èµ·åããããåä½éå§ãããï¼
+ *  'B' : ã¢ã©ã¼ã ãã³ãã©ãåä½åæ­¢ãããï¼
+ *  'z' : å¯¾è±¡ã¿ã¹ã¯ã«CPUä¾å¤ãçºçãããï¼ã¿ã¹ã¯ãçµäºãããï¼ï¼
+ *  'Z' : å¯¾è±¡ã¿ã¹ã¯ã«CPUã­ãã¯ç¶æ
+ã§CPUä¾å¤ãçºçãããï¼ãã­ã°ã©ã ã
+ *        çµäºããï¼ï¼
+ *  'V' : fch_hrtã§é«åè§£è½ã¿ã¤ãã2åèª­ãï¼
+ *  'v' : çºè¡ããã·ã¹ãã ã³ã¼ã«ãè¡¨ç¤ºããï¼ããã©ã«ãï¼ï¼
+ *  'q' : çºè¡ããã·ã¹ãã ã³ã¼ã«ãè¡¨ç¤ºããªãï¼
+ */
+
+#include <kernel.h>
+#include <t_syslog.h>
+#include <t_stdlib.h>
+#include "syssvc/serial.h"
+#include "syssvc/syslog.h"
+#include "kernel_cfg.h"
+#include "sample1.h"
+
+/*
+ *  ãµã¼ãã¹ã³ã¼ã«ã®ã¨ã©ã¼ã®ã­ã°åºå
+ */
+Inline void
+svc_perror(const char *file, int_t line, const char *expr, ER ercd)
+{
+	if (ercd < 0) {
+		t_perror(LOG_ERROR, file, line, expr, ercd);
+	}
+}
+
+#define	SVC_PERROR(expr)	svc_perror(__FILE__, __LINE__, #expr, (expr))
+
+/*
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯ã¸ã®ã¡ãã»ã¼ã¸é å
+ */
+char	message[3];
+
+/*
+ *  ã«ã¼ãåæ°
+ */
+ulong_t	task_loop;		/* ã¿ã¹ã¯å
+ã§ã®ã«ã¼ãåæ° */
+
+/*
+ *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯
+ */
+void task(intptr_t exinf)
+{
+	volatile ulong_t	i;
+	int_t		n = 0;
+	int_t		tskno = (int_t) exinf;
+	const char	*graph[] = { "|", "  +", "    *" };
+	char		c;
+
+	while (true) {
+		syslog(LOG_NOTICE, "task%d is running (%03d).   %s",
+										tskno, ++n, graph[tskno-1]);
+		for (i = 0; i < task_loop; i++);
+		c = message[tskno-1];
+		message[tskno-1] = 0;
+		switch (c) {
+		case 'e':
+			syslog(LOG_INFO, "#%d#ext_tsk()", tskno);
+			SVC_PERROR(ext_tsk());
+			assert(0);
+		case 's':
+			syslog(LOG_INFO, "#%d#slp_tsk()", tskno);
+			SVC_PERROR(slp_tsk());
+			break;
+		case 'S':
+			syslog(LOG_INFO, "#%d#tslp_tsk(10000000)", tskno);
+			SVC_PERROR(tslp_tsk(10000000));
+			break;
+		case 'd':
+			syslog(LOG_INFO, "#%d#dly_tsk(10000000)", tskno);
+			SVC_PERROR(dly_tsk(10000000));
+			break;
+		case 'y':
+			syslog(LOG_INFO, "#%d#dis_ter()", tskno);
+			SVC_PERROR(dis_ter());
+			break;
+		case 'Y':
+			syslog(LOG_INFO, "#%d#ena_ter()", tskno);
+			SVC_PERROR(ena_ter());
+			break;
+#ifdef CPUEXC1
+		case 'z':
+			syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno);
+			RAISE_CPU_EXCEPTION;
+			break;
+		case 'Z':
+			SVC_PERROR(loc_cpu());
+			syslog(LOG_NOTICE, "#%d#raise CPU exception", tskno);
+			RAISE_CPU_EXCEPTION;
+			SVC_PERROR(unl_cpu());
+			break;
+#endif /* CPUEXC1 */
+		default:
+			break;
+		}
+	}
+}
+
+/*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+#ifdef INTNO1
+
+void intno1_isr(intptr_t exinf)
+{
+	intno1_clear();
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+#endif /* INTNO1 */
+
+/*
+ *  CPUä¾å¤ãã³ãã©
+ */
+ID	cpuexc_tskid;		/* CPUä¾å¤ãèµ·ãããã¿ã¹ã¯ã®ID */
+
+#ifdef CPUEXC1
+
+void
+cpuexc_handler(void *p_excinf)
+{
+	syslog(LOG_NOTICE, "CPU exception handler (p_excinf = %08p).", p_excinf);
+	if (sns_ctx() != true) {
+		syslog(LOG_WARNING,
+					"sns_ctx() is not true in CPU exception handler.");
+	}
+	if (sns_dpn() != true) {
+		syslog(LOG_WARNING,
+					"sns_dpn() is not true in CPU exception handler.");
+	}
+	syslog(LOG_INFO, "sns_loc = %d sns_dsp = %d xsns_dpn = %d",
+								sns_loc(), sns_dsp(), xsns_dpn(p_excinf));
+
+	if (xsns_dpn(p_excinf)) {
+		syslog(LOG_NOTICE, "Sample program ends with exception.");
+		SVC_PERROR(ext_ker());
+		assert(0);
+	}
+
+#ifdef PREPARE_RETURN_CPUEXC
+	PREPARE_RETURN_CPUEXC;
+	SVC_PERROR(get_tid(&cpuexc_tskid));
+	SVC_PERROR(act_tsk(EXC_TASK));
+#else /* PREPARE_RETURN_CPUEXC */
+	syslog(LOG_NOTICE, "Sample program ends with exception.");
+	SVC_PERROR(ext_ker());
+	assert(0);
+#endif /* PREPARE_RETURN_CPUEXC */
+}
+
+#endif /* CPUEXC1 */
+
+/*
+ *  å¨æãã³ãã©
+ *
+ *  HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITY ã®ååªå
+åº¦ã®ã¬ãã£ã­ã¥ã¼
+ *  ãåè»¢ãããï¼
+ */
+void cyclic_handler(intptr_t exinf)
+{
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+/*
+ *  ã¢ã©ã¼ã ãã³ãã©
+ *
+ *  HIGH_PRIORITYï¼MID_PRIORITYï¼LOW_PRIORITY ã®ååªå
+åº¦ã®ã¬ãã£ã­ã¥ã¼
+ *  ãåè»¢ãããï¼
+ */
+void alarm_handler(intptr_t exinf)
+{
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+/*
+ *  ä¾å¤å¦çã¿ã¹ã¯
+ */
+void exc_task(intptr_t exinf)
+{
+	SVC_PERROR(ras_ter(cpuexc_tskid));
+}
+
+/*
+ *  ã¡ã¤ã³ã¿ã¹ã¯
+ */
+void main_task(intptr_t exinf)
+{
+	char	c;
+	ID		tskid = TASK1;
+	int_t	tskno = 1;
+	ER_UINT	ercd;
+	PRI		tskpri;
+#ifndef TASK_LOOP
+	volatile ulong_t	i;
+	SYSTIM	stime1, stime2;
+#endif /* TASK_LOOP */
+	HRTCNT	hrtcnt1, hrtcnt2;
+
+	SVC_PERROR(syslog_msk_log(LOG_UPTO(LOG_INFO), LOG_UPTO(LOG_EMERG)));
+	syslog(LOG_NOTICE, "Sample program starts (exinf = %d).", (int_t) exinf);
+
+	/*
+	 *  ã·ãªã¢ã«ãã¼ãã®åæå
+	 *
+	 *  ã·ã¹ãã ã­ã°ã¿ã¹ã¯ã¨åãã·ãªã¢ã«ãã¼ããä½¿ãå ´åãªã©ï¼ã·ãªã¢ã«
+	 *  ãã¼ãããªã¼ãã³æ¸ã¿ã®å ´åã«ã¯ããã§E_OBJã¨ã©ã¼ã«ãªããï¼æ¯éã¯
+	 *  ãªãï¼
+	 */
+	ercd = serial_opn_por(TASK_PORTID);
+	if (ercd < 0 && MERCD(ercd) != E_OBJ) {
+		syslog(LOG_ERROR, "%s (%d) reported by `serial_opn_por'.",
+									itron_strerror(ercd), SERCD(ercd));
+	}
+	SVC_PERROR(serial_ctl_por(TASK_PORTID,
+							(IOCTL_CRLF | IOCTL_FCSND | IOCTL_FCRCV)));
+
+	/*
+ 	 *  ã«ã¼ãåæ°ã®è¨­å®
+	 *
+	 *  ä¸¦è¡å®è¡ãããã¿ã¹ã¯å
+ã§ã®ç©ºã«ã¼ãã®åæ°ï¼task_loopï¼ã¯ï¼ç©ºã«ã¼
+	 *  ãã®å®è¡æéãç´0.4ç§ã«ãªãããã«è¨­å®ããï¼ãã®è¨­å®ã®ããã«ï¼
+	 *  LOOP_REFåã®ç©ºã«ã¼ãã®å®è¡æéãï¼ãã®åå¾ã§get_timãå¼ã¶ãã¨ã§
+	 *  æ¸¬å®ãï¼ãã®æ¸¬å®çµæããç©ºã«ã¼ãã®å®è¡æéã0.4ç§ã«ãªãã«ã¼ãå
+	 *  æ°ãæ±ãï¼task_loopã«è¨­å®ããï¼
+	 *
+	 *  LOOP_REFã¯ï¼ããã©ã«ãã§ã¯1,000,000ã«è¨­å®ãã¦ãããï¼æ³å®ããã
+	 *  ãé
+ããã­ã»ããµã§ã¯ï¼ãµã³ãã«ãã­ã°ã©ã ã®å®è¡éå§ã«æéããã
+	 *  ããããã¨ããåé¡ãçããï¼éã«æ³å®ããããéããã­ã»ããµã§ã¯ï¼
+	 *  LOOP_REFåã®ç©ºã«ã¼ãã®å®è¡æéãç­ããªãï¼task_loopã«è¨­å®ããå¤
+	 *  ã®èª¤å·®ãå¤§ãããªãã¨ããåé¡ãããï¼
+	 *
+	 *  ããã§ï¼ãã®ãããªã¿ã¼ã²ããã§ã¯ï¼target_test.hã§ï¼LOOP_REFãé©
+	 *  åãªå¤ã«å®ç¾©ããã®ãæã¾ããï¼
+	 *
+	 *  ã¾ãï¼task_loopã®å¤ãåºå®ãããå ´åã«ã¯ï¼ãã®å¤ãTASK_LOOPã«ã
+	 *  ã¯ã­å®ç¾©ããï¼TASK_LOOPããã¯ã­å®ç¾©ããã¦ããå ´åï¼ä¸è¨ã®æ¸¬å®ã
+	 *  è¡ããã«ï¼TASK_LOOPã«å®ç¾©ãããå¤ãç©ºã«ã¼ãã®åæ°ã¨ããï¼
+	 *
+	 * ã¿ã¼ã²ããã«ãã£ã¦ã¯ï¼ç©ºã«ã¼ãã®å®è¡æéã®1åç®ã®æ¸¬å®ã§ï¼æ¬æ¥ã
+	 * ããé·ãã«ãªããã®ãããï¼ãã®ãããªã¿ã¼ã²ããã§ã¯ï¼MEASURE_TWICE
+	 * ããã¯ã­å®ç¾©ãããã¨ã§ï¼1åç®ã®æ¸¬å®çµæãæ¨ã¦ã¦ï¼2åç®ã®æ¸¬å®çµæ
+	 * ãä½¿ãï¼
+	 */
+#ifdef TASK_LOOP
+	task_loop = TASK_LOOP;
+#else /* TASK_LOOP */
+
+#ifdef MEASURE_TWICE
+	task_loop = LOOP_REF;
+	SVC_PERROR(get_tim(&stime1));
+	for (i = 0; i < task_loop; i++);
+	SVC_PERROR(get_tim(&stime2));
+#endif /* MEASURE_TWICE */
+
+	task_loop = LOOP_REF;
+	SVC_PERROR(get_tim(&stime1));
+	for (i = 0; i < task_loop; i++);
+	SVC_PERROR(get_tim(&stime2));
+	task_loop = LOOP_REF * 400LU / (ulong_t)(stime2 - stime1) * 1000LU;
+
+#endif /* TASK_LOOP */
+
+	/*
+ 	 *  ã¿ã¹ã¯ã®èµ·å
+	 */
+	SVC_PERROR(act_tsk(TASK1));
+	SVC_PERROR(act_tsk(TASK2));
+	SVC_PERROR(act_tsk(TASK3));
+
+	/*
+ 	 *  ã¡ã¤ã³ã«ã¼ã
+	 */
+	do {
+		SVC_PERROR(serial_rea_dat(TASK_PORTID, &c, 1));
+		switch (c) {
+		case 'e':
+		case 's':
+		case 'S':
+		case 'd':
+		case 'y':
+		case 'Y':
+		case 'z':
+		case 'Z':
+			message[tskno-1] = c;
+			break;
+		case '1':
+			tskno = 1;
+			tskid = TASK1;
+			break;
+		case '2':
+			tskno = 2;
+			tskid = TASK2;
+			break;
+		case '3':
+			tskno = 3;
+			tskid = TASK3;
+			break;
+		case 'a':
+			syslog(LOG_INFO, "#act_tsk(%d)", tskno);
+			SVC_PERROR(act_tsk(tskid));
+			break;
+		case 'A':
+			syslog(LOG_INFO, "#can_act(%d)", tskno);
+			SVC_PERROR(ercd = can_act(tskid));
+			if (ercd >= 0) {
+				syslog(LOG_NOTICE, "can_act(%d) returns %d", tskno, ercd);
+			}
+			break;
+		case 't':
+			syslog(LOG_INFO, "#ter_tsk(%d)", tskno);
+			SVC_PERROR(ter_tsk(tskid));
+			break;
+		case '>':
+			syslog(LOG_INFO, "#chg_pri(%d, HIGH_PRIORITY)", tskno);
+			SVC_PERROR(chg_pri(tskid, HIGH_PRIORITY));
+			break;
+		case '=':
+			syslog(LOG_INFO, "#chg_pri(%d, MID_PRIORITY)", tskno);
+			SVC_PERROR(chg_pri(tskid, MID_PRIORITY));
+			break;
+		case '<':
+			syslog(LOG_INFO, "#chg_pri(%d, LOW_PRIORITY)", tskno);
+			SVC_PERROR(chg_pri(tskid, LOW_PRIORITY));
+			break;
+		case 'G':
+			syslog(LOG_INFO, "#get_pri(%d, &tskpri)", tskno);
+			SVC_PERROR(ercd = get_pri(tskid, &tskpri));
+			if (ercd >= 0) {
+				syslog(LOG_NOTICE, "priority of task %d is %d", tskno, tskpri);
+			}
+			break;
+		case 'w':
+			syslog(LOG_INFO, "#wup_tsk(%d)", tskno);
+			SVC_PERROR(wup_tsk(tskid));
+			break;
+		case 'W':
+			syslog(LOG_INFO, "#can_wup(%d)", tskno);
+			SVC_PERROR(ercd = can_wup(tskid));
+			if (ercd >= 0) {
+				syslog(LOG_NOTICE, "can_wup(%d) returns %d", tskno, ercd);
+			}
+			break;
+		case 'l':
+			syslog(LOG_INFO, "#rel_wai(%d)", tskno);
+			SVC_PERROR(rel_wai(tskid));
+			break;
+		case 'u':
+			syslog(LOG_INFO, "#sus_tsk(%d)", tskno);
+			SVC_PERROR(sus_tsk(tskid));
+			break;
+		case 'm':
+			syslog(LOG_INFO, "#rsm_tsk(%d)", tskno);
+			SVC_PERROR(rsm_tsk(tskid));
+			break;
+		case 'x':
+			syslog(LOG_INFO, "#ras_ter(%d)", tskno);
+			SVC_PERROR(ras_ter(tskid));
+			break;
+		case 'r':
+			syslog(LOG_INFO, "#rot_rdq(three priorities)");
+			SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+			SVC_PERROR(rot_rdq(MID_PRIORITY));
+			SVC_PERROR(rot_rdq(LOW_PRIORITY));
+			break;
+		case 'c':
+			syslog(LOG_INFO, "#sta_cyc(1)");
+			SVC_PERROR(sta_cyc(CYCHDR1));
+			break;
+		case 'C':
+			syslog(LOG_INFO, "#stp_cyc(1)");
+			SVC_PERROR(stp_cyc(CYCHDR1));
+			break;
+		case 'b':
+			syslog(LOG_INFO, "#sta_alm(1, 5000000)");
+			SVC_PERROR(sta_alm(ALMHDR1, 5000000));
+			break;
+		case 'B':
+			syslog(LOG_INFO, "#stp_alm(1)");
+			SVC_PERROR(stp_alm(ALMHDR1));
+			break;
+
+		case 'V':
+			hrtcnt1 = fch_hrt();
+			hrtcnt2 = fch_hrt();
+			syslog(LOG_NOTICE, "hrtcnt1 = %tu, hrtcnt2 = %tu",
+										hrtcnt1, hrtcnt2);
+			break;
+
+		case 'v':
+			SVC_PERROR(syslog_msk_log(LOG_UPTO(LOG_INFO),
+										LOG_UPTO(LOG_EMERG)));
+			break;
+		case 'q':
+			SVC_PERROR(syslog_msk_log(LOG_UPTO(LOG_NOTICE),
+										LOG_UPTO(LOG_EMERG)));
+			break;
+
+#ifdef BIT_KERNEL
+		case ' ':
+			SVC_PERROR(loc_cpu());
+			{
+				extern ER	bit_kernel(void);
+
+				SVC_PERROR(ercd = bit_kernel());
+				if (ercd >= 0) {
+					syslog(LOG_NOTICE, "bit_kernel passed.");
+				}
+			}
+			SVC_PERROR(unl_cpu());
+			break;
+#endif /* BIT_KERNEL */
+
+		default:
+			break;
+		}
+	} while (c != '\003' && c != 'Q');
+
+	syslog(LOG_NOTICE, "Sample program ends.");
+	SVC_PERROR(ext_ker());
+	assert(0);
+}
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.cfg
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.cfg	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.cfg	(revision 308)
@@ -0,0 +1,25 @@
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id: sample1.cfg 326 2015-06-21 06:06:45Z ertl-hiro $
+ */
+INCLUDE("syssvc/syslog.cfg");
+INCLUDE("syssvc/banner.cfg");
+INCLUDE("syssvc/serial.cfg");
+INCLUDE("syssvc/logtask.cfg");
+
+#include "sample1.h"
+CRE_TSK(TASK1, { TA_NULL, 1, task, MID_PRIORITY, STACK_SIZE, NULL });
+CRE_TSK(TASK2, { TA_NULL, 2, task, MID_PRIORITY, STACK_SIZE, NULL });
+CRE_TSK(TASK3, { TA_NULL, 3, task, MID_PRIORITY, STACK_SIZE, NULL });
+CRE_TSK(MAIN_TASK, { TA_ACT, 0, main_task, MAIN_PRIORITY, STACK_SIZE, NULL });
+CRE_TSK(EXC_TASK, { TA_NULL, 0, exc_task, EXC_PRIORITY, STACK_SIZE, NULL });
+CRE_CYC(CYCHDR1, { TA_NULL, { TNFY_HANDLER, 0, cyclic_handler }, 2000000, 0 });
+CRE_ALM(ALMHDR1, { TA_NULL, { TNFY_HANDLER, 0, alarm_handler }});
+#ifdef INTNO1
+CFG_INT(INTNO1, { INTNO1_INTATR, INTNO1_INTPRI });
+CRE_ISR(INTNO1_ISR, { TA_NULL, 0, INTNO1, intno1_isr, 1 });
+#endif /* INTNO1 */
+#ifdef CPUEXC1
+DEF_EXC(CPUEXC1, { TA_NULL, cpuexc_handler });
+#endif /* CPUEXC1 */
Index: asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.h
===================================================================
--- asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.h	(revision 308)
+++ asp3_wo_tecs/trunk/target/nucleo_f401re_gcc/truestudio/asp3/sample1.h	(revision 308)
@@ -0,0 +1,119 @@
+/*
+ *  TOPPERS/ASP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Advanced Standard Profile Kernel
+ *
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
+ *              Graduate School of Information Science, Nagoya Univ., JAPAN
+ *
+ *  ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+ *  ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+ *  å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+ *  (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+ *      æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+ *      ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+ *  (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+ *      è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+ *      ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *  (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+ *      ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+ *      ã¨ï¼
+ *    (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+ *        ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+ *    (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+ *        å ±åãããã¨ï¼
+ *  (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+ *      å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+ *      ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+ *      ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+ *      å
+è²¬ãããã¨ï¼
+ * 
+ *  æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+ *  ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+ *  ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+ *  ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+ *  ã®è²¬ä»»ãè² ããªãï¼
+ *
+ *  $Id: sample1.h 705 2016-03-29 14:16:41Z ertl-hiro $
+ */
+
+/*
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ããããã¡ã¤ã«
+ */
+
+#include <kernel.h>
+
+/*
+ *  ã¿ã¼ã²ããä¾å­ã®å®ç¾©
+ */
+#include "target_test.h"
+
+/*
+ *  åã¿ã¹ã¯ã®åªå
+åº¦ã®å®ç¾©
+ */
+
+#define EXC_PRIORITY	1		/* ä¾å¤å¦çã¿ã¹ã¯ã®åªå
+åº¦ */
+#define MAIN_PRIORITY	5		/* ã¡ã¤ã³ã¿ã¹ã¯ã®åªå
+åº¦ */
+								/* HIGH_PRIORITYããé«ããããã¨ */
+
+#define HIGH_PRIORITY	9		/* ä¸¦è¡å®è¡ãããã¿ã¹ã¯ã®åªå
+åº¦ */
+#define MID_PRIORITY	10
+#define LOW_PRIORITY	11
+
+/*
+ *  ã¿ã¼ã²ããã«ä¾å­ããå¯è½æ§ã®ããå®æ°ã®å®ç¾©
+ */
+
+#ifndef TASK_PORTID
+#define	TASK_PORTID		1			/* æå­å
+¥åããã·ãªã¢ã«ãã¼ãID */
+#endif /* TASK_PORTID */
+
+#ifndef STACK_SIZE
+#define	STACK_SIZE		4096		/* ã¿ã¹ã¯ã®ã¹ã¿ãã¯ãµã¤ãº */
+#endif /* STACK_SIZE */
+
+#ifndef LOOP_REF
+#define LOOP_REF		ULONG_C(1000000)	/* éåº¦è¨æ¸¬ç¨ã®ã«ã¼ãåæ° */
+#endif /* LOOP_REF */
+
+/*
+ *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
+ */
+#ifndef TOPPERS_MACRO_ONLY
+
+extern void	task(intptr_t exinf);
+extern void	main_task(intptr_t exinf);
+extern void exc_task(intptr_t exinf);
+#ifdef INTNO1
+extern void intno1_isr(intptr_t exinf);
+#endif /* INTNO1 */
+#ifdef CPUEXC1
+extern void	cpuexc_handler(void *p_excinf);
+#endif /* CPUEXC1 */
+extern void	cyclic_handler(intptr_t exinf);
+extern void	alarm_handler(intptr_t exinf);
+
+#endif /* TOPPERS_MACRO_ONLY */
