This commit is contained in:
Wolfgang Hottgenroth 2014-05-14 19:37:04 +02:00
commit ca8ed709b8
22 changed files with 1468 additions and 0 deletions

67
.cproject Normal file
View File

@ -0,0 +1,67 @@
<?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="it.baeyens.arduino.core.toolChain.release.400069008">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="it.baeyens.arduino.core.toolChain.release.400069008" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" 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.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="it.baeyens.arduino.core.toolChain.release.400069008" name="Release" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="it.baeyens.arduino.core.toolChain.release.400069008.1343116614" name="/" resourcePath="">
<toolChain id="it.baeyens.arduino.core.toolChain.release.2059795453" name="it.baeyens.arduino.core.toolChain.release" superClass="it.baeyens.arduino.core.toolChain.release">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="it.baeyens.arduino.targetplatform.785553459" name="Arduino Target" osList="all" superClass="it.baeyens.arduino.targetplatform"/>
<builder buildPath="${workspace_loc:/NetMeterBusMaster2}/Release" id="it.baeyens.arduino.sketch.builder.2118456783" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Arduino sketch builder" superClass="it.baeyens.arduino.sketch.builder"/>
<tool id="it.baeyens.arduino.tool.sketch.compiler.cpp.442521309" name="Arduino C++ Compiler" superClass="it.baeyens.arduino.tool.sketch.compiler.cpp">
<option id="it.baeyens.arduino.compiler.cpp.sketch.option.incpath.1534135165" name="Include Paths (-I)" superClass="it.baeyens.arduino.compiler.cpp.sketch.option.incpath" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/arduino/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/Ethernet}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/Ethernet/utility}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/SPI}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/EEPROM}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/Streaming}&quot;"/>
</option>
<inputType id="it.baeyens.arduino.compiler.cpp.sketch.input.1988694850" name="CPP source files" superClass="it.baeyens.arduino.compiler.cpp.sketch.input"/>
</tool>
<tool id="it.baeyens.arduino.tool.compiler.c.1177223344" name="Arduino C Compiler" superClass="it.baeyens.arduino.tool.compiler.c">
<option id="it.baeyens.arduino.compiler.c.sketch.option.incpath.420249303" name="Include Paths (-I)" superClass="it.baeyens.arduino.compiler.c.sketch.option.incpath" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/arduino/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/Ethernet}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/Ethernet/utility}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/SPI}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/EEPROM}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/NetMeterBusMaster2/Libraries/Streaming}&quot;"/>
</option>
<inputType id="it.baeyens.arduino.compiler.c.sketch.input.1905071279" name="C Source Files" superClass="it.baeyens.arduino.compiler.c.sketch.input"/>
</tool>
<tool id="it.baeyens.arduino.tool.ar.1960217344" name="Arduino archiver" superClass="it.baeyens.arduino.tool.ar"/>
<tool id="it.baeyens.arduino.tool.combine.649346910" name="Arduino combiner" superClass="it.baeyens.arduino.tool.combine"/>
<tool id="it.baeyens.arduino.tool.objcopy.eep.2038346519" name="Arduino tool Create eeprom" superClass="it.baeyens.arduino.tool.objcopy.eep"/>
<tool id="it.baeyens.arduino.tool.objcopy.flash.1009260605" name="Arduino tool Create hex" superClass="it.baeyens.arduino.tool.objcopy.flash"/>
<tool id="it.baeyens.arduino.tool.size.2023431554" name="Arduino tool Print Size" superClass="it.baeyens.arduino.tool.size"/>
</toolChain>
</folderInfo>
<sourceEntries>
<entry excluding="Libraries/*/?xamples" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="NetMeterBusMaster2.null.1049158770" name="NetMeterBusMaster2"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope"/>
</cproject>

69
.project Normal file
View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>NetMeterBusMaster2</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.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>it.baeyens.arduinonature</nature>
</natures>
<linkedResources>
<link>
<name>Libraries/EEPROM</name>
<type>2</type>
<locationURI>ArduinoHardwareLibPath/EEPROM</locationURI>
</link>
<link>
<name>Libraries/Ethernet</name>
<type>2</type>
<locationURI>ArduinoHardwareLibPath/Ethernet</locationURI>
</link>
<link>
<name>Libraries/SPI</name>
<type>2</type>
<locationURI>ArduinoHardwareLibPath/SPI</locationURI>
</link>
<link>
<name>Libraries/Streaming</name>
<type>2</type>
<locationURI>ArduinoPivateLibPath/Streaming</locationURI>
</link>
<link>
<name>arduino/core</name>
<type>2</type>
<locationURI>ArduinoPlatformPath/cores/teensy3</locationURI>
</link>
</linkedResources>
<variableList>
<variable>
<name>ArduinoHardwareLibPath</name>
<value>file:/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/all/libraries</value>
</variable>
<variable>
<name>ArduinoPinPath</name>
<value>file:/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/all/variants</value>
</variable>
<variable>
<name>ArduinoPlatformPath</name>
<value>file:/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/all</value>
</variable>
</variableList>
</projectDescription>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="it.baeyens.arduino.core.toolChain.release.400069008" name="Release">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider class="it.baeyens.arduino.toolchain.ArduinoLanguageProvider" console="false" env-hash="-2011256820" id="it.baeyens.arduino.languageSettingsProvider" keep-relative-paths="false" name="Arduino Compiler Settings" parameter="${COMMAND} -E -P -v -dD ${INPUTS}" 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>

View File

