Changeset 260 for rtos_arduino/trunk/examples/CompositeExample
- Timestamp:
- Oct 23, 2016, 8:29:46 PM (8 years ago)
- Location:
- rtos_arduino/trunk/examples/CompositeExample
- Files:
-
- 1 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
rtos_arduino/trunk/examples/CompositeExample/Makefile
r198 r260 7 7 # ã¢ããªã±ã¼ã·ã§ã³ãã¡ã¤ã« 8 8 # 9 APPL_CXXOBJS += r ca_app.o9 APPL_CXXOBJS += r2ca_app.o 10 10 APPL_COBJS += 11 APPL_CFG = r ca_app.cfg11 APPL_CFG = r2ca_app.cfg 12 12 13 13 # … … 32 32 33 33 # 34 # R CAã®ãã£ã¬ã¯ããªã®å®ç¾©34 # R2CAã®ãã£ã¬ã¯ããªã®å®ç¾© 35 35 # 36 R CA_DIR = ../..36 R2CA_DIR = ../.. 37 37 38 38 # … … 61 61 APPL_CXXOBJS += Adafruit_VCNL4000.o 62 62 63 APPL_DIR += $(R CA_DIR)/arduino_lib/libraries/ESP8266_Arudino_AT/63 APPL_DIR += $(R2CA_DIR)/arduino_lib/libraries/ESP8266_Arudino_AT/ 64 64 APPL_CXXOBJS += ESP8266.o 65 65 66 include $(R CA_DIR)/lib/Makefile.rca66 include $(R2CA_DIR)/lib/Makefile.r2ca -
rtos_arduino/trunk/examples/CompositeExample/r2ca.atsln
r255 r260 4 4 VisualStudioVersion = 14.0.23107.0 5 5 MinimumVisualStudioVersion = 10.0.40219.1 6 Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "r ca", "rca.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}"6 Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "r2ca", "r2ca.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}" 7 7 EndProject 8 8 Global -
rtos_arduino/trunk/examples/CompositeExample/r2ca.componentinfo.xml
r255 r260 23 23 <CVersion>1.0.0</CVersion> 24 24 <DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath> 25 <DependentComponents /> 25 <DependentComponents> 26 <d4p1:anyType z:Ref="i1" /> 27 </DependentComponents> 26 28 <Description></Description> 27 29 <Files> 28 30 <d4p1:anyType i:type="FileInfo"> 29 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.2 22\samd21a\include</AbsolutePath>31 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.231\samd21a\include</AbsolutePath> 30 32 <Attribute></Attribute> 31 33 <Category>include</Category> … … 38 40 </d4p1:anyType> 39 41 <d4p1:anyType i:type="FileInfo"> 40 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.2 22\samd21a\include\sam.h</AbsolutePath>42 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.231\samd21a\include\sam.h</AbsolutePath> 41 43 <Attribute></Attribute> 42 44 <Category>header</Category> … … 49 51 </d4p1:anyType> 50 52 <d4p1:anyType i:type="FileInfo"> 51 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.2 22\samd21a\templates\main.c</AbsolutePath>53 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.231\samd21a\templates\main.c</AbsolutePath> 52 54 <Attribute>template</Attribute> 53 55 <Category>source</Category> 54 56 <Condition>C Exe</Condition> 55 <FileContentHash> dSS7TLoDl1MS+uFZPgKPWQ==</FileContentHash>57 <FileContentHash>o0ncidL5gR0Z0YwWJ1YroQ==</FileContentHash> 56 58 <FileVersion></FileVersion> 57 59 <Name>samd21a/templates/main.c</Name> … … 60 62 </d4p1:anyType> 61 63 <d4p1:anyType i:type="FileInfo"> 62 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.2 22\samd21a\templates\main.cpp</AbsolutePath>64 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.231\samd21a\templates\main.cpp</AbsolutePath> 63 65 <Attribute>template</Attribute> 64 66 <Category>source</Category> … … 71 73 </d4p1:anyType> 72 74 <d4p1:anyType i:type="FileInfo"> 73 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.2 22\samd21a\gcc\system_samd21.c</AbsolutePath>75 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.231\samd21a\gcc\system_samd21.c</AbsolutePath> 74 76 <Attribute>config</Attribute> 75 77 <Category>source</Category> … … 82 84 </d4p1:anyType> 83 85 <d4p1:anyType i:type="FileInfo"> 84 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.2 22\samd21a\gcc\gcc\startup_samd21.c</AbsolutePath>86 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.231\samd21a\gcc\gcc\startup_samd21.c</AbsolutePath> 85 87 <Attribute>config</Attribute> 86 88 <Category>source</Category> … … 93 95 </d4p1:anyType> 94 96 <d4p1:anyType i:type="FileInfo"> 95 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.2 22\samd21a\gcc\gcc\samd21g18a_flash.ld</AbsolutePath>97 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.231\samd21a\gcc\gcc\samd21g18a_flash.ld</AbsolutePath> 96 98 <Attribute>config</Attribute> 97 99 <Category>linkerScript</Category> … … 104 106 </d4p1:anyType> 105 107 <d4p1:anyType i:type="FileInfo"> 106 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.2 22\samd21a\gcc\gcc\samd21g18a_sram.ld</AbsolutePath>108 <AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\SAMD21_DFP\1.0.231\samd21a\gcc\gcc\samd21g18a_sram.ld</AbsolutePath> 107 109 <Attribute>config</Attribute> 108 110 <Category>other</Category> … … 116 118 </Files> 117 119 <PackName>SAMD21_DFP</PackName> 118 <PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/SAMD21_DFP/1.0.2 22/Atmel.SAMD21_DFP.pdsc</PackPath>119 <PackVersion>1.0.2 22</PackVersion>120 <PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/SAMD21_DFP/1.0.231/Atmel.SAMD21_DFP.pdsc</PackPath> 121 <PackVersion>1.0.231</PackVersion> 120 122 <PresentInProject>true</PresentInProject> 121 123 <ReferenceConditionId>ATSAMD21G18A</ReferenceConditionId> -
rtos_arduino/trunk/examples/CompositeExample/r2ca.cproj
r255 r260 13 13 <OutputFileExtension>.elf</OutputFileExtension> 14 14 <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory> 15 <AssemblyName>r ca</AssemblyName>16 <Name>r ca</Name>17 <RootNamespace>r ca</RootNamespace>15 <AssemblyName>r2ca</AssemblyName> 16 <Name>r2ca</Name> 17 <RootNamespace>r2ca</RootNamespace> 18 18 <ToolchainFlavour>Native</ToolchainFlavour> 19 19 <KeepTimersRunning>true</KeepTimersRunning> … … 73 73 <armgcc.compiler.directories.IncludePaths> 74 74 <ListValues> 75 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>76 75 <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value> 76 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.231\samd21a\include</Value> 77 77 </ListValues> 78 78 </armgcc.compiler.directories.IncludePaths> … … 92 92 <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections> 93 93 <armgcc.linker.miscellaneous.LinkerFlags>-Tsamd21g18a_flash.ld</armgcc.linker.miscellaneous.LinkerFlags> 94 <armgcc.assembler.general.IncludePaths> 95 <ListValues> 96 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.231\samd21a\include</Value> 97 </ListValues> 98 </armgcc.assembler.general.IncludePaths> 94 99 <armgcc.preprocessingassembler.general.IncludePaths> 95 100 <ListValues> 96 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>97 101 <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value> 102 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.231\samd21a\include</Value> 98 103 </ListValues> 99 104 </armgcc.preprocessingassembler.general.IncludePaths> … … 116 121 <armgcc.compiler.directories.IncludePaths> 117 122 <ListValues> 118 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>119 123 <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value> 124 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.231\samd21a\include</Value> 120 125 </ListValues> 121 126 </armgcc.compiler.directories.IncludePaths> … … 136 141 <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections> 137 142 <armgcc.linker.miscellaneous.LinkerFlags>-Tsamd21g18a_flash.ld</armgcc.linker.miscellaneous.LinkerFlags> 143 <armgcc.assembler.general.IncludePaths> 144 <ListValues> 145 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.231\samd21a\include</Value> 146 </ListValues> 147 </armgcc.assembler.general.IncludePaths> 138 148 <armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel> 139 149 <armgcc.preprocessingassembler.general.IncludePaths> 140 150 <ListValues> 141 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.222\samd21a\include</Value>142 151 <Value>%24(PackRepoDir)\arm\cmsis\4.2.0\CMSIS\Include\</Value> 152 <Value>%24(PackRepoDir)\atmel\SAMD21_DFP\1.0.231\samd21a\include</Value> 143 153 </ListValues> 144 154 </armgcc.preprocessingassembler.general.IncludePaths> … … 153 163 </PropertyGroup> 154 164 <ItemGroup> 155 <None Include="r ca_app.cfg">165 <None Include="r2ca_app.cfg"> 156 166 <SubType>compile</SubType> 157 167 </None> 158 <None Include="r ca_app.cpp">168 <None Include="r2ca_app.cpp"> 159 169 <SubType>compile</SubType> 160 170 </None> 161 171 </ItemGroup> 162 172 <ItemGroup> 163 <Compile Include="r ca_app.h">173 <Compile Include="r2ca_app.h"> 164 174 <SubType>compile</SubType> 165 175 </Compile> -
rtos_arduino/trunk/examples/CompositeExample/r2ca_app.cfg
r255 r260 3 3 */ 4 4 5 INCLUDE("r ca_lib.cfg");5 INCLUDE("r2ca_lib.cfg"); 6 6 -
rtos_arduino/trunk/examples/CompositeExample/r2ca_app.cpp
r255 r260 1 #include "r ca.h"1 #include "r2ca.h" 2 2 #include "i2c_lcd.h" 3 3 … … 36 36 "; 37 37 38 extern void task1_setup(); 39 extern void task2_setup(); 40 extern void task3_setup(); 41 extern void task4_setup(); 42 extern void task5_setup(); 43 38 44 void setup(){ 39 45 Serial.begin(115200); … … 43 49 Serial.println("Main Task : setup start!"); 44 50 Serial.println(usage); 51 52 task1_setup(); 53 task2_setup(); 54 task3_setup(); 55 task4_setup(); 56 task5_setup(); 45 57 } 46 58 … … 59 71 #define SVC_PERROR(expr) svc_perror(__FILE__, __LINE__, #expr, (expr)) 60 72 61 ID tskid = R CA_TASK1;73 ID tskid = R2CA_TASK1; 62 74 int_t tskno = 1; 63 75 … … 77 89 case '1': 78 90 tskno = 1; 79 tskid = R CA_TASK1;91 tskid = R2CA_TASK1; 80 92 syslog(LOG_INFO, "Select Sensor Task."); 81 93 break; 82 94 case '2': 83 95 tskno = 2; 84 tskid = R CA_TASK2;96 tskid = R2CA_TASK2; 85 97 syslog(LOG_INFO, "Select Web Task."); 86 98 break; 87 99 case '3': 88 100 tskno = 3; 89 tskid = R CA_TASK3;101 tskid = R2CA_TASK3; 90 102 syslog(LOG_INFO, "Select LED Task."); 91 103 break; 92 104 case '4': 93 105 tskno = 4; 94 tskid = R CA_TASK4;106 tskid = R2CA_TASK4; 95 107 syslog(LOG_INFO, "Select TFT Task."); 96 108 break; 97 109 case '5': 98 110 tskno = 5; 99 tskid = R CA_TASK5;111 tskid = R2CA_TASK5; 100 112 syslog(LOG_INFO, "Select Processing Task."); 101 113 break; … … 346 358 } 347 359 348 void task1_loop() {360 void loop1() { 349 361 static uint32_t sensor_cyc_tim = 0; 350 362 … … 554 566 555 567 556 void task2_loop()568 void loop2() 557 569 { 558 570 uint8_t buffer[128] = {0}; … … 622 634 } 623 635 624 void task3_loop() {636 void loop3() { 625 637 static bool gled1_blink_state = false; 626 638 static bool gled2_blink_state = false; … … 772 784 int loop_cnt = 0;; 773 785 774 void task4_loop() {786 void loop4() { 775 787 // don't do anything if the image wasn't loaded correctly. 776 788 if (logo.isValid() == false) { … … 833 845 #define TIMEOUT_MS 3000 834 846 835 void task5_loop()847 void loop5() 836 848 { 837 849 if(!processing_connected){ … … 848 860 uint16_t dispatch_cnt; 849 861 850 load = 100 - map(r ca_idle_result, 0, IDLE_TASK_IDLE_LOOP_10MS/10, 0, 100);851 isr_cnt = (r ca_isr_result > 0xffff)? 0xffff : rca_isr_result;852 dispatch_cnt = (r ca_dispatch_result > 0xffff)? 0xffff : rca_dispatch_result;862 load = 100 - map(r2ca_idle_result, 0, IDLE_TASK_IDLE_LOOP_10MS/10, 0, 100); 863 isr_cnt = (r2ca_isr_result > 0xffff)? 0xffff : r2ca_isr_result; 864 dispatch_cnt = (r2ca_dispatch_result > 0xffff)? 0xffff : r2ca_dispatch_result; 853 865 854 866 if (PSERIAL.available()){ -
rtos_arduino/trunk/examples/CompositeExample/r2ca_app.h
r255 r260 1 #ifndef _R CA_APP_H_2 #define _R CA_APP_H_1 #ifndef _R2CA_APP_H_ 2 #define _R2CA_APP_H_ 3 3 4 #define R CA_NUM_TASK 54 #define R2CA_NUM_TASK 5 5 5 6 6 /* 7 7 * Use Serial3 8 8 */ 9 #define R CA_USE_SERIAL39 #define R2CA_USE_SERIAL3 10 10 11 #define R CA_TASK2_LOOP_PRI 4 //Web12 #define R CA_TASK3_LOOP_PRI 3 //LED13 #define R CA_TASK4_LOOP_PRI 7 //TFT14 #define R CA_TASK5_LOOP_PRI 6 //Processing11 #define R2CA_TASK2_LOOP_PRI 4 //Web 12 #define R2CA_TASK3_LOOP_PRI 3 //LED 13 #define R2CA_TASK4_LOOP_PRI 7 //TFT 14 #define R2CA_TASK5_LOOP_PRI 6 //Processing 15 15 16 #define R CA_ENABLE_PROFILING17 #define R CA_PROFILING_CYC_MS 116 #define R2CA_ENABLE_PROFILING 17 #define R2CA_PROFILING_CYC_MS 1 18 18 19 #endif /* _R CA_APP_H_ */19 #endif /* _R2CA_APP_H_ */
Note:
See TracChangeset
for help on using the changeset viewer.