Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2018-07-15 01:14:45 +0300
committerDavid Crocker <dcrocker@eschertech.com>2018-07-15 01:14:45 +0300
commit1758dc9812585ff1b4a055fb4f4b5038a5dabc50 (patch)
treef54471d1ed16d10dc72e77e611f56a95cae6de30
parent035701a2f2025a8afd261dc3358d19254f7e0c77 (diff)
Added PCCB configuration
Added support for PCCB Moves stepper driver support into a separate folder
-rw-r--r--.cproject131
-rw-r--r--.settings/language.settings.xml23
-rw-r--r--src/Alligator/Pins_Alligator.h2
-rw-r--r--src/BugList.txt3
-rw-r--r--src/Duet/Pins_Duet.h2
-rw-r--r--src/DuetM/Pins_DuetM.h6
-rw-r--r--src/DuetNG/Pins_DuetNG.h6
-rw-r--r--src/GCodes/GCodes2.cpp10
-rw-r--r--src/Pccb/Network.cpp46
-rw-r--r--src/Pccb/Network.h49
-rw-r--r--src/Pccb/Pins_Pccb.h162
-rw-r--r--src/Pins.h27
-rw-r--r--src/Platform.cpp15
-rw-r--r--src/Platform.h12
-rw-r--r--src/RADDS/Pins_RADDS.h2
-rw-r--r--src/SAME70_TEST/Pins_SAME70_TEST.h15
-rw-r--r--src/StepperDrivers/TMC22xx/TMC22xx.cpp (renamed from src/DuetM/TMC22xx.cpp)6
-rw-r--r--src/StepperDrivers/TMC22xx/TMC22xx.h (renamed from src/DuetM/TMC22xx.h)10
-rw-r--r--src/StepperDrivers/TMC2660/TMC2660.cpp (renamed from src/DuetNG/TMC2660.cpp)6
-rw-r--r--src/StepperDrivers/TMC2660/TMC2660.h (renamed from src/DuetNG/TMC2660.h)4
20 files changed, 481 insertions, 56 deletions
diff --git a/.cproject b/.cproject
index a08d73f1..7d14e854 100644
--- a/.cproject
+++ b/.cproject
@@ -110,7 +110,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/Alligator|src/Duet/Lwip/lwip/src/core/ipv6|src/Duet/Lwip/lwip/test|src/SAME70_TEST|src/Display|src/Networking|src/DuetNG|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Pccb|src/Alligator|src/Duet/Lwip/lwip/src/core/ipv6|src/Duet/Lwip/lwip/test|src/SAME70_TEST|src/Display|src/Networking|src/DuetNG|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -220,7 +220,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/Networking|src/Alligator|src/SAME70_TEST|src/Display|src/Duet|src/DuetNG|src/DuetM" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Pccb|src/Alligator|src/SAME70_TEST|src/Display|src/Duet|src/Networking|src/DuetNG|src/DuetM" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -341,7 +341,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/Networking|src/Duet/Lwip/lwip/src/core/ipv6|src/Networking|src/DuetNG|src/Alligator/Lwip/lwip/src/include/ipv6|src/Alligator/Lwip/lwip/test|src/Duet/MCP4461|src/Duet/Lwip/lwip/test|src/SAME70_TEST|src/Display|src/DuetM|src/Alligator/Lwip/lwip/src/core/ipv6|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Pccb|src/Duet/Lwip/lwip/src/core/ipv6|src/Duet/Lwip/lwip/test|src/SAME70_TEST|src/Display|src/Networking|src/DuetNG|src/Alligator/Lwip/lwip/src/include/ipv6|src/Alligator/Lwip/lwip/test|src/DuetM|src/Duet/MCP4461|src/Alligator/Lwip/lwip/src/core/ipv6|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -461,7 +461,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/Networking/LwipEthernet|src/Alligator|src/SAME70_TEST|src/Display|src/Duet|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Pccb|src/Alligator|src/SAME70_TEST|src/Display|src/Duet|src/Networking/LwipEthernet|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -581,7 +581,7 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/DuetNG|src/Networking/ESP8266WiFi|src/Networking/LwipEthernet|src/Alligator|src/SAME70_TEST|src/Duet|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Pccb|src/Alligator|src/SAME70_TEST|src/Duet|src/Networking/ESP8266WiFi|src/Networking/LwipEthernet|src/DuetNG|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
@@ -715,7 +715,126 @@
</toolChain>
</folderInfo>
<sourceEntries>
- <entry excluding="src/Networking/W5500Ethernet|src/DuetNG/DuetWiFi|src/Duet|src/DuetNG/DuetEthernet/Wiznet/Internet/SNTP|src/DuetNG|src/Networking/LwipEthernet/Lwip/test|src/DuetNG/DuetEthernet/Wiznet/Internet/DNS|src/DuetNG/DuetEthernet/Wiznet/Application|src/DuetNG/DuetEthernet/Wiznet/Internet/MQTT|src/Alligator|src/Display|src/Networking/LwipEthernet/Lwip/src/apps/mqtt|src/Networking/LwipEthernet/Lwip/doc|src/DuetNG/DuetEthernet/Wiznet/Internet/TFTP|src/DuetNG/DuetEthernet/Ethernet3|src/Networking/LwipEthernet/Lwip/src/apps/snmp|src/Networking/LwipEthernet/Lwip/src/apps/httpd|src/DuetNG/DuetEthernet/Wiznet/Internet/FTPServer|src/DuetNG/DuetEthernet/Ethernet3/examples|src/Networking/LwipEthernet/Lwip/src/apps/tftp|src/Networking/LwipEthernet/Lwip/src/netif/ppp|src/Networking/LwipEthernet/Lwip/src/apps/lwiperf|src/DuetNG/DuetEthernet/Wiznet/Internet/FTPClient|src/Networking/LwipEthernet/Lwip/src/apps/sntp|src/DuetNG/DuetEthernet/Wiznet/Internet/httpServer|src/DuetNG/DuetEthernet/Wiznet/Internet/SNMP|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry excluding="src/Pccb|src/DuetNG/DuetWiFi|src/Duet|src/DuetNG/DuetEthernet/Wiznet/Internet/SNTP|src/DuetNG|src/Networking/LwipEthernet/Lwip/test|src/DuetNG/DuetEthernet/Wiznet/Internet/DNS|src/DuetNG/DuetEthernet/Wiznet/Application|src/Networking/W5500Ethernet|src/DuetNG/DuetEthernet/Wiznet/Internet/MQTT|src/Alligator|src/Display|src/Networking/LwipEthernet/Lwip/src/apps/mqtt|src/Networking/LwipEthernet/Lwip/doc|src/DuetNG/DuetEthernet/Wiznet/Internet/TFTP|src/DuetNG/DuetEthernet/Ethernet3|src/Networking/LwipEthernet/Lwip/src/apps/snmp|src/Networking/LwipEthernet/Lwip/src/apps/httpd|src/DuetNG/DuetEthernet/Wiznet/Internet/FTPServer|src/DuetNG/DuetEthernet/Ethernet3/examples|src/Networking/LwipEthernet/Lwip/src/apps/tftp|src/Networking/LwipEthernet/Lwip/src/netif/ppp|src/Networking/LwipEthernet/Lwip/src/apps/lwiperf|src/DuetNG/DuetEthernet/Wiznet/Internet/FTPClient|src/Networking/LwipEthernet/Lwip/src/apps/sntp|src/DuetNG/DuetEthernet/Wiznet/Internet/httpServer|src/DuetNG/DuetEthernet/Wiznet/Internet/SNMP|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.170574622.649587786.1798324396">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.170574622.649587786.1798324396" moduleId="org.eclipse.cdt.core.settings" name="PCCB">
+ <macros>
+ <stringMacro name="LinkFlags2" type="VALUE_TEXT" value="-Wl,--end-group -lm"/>
+ <stringMacro name="LinkFlags1" type="VALUE_TEXT" value="-mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group"/>
+ <stringMacro name="CoreName" type="VALUE_TEXT" value="CoreNG"/>
+ <stringMacro name="GccPath" type="VALUE_TEXT" value="C:\Program Files (x86)\GNU Tools ARM Embedded\7 2018-q2-update\bin"/>
+ </macros>
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="elf" artifactName="PccbFirmware" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.170574622.649587786.1798324396" name="PCCB" parent="cdt.managedbuild.config.gnu.cross.exe.release" postannouncebuildStep="Generating binary file" postbuildStep="arm-none-eabi-objcopy -O binary ${workspace_loc:/${ProjName}/${ConfigName}}/${BuildArtifactFileBaseName}.elf ${workspace_loc:/${ProjName}/${ConfigName}}/${BuildArtifactFileBaseName}.bin">
+ <folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.170574622.649587786.1798324396." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.1017317107" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
+ <option id="cdt.managedbuild.option.gnu.cross.path.1932906636" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" useByScannerDiscovery="false" value="${GccPath}" valueType="string"/>
+ <option id="cdt.managedbuild.option.gnu.cross.prefix.1572241044" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/>
+ <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.185324036" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
+ <builder buildPath="${workspace_loc:/RepRapFirmware}/Release" id="cdt.managedbuild.builder.gnu.cross.1082169056" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
+ <tool id="cdt.managedbuild.tool.gnu.cross.assembler.1148717304" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2143813580" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" id="cdt.managedbuild.tool.gnu.cross.c.compiler.1981974117" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
+ <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1510743318" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.c.optimization.level.more" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.debugging.level.1424949241" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.misc.verbose.623464210" name="Verbose (-v)" superClass="gnu.c.compiler.option.misc.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/>
+ <option id="gnu.c.compiler.option.misc.other.1167454821" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -std=gnu99 -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections -nostdlib -Wdouble-promotion -fsingle-precision-constant &quot;-Wa,-ahl=$*.s&quot;" valueType="string"/>
+ <option id="gnu.c.compiler.option.include.paths.531615654" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/cores/arduino}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/Storage}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/common/utils}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/common/services/ioport}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/cmsis/sam4s/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/header_files}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/preprocessor}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/thirdparty/CMSIS/Include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/variants/sam4s}&quot;"/>
+ </option>
+ <option id="gnu.c.compiler.option.preprocessor.def.symbols.507583566" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="__SAM4S8C__"/>
+ <listOptionValue builtIn="false" value="RTOS"/>
+ <listOptionValue builtIn="false" value="PCCB"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.562849016" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1448735774" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
+ <tool id="cdt.managedbuild.tool.gnu.cross.archiver.886333230" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
+ <tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${LinkFlags1} &quot;${workspace_loc}/${CoreName}/SAM4S_RTOS/cores/arduino/syscalls.o&quot; ${INPUTS} ${LinkFlags2}" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.687537254" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
+ <option id="gnu.cpp.link.option.nostdlibs.1719677032" name="No startup or default libs (-nostdlib)" superClass="gnu.cpp.link.option.nostdlibs" useByScannerDiscovery="false" value="false" valueType="boolean"/>
+ <option id="gnu.cpp.link.option.paths.2028936348" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/SAM4S_RTOS/}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/FreeRTOS/SAM4S}&quot;"/>
+ </option>
+ <option id="gnu.cpp.link.option.libs.1421214818" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs">
+ <listOptionValue builtIn="false" value="${CoreName}"/>
+ <listOptionValue builtIn="false" value="FreeRTOS"/>
+ </option>
+ <option id="gnu.cpp.link.option.flags.633609481" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-Os --specs=nano.specs -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m4 -T${workspace_loc:/${CoreName}/variants/sam4s/linker_scripts/gcc/flash.ld} -Wl,-Map,${workspace_loc:/${ProjName}/${ConfigName}}/${BuildArtifactFileBaseName}.map" valueType="string"/>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.96746585" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool command="g++" id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.972255361" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
+ <option id="gnu.cpp.compiler.option.optimization.level.820933483" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.more" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.option.debugging.level.1785551954" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.option.other.verbose.1038790030" name="Verbose (-v)" superClass="gnu.cpp.compiler.option.other.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/>
+ <option id="gnu.cpp.compiler.option.other.other.1212511140" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -std=gnu++14 -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wdouble-promotion -fsingle-precision-constant &quot;-Wa,-ahl=$*.s&quot;" valueType="string"/>
+ <option id="gnu.cpp.compiler.option.include.paths.1648844124" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/cores/arduino}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/Flash}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/SharedSpi}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/Storage}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/libraries/Wire}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/common/utils}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/common/services/clock}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/common/services/ioport}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/drivers}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/services/flash_efc}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/cmsis/sam4s/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/header_files}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/sam/utils/preprocessor}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/asf/thirdparty/CMSIS/Include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${CoreName}/variants/sam4s}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/Pccb}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/DuetWiFiSocketServer/src/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/FreeRTOS/src/include}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/FreeRTOS/src/portable/GCC/ARM_CM3}&quot;"/>
+ </option>
+ <option id="gnu.cpp.compiler.option.preprocessor.def.249074867" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="__SAM4S8C__"/>
+ <listOptionValue builtIn="false" value="RTOS"/>
+ <listOptionValue builtIn="false" value="PCCB"/>
+ <listOptionValue builtIn="false" value="_XOPEN_SOURCE"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.58883174" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="src/DuetM|src/Display|src/Networking|src/Alligator|src/SAME70_TEST|src/Duet|src/Networking/ESP8266WiFi|src/Networking/LwipEthernet|src/DuetNG|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
</sourceEntries>
</configuration>
</storageModule>
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index adeb1341..93f91cfc 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-114279925955362495" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-102132239664010639" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@@ -16,7 +16,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-114279925955362495" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-102132239664010639" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@@ -27,7 +27,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-114279925955362495" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-102132239664010639" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@@ -38,7 +38,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-114279925955362495" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-102132239664010639" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@@ -49,7 +49,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-114279925955362495" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-102132239664010639" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
@@ -60,7 +60,18 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
- <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-114279925955362495" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-102132239664010639" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <language-scope id="org.eclipse.cdt.core.gcc"/>
+ <language-scope id="org.eclipse.cdt.core.g++"/>
+ </provider>
+ </extension>
+ </configuration>
+ <configuration id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.170574622.649587786.1798324396" name="PCCB">
+ <extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
+ <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
+ <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
+ <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
+ <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-102132239664010639" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
diff --git a/src/Alligator/Pins_Alligator.h b/src/Alligator/Pins_Alligator.h
index 120e475b..1f965e98 100644
--- a/src/Alligator/Pins_Alligator.h
+++ b/src/Alligator/Pins_Alligator.h
@@ -8,8 +8,6 @@
#define HAS_WIFI_NETWORKING 0
#define HAS_CPU_TEMP_SENSOR 1
#define HAS_HIGH_SPEED_SD 0
-#define HAS_SMART_DRIVERS 0
-#define HAS_STALL_DETECT 0
#define HAS_VOLTAGE_MONITOR 0
#define HAS_VREF_MONITOR 0
#define ACTIVE_LOW_HEAT_ON 0
diff --git a/src/BugList.txt b/src/BugList.txt
index abd5b053..e1c84ae7 100644
--- a/src/BugList.txt
+++ b/src/BugList.txt
@@ -233,10 +233,11 @@ Done in 2.02beta2:
Bug fixes/investigations for 2.02beta3:
- [done, ok] Chrishamm's changes to allow fans to be named
+- Pressure advance with high K and low microstepping, see https://forum.duet3d.com/topic/1935/more-strange-pressure-advance-behaviour/95
+- Do we need to defer stall detection when a motor is starting from rest?
- [awaiting reply] Step errors when using Nimble and pressure advance, https://forum.duet3d.com/topic/3139/high-level-of-steperrors-what-can-cause-them/5
- [awaiting reply] GCode file that pauses between parts, https://forum.duet3d.com/topic/5702/printer-keeps-pausing-during-print/15
- [looks like it was a temperature sensing error] Is there a kink during auto tuning? https://forum.duet3d.com/topic/5582/hot-end-auto-tuning-failed-due. Could explain oddly low dead times from auto tuning.
-- Pressure advance, see https://www.duet3d.com/forum/thread.php?pid=38036#p38036 and https://forum.duet3d.com/topic/1935/more-strange-pressure-advance-behaviour/95
- Stuck in spin loop, https://forum.duet3d.com/topic/5674/damned-crash-stuck-in-spin-loop
- Report that if you use FileZilla to upload several short files, some of them are written blank, https://forum.duet3d.com/topic/5992/files-uploaded-over-ftp-occasionally-blank
diff --git a/src/Duet/Pins_Duet.h b/src/Duet/Pins_Duet.h
index 8f17abdf..766fd81f 100644
--- a/src/Duet/Pins_Duet.h
+++ b/src/Duet/Pins_Duet.h
@@ -8,8 +8,6 @@
#define HAS_WIFI_NETWORKING 0
#define HAS_CPU_TEMP_SENSOR 1
#define HAS_HIGH_SPEED_SD 1
-#define HAS_SMART_DRIVERS 0
-#define HAS_STALL_DETECT 0
#define HAS_VOLTAGE_MONITOR 0
#define HAS_VREF_MONITOR 0
#define ACTIVE_LOW_HEAT_ON 1
diff --git a/src/DuetM/Pins_DuetM.h b/src/DuetM/Pins_DuetM.h
index 3825e32b..1b02f2af 100644
--- a/src/DuetM/Pins_DuetM.h
+++ b/src/DuetM/Pins_DuetM.h
@@ -12,6 +12,7 @@
# define DEFAULT_BOARD_TYPE BoardType::DuetM_10
constexpr size_t NumFirmwareUpdateModules = 1; // 1 module
# define IAP_FIRMWARE_FILE "DuetMaestroFirmware.bin"
+#define IAP_UPDATE_FILE "iap4s.bin"
// Features definition
#define HAS_LWIP_NETWORKING 0
@@ -20,14 +21,11 @@ constexpr size_t NumFirmwareUpdateModules = 1; // 1 module
#define HAS_CPU_TEMP_SENSOR 1
#define HAS_HIGH_SPEED_SD 1
-#define HAS_SMART_DRIVERS 1
-#define HAS_STALL_DETECT 0
+#define SUPPORT_TMC22xx 1
#define HAS_VOLTAGE_MONITOR 1
#define HAS_VREF_MONITOR 1
#define ACTIVE_LOW_HEAT_ON 1
-#define IAP_UPDATE_FILE "iap4s.bin"
-
#define SUPPORT_INKJET 0 // set nonzero to support inkjet control
#define SUPPORT_ROLAND 0 // set nonzero to support Roland mill
#define SUPPORT_SCANNER 0 // set zero to disable support for FreeLSS scanners
diff --git a/src/DuetNG/Pins_DuetNG.h b/src/DuetNG/Pins_DuetNG.h
index 3aa83879..c7709380 100644
--- a/src/DuetNG/Pins_DuetNG.h
+++ b/src/DuetNG/Pins_DuetNG.h
@@ -5,6 +5,7 @@
# define DEFAULT_BOARD_TYPE BoardType::DuetWiFi_10
constexpr size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manual upload to WiFi module (module 2 is now unused)
# define IAP_FIRMWARE_FILE "Duet2CombinedFirmware.bin"
+#define IAP_UPDATE_FILE "iap4e.bin" // using the same IAP file for both Duet WiFi and Duet Ethernet
# define WIFI_FIRMWARE_FILE "DuetWiFiServer.bin"
// Features definition
@@ -15,14 +16,11 @@ constexpr size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manua
#define HAS_CPU_TEMP_SENSOR 1
#define HAS_HIGH_SPEED_SD 1
-#define HAS_SMART_DRIVERS 1
-#define HAS_STALL_DETECT 1
+#define SUPPORT_TMC2660 1
#define HAS_VOLTAGE_MONITOR 1
#define HAS_VREF_MONITOR 0
#define ACTIVE_LOW_HEAT_ON 1
-#define IAP_UPDATE_FILE "iap4e.bin" // using the same IAP file for both Duet WiFi and Duet Ethernet
-
#define SUPPORT_INKJET 0 // set nonzero to support inkjet control
#define SUPPORT_ROLAND 0 // set nonzero to support Roland mill
#define SUPPORT_SCANNER 1 // set zero to disable support for FreeLSS scanners
diff --git a/src/GCodes/GCodes2.cpp b/src/GCodes/GCodes2.cpp
index 2e0f04fe..f996eb02 100644
--- a/src/GCodes/GCodes2.cpp
+++ b/src/GCodes/GCodes2.cpp
@@ -30,10 +30,12 @@
# include "FirmwareUpdater.h"
#endif
-#if defined(DUET_NG)
-# include "TMC2660.h"
-#elif defined(DUET_M)
-# include "TMC22xx.h"
+#if SUPPORT_TMC2660
+# include "StepperDrivers/TMC2660/TMC2660.h"
+#endif
+
+#if SUPPORT_TMC22xx
+# include "StepperDrivers/TMC22xx/TMC22xx.h"
#endif
#if SUPPORT_12864_LCD
diff --git a/src/Pccb/Network.cpp b/src/Pccb/Network.cpp
new file mode 100644
index 00000000..0ad6d123
--- /dev/null
+++ b/src/Pccb/Network.cpp
@@ -0,0 +1,46 @@
+#include "Network.h"
+#include "OutputMemory.h"
+
+const char * const notSupportedText = "Networking is not supported on this hardware";
+
+GCodeResult Network::EnableProtocol(unsigned int interface, int protocol, int port, bool secure, const StringRef& reply)
+{
+ reply.copy(notSupportedText);
+ return GCodeResult::error;
+}
+
+GCodeResult Network::DisableProtocol(unsigned int interface, int protocol, const StringRef& reply)
+{
+ reply.copy(notSupportedText);
+ return GCodeResult::error;
+}
+
+GCodeResult Network::ReportProtocols(unsigned int interface, const StringRef& reply) const
+{
+ reply.copy(notSupportedText);
+ return GCodeResult::error;
+}
+
+GCodeResult Network::EnableInterface(unsigned int interface, int mode, const StringRef& ssid, const StringRef& reply)
+{
+ reply.copy(notSupportedText);
+ return GCodeResult::error;
+}
+
+GCodeResult Network::GetNetworkState(unsigned int interface, const StringRef& reply)
+{
+ reply.copy(notSupportedText);
+ return GCodeResult::error;
+}
+
+void Network::HandleHttpGCodeReply(OutputBuffer *buf)
+{
+ OutputBuffer::ReleaseAll(buf);
+}
+
+void Network::HandleTelnetGCodeReply(OutputBuffer *buf)
+{
+ OutputBuffer::ReleaseAll(buf);
+}
+
+// End
diff --git a/src/Pccb/Network.h b/src/Pccb/Network.h
new file mode 100644
index 00000000..31307f64
--- /dev/null
+++ b/src/Pccb/Network.h
@@ -0,0 +1,49 @@
+#ifndef NETWORK_H
+#define NETWORK_H
+
+#include "RepRapFirmware.h"
+#include "MessageType.h"
+#include "GCodes/GCodeResult.h"
+
+const uint8_t DefaultIpAddress[4] = { 0, 0, 0, 0 };
+const uint8_t DefaultNetMask[4] = { 0, 0, 0, 0 };
+const uint8_t DefaultGateway[4] = { 0, 0, 0, 0 };
+const uint8_t macAddress[6] = { 0, 0, 0, 0, 0, 0 };
+
+const uint8_t DefaultMacAddress[6] = { 0, 0, 0, 0, 0, 0 };
+const size_t SsidBufferLength = 32; // maximum characters in an SSID
+
+// The main network class that drives the network.
+class Network
+{
+public:
+ Network(Platform& p) { }
+ void Init() const { }
+ void Activate() const { }
+ void Exit() const { }
+ void Spin(bool full) const { }
+ void Interrupt() const { }
+ void Diagnostics(MessageType mtype) const { }
+
+ GCodeResult EnableInterface(unsigned int interface, int mode, const StringRef& ssid, const StringRef& reply);
+ GCodeResult EnableProtocol(unsigned int interface, int protocol, int port, bool secure, const StringRef& reply);
+ GCodeResult DisableProtocol(unsigned int interface, int protocol, const StringRef& reply);
+ GCodeResult ReportProtocols(unsigned int interface, const StringRef& reply) const;
+
+ GCodeResult GetNetworkState(unsigned int interface, const StringRef& reply);
+
+ void SetEthernetIPAddress(const uint8_t p_ipAddress[], const uint8_t p_netmask[], const uint8_t p_gateway[]) { }
+ void SetMacAddress(unsigned int interface, const uint8_t mac[]) { }
+ const uint8_t *GetMacAddress(unsigned int interface) const { return macAddress; }
+
+ void SetHostname(const char *name) const { }
+ bool IsWiFiInterface(unsigned int interface) const { return false; }
+
+ void HandleHttpGCodeReply(const char *msg) { }
+ void HandleTelnetGCodeReply(const char *msg) { }
+ void HandleHttpGCodeReply(OutputBuffer *buf);
+ void HandleTelnetGCodeReply(OutputBuffer *buf);
+ uint32_t GetHttpReplySeq() { return 0; }
+};
+
+#endif
diff --git a/src/Pccb/Pins_Pccb.h b/src/Pccb/Pins_Pccb.h
new file mode 100644
index 00000000..d46e5137
--- /dev/null
+++ b/src/Pccb/Pins_Pccb.h
@@ -0,0 +1,162 @@
+/*
+ * Pins_DuetM.h
+ *
+ * Created on: 29 Nov 2017
+ * Author: David
+ */
+
+#ifndef SRC_DUETM_PINS_DUETM_H_
+#define SRC_DUETM_PINS_DUETM_H_
+
+# define FIRMWARE_NAME "RepRapFirmware for PCCB"
+# define DEFAULT_BOARD_TYPE BoardType::PCCB_10
+constexpr size_t NumFirmwareUpdateModules = 1; // 1 module
+# define IAP_FIRMWARE_FILE "PccbFirmware.bin"
+#define IAP_UPDATE_FILE "iap4s.bin"
+
+// Features definition
+#define HAS_LWIP_NETWORKING 0
+#define HAS_WIFI_NETWORKING 0
+#define HAS_W5500_NETWORKING 0
+
+#define HAS_CPU_TEMP_SENSOR 1
+#define HAS_HIGH_SPEED_SD 1
+#define SUPPORT_TMC22xx 1
+#define HAS_VOLTAGE_MONITOR 1
+#define HAS_VREF_MONITOR 1
+#define ACTIVE_LOW_HEAT_ON 1
+
+#define SUPPORT_INKJET 0 // set nonzero to support inkjet control
+#define SUPPORT_ROLAND 0 // set nonzero to support Roland mill
+#define SUPPORT_SCANNER 0 // set zero to disable support for FreeLSS scanners
+#define SUPPORT_IOBITS 0 // set to support P parameter in G0/G1 commands
+#define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors (requires RTOS)
+#define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59
+#define SUPPORT_12864_LCD 0 // set nonzero to support 12864 LCD and rotary encoder
+
+// The physical capabilities of the machine
+
+constexpr size_t DRIVES = 7; // The maximum number of drives supported by the electronics
+constexpr size_t MaxSmartDrivers = 7; // The maximum number of smart drivers
+#define DRIVES_(a,b,c,d,e,f,g,h,i,j,k,l) { a,b,c,d,e,f,g }
+
+constexpr size_t Heaters = 4; // The number of heaters/thermistors in the machine. Duet M has 3 heaters but 4 thermistors.
+#define HEATERS_(a,b,c,d,e,f,g,h) { a,b,c }
+
+constexpr size_t NumExtraHeaterProtections = 4; // The number of extra heater protection instances
+
+constexpr size_t MinAxes = 3; // The minimum and default number of axes
+constexpr size_t MaxAxes = 6; // The maximum number of movement axes in the machine, usually just X, Y and Z, <= DRIVES
+// Initialization macro used in statements needing to initialize values in arrays of size MAX_AXES
+#define AXES_(a,b,c,d,e,f,g,h,i) { a,b,c,d,e,f }
+
+constexpr size_t MaxExtruders = DRIVES - MinAxes; // The maximum number of extruders
+constexpr size_t MaxDriversPerAxis = 4; // The maximum number of stepper drivers assigned to one axis
+
+constexpr size_t NUM_SERIAL_CHANNELS = 2; // The number of serial IO channels (USB and one auxiliary UART)
+#define SERIAL_MAIN_DEVICE SerialUSB
+#define SERIAL_AUX_DEVICE Serial
+
+#define I2C_IFACE Wire // First and only I2C interface
+#define I2C_IRQn WIRE_ISR_ID
+
+// The numbers of entries in each array must correspond with the values of DRIVES, AXES, or HEATERS. Set values to NoPin to flag unavailability.
+
+// Drivers
+constexpr Pin GlobalTmcEnablePin = 1; // The pin that drives ENN of all drivers
+constexpr Pin ENABLE_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin, 63, 61 };
+constexpr Pin STEP_PINS[DRIVES] = { 56, 38, 64, 40, 41, 67, 57 };
+constexpr Pin DIRECTION_PINS[DRIVES] = { 54, 8, 30, 33, 42, 18, 60 };
+constexpr Pin DriverMuxPins[3] = { 50, 52, 53 }; // Pins that control the UART multiplexer, LSB first
+
+// Endstops
+// RepRapFirmware only has a single endstop per axis.
+// Gcode defines if it is a max ("high end") or min ("low end") endstop and sets if it is active HIGH or LOW.
+constexpr Pin END_STOP_PINS[DRIVES] = { 24, 32, 46, 25, 43, NoPin, NoPin };
+
+// Heaters and thermistors
+constexpr Pin HEAT_ON_PINS[Heaters] = { 36, 37, 16, NoPin }; // Heater pin numbers
+constexpr Pin TEMP_SENSE_PINS[Heaters] = { 20, 26, 66, 27 }; // Thermistor pin numbers
+constexpr Pin VssaSensePin = 19;
+constexpr Pin VrefSensePin = 17;
+
+// Default thermistor parameters
+constexpr float BED_R25 = 100000.0;
+constexpr float BED_BETA = 3988.0;
+constexpr float BED_SHC = 0.0;
+constexpr float EXT_R25 = 100000.0;
+constexpr float EXT_BETA = 4388.0;
+constexpr float EXT_SHC = 0.0;
+
+// Thermistor series resistor value in Ohms
+constexpr float THERMISTOR_SERIES_RS = 2200.0;
+
+// Number of SPI temperature sensors to support
+constexpr size_t MaxSpiTempSensors = 2;
+
+// Digital pins the 31855s have their select lines tied to
+constexpr Pin SpiTempSensorCsPins[MaxSpiTempSensors] = { 35, 55 }; // SPI0_CS1, SPI0_CS2
+
+// DHTxx data pin
+//constexpr Pin DhtDataPin = 97; // Pin CS6
+
+// Pin that controls the ATX power on/off
+constexpr Pin ATX_POWER_PIN = 0;
+
+// Analogue pin numbers
+constexpr Pin Z_PROBE_PIN = 51; // Z probe analog input
+constexpr Pin PowerMonitorVinDetectPin = 48; // Vin monitor
+constexpr float PowerMonitorVoltageRange = 11.0 * 3.3; // We use an 11:1 voltage divider
+
+// Digital pin number to turn the IR LED on (high) or off (low), also controls the DIAG LED
+constexpr Pin Z_PROBE_MOD_PIN = 62;
+constexpr Pin DiagPin = Z_PROBE_MOD_PIN;
+
+// Cooling fans
+constexpr size_t NUM_FANS = 3;
+constexpr Pin COOLING_FAN_PINS[NUM_FANS] = { 59, 58, 65 };
+constexpr Pin COOLING_FAN_RPM_PIN = 21;
+
+// SD cards
+constexpr size_t NumSdCards = 2;
+constexpr Pin SdCardDetectPins[NumSdCards] = { 44, NoPin };
+constexpr Pin SdWriteProtectPins[NumSdCards] = { NoPin, NoPin };
+constexpr Pin SdSpiCSPins[1] = { 34 };
+constexpr uint32_t ExpectedSdCardSpeed = 15000000;
+
+// 12864 LCD
+constexpr Pin LcdCSPin = 45;
+constexpr Pin LcdBeepPin = 15;
+constexpr Pin EncoderPinA = 31;
+constexpr Pin EncoderPinB = 39;
+constexpr Pin EncoderPinSw = 7;
+
+// M42 and M208 commands now use logical pin numbers, not firmware pin numbers.
+// This next definition defines the highest one.
+// This is the mapping from logical pins 60+ to firmware pin numbers
+constexpr Pin SpecialPinMap[] =
+{
+ 21, 22, 3, 4, Z_PROBE_MOD_PIN // PA21/RXD1/AD8, PA22/TXD1/AD9, PA3/TWD0, PA4/TWC, Z_MOD
+};
+
+constexpr int HighestLogicalPin = 64; // highest logical pin number on this electronics
+
+// SAM4S Flash locations (may be expanded in the future)
+constexpr uint32_t IAP_FLASH_START = 0x00470000;
+constexpr uint32_t IAP_FLASH_END = 0x0047FFFF; // we allow a full 64K on the SAM4
+
+// Duet pin numbers to control the W5500 interface
+constexpr Pin W5500ResetPin = 100; // Low on this in holds the W5500 module in reset (ESP_RESET)
+constexpr Pin W5500SsPin = 11; // SPI NPCS pin, input from W5500 module
+
+// Timer allocation
+// TC0 channel 0 is used for step pulse generation and software timers
+// TC0 channel 1 is used for LCD beep
+// TC0 channel 2 is currently unused
+#define STEP_TC (TC0)
+#define STEP_TC_CHAN (0)
+#define STEP_TC_ID ID_TC0
+#define STEP_TC_IRQN TC0_IRQn
+#define STEP_TC_HANDLER TC0_Handler
+
+#endif /* SRC_DUETM_PINS_DUETM_H_ */
diff --git a/src/Pins.h b/src/Pins.h
index ebe82597..230d2601 100644
--- a/src/Pins.h
+++ b/src/Pins.h
@@ -16,8 +16,10 @@
# define PLATFORM DuetNG
# elif defined(__SAME70Q21__)
# define PLATFORM SAME70_TEST
-# elif defined(__SAM4S8C__)
+# elif defined(DUET_M)
# define PLATFORM DuetM
+# elif defined(PCCB)
+# define PLATFORM Pccb
# else
# error Unknown platform
# endif
@@ -30,8 +32,10 @@
# define P_XSTR(x) P_STR(x)
# define P_INCLUDE_FILE P_XSTR(P_CONCAT(PLATFORM,P_CONCAT(/Pins_,P_CONCAT(PLATFORM,.h))))
#endif
+
#include P_INCLUDE_FILE
+// Apply default values to anything not configured
#ifndef SUPPORT_NONLINEAR_EXTRUSION
# define SUPPORT_NONLINEAR_EXTRUSION 1 // for now this is always enabled
#endif
@@ -41,11 +45,28 @@
#endif
#ifndef SUPPORT_12864_LCD
-# define SUPPORT_12864_LCD 0
+# define SUPPORT_12864_LCD 0
#endif
#ifndef USE_CACHE
-# define USE_CACHE 0
+# define USE_CACHE 0
+#endif
+
+#ifndef SUPPORT_TMC2660
+# define SUPPORT_TMC2660 0
+#endif
+
+#ifndef SUPPORT_TMC22xx
+# define SUPPORT_TMC22xx 0
+#endif
+
+#define HAS_SMART_DRIVERS (SUPPORT_TMC2660 || SUPPORT_TMC22xx)
+#define HAS_STALL_DETECT SUPPORT_TMC2660
+
+#define HAS_UNIFIED_NETWORKING (HAS_LWIP_NETWORKING || HAS_WIFI_NETWORKING || HAS_W5500_NETWORKING)
+
+#if SUPPORT_DHT_SENSOR && !defined(RTOS)
+# error DHT sensor support requires RTOS
#endif
#endif // PINS_H__
diff --git a/src/Platform.cpp b/src/Platform.cpp
index 794ec671..bf5a6053 100644
--- a/src/Platform.cpp
+++ b/src/Platform.cpp
@@ -41,10 +41,11 @@
#include "sd_mmc.h"
-#if defined(DUET_NG)
-# include "TMC2660.h"
-#elif defined(DUET_M)
-# include "TMC22xx.h"
+#if SUPPORT_TMC2660
+# include "StepperDrivers/TMC2660/TMC2660.h"
+#endif
+#if SUPPORT_TMC22xx
+# include "StepperDrivers/TMC22xx/TMC22xx.h"
#endif
#if HAS_WIFI_NETWORKING
@@ -3832,6 +3833,8 @@ void Platform::SetBoardType(BoardType bt)
board = BoardType::RADDS_15;
#elif defined(__ALLIGATOR__)
board = BoardType::Alligator_2;
+#elif defined(PCCB)
+ board = BoardType::PCCB_10;
#else
# error Undefined board type
#endif
@@ -3870,6 +3873,8 @@ const char* Platform::GetElectronicsString() const
case BoardType::RADDS_15: return "RADDS 1.5";
#elif defined(__ALLIGATOR__)
case BoardType::Alligator_2: return "Alligator r2";
+#elif defined(PCCB)
+ case BoardType::PCCB_10: return "PCCB 1.0";
#else
# error Undefined board type
#endif
@@ -3899,6 +3904,8 @@ const char* Platform::GetBoardString() const
case BoardType::RADDS_15: return "radds15";
#elif defined(__ALLIGATOR__)
case BoardType::Alligator_2: return "alligator2";
+#elif defined(PCCB)
+ case BoardType::PCCB_10: return "pccb10";
#else
# error Undefined board type
#endif
diff --git a/src/Platform.h b/src/Platform.h
index 57296ab5..6afdb6b7 100644
--- a/src/Platform.h
+++ b/src/Platform.h
@@ -129,6 +129,8 @@ enum class BoardType : uint8_t
RADDS_15 = 1
#elif defined(__ALLIGATOR__)
Alligator_2 = 1
+#elif defined(PCCB)
+ PCCB_10 = 1
#else
# error Unknown board
#endif
@@ -1252,7 +1254,7 @@ inline OutputBuffer *Platform::GetAuxGCodeReply()
// The bitmaps for various controller electronics are organised like this:
// Duet WiFi:
// All step pins are on port D, so the bitmap is just the map of step bits in port D.
-// Duet Maestro:
+// Duet Maestro and PCCB:
// All step pins are on port C, so the bitmap is just the map of step bits in port C.
// Duet 0.6 and 0.8.5:
// Step pins are PA0, PC7,9,11,14,25,29 and PD0,3.
@@ -1276,9 +1278,7 @@ inline OutputBuffer *Platform::GetAuxGCodeReply()
return 0; // TODO assign step pins
#else
const PinDescription& pinDesc = g_APinDescription[STEP_PINS[driver]];
-#if defined(DUET_NG)
- return pinDesc.ulPin;
-#elif defined(DUET_M)
+#if defined(DUET_NG) || defined(DUET_M) || defined(PCCB)
return pinDesc.ulPin;
#elif defined(DUET_06_085)
return (pinDesc.pPort == PIOA) ? pinDesc.ulPin << 1 : pinDesc.ulPin;
@@ -1301,7 +1301,7 @@ inline OutputBuffer *Platform::GetAuxGCodeReply()
// TODO
#elif defined(DUET_NG)
PIOD->PIO_ODSR = driverMap; // on Duet WiFi all step pins are on port D
-#elif defined(DUET_M)
+#elif defined(DUET_M) || defined(PCCB)
PIOC->PIO_ODSR = driverMap; // on Duet Maestro all step pins are on port C
#elif defined(DUET_06_085)
PIOD->PIO_ODSR = driverMap;
@@ -1330,7 +1330,7 @@ inline OutputBuffer *Platform::GetAuxGCodeReply()
// TODO
#elif defined(DUET_NG)
PIOD->PIO_ODSR = 0; // on Duet WiFi all step pins are on port D
-#elif defined(DUET_M)
+#elif defined(DUET_M) || defined(PCCB)
PIOC->PIO_ODSR = 0; // on Duet Maestro all step pins are on port C
#elif defined(DUET_06_085)
PIOD->PIO_ODSR = 0;
diff --git a/src/RADDS/Pins_RADDS.h b/src/RADDS/Pins_RADDS.h
index 1623c6c8..01eac0ed 100644
--- a/src/RADDS/Pins_RADDS.h
+++ b/src/RADDS/Pins_RADDS.h
@@ -8,8 +8,6 @@
#define HAS_WIFI_NETWORKING 0
#define HAS_CPU_TEMP_SENSOR 0 // enabling the CPU temperature sensor disables Due pin 13 due to bug in SAM3X
#define HAS_HIGH_SPEED_SD 0
-#define HAS_SMART_DRIVERS 0
-#define HAS_STALL_DETECT 0
#define HAS_VOLTAGE_MONITOR 0
#define HAS_VREF_MONITOR 0
#define ACTIVE_LOW_HEAT_ON 0
diff --git a/src/SAME70_TEST/Pins_SAME70_TEST.h b/src/SAME70_TEST/Pins_SAME70_TEST.h
index fd210d45..0c028c60 100644
--- a/src/SAME70_TEST/Pins_SAME70_TEST.h
+++ b/src/SAME70_TEST/Pins_SAME70_TEST.h
@@ -1,26 +1,23 @@
#ifndef PINS_SAME70_H__
#define PINS_SAME70_H__
-# define FIRMWARE_NAME "RepRapFirmware for SAME70"
-# define DEFAULT_BOARD_TYPE BoardType::SamE70TestBoard
+#define FIRMWARE_NAME "RepRapFirmware for SAME70"
+#define DEFAULT_BOARD_TYPE BoardType::SamE70TestBoard
const size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manual upload to WiFi module (module 2 not used)
-# define IAP_FIRMWARE_FILE "SAME70Firmware.bin"
-# define WIFI_FIRMWARE_FILE "DuetWiFiServer.bin"
-# define WIFI_WEB_FILE "DuetWebControl.bin"
+#define IAP_FIRMWARE_FILE "SAME70Firmware.bin"
+#define WIFI_FIRMWARE_FILE "DuetWiFiServer.bin"
+#define WIFI_WEB_FILE "DuetWebControl.bin"
+#define IAP_UPDATE_FILE "iape70.bin" // need special build for SAME70
// Features definition
#define HAS_LWIP_NETWORKING 1
#define HAS_WIFI_NETWORKING 1
#define HAS_CPU_TEMP_SENSOR 0
#define HAS_HIGH_SPEED_SD 1
-#define HAS_SMART_DRIVERS 0 // TBD
-#define HAS_STALL_DETECT 0 // TBD
#define HAS_VOLTAGE_MONITOR 0 // TBD
#define HAS_VREF_MONITOR 0 // TBD
#define ACTIVE_LOW_HEAT_ON 1
-#define IAP_UPDATE_FILE "iape70.bin" // need special build for SAME70
-
#define SUPPORT_INKJET 0 // set nonzero to support inkjet control
#define SUPPORT_ROLAND 0 // set nonzero to support Roland mill
#define SUPPORT_SCANNER 0 // set zero to disable support for FreeLSS scanners
diff --git a/src/DuetM/TMC22xx.cpp b/src/StepperDrivers/TMC22xx/TMC22xx.cpp
index 4a71f2d4..c5403569 100644
--- a/src/DuetM/TMC22xx.cpp
+++ b/src/StepperDrivers/TMC22xx/TMC22xx.cpp
@@ -5,6 +5,10 @@
* Author: David
*/
+#include "ReprapFirmware.h"
+
+#if SUPPORT_TMC22xx
+
#include "TMC22xx.h"
#include "RepRap.h"
#include "Movement/Move.h"
@@ -1004,4 +1008,6 @@ namespace SmartDrivers
}; // end namespace
+#endif
+
// End
diff --git a/src/DuetM/TMC22xx.h b/src/StepperDrivers/TMC22xx/TMC22xx.h
index 4e181fdc..8ca77bd1 100644
--- a/src/DuetM/TMC22xx.h
+++ b/src/StepperDrivers/TMC22xx/TMC22xx.h
@@ -5,8 +5,10 @@
* Author: David
*/
-#ifndef TMC2660_H_
-#define TMC2660_H_
+#ifndef TMC22xx_H_
+#define TMC22xx_H_
+
+#if SUPPORT_TMC22xx
#include "RepRapFirmware.h"
#include "GCodes/DriverMode.h"
@@ -56,4 +58,6 @@ namespace SmartDrivers
void SetStandstillCurrentPercent(size_t drive, float percent);
};
-#endif /* TMC2660_H_ */
+#endif
+
+#endif /* TMC22xx_H_ */
diff --git a/src/DuetNG/TMC2660.cpp b/src/StepperDrivers/TMC2660/TMC2660.cpp
index afaf625e..51fbc84c 100644
--- a/src/DuetNG/TMC2660.cpp
+++ b/src/StepperDrivers/TMC2660/TMC2660.cpp
@@ -5,6 +5,10 @@
* Author: David
*/
+#include "ReprapFirmware.h"
+
+#if SUPPORT_TMC2660
+
#include "TMC2660.h"
#include "RepRap.h"
#include "Movement/Move.h"
@@ -823,6 +827,8 @@ namespace SmartDrivers
}; // end namespace
+#endif
+
// End
diff --git a/src/DuetNG/TMC2660.h b/src/StepperDrivers/TMC2660/TMC2660.h
index c31f6ffe..fa18c27c 100644
--- a/src/DuetNG/TMC2660.h
+++ b/src/StepperDrivers/TMC2660/TMC2660.h
@@ -8,6 +8,8 @@
#ifndef TMC2660_H_
#define TMC2660_H_
+#if SUPPORT_TMC2660
+
#include "RepRapFirmware.h"
#include "GCodes/DriverMode.h"
#include "Pins.h"
@@ -58,4 +60,6 @@ namespace SmartDrivers
void SetStandstillCurrentPercent(size_t driver, float percent);
};
+#endif
+
#endif /* TMC2660_H_ */