@ -0,0 +1,357 @@
eclipse.preferences.version=1
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.ARCHITECTURE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.ARCHITECTURE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.ARCHITECTURE/value=all
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.ARCHIVE_FILE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.ARCHIVE_FILE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.ARCHIVE_FILE/value=teensy.ar
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BOOTLOADER.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BOOTLOADER.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BOOTLOADER.PATH/value=undefined
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ARCH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ARCH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ARCH/value=ALL
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ARCHITECTURE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ARCHITECTURE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ARCHITECTURE/value=arm-none-eabi
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.AR/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.AR/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.AR/value=arm-none-eabi-ar
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.G++/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.G++/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.G++/value=arm-none-eabi-g++
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.GCC/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.GCC/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.GCC/value=arm-none-eabi-gcc
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.OBJCOPY/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.OBJCOPY/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.OBJCOPY/value=arm-none-eabi-objcopy
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.OBJDUMP/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.OBJDUMP/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.OBJDUMP/value=arm-none-eabi-objdump
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.SIZE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.SIZE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.COMMAND.SIZE/value=arm-none-eabi-size
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CORE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CORE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CORE/value=teensy3
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CPPOPTION1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CPPOPTION1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CPPOPTION1/value=-fno-rtti
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CPU/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CPU/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.CPU/value=cortex-m4
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEFINE0/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEFINE0/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEFINE0/value=-DUSB_SERIAL
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEFINE1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEFINE1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEFINE1/value=-DLAYOUT_US_ENGLISH
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEPENDENCY/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEPENDENCY/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.DEPENDENCY/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ELIDE_CONSTRUCTORS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ELIDE_CONSTRUCTORS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.ELIDE_CONSTRUCTORS/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.EXTRA_FLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.EXTRA_FLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.EXTRA_FLAGS/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.F_CPU/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.F_CPU/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.F_CPU/value=24000000
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.GNU0X/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.GNU0X/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.GNU0X/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LDSCRIPT/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LDSCRIPT/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LDSCRIPT/value=teensy/all/cores/teensy3/mk20dx256.ld
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LINKOPTION1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LINKOPTION1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LINKOPTION1/value=-mthumb
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LINKSCRIPT/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LINKSCRIPT/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.LINKSCRIPT/value=mk20dx256.ld
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.MCU/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.MCU/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.MCU/value=cortex-m4
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.NOARCHIVE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.NOARCHIVE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.NOARCHIVE/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION1/value=-mthumb
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION2/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION2/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION2/value=-nostdlib
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION3/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION3/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.OPTION3/value=-D__MK20DX256__
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.PATH/value=${ProjDirPath}/${ConfigName}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.POST_COMPILE_SCRIPT/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.POST_COMPILE_SCRIPT/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.POST_COMPILE_SCRIPT/value=teensy_post_compile
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.PROJECT_NAME/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.PROJECT_NAME/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.PROJECT_NAME/value=${ProjName}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.TIME_T/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.TIME_T/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.TIME_T/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.USE_ARCHIVER/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.USE_ARCHIVER/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.USE_ARCHIVER/value=false
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.VARIANT.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.VARIANT.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.BUILD.VARIANT.PATH/value=/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/all/variants/${A.BUILD.VARIANT}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CMD.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CMD.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CMD.PATH/value=${A.TOOLS.AVRDUDE.CMD.PATH}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CMD/value=${A.TOOLS.BOSSAC.CMD}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.AR.CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.AR.CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.AR.CMD/value=avr-ar
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.AR.FLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.AR.FLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.AR.FLAGS/value=rcs
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.CMD/value=avr-gcc
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.ELF.CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.ELF.CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.ELF.CMD/value=avr-gcc
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.ELF.FLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.ELF.FLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.ELF.FLAGS/value=-Os -Wl,--gc-sections
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.FLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.FLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.C.FLAGS/value=-c -g -Os -w -ffunction-sections -fdata-sections -MMD
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.CPP.CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.CPP.CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.CPP.CMD/value=avr-g++
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.CPP.FLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.CPP.FLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.CPP.FLAGS/value=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.ELF2HEX.CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.ELF2HEX.CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.ELF2HEX.CMD/value=avr-objcopy
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.ELF2HEX.FLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.ELF2HEX.FLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.ELF2HEX.FLAGS/value=-O ihex -R .eeprom
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.LDFLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.LDFLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.LDFLAGS/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.OBJCOPY.CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.OBJCOPY.CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.OBJCOPY.CMD/value=avr-objcopy
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.OBJCOPY.EEP.FLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.OBJCOPY.EEP.FLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.OBJCOPY.EEP.FLAGS/value=-O ihex -j .eeprom --set-section-flags\=.eeprom\=alloc,load --no-change-warnings --change-section-lma .eeprom\=0
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.PATH/value=${A.RUNTIME.IDE.PATH}/hardware/tools/avr/bin/
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.S.FLAGS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.S.FLAGS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.S.FLAGS/value=-c -g -assembler-with-cpp
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH.LINUX/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH.LINUX/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH.LINUX/value=${A.RUNTIME.HARDWARE.PATH}/teensy/tools/linux/arm-none-eabi/bin/
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH.WINDOWS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH.WINDOWS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH.WINDOWS/value=${A.RUNTIME.HARDWARE.PATH}/teensy/tools/windows/arm-none-eabi/bin/
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SAM.PATH/value=${A.RUNTIME.HARDWARE.PATH}/teensy/tools/mac/arm-none-eabi/bin/
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SIZE.CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SIZE.CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.COMPILER.SIZE.CMD/value=avr-size
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CONFIG.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CONFIG.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.CONFIG.PATH/value=${A.TOOLS.AVRDUDE.CONFIG.PATH}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.NAME/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.NAME/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.NAME/value=Teensy 3.1
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.PATH/value=${A.TOOLS.BOSSAC.PATH}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.AR.PATTERN.1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.AR.PATTERN.1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.AR.PATTERN.1/value="${A.COMPILER.SAM.PATH}arm-none-eabi-ar" -r "${A.BUILD.PATH}/${A.ARCHIVE_FILE}" ${A.OBJECT_FILE}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.AR.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.AR.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.AR.PATTERN/value="${A.COMPILER.SAM.PATH}arm-none-eabi-ar" -r "${A.BUILD.PATH}/${A.ARCHIVE_FILE}" ${A.OBJECT_FILE}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN.1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN.1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN.1/value="${A.COMPILER.SAM.PATH}arm-none-eabi-gcc" -Os -Wl,--gc-sections -mcpu\=${A.BUILD.MCU} -mthumb "-T${A.RUNTIME.HARDWARE.PATH}/${A.BUILD.LDSCRIPT}" -o "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN.2/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN.2/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN.2/value=\ -L"${A.BUILD.PATH}" -lm
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.COMBINE.PATTERN/value="${A.COMPILER.SAM.PATH}arm-none-eabi-gcc" -Os -Wl,--gc-sections -mcpu\=${A.BUILD.MCU} -mthumb "-T${A.RUNTIME.HARDWARE.PATH}/${A.BUILD.LDSCRIPT}" -o "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf" ${A.OBJECT_FILES} -L"${A.BUILD.PATH}" -lm
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.1/value="${A.COMPILER.SAM.PATH}arm-none-eabi-gcc" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib -mcpu\=${A.BUILD.MCU} -DF_CPU\=${A.BUILD.F_CPU} -DTIME_T\=1365449461 ${A.BUILD.DEFINE0} ${A.BUILD.DEFINE1} -MMD -D${A.SOFTWARE}\=${A.RUNTIME.IDE.VERSION} ${A.BUILD.EXTRA_FLAGS} -mthumb -D__MK20DX256__ ${A.INCLUDES}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.2/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.2/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.2/value=\ -o
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.3/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.3/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN.3/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.C.O.PATTERN/value="${A.COMPILER.SAM.PATH}arm-none-eabi-gcc" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib -mcpu\=${A.BUILD.MCU} -DF_CPU\=${A.BUILD.F_CPU} -DTIME_T\=1365449461 ${A.BUILD.DEFINE0} ${A.BUILD.DEFINE1} -MMD -D${A.SOFTWARE}\=${A.RUNTIME.IDE.VERSION} ${A.BUILD.EXTRA_FLAGS} -mthumb -D__MK20DX256__ ${A.INCLUDES} "${A.SOURCE_FILE}" -o "${A.OBJECT_FILE}"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.1/value="${A.COMPILER.SAM.PATH}arm-none-eabi-g++" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib -fno-rtti -fno-exceptions -mcpu\=${A.BUILD.MCU} -DF_CPU\=${A.BUILD.F_CPU} ${A.BUILD.DEFINE0} ${A.BUILD.DEFINE1} -MMD -D${A.SOFTWARE}\=${A.RUNTIME.IDE.VERSION} ${A.BUILD.EXTRA_FLAGS} -mthumb -D__MK20DX256__ -felide-constructors -std\=gnu++0x ${A.INCLUDES}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.2/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.2/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.2/value=\ -o
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.3/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.3/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN.3/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.CPP.O.PATTERN/value="${A.COMPILER.SAM.PATH}arm-none-eabi-g++" -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib -fno-rtti -fno-exceptions -mcpu\=${A.BUILD.MCU} -DF_CPU\=${A.BUILD.F_CPU} ${A.BUILD.DEFINE0} ${A.BUILD.DEFINE1} -MMD -D${A.SOFTWARE}\=${A.RUNTIME.IDE.VERSION} ${A.BUILD.EXTRA_FLAGS} -mthumb -D__MK20DX256__ -felide-constructors -std\=gnu++0x ${A.INCLUDES} "${A.SOURCE_FILE}" -o "${A.OBJECT_FILE}"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.EEP.PATTERN.1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.EEP.PATTERN.1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.EEP.PATTERN.1/value="${A.COMPILER.SAM.PATH}arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags\=.eeprom\=alloc,load --no-change-warnings --change-section-lma .eeprom\=0 "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf" "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.eep"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.EEP.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.EEP.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.EEP.PATTERN/value="${A.COMPILER.SAM.PATH}arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags\=.eeprom\=alloc,load --no-change-warnings --change-section-lma .eeprom\=0 "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf" "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.eep"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.HEX.PATTERN.1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.HEX.PATTERN.1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.HEX.PATTERN.1/value="${A.COMPILER.SAM.PATH}arm-none-eabi-objcopy" -O ihex -R .eeprom "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf" "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.hex"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.HEX.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.HEX.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.OBJCOPY.HEX.PATTERN/value="${A.COMPILER.SAM.PATH}arm-none-eabi-objcopy" -O ihex -R .eeprom "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf" "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.hex"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.PATTERN.1/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.PATTERN.1/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.PATTERN.1/value="${A.COMPILER.SAM.PATH}arm-none-eabi-size" -A "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.PATTERN/value="${A.COMPILER.SAM.PATH}arm-none-eabi-size" -A "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.REGEX/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.REGEX/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RECIPE.SIZE.REGEX/value=Total\\s+([0-9]+).*
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.HARDWARE.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.HARDWARE.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.HARDWARE.PATH/value=/Applications/Arduino.app/Contents/Resources/Java/hardware
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.IDE.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.IDE.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.IDE.PATH/value=/Applications/Arduino.app/Contents/Resources/Java
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.IDE.VERSION/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.IDE.VERSION/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.RUNTIME.IDE.VERSION/value=152
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SERIAL.RESTART_CMD/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SERIAL.RESTART_CMD/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SERIAL.RESTART_CMD/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SERIAL.SAFE_BAUD_RATES_ONLY/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SERIAL.SAFE_BAUD_RATES_ONLY/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SERIAL.SAFE_BAUD_RATES_ONLY/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SOFTWARE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SOFTWARE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.SOFTWARE/value=ARDUINO
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CMD.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CMD.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CMD.PATH/value=${A.TOOLS.TEENSY_REBOOT.CONFIG.PATH}/
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH.LINUX/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH.LINUX/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH.LINUX/value=${A.RUNTIME.HARDWARE.PATH}/teensy/tools/linux
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH.WINDOWS/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH.WINDOWS/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH.WINDOWS/value=${A.RUNTIME.HARDWARE.PATH}/teensy/tools/windows
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.CONFIG.PATH/value=${A.RUNTIME.HARDWARE.PATH}/teensy/tools/mac
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.NAME/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.NAME/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.NAME/value=Teensy upload
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP1.NAME/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP1.NAME/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP1.NAME/value=Teensy post compile
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP1.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP1.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP1.PATTERN/value=${A.TOOLS.TEENSY_REBOOT.CMD.PATH}teensy_post_compile -path\=${A.BUILD.PATH} -file\=${A.BUILD.PROJECT_NAME} -tools\=${A.TOOLS.TEENSY_REBOOT.CONFIG.PATH} -board\=${A.NAME}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP2.NAME/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP2.NAME/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP2.NAME/value=Teensy reboot
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP2.PATTERN/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP2.PATTERN/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.STEP2.PATTERN/value=${A.TOOLS.TEENSY_REBOOT.CMD.PATH}teensy_reboot -v
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.UPLOAD.PARAMS.QUIET/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.UPLOAD.PARAMS.QUIET/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.UPLOAD.PARAMS.QUIET/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.UPLOAD.PARAMS.VERBOSE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.UPLOAD.PARAMS.VERBOSE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.TOOLS.TEENSY_REBOOT.UPLOAD.PARAMS.VERBOSE/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.DISABLE_FLUSHING/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.DISABLE_FLUSHING/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.DISABLE_FLUSHING/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.MAXIMUM_RAM_SIZE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.MAXIMUM_RAM_SIZE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.MAXIMUM_RAM_SIZE/value=65536
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.MAXIMUM_SIZE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.MAXIMUM_SIZE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.MAXIMUM_SIZE/value=262144
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.PROTOCOL/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.PROTOCOL/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.PROTOCOL/value=halfkay
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.SPEED/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.SPEED/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.SPEED/value=12000000
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.TOOL/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.TOOL/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/A.UPLOAD.TOOL/value=teensy_reboot
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.BOARDS_FILE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.BOARDS_FILE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.BOARDS_FILE/value=/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/all/boards.txt
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.BOARD_NAME/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.BOARD_NAME/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.BOARD_NAME/value=Teensy 3.1
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.COM_PORT/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.COM_PORT/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.COM_PORT/value=/dev
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.CPU\ Speed/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.CPU\ Speed/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.CPU\ Speed/value=24 MHz
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.C.COMPILE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.C.COMPILE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.C.COMPILE/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.COMPILE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.COMPILE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.COMPILE/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.CPP.COMPILE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.CPP.COMPILE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.EXTRA.CPP.COMPILE/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.Keyboard\ Layout/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.Keyboard\ Layout/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.Keyboard\ Layout/value=US English
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.PLATFORM_FILE/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.PLATFORM_FILE/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.PLATFORM_FILE/value=/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/all/platform.txt
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.Processor/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.Processor/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.Processor/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.SIZE.SWITCH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.SIZE.SWITCH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.SIZE.SWITCH/value=${A.RECIPE.SIZE.PATTERN}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.SIZE_COMMAND/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.SIZE_COMMAND/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.SIZE_COMMAND/value="${A.COMPILER.PATH}${A.COMPILER.SIZE.CMD}" --format\=avr --mcu\=${A.BUILD.MCU} "${A.BUILD.PATH}/${A.BUILD.PROJECT_NAME}.elf"
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.TEMPLATE_FOLDER/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.TEMPLATE_FOLDER/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.TEMPLATE_FOLDER/value=
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.TEMPLATE_USE_DEFAULT/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.TEMPLATE_USE_DEFAULT/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.TEMPLATE_USE_DEFAULT/value=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.USB\ Type/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.USB\ Type/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/JANTJE.USB\ Type/value=Serial
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/PATH/delimiter=\:
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/PATH/operation=replace
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/PATH/value=${A.COMPILER.PATH}${PathDelimiter}${A.BUILD.GENERIC.PATH}${PathDelimiter}${PATH}
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/append=true
environment/project/it.baeyens.arduino.core.toolChain.release.400069008/appendContributed=true

