Index: rtos_arduino/trunk/examples/NCESCan/Makefile
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/Makefile	(revision 204)
+++ rtos_arduino/trunk/examples/NCESCan/Makefile	(revision 260)
@@ -7,7 +7,7 @@
 #  ã¢ããªã±ã¼ã·ã§ã³ãã¡ã¤ã«
 #
-APPL_CXXOBJS += rca_app.o
+APPL_CXXOBJS += r2ca_app.o
 APPL_COBJS   += 
-APPL_CFG      = rca_app.cfg
+APPL_CFG      = r2ca_app.cfg
 
 #
@@ -38,7 +38,7 @@
 
 #
-#  RCAã®ãã£ã¬ã¯ããªã®å®ç¾©
+#  R2CAã®ãã£ã¬ã¯ããªã®å®ç¾©
 #
-RCA_DIR = ../..
+R2CA_DIR = ../..
 
 #
@@ -54,3 +54,3 @@
 APPL_DIR = 
 
-include $(RCA_DIR)/lib/Makefile.rca
+include $(R2CA_DIR)/lib/Makefile.r2ca
Index: rtos_arduino/trunk/examples/NCESCan/r2ca.atsln
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/r2ca.atsln	(revision 260)
+++ rtos_arduino/trunk/examples/NCESCan/r2ca.atsln	(revision 260)
@@ -0,0 +1,22 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Atmel Studio Solution File, Format Version 11.00
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "r2ca", "r2ca.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|ARM = Debug|ARM
+		Release|ARM = Release|ARM
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.ActiveCfg = Debug|ARM
+		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.Build.0 = Debug|ARM
+		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.ActiveCfg = Release|ARM
+		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.Build.0 = Release|ARM
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: rtos_arduino/trunk/examples/NCESCan/r2ca.componentinfo.xml
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/r2ca.componentinfo.xml	(revision 260)
+++ rtos_arduino/trunk/examples/NCESCan/r2ca.componentinfo.xml	(revision 260)
@@ -0,0 +1,169 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
+	<ProjectComponents>
+		<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
+			<CApiVersion></CApiVersion>
+			<CBundle></CBundle>
+			<CClass>CMSIS</CClass>
+			<CGroup>CORE</CGroup>
+			<CSub></CSub>
+			<CVariant></CVariant>
+			<CVendor>ARM</CVendor>
+			<CVersion>3.40.0</CVersion>
+			<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
+			<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
+				<d4p1:anyType z:Id="i2" i:type="ProjectComponent">
+					<CApiVersion></CApiVersion>
+					<CBundle></CBundle>
+					<CClass>Device</CClass>
+					<CGroup>Startup</CGroup>
+					<CSub></CSub>
+					<CVariant></CVariant>
+					<CVendor>Atmel</CVendor>
+					<CVersion>1.0.0</CVersion>
+					<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
+					<DependentComponents />
+					<Description></Description>
+					<Files>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\include</AbsolutePath>
+							<Attribute></Attribute>
+							<Category>include</Category>
+							<Condition>C</Condition>
+							<FileContentHash i:nil="true" />
+							<FileVersion></FileVersion>
+							<Name>samd21a/include</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\include\sam.h</AbsolutePath>
+							<Attribute></Attribute>
+							<Category>header</Category>
+							<Condition>C</Condition>
+							<FileContentHash>wM94EGprD6Od4xKBsAzkFQ==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/include/sam.h</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\templates\main.c</AbsolutePath>
+							<Attribute>template</Attribute>
+							<Category>source</Category>
+							<Condition>C Exe</Condition>
+							<FileContentHash>dSS7TLoDl1MS+uFZPgKPWQ==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/templates/main.c</Name>
+							<SelectString>Main file (.c)</SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\templates\main.cpp</AbsolutePath>
+							<Attribute>template</Attribute>
+							<Category>source</Category>
+							<Condition>C Exe</Condition>
+							<FileContentHash>nU+WlKcYaWh0AWBBS+WVpA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/templates/main.cpp</Name>
+							<SelectString>Main file (.cpp)</SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\system_samd21.c</AbsolutePath>
+							<Attribute>config</Attribute>
+							<Category>source</Category>
+							<Condition>GCC Exe</Condition>
+							<FileContentHash>Qjqe1jYsYQB+vQG2A3hhiA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/gcc/system_samd21.c</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\startup_samd21.c</AbsolutePath>
+							<Attribute>config</Attribute>
+							<Category>source</Category>
+							<Condition>GCC Exe</Condition>
+							<FileContentHash>pLNlIy+Llw/GLgds0gbQQA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/gcc/gcc/startup_samd21.c</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\samd21g18a_flash.ld</AbsolutePath>
+							<Attribute>config</Attribute>
+							<Category>linkerScript</Category>
+							<Condition>GCC Exe</Condition>
+							<FileContentHash>4xbqLG5DtSn/T8pJoWAvNA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/gcc/gcc/samd21g18a_flash.ld</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+						<d4p1:anyType i:type="FileInfo">
+							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\samd21g18a_sram.ld</AbsolutePath>
+							<Attribute>config</Attribute>
+							<Category>other</Category>
+							<Condition>GCC Exe</Condition>
+							<FileContentHash>K9GWjx6oZkcBnxrHUbvSwA==</FileContentHash>
+							<FileVersion></FileVersion>
+							<Name>samd21a/gcc/gcc/samd21g18a_sram.ld</Name>
+							<SelectString></SelectString>
+							<SourcePath></SourcePath>
+						</d4p1:anyType>
+					</Files>
+					<PackName>SAMD21_DFP</PackName>
+					<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/SAMD21_DFP/1.0.222/Atmel.SAMD21_DFP.pdsc</PackPath>
+					<PackVersion>1.0.222</PackVersion>
+					<PresentInProject>true</PresentInProject>
+					<ReferenceConditionId>ATSAMD21G18A</ReferenceConditionId>
+					<RteComponents>
+						<d4p1:string></d4p1:string>
+					</RteComponents>
+					<Status>Resolved</Status>
+					<VersionMode>Fixed</VersionMode>
+					<IsComponentInAtProject>true</IsComponentInAtProject>
+				</d4p1:anyType>
+			</DependentComponents>
+			<Description></Description>
+			<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
+				<d4p1:anyType i:type="FileInfo">
+					<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\4.2.0\CMSIS\Documentation\Core\html\index.html</AbsolutePath>
+					<Attribute></Attribute>
+					<Category>doc</Category>
+					<Condition></Condition>
+					<FileContentHash>Fm1Ae7doPh4708FZQAIEpw==</FileContentHash>
+					<FileVersion></FileVersion>
+					<Name>CMSIS\Documentation\Core\html\index.html</Name>
+					<SelectString></SelectString>
+					<SourcePath></SourcePath>
+				</d4p1:anyType>
+				<d4p1:anyType i:type="FileInfo">
+					<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\4.2.0\CMSIS\Include\</AbsolutePath>
+					<Attribute></Attribute>
+					<Category>include</Category>
+					<Condition></Condition>
+					<FileContentHash i:nil="true" />
+					<FileVersion></FileVersion>
+					<Name>CMSIS\Include\</Name>
+					<SelectString></SelectString>
+					<SourcePath></SourcePath>
+				</d4p1:anyType>
+			</Files>
+			<PackName>CMSIS</PackName>
+			<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/arm/cmsis/4.2.0/ARM.CMSIS.pdsc</PackPath>
+			<PackVersion>4.2.0</PackVersion>
+			<PresentInProject>true</PresentInProject>
+			<ReferenceConditionId>CMSIS Core</ReferenceConditionId>
+			<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
+				<d4p1:string></d4p1:string>
+			</RteComponents>
+			<Status>Resolved</Status>
+			<VersionMode>Fixed</VersionMode>
+			<IsComponentInAtProject>true</IsComponentInAtProject>
+		</ProjectComponent>
+		<ProjectComponent z:Ref="i2" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
+	</ProjectComponents>
+</Store>
Index: rtos_arduino/trunk/examples/NCESCan/r2ca.cproj
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/r2ca.cproj	(revision 260)
+++ rtos_arduino/trunk/examples/NCESCan/r2ca.cproj	(revision 260)
@@ -0,0 +1,168 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
+  <PropertyGroup>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectVersion>7.0</ProjectVersion>
+    <ToolchainName>com.Atmel.ARMGCC.C</ToolchainName>
+    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>
+    <avrdevice>ATSAMD21G18A</avrdevice>
+    <avrdeviceseries>none</avrdeviceseries>
+    <OutputType>Executable</OutputType>
+    <Language>C</Language>
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
+    <OutputFileExtension>.elf</OutputFileExtension>
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
+    <AssemblyName>r2ca</AssemblyName>
+    <Name>r2ca</Name>
+    <RootNamespace>r2ca</RootNamespace>
+    <ToolchainFlavour>Native</ToolchainFlavour>
+    <KeepTimersRunning>true</KeepTimersRunning>
+    <OverrideVtor>false</OverrideVtor>
+    <CacheFlash>true</CacheFlash>
+    <ProgFlashFromRam>true</ProgFlashFromRam>
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>
+    <UncachedRange />
+    <preserveEEPROM>true</preserveEEPROM>
+    <OverrideVtorValue>exception_table</OverrideVtorValue>
+    <BootSegment>2</BootSegment>
+    <eraseonlaunchrule>4</eraseonlaunchrule>
+    <ExternalProgrammingToolCommand />
+    <AsfFrameworkConfig>
+      <framework-data xmlns="">
+        <options />
+        <configurations />
+        <files />
+        <documentation help="" />
+        <offline-documentation help="" />
+        <dependencies>
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />
+        </dependencies>
+      </framework-data>
+    </AsfFrameworkConfig>
+    <UseGdb>False</UseGdb>
+    <avrtool>com.atmel.avrdbg.tool.edbg</avrtool>
+    <avrtoolserialnumber>FFFFFFFFFFFFFFFFFFFF</avrtoolserialnumber>
+    <avrdeviceexpectedsignature>0x10010005</avrdeviceexpectedsignature>
+    <avrtoolinterface>SWD</avrtoolinterface>
+    <com_atmel_avrdbg_tool_edbg>
+      <ToolOptions>
+        <InterfaceProperties>
+          <SwdClock>2000000</SwdClock>
+        </InterfaceProperties>
+        <InterfaceName>SWD</InterfaceName>
+      </ToolOptions>
+      <ToolType>com.atmel.avrdbg.tool.edbg</ToolType>
+      <ToolNumber>FFFFFFFFFFFFFFFFFFFF</ToolNumber>
+      <ToolName>EDBG</ToolName>
+    </com_atmel_avrdbg_tool_edbg>
+    <avrtoolinterfaceclock>2000000</avrtoolinterfaceclock>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+    <ToolchainSettings>
+      <ArmGcc>
+  <armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
+  <armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
+  <armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
+  <armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
+  <armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
+  <armgcc.compiler.symbols.DefSymbols>
+    <ListValues>
+      <Value>NDEBUG</Value>
+    </ListValues>
+  </armgcc.compiler.symbols.DefSymbols>
+  <armgcc.compiler.directories.IncludePaths>
+    <ListValues>
+      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
+      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
+    </ListValues>
+  </armgcc.compiler.directories.IncludePaths>
+  <armgcc.compiler.optimization.level>Optimize for size (-Os)</armgcc.compiler.optimization.level>
+  <armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
+  <armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
+  <armgcc.linker.libraries.Libraries>
+    <ListValues>
+      <Value>libm</Value>
+    </ListValues>
+  </armgcc.linker.libraries.Libraries>
+  <armgcc.linker.libraries.LibrarySearchPaths>
+    <ListValues>
+      <Value>%24(ProjectDir)\Device_Startup</Value>
+    </ListValues>
+  </armgcc.linker.libraries.LibrarySearchPaths>
+  <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>
+  <armgcc.linker.miscellaneous.LinkerFlags>-Tsamd21g18a_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>
+  <armgcc.preprocessingassembler.general.IncludePaths>
+    <ListValues>
+      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
+      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
+    </ListValues>
+  </armgcc.preprocessingassembler.general.IncludePaths>
+</ArmGcc>
+    </ToolchainSettings>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+    <ToolchainSettings>
+      <ArmGcc>
+  <armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
+  <armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
+  <armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
+  <armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
+  <armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
+  <armgcc.compiler.symbols.DefSymbols>
+    <ListValues>
+      <Value>DEBUG</Value>
+    </ListValues>
+  </armgcc.compiler.symbols.DefSymbols>
+  <armgcc.compiler.directories.IncludePaths>
+    <ListValues>
+      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
+      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
+    </ListValues>
+  </armgcc.compiler.directories.IncludePaths>
+  <armgcc.compiler.optimization.level>Optimize (-O1)</armgcc.compiler.optimization.level>
+  <armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
+  <armgcc.compiler.optimization.DebugLevel>Maximum (-g3)</armgcc.compiler.optimization.DebugLevel>
+  <armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
+  <armgcc.linker.libraries.Libraries>
+    <ListValues>
+      <Value>libm</Value>
+    </ListValues>
+  </armgcc.linker.libraries.Libraries>
+  <armgcc.linker.libraries.LibrarySearchPaths>
+    <ListValues>
+      <Value>%24(ProjectDir)\Device_Startup</Value>
+    </ListValues>
+  </armgcc.linker.libraries.LibrarySearchPaths>
+  <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>
+  <armgcc.linker.miscellaneous.LinkerFlags>-Tsamd21g18a_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>
+  <armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>
+  <armgcc.preprocessingassembler.general.IncludePaths>
+    <ListValues>
+      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
+      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
+    </ListValues>
+  </armgcc.preprocessingassembler.general.IncludePaths>
+  <armgcc.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcc.preprocessingassembler.debugging.DebugLevel>
+</ArmGcc>
+    </ToolchainSettings>
+    <UsesExternalMakeFile>True</UsesExternalMakeFile>
+    <OutputDirectory />
+    <BuildTarget>all</BuildTarget>
+    <CleanTarget>clean</CleanTarget>
+    <ExternalMakeFilePath>Makefile</ExternalMakeFilePath>
+  </PropertyGroup>
+  <ItemGroup>
+    <None Include="r2ca_app.cfg">
+      <SubType>compile</SubType>
+    </None>
+    <None Include="r2ca_app.cpp">
+      <SubType>compile</SubType>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="r2ca_app.h">
+      <SubType>compile</SubType>
+    </Compile>
+  </ItemGroup>
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
+</Project>
Index: rtos_arduino/trunk/examples/NCESCan/r2ca_app.cfg
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/r2ca_app.cfg	(revision 260)
+++ rtos_arduino/trunk/examples/NCESCan/r2ca_app.cfg	(revision 260)
@@ -0,0 +1,8 @@
+/*
+ *  $Id: sample1.cfg 2416 2012-09-07 08:06:20Z ertl-hiro $
+ */
+
+/*
+ *  ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ */
+INCLUDE("r2ca_lib.cfg");
Index: rtos_arduino/trunk/examples/NCESCan/r2ca_app.cpp
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/r2ca_app.cpp	(revision 260)
+++ rtos_arduino/trunk/examples/NCESCan/r2ca_app.cpp	(revision 260)
@@ -0,0 +1,142 @@
+#include "r2ca.h"
+
+// demo: CAN-BUS Shield, receive data
+#include <SPI.h>
+#include "mcp_can.h"
+#include <stdio.h>
+#define uint8_t unsigned char
+
+const int SPI_CS_PIN = 9;
+#define CAN_INT_PIN 3
+MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin
+
+extern void MCP2515_ISR();
+
+/*
+ *  CAN Controller : MCP2515
+ *  TXB : MCP_TXB0:0, MCP_RXB1:1,MCP_RXB2:2
+ *  RXB : MCP_RXB0:0 : Mask MCP_RXM0:0 : Filer MCP_RXF0:0, MCP_RXF1:1
+ *        MCP_RXB1:1 : Mask MCP_RXM2:1 : Filer MCP_RXF2:2, MCP_RXF3:3, MCP_RXF4:4, MCP_RXF5:5
+ *  Interrupt mask
+ *    MCP_TX0IF
+ *    MCP_TX1IF
+ *    MCP_TX2IF
+ *    MCP_RX0IF
+ *    MCP_RX1IF
+ */
+
+void setup()
+{
+    Serial.begin(115200);
+    pinMode(13, OUTPUT);
+
+    /*
+     *  CAN Initialize
+     */
+    if(CAN.begin(CAN_500KBPS) ==CAN_OK) {
+        Serial.print("can init ok!!\r\n");
+    }
+    else {
+        while(1){
+            Serial.print("Can init fail!!\r\n");
+            digitalWrite(13, HIGH); 
+            delay(500);             
+            digitalWrite(13, LOW);  
+            delay(500);             
+        };
+    }
+    
+    /*
+     *  CAN Recive mabx Init
+     */
+    
+    /*
+     *  RXB0
+     */
+    CAN.init_Mask(MCP_RXM0, 0x0f);
+    CAN.init_Filter(MCP_RXF0, 0x01);
+    CAN.init_Filter(MCP_RXF1, 0x02);
+    CAN.startReceive(MCP_RXB0);
+
+    /*
+     *  RXB1
+     */
+    CAN.init_Mask(MCP_RXM1, 0x0f);
+    CAN.init_Filter(MCP_RXF2, 0x03);
+    CAN.init_Filter(MCP_RXF3, 0x04);
+    CAN.init_Filter(MCP_RXF4, 0x05);
+    CAN.init_Filter(MCP_RXF5, 0x06);    
+    CAN.startReceive(MCP_RXB1);
+
+    CAN.enableInterrupt(MCP_RX0IF|MCP_RX1IF);
+    CAN.attachInterrupt(CAN_INT_PIN, MCP2515_ISR);
+
+}
+
+uint8_t Flag_Recv = 0;
+
+void MCP2515_ISR()
+{
+     Flag_Recv = 1;
+}
+
+void loop()
+{
+    uint8_t len = 0;
+    uint8_t buf[8];
+    uint8_t i;
+    uint32_t id;    
+    
+    if(!Flag_Recv) {
+       delay(1);
+        return;
+    }
+      
+    Flag_Recv = 0;
+
+    for(i = 0; i < 2; i++){
+        if(CAN.checkReceive(i) == CAN_NOMSG) {
+            continue;
+        }       
+        CAN.readMsg(i, &id, &len, buf);    // read data,  len: data length, buf: data buf
+        Serial.print("CAN_BUS GET DATA MBX");
+        Serial.println(i);
+        Serial.print("ID = ");Serial.print(id, HEX);
+        Serial.print(", DLC = ");Serial.print(len);
+        Serial.print(", data = ");
+        for(int i = 0; i<len; i++){    // print the data          
+              Serial.print(buf[i]);Serial.print("\t");
+          }
+        Serial.println();
+    }
+}
+
+unsigned char stmp[8][8] = {
+    {1, 2, 3, 4, 5, 6, 7, 8},
+    {2, 3, 4, 5, 6, 7, 8, 1},
+    {3, 4, 5, 6, 7, 8, 1, 2},
+    {1, 2, 3, 4, 5, 6, 7, 8},
+    {1, 2, 3, 4, 5, 6, 7, 8},
+    {1, 2, 3, 4, 5, 6, 7, 8},
+    {1, 2, 3, 4, 5, 6, 7, 8},
+    {0, 1, 2, 3, 4, 5, 6, 7}
+};
+
+unsigned char stmp1[8] =     {0, 1, 2, 3, 4, 5, 6, 7};
+    
+void loop1()
+{
+    int i, e;
+
+    for(e = 0;  e < 3; e++){
+        Serial.print("Send can message from mbx ");
+        Serial.println(e);
+        for(i = 1; i <= 8; i++){
+            while(CAN_SENDWAIT == CAN.checkSend(e)){delay(10);};
+            /* mailbox, ID, DLC, DATA */
+            CAN.sendMsg(e, i, i, stmp[i-1]);
+        }
+    }
+
+    delay(5000);
+}
Index: rtos_arduino/trunk/examples/NCESCan/r2ca_app.h
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/r2ca_app.h	(revision 260)
+++ rtos_arduino/trunk/examples/NCESCan/r2ca_app.h	(revision 260)
@@ -0,0 +1,6 @@
+#ifndef _R2CA_APP_H_
+#define _R2CA_APP_H_
+
+#define R2CA_NUM_TASK 1
+
+#endif /* _R2CA_APP_H_ */
Index: rtos_arduino/trunk/examples/NCESCan/rca.atsln
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/rca.atsln	(revision 204)
+++ 	(revision )
@@ -1,22 +1,0 @@
-﻿
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Atmel Studio Solution File, Format Version 11.00
-VisualStudioVersion = 14.0.23107.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "rca", "rca.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|ARM = Debug|ARM
-		Release|ARM = Release|ARM
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.ActiveCfg = Debug|ARM
-		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|ARM.Build.0 = Debug|ARM
-		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.ActiveCfg = Release|ARM
-		{DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|ARM.Build.0 = Release|ARM
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
Index: rtos_arduino/trunk/examples/NCESCan/rca.componentinfo.xml
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/rca.componentinfo.xml	(revision 204)
+++ 	(revision )
@@ -1,169 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
-	<ProjectComponents>
-		<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
-			<CApiVersion></CApiVersion>
-			<CBundle></CBundle>
-			<CClass>CMSIS</CClass>
-			<CGroup>CORE</CGroup>
-			<CSub></CSub>
-			<CVariant></CVariant>
-			<CVendor>ARM</CVendor>
-			<CVersion>3.40.0</CVersion>
-			<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
-			<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
-				<d4p1:anyType z:Id="i2" i:type="ProjectComponent">
-					<CApiVersion></CApiVersion>
-					<CBundle></CBundle>
-					<CClass>Device</CClass>
-					<CGroup>Startup</CGroup>
-					<CSub></CSub>
-					<CVariant></CVariant>
-					<CVendor>Atmel</CVendor>
-					<CVersion>1.0.0</CVersion>
-					<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
-					<DependentComponents />
-					<Description></Description>
-					<Files>
-						<d4p1:anyType i:type="FileInfo">
-							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\include</AbsolutePath>
-							<Attribute></Attribute>
-							<Category>include</Category>
-							<Condition>C</Condition>
-							<FileContentHash i:nil="true" />
-							<FileVersion></FileVersion>
-							<Name>samd21a/include</Name>
-							<SelectString></SelectString>
-							<SourcePath></SourcePath>
-						</d4p1:anyType>
-						<d4p1:anyType i:type="FileInfo">
-							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\include\sam.h</AbsolutePath>
-							<Attribute></Attribute>
-							<Category>header</Category>
-							<Condition>C</Condition>
-							<FileContentHash>wM94EGprD6Od4xKBsAzkFQ==</FileContentHash>
-							<FileVersion></FileVersion>
-							<Name>samd21a/include/sam.h</Name>
-							<SelectString></SelectString>
-							<SourcePath></SourcePath>
-						</d4p1:anyType>
-						<d4p1:anyType i:type="FileInfo">
-							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\templates\main.c</AbsolutePath>
-							<Attribute>template</Attribute>
-							<Category>source</Category>
-							<Condition>C Exe</Condition>
-							<FileContentHash>dSS7TLoDl1MS+uFZPgKPWQ==</FileContentHash>
-							<FileVersion></FileVersion>
-							<Name>samd21a/templates/main.c</Name>
-							<SelectString>Main file (.c)</SelectString>
-							<SourcePath></SourcePath>
-						</d4p1:anyType>
-						<d4p1:anyType i:type="FileInfo">
-							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\templates\main.cpp</AbsolutePath>
-							<Attribute>template</Attribute>
-							<Category>source</Category>
-							<Condition>C Exe</Condition>
-							<FileContentHash>nU+WlKcYaWh0AWBBS+WVpA==</FileContentHash>
-							<FileVersion></FileVersion>
-							<Name>samd21a/templates/main.cpp</Name>
-							<SelectString>Main file (.cpp)</SelectString>
-							<SourcePath></SourcePath>
-						</d4p1:anyType>
-						<d4p1:anyType i:type="FileInfo">
-							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\system_samd21.c</AbsolutePath>
-							<Attribute>config</Attribute>
-							<Category>source</Category>
-							<Condition>GCC Exe</Condition>
-							<FileContentHash>Qjqe1jYsYQB+vQG2A3hhiA==</FileContentHash>
-							<FileVersion></FileVersion>
-							<Name>samd21a/gcc/system_samd21.c</Name>
-							<SelectString></SelectString>
-							<SourcePath></SourcePath>
-						</d4p1:anyType>
-						<d4p1:anyType i:type="FileInfo">
-							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\startup_samd21.c</AbsolutePath>
-							<Attribute>config</Attribute>
-							<Category>source</Category>
-							<Condition>GCC Exe</Condition>
-							<FileContentHash>pLNlIy+Llw/GLgds0gbQQA==</FileContentHash>
-							<FileVersion></FileVersion>
-							<Name>samd21a/gcc/gcc/startup_samd21.c</Name>
-							<SelectString></SelectString>
-							<SourcePath></SourcePath>
-						</d4p1:anyType>
-						<d4p1:anyType i:type="FileInfo">
-							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\samd21g18a_flash.ld</AbsolutePath>
-							<Attribute>config</Attribute>
-							<Category>linkerScript</Category>
-							<Condition>GCC Exe</Condition>
-							<FileContentHash>4xbqLG5DtSn/T8pJoWAvNA==</FileContentHash>
-							<FileVersion></FileVersion>
-							<Name>samd21a/gcc/gcc/samd21g18a_flash.ld</Name>
-							<SelectString></SelectString>
-							<SourcePath></SourcePath>
-						</d4p1:anyType>
-						<d4p1:anyType i:type="FileInfo">
-							<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.222\samd21a\gcc\gcc\samd21g18a_sram.ld</AbsolutePath>
-							<Attribute>config</Attribute>
-							<Category>other</Category>
-							<Condition>GCC Exe</Condition>
-							<FileContentHash>K9GWjx6oZkcBnxrHUbvSwA==</FileContentHash>
-							<FileVersion></FileVersion>
-							<Name>samd21a/gcc/gcc/samd21g18a_sram.ld</Name>
-							<SelectString></SelectString>
-							<SourcePath></SourcePath>
-						</d4p1:anyType>
-					</Files>
-					<PackName>SAMD21_DFP</PackName>
-					<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/SAMD21_DFP/1.0.222/Atmel.SAMD21_DFP.pdsc</PackPath>
-					<PackVersion>1.0.222</PackVersion>
-					<PresentInProject>true</PresentInProject>
-					<ReferenceConditionId>ATSAMD21G18A</ReferenceConditionId>
-					<RteComponents>
-						<d4p1:string></d4p1:string>
-					</RteComponents>
-					<Status>Resolved</Status>
-					<VersionMode>Fixed</VersionMode>
-					<IsComponentInAtProject>true</IsComponentInAtProject>
-				</d4p1:anyType>
-			</DependentComponents>
-			<Description></Description>
-			<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
-				<d4p1:anyType i:type="FileInfo">
-					<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\4.2.0\CMSIS\Documentation\Core\html\index.html</AbsolutePath>
-					<Attribute></Attribute>
-					<Category>doc</Category>
-					<Condition></Condition>
-					<FileContentHash>Fm1Ae7doPh4708FZQAIEpw==</FileContentHash>
-					<FileVersion></FileVersion>
-					<Name>CMSIS\Documentation\Core\html\index.html</Name>
-					<SelectString></SelectString>
-					<SourcePath></SourcePath>
-				</d4p1:anyType>
-				<d4p1:anyType i:type="FileInfo">
-					<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\arm\cmsis\4.2.0\CMSIS\Include\</AbsolutePath>
-					<Attribute></Attribute>
-					<Category>include</Category>
-					<Condition></Condition>
-					<FileContentHash i:nil="true" />
-					<FileVersion></FileVersion>
-					<Name>CMSIS\Include\</Name>
-					<SelectString></SelectString>
-					<SourcePath></SourcePath>
-				</d4p1:anyType>
-			</Files>
-			<PackName>CMSIS</PackName>
-			<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/arm/cmsis/4.2.0/ARM.CMSIS.pdsc</PackPath>
-			<PackVersion>4.2.0</PackVersion>
-			<PresentInProject>true</PresentInProject>
-			<ReferenceConditionId>CMSIS Core</ReferenceConditionId>
-			<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
-				<d4p1:string></d4p1:string>
-			</RteComponents>
-			<Status>Resolved</Status>
-			<VersionMode>Fixed</VersionMode>
-			<IsComponentInAtProject>true</IsComponentInAtProject>
-		</ProjectComponent>
-		<ProjectComponent z:Ref="i2" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />
-	</ProjectComponents>
-</Store>
Index: rtos_arduino/trunk/examples/NCESCan/rca.cproj
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/rca.cproj	(revision 204)
+++ 	(revision )
@@ -1,168 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
-  <PropertyGroup>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectVersion>7.0</ProjectVersion>
-    <ToolchainName>com.Atmel.ARMGCC.C</ToolchainName>
-    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>
-    <avrdevice>ATSAMD21G18A</avrdevice>
-    <avrdeviceseries>none</avrdeviceseries>
-    <OutputType>Executable</OutputType>
-    <Language>C</Language>
-    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
-    <OutputFileExtension>.elf</OutputFileExtension>
-    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
-    <AssemblyName>rca</AssemblyName>
-    <Name>rca</Name>
-    <RootNamespace>rca</RootNamespace>
-    <ToolchainFlavour>Native</ToolchainFlavour>
-    <KeepTimersRunning>true</KeepTimersRunning>
-    <OverrideVtor>false</OverrideVtor>
-    <CacheFlash>true</CacheFlash>
-    <ProgFlashFromRam>true</ProgFlashFromRam>
-    <RamSnippetAddress>0x20000000</RamSnippetAddress>
-    <UncachedRange />
-    <preserveEEPROM>true</preserveEEPROM>
-    <OverrideVtorValue>exception_table</OverrideVtorValue>
-    <BootSegment>2</BootSegment>
-    <eraseonlaunchrule>4</eraseonlaunchrule>
-    <ExternalProgrammingToolCommand />
-    <AsfFrameworkConfig>
-      <framework-data xmlns="">
-        <options />
-        <configurations />
-        <files />
-        <documentation help="" />
-        <offline-documentation help="" />
-        <dependencies>
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />
-        </dependencies>
-      </framework-data>
-    </AsfFrameworkConfig>
-    <UseGdb>False</UseGdb>
-    <avrtool>com.atmel.avrdbg.tool.edbg</avrtool>
-    <avrtoolserialnumber>FFFFFFFFFFFFFFFFFFFF</avrtoolserialnumber>
-    <avrdeviceexpectedsignature>0x10010005</avrdeviceexpectedsignature>
-    <avrtoolinterface>SWD</avrtoolinterface>
-    <com_atmel_avrdbg_tool_edbg>
-      <ToolOptions>
-        <InterfaceProperties>
-          <SwdClock>2000000</SwdClock>
-        </InterfaceProperties>
-        <InterfaceName>SWD</InterfaceName>
-      </ToolOptions>
-      <ToolType>com.atmel.avrdbg.tool.edbg</ToolType>
-      <ToolNumber>FFFFFFFFFFFFFFFFFFFF</ToolNumber>
-      <ToolName>EDBG</ToolName>
-    </com_atmel_avrdbg_tool_edbg>
-    <avrtoolinterfaceclock>2000000</avrtoolinterfaceclock>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <ToolchainSettings>
-      <ArmGcc>
-  <armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
-  <armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
-  <armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
-  <armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
-  <armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
-  <armgcc.compiler.symbols.DefSymbols>
-    <ListValues>
-      <Value>NDEBUG</Value>
-    </ListValues>
-  </armgcc.compiler.symbols.DefSymbols>
-  <armgcc.compiler.directories.IncludePaths>
-    <ListValues>
-      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
-      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
-    </ListValues>
-  </armgcc.compiler.directories.IncludePaths>
-  <armgcc.compiler.optimization.level>Optimize for size (-Os)</armgcc.compiler.optimization.level>
-  <armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
-  <armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
-  <armgcc.linker.libraries.Libraries>
-    <ListValues>
-      <Value>libm</Value>
-    </ListValues>
-  </armgcc.linker.libraries.Libraries>
-  <armgcc.linker.libraries.LibrarySearchPaths>
-    <ListValues>
-      <Value>%24(ProjectDir)\Device_Startup</Value>
-    </ListValues>
-  </armgcc.linker.libraries.LibrarySearchPaths>
-  <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>
-  <armgcc.linker.miscellaneous.LinkerFlags>-Tsamd21g18a_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>
-  <armgcc.preprocessingassembler.general.IncludePaths>
-    <ListValues>
-      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
-      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
-    </ListValues>
-  </armgcc.preprocessingassembler.general.IncludePaths>
-</ArmGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <ToolchainSettings>
-      <ArmGcc>
-  <armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
-  <armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
-  <armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
-  <armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
-  <armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
-  <armgcc.compiler.symbols.DefSymbols>
-    <ListValues>
-      <Value>DEBUG</Value>
-    </ListValues>
-  </armgcc.compiler.symbols.DefSymbols>
-  <armgcc.compiler.directories.IncludePaths>
-    <ListValues>
-      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
-      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
-    </ListValues>
-  </armgcc.compiler.directories.IncludePaths>
-  <armgcc.compiler.optimization.level>Optimize (-O1)</armgcc.compiler.optimization.level>
-  <armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
-  <armgcc.compiler.optimization.DebugLevel>Maximum (-g3)</armgcc.compiler.optimization.DebugLevel>
-  <armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
-  <armgcc.linker.libraries.Libraries>
-    <ListValues>
-      <Value>libm</Value>
-    </ListValues>
-  </armgcc.linker.libraries.Libraries>
-  <armgcc.linker.libraries.LibrarySearchPaths>
-    <ListValues>
-      <Value>%24(ProjectDir)\Device_Startup</Value>
-    </ListValues>
-  </armgcc.linker.libraries.LibrarySearchPaths>
-  <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>
-  <armgcc.linker.miscellaneous.LinkerFlags>-Tsamd21g18a_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>
-  <armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>
-  <armgcc.preprocessingassembler.general.IncludePaths>
-    <ListValues>
-      <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>
-      <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value>
-    </ListValues>
-  </armgcc.preprocessingassembler.general.IncludePaths>
-  <armgcc.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcc.preprocessingassembler.debugging.DebugLevel>
-</ArmGcc>
-    </ToolchainSettings>
-    <UsesExternalMakeFile>True</UsesExternalMakeFile>
-    <OutputDirectory />
-    <BuildTarget>all</BuildTarget>
-    <CleanTarget>clean</CleanTarget>
-    <ExternalMakeFilePath>Makefile</ExternalMakeFilePath>
-  </PropertyGroup>
-  <ItemGroup>
-    <None Include="rca_app.cfg">
-      <SubType>compile</SubType>
-    </None>
-    <None Include="rca_app.cpp">
-      <SubType>compile</SubType>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="rca_app.h">
-      <SubType>compile</SubType>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
-</Project>
Index: rtos_arduino/trunk/examples/NCESCan/rca_app.cfg
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/rca_app.cfg	(revision 204)
+++ 	(revision )
@@ -1,8 +1,0 @@
-/*
- *  $Id: sample1.cfg 2416 2012-09-07 08:06:20Z ertl-hiro $
- */
-
-/*
- *  ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
- */
-INCLUDE("rca_lib.cfg");
Index: rtos_arduino/trunk/examples/NCESCan/rca_app.cpp
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/rca_app.cpp	(revision 204)
+++ 	(revision )
@@ -1,149 +1,0 @@
-#include "rca.h"
-
-// demo: CAN-BUS Shield, receive data
-#include <SPI.h>
-#include "mcp_can.h"
-#include <stdio.h>
-#define uint8_t unsigned char
-
-const int SPI_CS_PIN = 9;
-#define CAN_INT_PIN 3
-MCP_CAN CAN(SPI_CS_PIN);                                    // Set CS pin
-
-extern void MCP2515_ISR();
-
-/*
- *  CAN Controller : MCP2515
- *  TXB : MCP_TXB0:0, MCP_RXB1:1,MCP_RXB2:2
- *  RXB : MCP_RXB0:0 : Mask MCP_RXM0:0 : Filer MCP_RXF0:0, MCP_RXF1:1
- *        MCP_RXB1:1 : Mask MCP_RXM2:1 : Filer MCP_RXF2:2, MCP_RXF3:3, MCP_RXF4:4, MCP_RXF5:5
- *  Interrupt mask
- *    MCP_TX0IF
- *    MCP_TX1IF
- *    MCP_TX2IF
- *    MCP_RX0IF
- *    MCP_RX1IF
- */
-bool can_init_done = false;
-
-void setup()
-{
-    Serial.begin(115200);
-    pinMode(13, OUTPUT);
-
-    /*
-     *  CAN Initialize
-     */
-    if(CAN.begin(CAN_500KBPS) ==CAN_OK) {
-        Serial.print("can init ok!!\r\n");
-    }
-    else {
-        while(1){
-            Serial.print("Can init fail!!\r\n");
-            digitalWrite(13, HIGH); 
-            delay(500);             
-            digitalWrite(13, LOW);  
-            delay(500);             
-        };
-    }
-    
-    /*
-     *  CAN Recive mabx Init
-     */
-    
-    /*
-     *  RXB0
-     */
-    CAN.init_Mask(MCP_RXM0, 0x0f);
-    CAN.init_Filter(MCP_RXF0, 0x01);
-    CAN.init_Filter(MCP_RXF1, 0x02);
-    CAN.startReceive(MCP_RXB0);
-
-    /*
-     *  RXB1
-     */
-    CAN.init_Mask(MCP_RXM1, 0x0f);
-    CAN.init_Filter(MCP_RXF2, 0x03);
-    CAN.init_Filter(MCP_RXF3, 0x04);
-    CAN.init_Filter(MCP_RXF4, 0x05);
-    CAN.init_Filter(MCP_RXF5, 0x06);    
-    CAN.startReceive(MCP_RXB1);
-
-    CAN.enableInterrupt(MCP_RX0IF|MCP_RX1IF);
-    CAN.attachInterrupt(CAN_INT_PIN, MCP2515_ISR);
-
-    can_init_done = true;
-}
-
-uint8_t Flag_Recv = 0;
-
-void MCP2515_ISR()
-{
-     Flag_Recv = 1;
-}
-
-void loop()
-{
-    uint8_t len = 0;
-    uint8_t buf[8];
-    uint8_t i;
-    uint32_t id;    
-    
-    if(!Flag_Recv) {
-       delay(1);
-        return;
-    }
-      
-    Flag_Recv = 0;
-
-    for(i = 0; i < 2; i++){
-        if(CAN.checkReceive(i) == CAN_NOMSG) {
-            continue;
-        }       
-        CAN.readMsg(i, &id, &len, buf);    // read data,  len: data length, buf: data buf
-        Serial.print("CAN_BUS GET DATA MBX");
-        Serial.println(i);
-        Serial.print("ID = ");Serial.print(id, HEX);
-        Serial.print(", DLC = ");Serial.print(len);
-        Serial.print(", data = ");
-        for(int i = 0; i<len; i++){    // print the data          
-              Serial.print(buf[i]);Serial.print("\t");
-          }
-        Serial.println();
-    }
-}
-
-void task1_setup()
-{
-    while(can_init_done == false){delay(10);}
-}
-
-unsigned char stmp[8][8] = {
-    {1, 2, 3, 4, 5, 6, 7, 8},
-    {2, 3, 4, 5, 6, 7, 8, 1},
-    {3, 4, 5, 6, 7, 8, 1, 2},
-    {1, 2, 3, 4, 5, 6, 7, 8},
-    {1, 2, 3, 4, 5, 6, 7, 8},
-    {1, 2, 3, 4, 5, 6, 7, 8},
-    {1, 2, 3, 4, 5, 6, 7, 8},
-    {0, 1, 2, 3, 4, 5, 6, 7}
-};
-
-unsigned char stmp1[8] =     {0, 1, 2, 3, 4, 5, 6, 7};
-    
-void task1_loop()
-{
-    int i, e;
-
-    for(e = 0;  e < 3; e++){
-        Serial.print("Send can message from mbx ");
-        Serial.println(e);
-        for(i = 1; i <= 8; i++){
-            while(CAN_SENDWAIT == CAN.checkSend(e)){delay(10);};
-            /* mailbox, ID, DLC, DATA */
-            CAN.sendMsg(e, i, i, stmp[i-1]);
-        }
-    }
-
-    delay(5000);
-}
Index: rtos_arduino/trunk/examples/NCESCan/rca_app.h
===================================================================
--- rtos_arduino/trunk/examples/NCESCan/rca_app.h	(revision 204)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#ifndef _RCA_APP_H_
-#define _RCA_APP_H_
-
-#define RCA_NUM_TASK 1
-
-#endif /* _RCA_APP_H_ */