64
NetMeterBusMaster2.cpp Normal file
View File

@ -0,0 +1,64 @@
// Do not remove the include below
// #include <HardwareSerial.h>
#include "NetMeterBusMaster2.h"
#include "cmd.h"
#include "test.h"
#include "uptime.h"
#include "meterBusServer.h"
#include "meterBusMaster.h"
#include "overCurrentProt.h"
#include <Ethernet.h>
const uint8_t POWER_LED = 4;
const uint8_t ETHERNET_RESET = 14;
static uint8_t mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEF };
static CmdServer cmdServer(2000);
static TestCmd testCmd;
static Uptime uptime;
static MeterBusMaster meterBusMaster;
static MeterBusServer meterBusServer(2001, &meterBusMaster);
static OverCurrentProt overCurrentProt;
void setup() {
Serial.begin(115200);
delay(100);
Serial.println("Starting up ...");
pinMode(POWER_LED, OUTPUT);
digitalWrite(POWER_LED, LOW);
pinMode(ETHERNET_RESET, OUTPUT);
digitalWrite(ETHERNET_RESET, LOW);
delay(100);
digitalWrite(ETHERNET_RESET, HIGH);
delay(100);
Ethernet.begin(mac);
Serial.println("Ethernet started");
cmdServer.begin();
testCmd.registerYourself(&cmdServer);
uptime.begin(&cmdServer);
overCurrentProt.begin(&cmdServer);
meterBusMaster.begin(&cmdServer);
meterBusServer.begin();
digitalWrite(POWER_LED, HIGH);
}
void loop() {
cmdServer.exec();
uptime.exec();
overCurrentProt.exec();
meterBusMaster.exec();
meterBusServer.exec();
}

29
NetMeterBusMaster2.h Normal file
View File

@ -0,0 +1,29 @@
// Only modify this file to include
// - function definitions (prototypes)
// - include files
// - extern variable definitions
// In the appropriate section
#ifndef NetMeterBusPowerMaster_H_
#define NetMeterBusPowerMaster_H_
#include "Arduino.h"
//add your includes for the project NetMeterBusPowerMaster here
//end of add your includes here
#ifdef __cplusplus
extern "C" {
#endif
void loop();
void setup();
#ifdef __cplusplus
} // extern "C"
#endif
//add your function definitions for the project NetMeterBusPowerMaster here
//Do not add code below this line
#endif /* NetMeterBusPowerMaster_H_ */

102
cmd.cpp Normal file
View File

@ -0,0 +1,102 @@
#include "cmd.h"
#include "fatal.h"
void Cmd::registerYourself(CmdServer *cmdServer) {
if (cmdServer) {
cmdServer->registerCmd(this);
}
}
CmdServer::CmdServer(uint16_t port) :
m_server(port), m_client(255), cmd(""), params(""), cmdListIdx(0)
{
}
void CmdServer::begin() {
m_server.begin();
}
void CmdServer::exec() {
static uint8_t state = 0;
bool done = false;
m_client = m_server.available();
if (m_client) {
int chi;
while ((chi = m_client.read()) != -1) {
char ch = (char) chi;
switch (state) {
case 0:
if ((ch != ' ') && (ch != '\n')) {
cmd += ch;
} else if (ch == '\n') {
done = true;
} else {
state = 1;
}
break;
case 1:
if (ch != '\n') {
params += ch;
} else {
done = true;
state = 0;
}
break;
}
if (done) {
parseCommand();
cmd = "";
params = "";
}
}
}
}
void CmdServer::registerCmd(Cmd *cmdObj) {
if (cmdListIdx < NUM_OF_COMMANDS) {
cmdList[cmdListIdx] = cmdObj;
cmdListIdx++;
} else {
fatal(FATAL_NOT_ENOUGH_CMD_SLOTS);
}
}
void CmdServer::parseCommand() {
//m_client.println("cmd: " + cmd);
//m_client.println("params: " + params);
if (cmd.equalsIgnoreCase("quit")) {
m_client.println("good bye");
m_client.flush();
m_client.stop();
} else if (cmd.equalsIgnoreCase("help")) {
for (uint8_t i = 0; i < cmdListIdx; i++) {
Cmd *c = cmdList[i];
m_client.println(c->getCmdName() + " " + c->getHelp());
}
m_client.println("HELP help");
m_client.println("QUIT quit");
} else {
// m_client.print("cmdListIdx: "); m_client.println(cmdListIdx);
bool found = false;
for (uint8_t i = 0; i < cmdListIdx; i++) {
// m_client.println("Check: " + cmdList[i]->getCmdName());
if (cmdList[i]->getCmdName().equalsIgnoreCase(cmd)) {
found = true;
// m_client.println("cmd found");
cmdList[i]->setClient(&m_client);
cmdList[i]->setServer(&m_server);
String res = cmdList[i]->exec(params);
m_client.println(res);
break;
}
}
if (! found)
m_client.println("command not found");
}
}

47
cmd.h Normal file
View File

@ -0,0 +1,47 @@
#ifndef CMD_H_
#define CMD_H_
#include <stdint.h>
#include <Ethernet.h>
#include <EthernetServer.h>
#include <EthernetClient.h>
#include <WString.h>
static const uint8_t NUM_OF_COMMANDS = 10;
class CmdServer;
class Cmd {
public:
virtual ~Cmd() {};
void setClient(EthernetClient *p_client) { m_client = p_client; };
void setServer(EthernetServer *p_server) { m_server = p_server; };
virtual String exec(String params) =0;
virtual String getCmdName() =0;
virtual String getHelp() =0;
virtual void registerYourself(CmdServer *cmdServer);
protected:
EthernetClient *m_client;
EthernetServer *m_server;
};
class CmdServer {
public:
CmdServer(uint16_t port);
void begin();
void exec();
void registerCmd(Cmd *cmdObj);
private:
void parseCommand();
EthernetServer m_server;
EthernetClient m_client;
String cmd;
String params;
uint8_t cmdListIdx;
Cmd *cmdList[NUM_OF_COMMANDS];
};
#endif /* CMD_H_ */

10
fatal.cpp Normal file
View File

@ -0,0 +1,10 @@
#include <avr/interrupt.h>
#include"fatal.h"
void fatal(uint8_t code) {
// do something with the code and somehow show that there is a problem
while (1);
}

15
fatal.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef FATAL_H_
#define FATAL_H_
#include <stdint.h>
const uint8_t FATAL_UNKNOWN = 1;
const uint8_t FATAL_NOT_ENOUGH_CMD_SLOTS = 2;
const uint8_t FATAL_BUFFER_OVERFLOW = 10;
void fatal(uint8_t code);
#endif /* FATAL_H_ */

20
mBusDialog.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef MBUS_DIALOG_H_
#define MBUS_DIALOG_H_
#include <stdint.h>
class ResponseCallback {
public:
virtual void sendResponse(uint8_t *responseBuffer, uint16_t responseBufferLength) =0;
virtual void sendError(uint8_t code) = 0;
};
class RequestSender {
public:
virtual uint8_t *getSendBuffer() =0;
virtual void sendBufferReady(uint16_t bufLen, ResponseCallback *responseCallback) =0;
};
#endif /* MBUS_DIALOG_H_ */

279
meterBusMaster.cpp Normal file
View File

@ -0,0 +1,279 @@
#include <Arduino.h>
#include <stdio.h>
#include <WString.h>
#include <Print.h>
#include <HardwareSerial.h>
#include "meterBusMaster.h"
// #include "config.h"
#include "fatal.h"
#include <Streaming.h>
uint8_t charToNibble(char i) {
uint8_t r = 99;
if ((i >= '0') && (i <= '9')) {
r = i - '0';
} else if ((i >= 'a') && (i <= 'f')) {
r = i - 'a' + 10;
} else if ((i >= 'A') && (i <= 'F')) {
r = i - 'A' + 10;
}
return r;
}
uint16_t stringToUInt8(String i, uint8_t index) {
uint16_t r = 999;
char b0 = i[index];
uint8_t c0 = charToNibble(b0);
char b1 = i[index + 1];
uint8_t c1 = charToNibble(b1);
if ((c0 <= 15) && (c1 <= 15)) {
r = (c0 << 4) | c1;
}
return r;
}
// =====================================================================================================
String CalibrationSupport::exec(String params) {
String res = "failed";
MeterBusMaster *mbm = (MeterBusMaster*)m_meterBusMaster;
if (params.equalsIgnoreCase("sample") && enable) {
mbm->sample();
res = "done";
} else if (params.equalsIgnoreCase("hold") && enable) {
mbm->hold();
res = "done";
} else if (params.equalsIgnoreCase("enable") && ! enable) {
enable = true;
mbm->m_calibration = true;
res = "enabled";
} else if (params.equalsIgnoreCase("disable") && enable) {
enable = false;
mbm->m_calibration = false;
res = "disabled";
}
return res;
}
String MeasureCurrent::exec(String params) {
int currentInVal = analogRead(CURRENT_IN);
int current = ((double)currentInVal * U_UNIT) / R_SHUNT;
return String() + current + String("mA");
}
String SendOctets::exec(String params) {
bool err = false;;
uint16_t sendBufLen = 0;
uint8_t *sendBuffer = m_meterBusMaster->getSendBuffer();
if (sendBuffer == 0) {
err = true;
} else {
uint16_t n;
for (uint16_t j = 0; j < params.length(); j+=3) {
n = stringToUInt8(params, j);
if (n == 999) {
err = true;
break;
}
if (sendBufLen >= SEND_BUFFER_SIZE)
fatal(FATAL_BUFFER_OVERFLOW + 2);
*(sendBuffer+sendBufLen) = n;
sendBufLen++;
}
}
if (err) {
return "error";
} else {
m_meterBusMaster->sendBufferReady(sendBufLen, this);
return "success";
}
}
void SendOctets::sendResponse(uint8_t *responseBuffer, uint16_t responseBufferLength) {
Print *out = m_server;
out->print("SO RESP: ");
uint16_t i = 0;
while (true) {
if (responseBuffer[i] <= 0x0f) {
out->print("0");
}
out->print(responseBuffer[i], HEX);
out->print(" ");
i++;
if (i == responseBufferLength) {
break;
}
}
out->println("");
}
void SendOctets::sendError(uint8_t code) {
switch (code) {
case 1:
m_server->println("SO RESP: no resp.");
break;
}
}
// =====================================================================================================
MeterBusMaster::MeterBusMaster() : m_sendOctets(this), m_measureCurrent(this),
m_calibrationSupport(this),
m_cmdReadyToSend(false), m_cmdReadyFromRecv(false), m_expectResponse(false),
m_sendBufLen(0), m_recvBufLen(0), m_retransmitCount(0), m_responseCallback(0),
m_sampling(true), m_calibration(false) {
pinMode(RX_EN_PIN, OUTPUT);
digitalWrite(RX_EN_PIN, RX_DISABLE);
Serial3.begin(2400);
UART2_C1 |= UART_C1_PE | UART_C1_M;
}
void MeterBusMaster::begin(CmdServer *cmdServer) {
m_sendOctets.registerYourself(cmdServer);
m_measureCurrent.registerYourself(cmdServer);
m_calibrationSupport.registerYourself(cmdServer);
}
uint8_t *MeterBusMaster::getSendBuffer() {
return m_expectResponse ? 0 : m_sendBuffer;
}
void MeterBusMaster::sendBufferReady(uint16_t sendBufLen, ResponseCallback *responseCallback) {
m_cmdReadyToSend = true;
m_retransmitCount = 0;
m_sendBufLen = sendBufLen;
m_responseCallback = responseCallback;
}
void MeterBusMaster::prepareResponse(bool err, uint8_t in) {
static int16_t expectedChars = -1;
static uint8_t state = 0;
if (err) {
if (m_responseCallback != 0) {
m_responseCallback->sendError(1);
}
expectedChars = 0;
state = 0;
m_expectResponse = false;
m_responseCallback = 0;
} else {
switch (state) {
case 0:
m_recvBufLen = 0;
if (in == 0xe5) {
state = 2;
expectedChars = 0;
} else if (in == 0x10) {
state = 2;
expectedChars = 4;
} else if (in == 0x68) {
state = 1;
expectedChars = -1;
}
break;
case 1:
expectedChars = (int16_t)in;
expectedChars += 4;
state = 2;
break;
case 2:
expectedChars--;
break;
}
if (m_recvBufLen >= RECEIVE_BUFFER_SIZE)
fatal(FATAL_BUFFER_OVERFLOW + 1);
m_recvBuffer[m_recvBufLen] = in;
m_recvBufLen++;
if (expectedChars == 0) {
if (m_responseCallback != 0) {
m_responseCallback->sendResponse(m_recvBuffer, m_recvBufLen);
}
m_expectResponse = false;
state = 0;
m_responseCallback = 0;
}
}
}
void MeterBusMaster::sample() {
if (! m_sampling) {
m_sampling = true;
digitalWrite(RX_EN_PIN, RX_DISABLE);
}
}
void MeterBusMaster::hold() {
if (m_sampling) {
m_sampling = false;
digitalWrite(RX_EN_PIN, RX_ENABLE);
}
}
void MeterBusMaster::exec() {
if (! m_calibration) {
static unsigned long cmdSendTime = 0;
if (m_cmdReadyToSend) {
sample();
Serial << "MeterBusMaster: sending " << m_sendBufLen << " octets." << endl;
Serial3.write(m_sendBuffer, m_sendBufLen);
Serial3.flush();
hold();
m_cmdReadyToSend = false;
m_expectResponse = true;
cmdSendTime = millis();
}
if (! m_expectResponse) {
sample();
}
// timeout
if (m_expectResponse && ((millis() - cmdSendTime) > RESPONSE_TIMEOUT)) {
m_retransmitCount++;
if (m_retransmitCount > 2) {
m_expectResponse = false;
prepareResponse(true, 0);
} else {
m_cmdReadyToSend = true;
}
}
int serialInChar = Serial3.read();
if (serialInChar != -1) {
Serial << "Got: " << _HEX(serialInChar) << endl;
}
if ((serialInChar != -1) && m_expectResponse) {
prepareResponse(false, (uint8_t)serialInChar);
}
}
}
// =====================================================================================================

90
meterBusMaster.h Normal file
View File

@ -0,0 +1,90 @@
#ifndef METERBUSMASTER_H_
#define METERBUSMASTER_H_
#include <WString.h>
#include <Print.h>
#include "cmd.h"
#include "mBusDialog.h"
const unsigned long RESPONSE_TIMEOUT = 2000; // millisecond
const uint8_t RX_EN_PIN = 2;
const uint8_t RX_ENABLE = LOW;
const uint8_t RX_DISABLE = HIGH;
const uint8_t CURRENT_IN = A1;
const double U_UNIT = 4.9; // mV
const double R_SHUNT = 10.0;
class SendOctets : public Cmd, public ResponseCallback {
public:
SendOctets(RequestSender *meterBusMaster) : m_meterBusMaster(meterBusMaster) {}
virtual String getCmdName() { return "SO"; }
virtual String getHelp() { return "Send octets"; }
virtual String exec(String params);
virtual void sendResponse(uint8_t *responseBuffer, uint16_t responseBufferLength);
virtual void sendError(uint8_t code);
private:
RequestSender *m_meterBusMaster;
};
class MeasureCurrent : public Cmd {
public:
MeasureCurrent(RequestSender *meterBusMaster) : m_meterBusMaster(meterBusMaster) {}
virtual String getCmdName() { return "MC"; }
virtual String getHelp() { return "Measure current"; }
virtual String exec(String params);
private:
RequestSender *m_meterBusMaster;
};
class CalibrationSupport : public Cmd {
public:
CalibrationSupport(RequestSender *meterBusMaster) : m_meterBusMaster(meterBusMaster), enable(false) {}
virtual String getCmdName() { return "CS"; }
virtual String getHelp() { return "Calibration Support"; }
virtual String exec(String params);
private:
RequestSender *m_meterBusMaster;
bool enable;
};
const uint8_t SEND_BUFFER_SIZE = 30;
const uint8_t RECEIVE_BUFFER_SIZE = 180;
class MeterBusMaster : public RequestSender {
public:
MeterBusMaster();
void begin(CmdServer *cmdServer);
void exec();
uint8_t *getSendBuffer();
void sendBufferReady(uint16_t bufLen, ResponseCallback *responseCallback);
friend class CalibrationSupport;
private:
SendOctets m_sendOctets;
MeasureCurrent m_measureCurrent;
CalibrationSupport m_calibrationSupport;
bool m_cmdReadyToSend;
bool m_cmdReadyFromRecv;
bool m_expectResponse;
uint16_t m_sendBufLen;
uint16_t m_recvBufLen;
uint8_t m_retransmitCount;
ResponseCallback *m_responseCallback;
uint8_t m_sendBuffer[SEND_BUFFER_SIZE];
uint8_t m_recvBuffer[RECEIVE_BUFFER_SIZE];
bool m_sampling;
bool m_calibration;
void prepareResponse(bool err, uint8_t in);
void sample();
void hold();
};
#endif /* METERBUSMASTER_H_ */

41
meterBusServer.cpp Normal file
View File

@ -0,0 +1,41 @@
#include "mBusDialog.h"
#include "meterBusServer.h"
#include <Streaming.h>
MeterBusServer::MeterBusServer(uint16_t port, RequestSender *meterBusMaster) :
m_server(port), m_client(255), m_meterBusMaster(meterBusMaster) {
}
void MeterBusServer::sendResponse(uint8_t *responseBuffer, uint16_t responseBufferLength) {
m_server.write(responseBuffer, responseBufferLength);
}
void MeterBusServer::sendError(uint8_t code) {
}
void MeterBusServer::begin() {
m_server.begin();
}
void MeterBusServer::exec() {
m_client = m_server.available();
if (m_client) {
uint16_t sendBufLen = 0;
uint8_t *sendBuffer = m_meterBusMaster->getSendBuffer();
if (sendBuffer != 0) {
int chi;
while ((chi = m_client.read()) != -1) {
char ch = (char) chi;
*(sendBuffer + sendBufLen) = ch;
sendBufLen++;
}
m_meterBusMaster->sendBufferReady(sendBufLen, this);
}
}
}

31
meterBusServer.h Normal file
View File

@ -0,0 +1,31 @@
/*
* meterBusServer.h
*
* Created on: 16.09.2013
* Author: wn
*/
#ifndef METERBUSSERVER_H_
#define METERBUSSERVER_H_
#include <Ethernet.h>
#include "mBusDialog.h"
class MeterBusServer : public ResponseCallback {
public:
MeterBusServer(uint16_t port, RequestSender *meterBusMaster);
void begin();
void exec();
virtual void sendResponse(uint8_t *responseBuffer, uint16_t responseBufferLength);
virtual void sendError(uint8_t code);
private:
EthernetServer m_server;
EthernetClient m_client;
RequestSender *m_meterBusMaster;
};
#endif /* METERBUSSERVER_H_ */

68
overCurrentProt.cpp Normal file
View File

@ -0,0 +1,68 @@
#include <arduino.h>
#include <stdint.h>
#include "overCurrentProt.h"
volatile bool overCurrentMarker;
void overCurrentProtServiceRoutine() {
// switch off current
digitalWrite(CURRENT_SHUTDOWN, CURRENT_OFF);
// set marker
overCurrentMarker = true;
Serial.println("X");
}
OverCurrentProtCmd::OverCurrentProtCmd(OverCurrentProt *overCurrentProt) : m_overCurrentProt(overCurrentProt) {
}
String OverCurrentProtCmd::exec(String params) {
return String("") + m_overCurrentProt->getEventCnt();
}
OverCurrentResetCmd::OverCurrentResetCmd(OverCurrentProt *overCurrentProt) : m_overCurrentProt(overCurrentProt) {
}
String OverCurrentResetCmd::exec(String params) {
m_overCurrentProt->resetEventCnt();
return "done";
}
OverCurrentProt::OverCurrentProt() : m_overCurrentProtCmd(this), m_overCurrentResetCmd(this),
m_eventCnt(0), m_timestamp(0) {
}
void OverCurrentProt::begin(CmdServer *cmdServer) {
m_overCurrentProtCmd.registerYourself(cmdServer);
m_overCurrentResetCmd.registerYourself(cmdServer);
pinMode(CURRENT_SHUTDOWN, OUTPUT);
digitalWrite(CURRENT_SHUTDOWN, CURRENT_ON);
overCurrentMarker = false;
pinMode(CURRENT_INTERRUPT, INPUT);
attachInterrupt(CURRENT_INTERRUPT, overCurrentProtServiceRoutine, FALLING);
Serial.println("OC ready");
}
void OverCurrentProt::exec() {
if ((m_timestamp == 0) && overCurrentMarker) {
m_eventCnt++;
m_timestamp = millis();
}
if ((m_timestamp != 0) && ((m_timestamp + TURN_ON_DELAY) < millis())) {
overCurrentMarker = false;
m_timestamp = 0;
digitalWrite(CURRENT_SHUTDOWN, CURRENT_ON);
}
}

56
overCurrentProt.h Normal file
View File

@ -0,0 +1,56 @@
#ifndef OVERCURRENTPROT_H_
#define OVERCURRENTPROT_H_
#include "cmd.h"
#define CURRENT_SHUTDOWN 5
#define CURRENT_ON 0
#define CURRENT_OFF 1
#define CURRENT_INTERRUPT 3
const unsigned long TURN_ON_DELAY = 2000; // ms
class OverCurrentProt;
class OverCurrentProtCmd : public Cmd {
public:
OverCurrentProtCmd(OverCurrentProt *overCurrentProt);
virtual String getCmdName() { return "OCPC"; }
virtual String getHelp() { return "OCP count"; }
virtual String exec(String params);
private:
OverCurrentProt *m_overCurrentProt;
};
class OverCurrentResetCmd : public Cmd {
public:
OverCurrentResetCmd(OverCurrentProt *overCurrentProt);
virtual String getCmdName() { return "OCRST"; }
virtual String getHelp() { return "OCP reset"; }
virtual String exec(String params);
private:
OverCurrentProt *m_overCurrentProt;
};
class OverCurrentProt {
public:
OverCurrentProt();
void begin(CmdServer *cmdServer);
void exec();
uint32_t getEventCnt() { return m_eventCnt; };
void resetEventCnt() { m_eventCnt = 0; };
private:
OverCurrentProtCmd m_overCurrentProtCmd;
OverCurrentResetCmd m_overCurrentResetCmd;
uint32_t m_eventCnt;
unsigned long m_timestamp;
};
#endif /* OVERCURRENTPROT_H_ */

2
spec.d Normal file
View File

@ -0,0 +1,2 @@
spec.o: \
/Users/wn/Documents/workspace/.metadata/.plugins/org.eclipse.cdt.managedbuilder.core/spec.C

7
test.cpp Normal file
View File

@ -0,0 +1,7 @@
#include <WString.h>
#include "test.h"
String TestCmd::exec(String params) {
return "Result of testCmd";
}

14
test.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef TEST_H_
#define TEST_H_
#include "cmd.h"
class TestCmd : public Cmd {
public:
virtual String getCmdName() { return "TEST"; }
virtual String getHelp() { return "Just a test command"; }
virtual String exec(String params);
};
#endif /* TEST_H_ */

48
uptime.cpp Normal file
View File

@ -0,0 +1,48 @@
#include <WString.h>
#include "uptime.h"
#include <Streaming.h>
UptimeCmd::UptimeCmd(Uptime *uptime) : m_uptime(uptime) {
}
String UptimeCmd::exec(String params) {
return m_uptime->getDays() + String(" ") +
m_uptime->getHours() + String(":") + m_uptime->getMinutes() + String(":") + m_uptime->getSeconds();
}
Uptime::Uptime() : m_uptimeCmd(this), m_seconds(0), m_minutes(0), m_hours(0), m_days(0) {
}
void Uptime::begin(CmdServer *cmdServer) {
m_uptimeCmd.registerYourself(cmdServer);
}
void Uptime::exec() {
static unsigned long lastMillis = 0;
unsigned long currentMillis = millis();
if (currentMillis >= (lastMillis + 1000)) {
m_seconds += ((currentMillis - lastMillis) / 1000);
if (m_seconds >= 60) {
m_seconds -= 60;
m_minutes++;
if (m_minutes >= 60) {
m_minutes -= 60;
m_hours++;
if (m_hours >= 24) {
m_hours -= 24;
m_days++;
}
}
}
lastMillis = currentMillis;
Serial << m_days << ", " << m_hours << ":" << m_minutes << ":" << m_seconds << endl;
}
}

39
uptime.h Normal file
View File

@ -0,0 +1,39 @@
#ifndef UPTIME_H_
#define UPTIME_H_
#include "cmd.h"
class Uptime;
class UptimeCmd : public Cmd {
public:
UptimeCmd(Uptime *uptime);
virtual String getCmdName() { return "UP"; }
virtual String getHelp() { return "Uptime"; }
virtual String exec(String params);
private:
Uptime *m_uptime;
};
class Uptime {
public:
Uptime();
void begin(CmdServer *cmdServer);
void exec();
uint8_t getSeconds() { return m_seconds; };
uint8_t getMinutes() { return m_minutes; };
uint8_t getHours() { return m_hours; };
uint8_t getDays() { return m_days; };
private:
UptimeCmd m_uptimeCmd;
uint8_t m_seconds;
uint8_t m_minutes;
uint8_t m_hours;
uint16_t m_days;
};
#endif /* TEST_H_ */