diff options
24 files changed, 549 insertions, 77 deletions
@@ -110,7 +110,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="src/Alligator|src/Duet/Lwip/lwip/src/core/ipv6|src/Duet/Lwip/lwip/test|src/Duet3|src/Display|src/Networking|src/Pccb|src/DuetNG|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="src/Alligator|src/Duet/Lwip/lwip/src/core/ipv6|src/Duet/Lwip/lwip/test|src/Display|src/Networking|src/Pccb|src/DuetNG|src/Duet3|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/Alligator|src/Duet3|src/Display|src/Duet|src/Networking|src/Pccb|src/DuetNG|src/DuetM" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="src/Alligator|src/Display|src/Duet|src/Networking|src/Pccb|src/DuetNG|src/Duet3|src/DuetM" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -341,7 +341,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="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/Duet3|src/Display|src/Pccb|src/DuetM|src/Alligator/Lwip/lwip/src/core/ipv6|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="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/Display|src/Pccb|src/Duet3|src/DuetM|src/Alligator/Lwip/lwip/src/core/ipv6|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -464,7 +464,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="src/Alligator|src/Duet3|src/Display|src/Duet|src/Pccb|src/Networking/LwipEthernet|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="src/Alligator|src/Display|src/Duet|src/Pccb|src/Networking/LwipEthernet|src/Duet3|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -587,7 +587,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="src/Alligator|src/Duet3|src/Duet|src/Networking/ESP8266WiFi|src/Pccb|src/Networking/LwipEthernet|src/DuetNG|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="src/Alligator|src/Duet|src/Networking/ESP8266WiFi|src/Pccb|src/Networking/LwipEthernet|src/DuetNG|src/Duet3|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -724,7 +724,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="src/Duet|src/DuetNG|src/Alligator|src/DuetM|src/RADDS|src/Pccb|src/Display|src/Networking/W5500Ethernet|/src/Networking/LwipEthernet/Lwip/test|/src/Networking/LwipEthernet/Lwip/src/apps/mqtt|src/Networking/LwipEthernet/Lwip/doc|src/Networking/LwipEthernet/Lwip/src/apps/snmp|src/Networking/LwipEthernet/Lwip/src/apps/httpd|src/Networking/LwipEthernet/Lwip/src/apps/tftp|src/Networking/LwipEthernet/Lwip/src/netif/ppp|src/Networking/LwipEthernet/Lwip/src/apps/lwiperf|src/Networking/LwipEthernet/Lwip/src/apps/sntp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="src/Networking/LwipEthernet/Lwip/src/apps/snmp|src/Duet|src/Networking/LwipEthernet/Lwip/src/apps/httpd|/src/Networking/LwipEthernet/Lwip/test|src/DuetNG|src/Networking/LwipEthernet/Lwip/src/apps/tftp|src/Networking/W5500Ethernet|src/Alligator|src/Networking/LwipEthernet/Lwip/src/netif/ppp|src/Networking/LwipEthernet/Lwip/src/apps/lwiperf|src/Networking/LwipEthernet/Lwip/src/apps/sntp|src/Display|src/Pccb|/src/Networking/LwipEthernet/Lwip/src/apps/mqtt|src/DuetM|src/RADDS|src/Networking/LwipEthernet/Lwip/doc" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -846,7 +846,7 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="src/Alligator|src/Duet3|src/Display|src/Duet|src/Networking|src/Networking/ESP8266WiFi|src/Networking/LwipEthernet|src/DuetNG|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="src/Alligator|src/Display|src/Duet|src/Networking|src/Networking/ESP8266WiFi|src/Networking/LwipEthernet|src/DuetNG|src/Duet3|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> @@ -970,7 +970,144 @@ </toolChain> </folderInfo> <sourceEntries> - <entry excluding="src/Alligator|src/Duet3|src/Display|src/Duet|src/Networking|src/Networking/ESP8266WiFi|src/Networking/LwipEthernet|src/DuetNG|src/DuetM|src/RADDS" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> + <entry excluding="src/Alligator|src/Display|src/Duet|src/Networking|src/Networking/ESP8266WiFi|src/Networking/LwipEthernet|src/DuetNG|src/Duet3|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.1275216290.274082366.1645191116.1852610203.216858457"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.516195201.976458850.241502451.1275216290.274082366.1645191116.1852610203.216858457" moduleId="org.eclipse.cdt.core.settings" name="SAME70XPLD"> + <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="Duet3Firmware" 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.1275216290.274082366.1645191116.1852610203.216858457" name="SAME70XPLD" 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.1275216290.274082366.1645191116.1852610203.216858457." name="/" resourcePath=""> + <toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.1157300775" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release"> + <option id="cdt.managedbuild.option.gnu.cross.path.2145914464" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" useByScannerDiscovery="false" value="${GccPath}" valueType="string"/> + <option id="cdt.managedbuild.option.gnu.cross.prefix.777097108" 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.998655674" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/> + <builder buildPath="${workspace_loc:/RepRapFirmware}/Release" id="cdt.managedbuild.builder.gnu.cross.2056908436" 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.1879769012" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler"> + <inputType id="cdt.managedbuild.tool.gnu.assembler.input.806612442" 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.1236802746" 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.1332086190" 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.1295896937" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.default" valueType="enumerated"/> + <option id="gnu.c.compiler.option.misc.verbose.264927500" name="Verbose (-v)" superClass="gnu.c.compiler.option.misc.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/> + <option id="gnu.c.compiler.option.misc.other.257975099" name="Other flags" superClass="gnu.c.compiler.option.misc.other" useByScannerDiscovery="false" value="-c -std=gnu99 -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -nostdlib -Wdouble-promotion -fsingle-precision-constant" valueType="string"/> + <option id="gnu.c.compiler.option.include.paths.1834911555" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/cores/arduino}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/libraries/Storage}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/common/utils}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/common/services/clock}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/common/services/ioport}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/components/ethernet_phy/ksz8081rna}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/drivers/hsmci}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/drivers/gmac}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/drivers/pmc}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/drivers/rstc}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/drivers/rtc}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/utils}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/utils/cmsis/same70/include}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/utils/header_files}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/utils/preprocessor}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/thirdparty/CMSIS/Include}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/variants/same70}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Duet3}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Networking/LwipEthernet}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Networking/LwipEthernet/Lwip/src/include}""/> + </option> + <option id="gnu.c.compiler.option.preprocessor.def.symbols.1462879427" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="__SAME70Q21__"/> + <listOptionValue builtIn="false" value="RTOS"/> + <listOptionValue builtIn="false" value="SAME70XPLD"/> + </option> + <option id="gnu.c.compiler.option.dialect.std.1111466865" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/> + <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.129281940" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> + </tool> + <tool id="cdt.managedbuild.tool.gnu.cross.c.linker.642836635" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/> + <tool id="cdt.managedbuild.tool.gnu.cross.archiver.1474356143" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/> + <tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${LinkFlags1} "${workspace_loc}/${CoreName}/SAME70/cores/arduino/syscalls.o" ${INPUTS} ${LinkFlags2}" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.8484819" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"> + <option id="gnu.cpp.link.option.nostdlibs.1515694027" 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.78806302" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" useByScannerDiscovery="false" valueType="libPaths"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/SAME70_RTOS/}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/FreeRTOS/SAME70}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/RRFLibraries/SAME70_RTOS}""/> + </option> + <option id="gnu.cpp.link.option.libs.1498089806" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" useByScannerDiscovery="false" valueType="libs"> + <listOptionValue builtIn="false" value="${CoreName}"/> + <listOptionValue builtIn="false" value="FreeRTOS"/> + <listOptionValue builtIn="false" value="RRFLibraries"/> + </option> + <option id="gnu.cpp.link.option.flags.1694312842" name="Linker flags" superClass="gnu.cpp.link.option.flags" useByScannerDiscovery="false" value="-Os -Wl,--gc-sections -Wl,--fatal-warnings -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -T${workspace_loc:/${CoreName}/variants/same70/linker_scripts/gcc/flash.ld} -Wl,-Map,${workspace_loc:/${ProjName}/${ConfigName}}/${BuildArtifactFileBaseName}.map" valueType="string"/> + <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.806549806" 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.1181079633" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler"> + <option id="gnu.cpp.compiler.option.optimization.level.2079143150" 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.979307845" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.default" valueType="enumerated"/> + <option id="gnu.cpp.compiler.option.other.verbose.389161357" name="Verbose (-v)" superClass="gnu.cpp.compiler.option.other.verbose" useByScannerDiscovery="false" value="false" valueType="boolean"/> + <option id="gnu.cpp.compiler.option.other.other.180760060" name="Other flags" superClass="gnu.cpp.compiler.option.other.other" useByScannerDiscovery="false" value="-c -std=gnu++17 -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections -fno-threadsafe-statics -fno-rtti -fno-exceptions -nostdlib -Wdouble-promotion -fsingle-precision-constant "-Wa,-ahl=$*.s"" valueType="string"/> + <option id="gnu.cpp.compiler.option.include.paths.2141723263" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/cores/arduino}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/libraries/Flash}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/libraries/SharedSpi}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/libraries/Storage}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/libraries/Wire}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/common/utils}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/common/services/clock}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/common/services/ioport}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/drivers}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/drivers/gmac}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/services/flash_efc}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/utils}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/utils/cmsis/same70/include}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/utils/header_files}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/sam/utils/preprocessor}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/asf/thirdparty/CMSIS/Include}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${CoreName}/variants/same70}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Duet3}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Networking}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Networking/LwipEthernet}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/Networking/LwipEthernet/Lwip/src/include}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/DuetWiFiSocketServer/src/include}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/FreeRTOS/src/include}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/FreeRTOS/src/portable/GCC/ARM_CM7/r0p1}""/> + <listOptionValue builtIn="false" value=""${workspace_loc:/RRFLibraries/src}""/> + </option> + <option id="gnu.cpp.compiler.option.preprocessor.def.1765654706" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="__SAME70Q21__"/> + <listOptionValue builtIn="false" value="RTOS"/> + <listOptionValue builtIn="false" value="SAME70XPLD"/> + <listOptionValue builtIn="false" value="_XOPEN_SOURCE"/> + </option> + <option id="gnu.cpp.compiler.option.dialect.std.152869856" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/> + <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1317155683" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/> + </tool> + </toolChain> + </folderInfo> + <sourceEntries> + <entry excluding="src/Networking/LwipEthernet/Lwip/src/apps/snmp|src/Duet|src/Networking/LwipEthernet/Lwip/src/apps/httpd|/src/Networking/LwipEthernet/Lwip/test|src/DuetNG|src/Networking/LwipEthernet/Lwip/src/apps/tftp|src/Networking/W5500Ethernet|src/Alligator|src/Networking/LwipEthernet/Lwip/src/netif/ppp|src/Networking/LwipEthernet/Lwip/src/apps/lwiperf|src/Networking/LwipEthernet/Lwip/src/apps/sntp|src/Display|src/Pccb|/src/Networking/LwipEthernet/Lwip/src/apps/mqtt|src/DuetM|src/RADDS|src/Networking/LwipEthernet/Lwip/doc" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/> </sourceEntries> </configuration> </storageModule> diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml index 0f715a87..33bc54e2 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="-1059782738354140179" 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 "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-159893819235269839" 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 "${INPUTS}"" 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="-1059782738354140179" 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 "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-159893819235269839" 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 "${INPUTS}"" 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="-1059782738354140179" 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 "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-159893819235269839" 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 "${INPUTS}"" 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="-1059782738354140179" 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 "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-159893819235269839" 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 "${INPUTS}"" 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="-1059782738354140179" 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 "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-159893819235269839" 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 "${INPUTS}"" prefer-non-shared="true"> <language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.g++"/> </provider> @@ -60,7 +60,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="-1059782738354140179" 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 "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-159893819235269839" 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 "${INPUTS}"" prefer-non-shared="true"> <language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.g++"/> </provider> @@ -71,7 +71,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="-1059782738354140179" 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 "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-159893819235269839" 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 "${INPUTS}"" prefer-non-shared="true"> <language-scope id="org.eclipse.cdt.core.gcc"/> <language-scope id="org.eclipse.cdt.core.g++"/> </provider> @@ -82,7 +82,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="-1059782738354140179" 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 "${INPUTS}"" prefer-non-shared="true"> + <provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-159893819235269839" 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 "${INPUTS}"" 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.1275216290.274082366.1645191116.1852610203.216858457" name="SAME70XPLD"> + <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="-159893819235269839" 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 "${INPUTS}"" 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/BugList.txt b/src/BugList.txt index 0cefc658..5d4c18c9 100644 --- a/src/BugList.txt +++ b/src/BugList.txt @@ -34,8 +34,9 @@ Investigations: - [tested, pause/resume works as intended] Check M106 R1 parameter, see https://forum.duet3d.com/topic/6538/resuming-print-fan-after-pause - Weird height map, https://forum.duet3d.com/topic/6472/mesh-grid-compensation/28 - Full stepping problem, https://forum.duet3d.com/topic/6433/how-to-reduce-the-speed-of-extrusion/14 -- Print time estimation problem, see https://forum.duet3d.com/topic/5572/it-s-out-reprapfirmware-2-0-and-1-21-1-released/64 +- Print time estimation problem, see https://forum.duet3d.com/topic/5572/it-s-out-reprapfirmware-2-0-and-1-21-1-released/64 and https://forum.duet3d.com/topic/5572/it-s-out-reprapfirmware-2-0-and-1-21-1-released/73 - Disconnections, https://forum.duet3d.com/topic/6487/running-bed-mesh-compensation/19 +- M122, https://forum.duet3d.com/topic/6725/m122-does-not-work-from-dwc-console Remaining: - [done, ok on DuetM, test on Duet2] No warning messages when TMC2224 drivers overheat, https://forum.duet3d.com/topic/6309/little-monster-s-hort-to-ground/13 @@ -44,6 +45,8 @@ Remaining: - [done, test] Add paused coordinates to 'printing paused' message? https://reprap.org/forum/read.php?416,832303,832440#msg-832440 - [done] If a bad curve fit occurs during tuning, display the values as A, C and D instead of G, tc and td to better relate to M307 - [done, M3D testing] Merge in Matt's display changes +- Limit amount of CPU time used to refesh the display, https://forum.duet3d.com/topic/6676/firmware-2-02-release-candidate-1-now-available +- Option to generate stall warning messages if stalls occur when not printing from SD card, https://forum.duet3d.com/topic/6720/stall-protection-on-pyserial-print/6 - Add check digit to serial number - check DAA working as intended, results are inconsistent - chrishamm's watchdog issue, see his email oif 2018-08-01 diff --git a/src/Configuration.h b/src/Configuration.h index be15ebfd..5a9e0700 100644 --- a/src/Configuration.h +++ b/src/Configuration.h @@ -32,12 +32,14 @@ constexpr float ROOM_TEMPERATURE = 21.0; // Celsius // Timeouts constexpr uint32_t FanCheckInterval = 500; // Milliseconds -constexpr uint32_t OpenLoadTimeout = 5000; // Milliseconds. A value of 500 resulted in lots of spurious detections in the SCARA extruder. Even 2000 resulted in a couple. +constexpr uint32_t OpenLoadTimeout = 500; // Milliseconds constexpr uint32_t MinimumWarningInterval = 4000; // Milliseconds, must be at least as long as FanCheckInterval constexpr uint32_t LogFlushInterval = 15000; // Milliseconds constexpr uint32_t DriverCoolingTimeout = 4000; // Milliseconds constexpr float DefaultMessageTimeout = 10.0; // How long a message is displayed by default, in seconds +constexpr uint32_t MinimumOpenLoadFullStepsPerSec = 4; + // FanCheckInterval must be lower than MinimumWarningInterval to avoid giving driver over temperature warnings too soon when thermostatic control of electronics cooling fans is used static_assert(FanCheckInterval < MinimumWarningInterval, "FanCheckInterval too large"); diff --git a/src/Display/ST7920/lcd7920.cpp b/src/Display/ST7920/lcd7920.cpp index 0271fd1c..9cd01d6a 100644 --- a/src/Display/ST7920/lcd7920.cpp +++ b/src/Display/ST7920/lcd7920.cpp @@ -9,7 +9,7 @@ #include "lcd7920.h" -const uint32_t SpiClockFrequency = 1000000; // try 1MHz for now +const uint32_t SpiClockFrequency = 1600000; // 1.6MHz (minimum clock cycle time for ST7920 is 600ns @ Vdd=2.7V) // LCD basic instructions. These all take 72us to execute except LcdDisplayClear, which takes 1.6ms const uint8_t LcdDisplayClear = 0x01; @@ -26,8 +26,8 @@ const uint8_t LcdSetDdramAddress = 0x80; // add the address we want to set // LCD extended instructions const uint8_t LcdSetGdramAddress = 0x80; -const unsigned int LcdCommandDelayMicros = 72 - 24; // 72us required, less 24us time to send the command @ 1MHz -const unsigned int LcdDataDelayMicros = 10; // delay between sending data bytes +const unsigned int LcdCommandDelayMicros = 72 - 15; // 72us required, less 15us time to send the command @ 1MHz +const unsigned int LcdDataDelayMicros = 4; // delay between sending data bytes const unsigned int LcdDisplayClearDelayMillis = 3; // 1.6ms should be enough Lcd7920::Lcd7920(uint8_t csPin) @@ -45,19 +45,38 @@ void Lcd7920::Init() numContinuationBytesLeft = 0; startRow = startCol = endRow = endCol = nextFlushRow = 0; - sendLcdCommand(LcdFunctionSetBasicAlpha); - delay(1); - sendLcdCommand(LcdFunctionSetBasicAlpha); - commandDelay(); - sendLcdCommand(LcdEntryModeSet); - commandDelay(); - sendLcdCommand(LcdFunctionSetExtendedGraphic); - commandDelay(); + { + MutexLocker lock(Tasks::GetSpiMutex()); + sspi_master_setup_device(&device); + delayMicroseconds(1); + sspi_select_device(&device); + delayMicroseconds(1); + + sendLcdCommand(LcdFunctionSetBasicAlpha); + delay(1); + sendLcdCommand(LcdFunctionSetBasicAlpha); + commandDelay(); + sendLcdCommand(LcdEntryModeSet); + commandDelay(); + sendLcdCommand(LcdFunctionSetExtendedGraphic); + commandDelay(); + + sspi_deselect_device(&device); + } Clear(); FlushAll(); - sendLcdCommand(LcdDisplayOn); - commandDelay(); + + { + MutexLocker lock(Tasks::GetSpiMutex()); + sspi_master_setup_device(&device); + delayMicroseconds(1); + sspi_select_device(&device); + delayMicroseconds(1); + sendLcdCommand(LcdDisplayOn); + commandDelay(); + sspi_deselect_device(&device); + } currentFont = nullptr; } @@ -469,17 +488,28 @@ bool Lcd7920::FlushSome() } // Flush that row - const uint8_t startColNum = startCol/16; - const uint8_t endColNum = (endCol + 15)/16; - setGraphicsAddress(nextFlushRow, startColNum); - uint8_t *ptr = image + ((16 * nextFlushRow) + (2 * startColNum)); - for (uint8_t i = startColNum; i < endColNum; ++i) { - sendLcdData(*ptr++); - //commandDelay(); // don't seem to need a delay here - sendLcdData(*ptr++); - //commandDelay(); // don't seem to need as long a delay as this - delayMicroseconds(LcdDataDelayMicros); + const uint8_t startColNum = startCol/16; + const uint8_t endColNum = (endCol + 15)/16; + + MutexLocker lock(Tasks::GetSpiMutex()); + sspi_master_setup_device(&device); + delayMicroseconds(1); + sspi_select_device(&device); + delayMicroseconds(1); + + setGraphicsAddress(nextFlushRow, startColNum); + uint8_t *ptr = image + ((16 * nextFlushRow) + (2 * startColNum)); + for (uint8_t i = startColNum; i < endColNum; ++i) + { + sendLcdData(*ptr++); + //commandDelay(); // don't seem to need a delay here + sendLcdData(*ptr++); + //commandDelay(); // don't seem to need as long a delay as this + delayMicroseconds(LcdDataDelayMicros); + } + + sspi_deselect_device(&device); } if (startRow != endRow) @@ -570,19 +600,11 @@ void Lcd7920::sendLcdData(uint8_t data) // Send a command to the lcd. Data1 is sent as-is, data2 is split into 2 bytes, high nibble first. void Lcd7920::sendLcd(uint8_t data1, uint8_t data2) { - MutexLocker lock(Tasks::GetSpiMutex()); - sspi_master_setup_device(&device); - delayMicroseconds(1); - sspi_select_device(&device); - delayMicroseconds(1); uint8_t data[3]; data[0] = data1; data[1] = data2 & 0xF0; data[2] = data2 << 4; sspi_transceive_packet(data, nullptr, 3); - delayMicroseconds(1); - sspi_deselect_device(&device); - delayMicroseconds(1); } #endif diff --git a/src/Movement/DDA.h b/src/Movement/DDA.h index 2e465436..c2308b44 100644 --- a/src/Movement/DDA.h +++ b/src/Movement/DDA.h @@ -257,7 +257,7 @@ inline void DDA::SetDriveCoordinate(int32_t a, size_t drive) endCoordinatesValid = false; } -#if HAS_STALL_DETECT +#if HAS_SMART_DRIVERS // Get the current full step interval for this axis or extruder inline uint32_t DDA::GetStepInterval(size_t axis, uint32_t microstepShift) const diff --git a/src/Movement/DriveMovement.h b/src/Movement/DriveMovement.h index d5df4602..8bd77f40 100644 --- a/src/Movement/DriveMovement.h +++ b/src/Movement/DriveMovement.h @@ -132,7 +132,7 @@ public: int32_t GetNetStepsLeft() const; int32_t GetNetStepsTaken() const; -#if HAS_STALL_DETECT +#if HAS_SMART_DRIVERS uint32_t GetStepInterval(uint32_t microstepShift) const; // Get the current full step interval for this axis or extruder #endif @@ -308,7 +308,7 @@ inline void DriveMovement::Release(DriveMovement *item) ++numFree; } -#if HAS_STALL_DETECT +#if HAS_SMART_DRIVERS // Get the current full step interval for this axis or extruder inline uint32_t DriveMovement::GetStepInterval(uint32_t microstepShift) const diff --git a/src/Movement/Move.h b/src/Movement/Move.h index 504693aa..1936db5e 100644 --- a/src/Movement/Move.h +++ b/src/Movement/Move.h @@ -139,7 +139,7 @@ public: bool WriteResumeSettings(FileStore *f) const; // Write settings for resuming the print -#if HAS_STALL_DETECT +#if HAS_SMART_DRIVERS uint32_t GetStepInterval(size_t axis, uint32_t microstepShift) const; // Get the current step interval for this axis or extruder #endif @@ -263,7 +263,7 @@ inline void Move::Interrupt() } } -#if HAS_STALL_DETECT +#if HAS_SMART_DRIVERS // Get the current step interval for this axis or extruder, or 0 if it is not moving // This is called from the stepper drivers SPI interface ISR diff --git a/src/Movement/StepperDrivers/TMC22xx.cpp b/src/Movement/StepperDrivers/TMC22xx.cpp index cea93519..dde89a7c 100644 --- a/src/Movement/StepperDrivers/TMC22xx.cpp +++ b/src/Movement/StepperDrivers/TMC22xx.cpp @@ -709,11 +709,11 @@ void TmcDriverState::AppendDriverStatus(const StringRef& reply) { reply.cat(" short-to-ground"); } - if ((lastReadStatus & TMC_RR_OLA) && !(lastReadStatus & TMC_RR_STST)) + if (lastReadStatus & TMC_RR_OLA) { reply.cat(" open-load-A"); } - if ((lastReadStatus & TMC_RR_OLB) && !(lastReadStatus & TMC_RR_STST)) + if (lastReadStatus & TMC_RR_OLB) { reply.cat(" open-load-B"); } @@ -752,7 +752,18 @@ inline void TmcDriverState::TransferDone() { // We asked to read the scheduled read register, and the sync byte, slave address and register number in the received message match //TODO here we could check the CRC of the received message, but for now we assume that we won't get any corruption in the 32-bit received data - const uint32_t regVal = ((uint32_t)receiveData[7] << 24) | ((uint32_t)receiveData[8] << 16) | ((uint32_t)receiveData[9] << 8) | receiveData[10]; + uint32_t regVal = ((uint32_t)receiveData[7] << 24) | ((uint32_t)receiveData[8] << 16) | ((uint32_t)receiveData[9] << 8) | receiveData[10]; + if (registerToRead == ReadDrvStat) + { + uint32_t interval; + if ((regVal & TMC_RR_STST) != 0 + || (interval = reprap.GetMove().GetStepInterval(axisNumber, microstepShiftFactor)) == 0 // get the full step interval + || interval > StepClockRate/MinimumOpenLoadFullStepsPerSec + ) + { + regVal &= ~(TMC_RR_OLA | TMC_RR_OLB); // open load bits are unreliable at standstill and low speeds + } + } readRegisters[registerToRead] = regVal; accumulatedReadRegisters[registerToRead] |= regVal; diff --git a/src/Movement/StepperDrivers/TMC2660.cpp b/src/Movement/StepperDrivers/TMC2660.cpp index 62737fae..c6e7d2f6 100644 --- a/src/Movement/StepperDrivers/TMC2660.cpp +++ b/src/Movement/StepperDrivers/TMC2660.cpp @@ -637,11 +637,11 @@ void TmcDriverState::AppendDriverStatus(const StringRef& reply) { reply.cat(" short-to-ground"); } - if ((lastReadStatus & TMC_RR_OLA) && !(lastReadStatus & TMC_RR_STST)) + if (lastReadStatus & TMC_RR_OLA) { reply.cat(" open-load-A"); } - if ((lastReadStatus & TMC_RR_OLB) && !(lastReadStatus & TMC_RR_STST)) + if (lastReadStatus & TMC_RR_OLB) { reply.cat(" open-load-B"); } @@ -696,6 +696,10 @@ inline void TmcDriverState::TransferDone() maxSgLoadRegister = sgLoad; } } + if ((status & TMC_RR_STST) != 0 || interval == 0 || interval > StepClockRate/MinimumOpenLoadFullStepsPerSec) + { + status &= ~(TMC_RR_OLA | TMC_RR_OLB); // open load bits are unreliable at standstill and low speeds + } lastReadStatus = status; accumulatedStatus |= status; } diff --git a/src/Movement/StepperDrivers/TMC51xx.cpp b/src/Movement/StepperDrivers/TMC51xx.cpp index 080988a0..735ca88f 100644 --- a/src/Movement/StepperDrivers/TMC51xx.cpp +++ b/src/Movement/StepperDrivers/TMC51xx.cpp @@ -229,7 +229,7 @@ constexpr uint8_t REGNUM_PWM_SCALE = 0x71; constexpr uint8_t REGNUM_PWM_AUTO = 0x72; // Common data -static size_t numTmc51xxDrivers; +static const size_t numTmc51xxDrivers = MaxSmartDrivers; enum class DriversState : uint8_t { @@ -1089,13 +1089,13 @@ namespace SmartDrivers { // Initialise the driver interface and the drivers, leaving each drive disabled. // It is assumed that the drivers are not powered, so driversPowered(true) must be called after calling this before the motors can be moved. - void Init(const Pin driverSelectPins[DRIVES], size_t numTmcDrivers) + void Init() { - numTmc51xxDrivers = min<size_t>(numTmcDrivers, MaxSmartDrivers); - // Make sure the ENN pins are high pinMode(GlobalTmc51xxEnablePin, OUTPUT_HIGH); + pinMode(GlobalTmc51xxCSPin, OUTPUT_HIGH); +#ifndef SAME51 // The pins are already set up for SPI in the pins table ConfigurePin(GetPinDescription(TMC51xxMosiPin)); ConfigurePin(GetPinDescription(TMC51xxMisoPin)); @@ -1103,8 +1103,52 @@ namespace SmartDrivers // Enable the clock to the USART or SPI pmc_enable_periph_clk(ID_TMC51xx_SPI); +#endif -#if TMC51xx_USES_USART +#if TMC51xx_USES_SERCOM + // Temporary fixed pin assignment + gpio_set_pin_function(PB24, PINMUX_PB24C_SERCOM0_PAD0); // MOSI + gpio_set_pin_function(PB25, PINMUX_PB25C_SERCOM0_PAD1); // SCLK + gpio_set_pin_function(PB24, PINMUX_PC25C_SERCOM0_PAD3); // MISO + + // Enable the clock + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM0_GCLK_ID_CORE, CONF_GCLK_SERCOM3_CORE_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + hri_gclk_write_PCHCTRL_reg(GCLK, SERCOM0_GCLK_ID_SLOW, CONF_GCLK_SERCOM3_SLOW_SRC | (1 << GCLK_PCHCTRL_CHEN_Pos)); + hri_mclk_set_APBBMASK_SERCOM0_bit(MCLK); + + // Set up the SERCOM + //TODO the following needs rewriting, it sets up the usart in async mode +// uint8_t i = _get_sercom_index(SERCOM_TMC51xx); + + if (!hri_sercomusart_is_syncing(SERCOM_TMC51xx, SERCOM_USART_SYNCBUSY_SWRST)) + { + uint32_t mode = _usarts[i].ctrl_a & SERCOM_USART_CTRLA_MODE_Msk; + if (hri_sercomusart_get_CTRLA_reg(SERCOM_TMC51xx)) + { + hri_sercomusart_clear_CTRLA_ENABLE_bit(SERCOM_TMC51xx); + hri_sercomusart_wait_for_sync(SERCOM_TMC51xx, SERCOM_USART_SYNCBUSY_ENABLE); + } + hri_sercomusart_write_CTRLA_reg(SERCOM_TMC51xx, SERCOM_USART_CTRLA_SWRST | mode); + } + hri_sercomusart_wait_for_sync(SERCOM_TMC51xx, SERCOM_USART_SYNCBUSY_SWRST); + + hri_sercomusart_write_CTRLA_reg(SERCOM_TMC51xx, _usarts[i].ctrl_a); + hri_sercomusart_write_CTRLB_reg(SERCOM_TMC51xx, _usarts[i].ctrl_b); + hri_sercomusart_write_CTRLC_reg(SERCOM_TMC51xx, _usarts[i].ctrl_c); + if ((_usarts[i].ctrl_a & SERCOM_USART_CTRLA_SAMPR(0x1)) || (_usarts[i].ctrl_a & SERCOM_USART_CTRLA_SAMPR(0x3))) + { + SERCOM_TMC51xx->USART.BAUD.FRAC.BAUD = _usarts[i].baud; + SERCOM_TMC51xx->USART.BAUD.FRAC.FP = _usarts[i].fractional; + } + else + { + hri_sercomusart_write_BAUD_reg(SERCOM_TMC51xx, _usarts[i].baud); + } + + hri_sercomusart_write_RXPL_reg(SERCOM_TMC51xx, _usarts[i].rxpl); + hri_sercomusart_write_DBGCTRL_reg(hw, _usarts[i].debug_ctrl); + +#elif TMC51xx_USES_USART // Set USART_EXT_DRV in SPI mode, with data changing on the falling edge of the clock and captured on the rising edge USART_TMC51xx->US_IDR = ~0u; USART_TMC51xx->US_CR = US_CR_RSTRX | US_CR_RSTTX | US_CR_RXDIS | US_CR_TXDIS; diff --git a/src/Movement/StepperDrivers/TMC51xx.h b/src/Movement/StepperDrivers/TMC51xx.h index fb1825d2..5a4b3537 100644 --- a/src/Movement/StepperDrivers/TMC51xx.h +++ b/src/Movement/StepperDrivers/TMC51xx.h @@ -27,8 +27,7 @@ const uint32_t TMC_RR_SGRESULT = 0x3FF; // 10-bit stallGuard2 result namespace SmartDrivers { - void Init(const Pin[DRIVES], size_t numTmcDrivers) - pre(numTmcDrivers <= DRIVES); + void Init(); void Spin(bool powered); void TurnDriversOff(); diff --git a/src/Networking/ESP8266WiFi/WiFiInterface.cpp b/src/Networking/ESP8266WiFi/WiFiInterface.cpp index d333b840..9d019fbe 100644 --- a/src/Networking/ESP8266WiFi/WiFiInterface.cpp +++ b/src/Networking/ESP8266WiFi/WiFiInterface.cpp @@ -33,7 +33,7 @@ static_assert(SsidLength == SsidBufferLength, "SSID lengths in NetworkDefs.h and # define ESP_SPI_IRQn SPI_IRQn # define ESP_SPI_HANDLER SPI_Handler -#elif defined(DUET3) +#elif defined(DUET3) || defined(SAME70XPLD) # define USE_PDC 0 // use peripheral DMA controller # define USE_DMAC 0 // use general DMA controller diff --git a/src/Duet3/GMAC/ethernet_sam.c b/src/Networking/LwipEthernet/GMAC/ethernet_sam.c index c2329262..c2329262 100644 --- a/src/Duet3/GMAC/ethernet_sam.c +++ b/src/Networking/LwipEthernet/GMAC/ethernet_sam.c diff --git a/src/Duet3/GMAC/ethernet_sam.h b/src/Networking/LwipEthernet/GMAC/ethernet_sam.h index 46de9e67..46de9e67 100644 --- a/src/Duet3/GMAC/ethernet_sam.h +++ b/src/Networking/LwipEthernet/GMAC/ethernet_sam.h diff --git a/src/Duet3/GMAC/same70_gmac.c b/src/Networking/LwipEthernet/GMAC/same70_gmac.c index 0a8b18de..0a8b18de 100644 --- a/src/Duet3/GMAC/same70_gmac.c +++ b/src/Networking/LwipEthernet/GMAC/same70_gmac.c diff --git a/src/Duet3/GMAC/same70_gmac.h b/src/Networking/LwipEthernet/GMAC/same70_gmac.h index 1cb25970..1cb25970 100644 --- a/src/Duet3/GMAC/same70_gmac.h +++ b/src/Networking/LwipEthernet/GMAC/same70_gmac.h diff --git a/src/Networking/Network.cpp b/src/Networking/Network.cpp index 3eff3418..094254be 100644 --- a/src/Networking/Network.cpp +++ b/src/Networking/Network.cpp @@ -41,7 +41,7 @@ static Task<NetworkStackWords> networkTask; Network::Network(Platform& p) : platform(p), responders(nullptr), nextResponderToPoll(nullptr) { -#if defined(DUET3) +#if defined(DUET3) || defined(SAME70XPLD) interfaces[0] = new LwipEthernetInterface(p); interfaces[1] = new WiFiInterface(p); #elif defined(DUET_NG) diff --git a/src/Networking/Network.h b/src/Networking/Network.h index ff63d84a..8d205e40 100644 --- a/src/Networking/Network.h +++ b/src/Networking/Network.h @@ -14,7 +14,7 @@ #include "GCodes/GCodeResult.h" #include "RTOSIface/RTOSIface.h" -#if defined(DUET3) +#if defined(DUET3) || defined(SAME70XPLD) const size_t NumNetworkInterfaces = 2; #elif defined(DUET_NG) || defined(DUET_M) const size_t NumNetworkInterfaces = 1; @@ -15,7 +15,13 @@ # elif defined(__SAM4E8E__) # define PLATFORM DuetNG # elif defined(__SAME70Q21__) -# define PLATFORM Duet3 +# if defined(DUET3) +# define PLATFORM Duet3 +# elif defined(SAME70XPLD) +# define PLATFORM SAME70xpld +# else +# error Unknown platform +# endif # elif defined(DUET_M) # define PLATFORM DuetM # elif defined(PCCB) diff --git a/src/Platform.cpp b/src/Platform.cpp index 12607854..8c8710af 100644 --- a/src/Platform.cpp +++ b/src/Platform.cpp @@ -477,7 +477,11 @@ void Platform::Init() #if HAS_SMART_DRIVERS // Initialise TMC driver module driversPowered = false; +# if SUPPORT_TMC51xx + SmartDrivers::Init(); +# else SmartDrivers::Init(ENABLE_PINS, numSmartDrivers); +# endif temperatureShutdownDrivers = temperatureWarningDrivers = shortToGroundDrivers = openLoadADrivers = openLoadBDrivers = 0; #endif @@ -1410,7 +1414,7 @@ void Platform::Spin() // The driver often produces a transient open-load error, especially in stealthchop mode, so we require the condition to persist before we report it. // Also, false open load indications persist when in standstill, if the phase has zero current in that position - if ((stat & TMC_RR_OLA) != 0 && (stat & TMC_RR_STST) == 0) + if ((stat & TMC_RR_OLA) != 0) { if (openLoadADrivers == 0) { @@ -1423,7 +1427,7 @@ void Platform::Spin() openLoadADrivers &= ~mask; } - if ((stat & TMC_RR_OLB) != 0 && (stat & TMC_RR_STST) == 0) + if ((stat & TMC_RR_OLB) != 0) { if (openLoadBDrivers == 0) { @@ -3969,6 +3973,8 @@ void Platform::SetBoardType(BoardType bt) { #if defined(DUET3) board = BoardType::Duet3_10; +#elif defined(SAME70XPLD) + board = BoardType::SAME70XPLD_0; #elif defined(DUET_NG) // Get ready to test whether the Ethernet module is present, so that we avoid additional delays pinMode(EspResetPin, OUTPUT_LOW); // reset the WiFi module or the W5500. We assume that this forces the ESP8266 UART output pin to high impedance. @@ -4038,6 +4044,8 @@ const char* Platform::GetElectronicsString() const { #if defined(DUET3) case BoardType::Duet3_10: return "Duet 3 prototype 1"; +#elif defined(SAME70XPLD) + case BoardType::SAME70XPLD_0: return "SAME70-XPLD"; #elif defined(DUET_NG) case BoardType::DuetWiFi_10: return "Duet WiFi 1.0 or 1.01"; case BoardType::DuetWiFi_102: return "Duet WiFi 1.02 or later"; @@ -4071,6 +4079,8 @@ const char* Platform::GetBoardString() const { #if defined(DUET3) case BoardType::Duet3_10: return "duet3proto"; +#elif defined(SAME70XPLD) + case BoardType::SAME70XPLD_0: return "same70xpld"; #elif defined(DUET_NG) case BoardType::DuetWiFi_10: return "duetwifi10"; case BoardType::DuetWiFi_102: return "duetwifi102"; diff --git a/src/Platform.h b/src/Platform.h index e52acaf3..60757136 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -115,6 +115,8 @@ enum class BoardType : uint8_t Auto = 0, #if defined(DUET3) Duet3_10 = 1 +#elif defined(SAME70XPLD) + SAME70XPLD_0 = 1 #elif defined(DUET_NG) DuetWiFi_10 = 1, DuetWiFi_102 = 2, @@ -1273,7 +1275,7 @@ inline OutputBuffer *Platform::GetAuxGCodeReply() const PinDescription& pinDesc = g_APinDescription[STEP_PINS[driver]]; #endif -#if defined(DUET_NG) || defined(DUET_M) || defined(PCCB) || defined(DUET3) +#if defined(DUET_NG) || defined(DUET_M) || defined(PCCB) || defined(DUET3) || defined(SAME70XPLD) return pinDesc.ulPin; #elif defined(DUET_06_085) return (pinDesc.pPort == PIOA) ? pinDesc.ulPin << 1 : pinDesc.ulPin; @@ -1295,7 +1297,7 @@ inline OutputBuffer *Platform::GetAuxGCodeReply() { #if defined(DUET_NG) PIOD->PIO_ODSR = driverMap; // on Duet WiFi all step pins are on port D -#elif defined(DUET_M) || defined(PCCB) || defined(DUET3) +#elif defined(DUET_M) || defined(PCCB) || defined(DUET3) || defined(SAME70XPLD) PIOC->PIO_ODSR = driverMap; // on Duet Maestro all step pins are on port C #elif defined(DUET_06_085) PIOD->PIO_ODSR = driverMap; @@ -1327,7 +1329,7 @@ inline OutputBuffer *Platform::GetAuxGCodeReply() { #if defined(DUET_NG) PIOD->PIO_ODSR = 0; // on Duet WiFi all step pins are on port D -#elif defined(DUET_M) || defined(PCCB) || defined(DUET3) +#elif defined(DUET_M) || defined(PCCB) || defined(DUET3) || defined(SAME70XPLD) 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/SAME70xpld/Pins_SAME70xpld.h b/src/SAME70xpld/Pins_SAME70xpld.h new file mode 100644 index 00000000..9eddb357 --- /dev/null +++ b/src/SAME70xpld/Pins_SAME70xpld.h @@ -0,0 +1,221 @@ +#ifndef PINS_SAME70_H__ +#define PINS_SAME70_H__ + +#define FIRMWARE_NAME "RepRapFirmware for SAME70-XPLD" +#define DEFAULT_BOARD_TYPE BoardType::SAME70XPLD_0 +const size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manual upload to WiFi module (module 2 not used) +#define IAP_FIRMWARE_FILE "Duet3Firmware.bin" +#define WIFI_FIRMWARE_FILE "DuetWiFiServer.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 1 +#define HAS_HIGH_SPEED_SD 1 + +#define VARIANT_TMC5130 1 + +#ifdef VARIANT_TMC5130 +# define SUPPORT_TMC51xx 1 +# define TMC51xx_USES_USART 1 +#else +# define SUPPORT_TMC2660 1 +# define TMC2660_USES_USART 1 +#endif + +#define HAS_VOLTAGE_MONITOR 0 // TBD +#define HAS_VREF_MONITOR 0 // TBD +#define ACTIVE_LOW_HEAT_ON 0 + +#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 1 // set to support P parameter in G0/G1 commands +#define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors +#define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59 + +#define USE_CACHE 0 // Cache controller disabled for now + +// The physical capabilities of the machine + +#ifdef VARIANT_TMC5130 +constexpr size_t DRIVES = 6; // The maximum number of drives supported by the electronics +constexpr size_t MaxSmartDrivers = 6; // 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 } +#else +constexpr size_t DRIVES = 5; // The maximum number of drives supported by the electronics +constexpr size_t MaxSmartDrivers = 5; // 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 } +#endif + +constexpr size_t NumEndstops = 6; // The number of inputs we have for endstops, filament sensors etc. +constexpr size_t NumHeaters = 4; // The number of heaters in the machine; 0 is the heated bed even if there isn't one +constexpr size_t NumExtraHeaterProtections = 8; // The number of extra heater protection instances +constexpr size_t NumThermistorInputs = 4; + +constexpr size_t MinAxes = 3; // The minimum and default number of axes +constexpr size_t MaxAxes = 9; // 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,g,h,i } + +constexpr size_t MaxExtruders = DRIVES - MinAxes; // The maximum number of extruders +constexpr size_t MaxDriversPerAxis = 5; // The maximum number of stepper drivers assigned to one axis + +constexpr size_t NUM_SERIAL_CHANNELS = 2; // The number of serial IO channels not counting the WiFi serial connection (USB and one auxiliary UART) +#define SERIAL_MAIN_DEVICE SerialUSB +#define SERIAL_AUX_DEVICE Serial +#define SERIAL_WIFI_DEVICE Serial1 + +//TWI is disabled for now on the SAM7E until we rewrite the driver +//#define I2C_IFACE Wire // Which TWI interface we use + +// The numbers of entries in each array must correspond with the values of DRIVES, AXES, or HEATERS. Set values to NoPin to flag unavailability. + +// DRIVES + +#ifdef VARIANT_TMC5130 + +constexpr Pin ENABLE_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin, NoPin }; +constexpr Pin STEP_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin, NoPin }; +constexpr Pin DIRECTION_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin, NoPin }; + +// Pin assignments etc. using USART1 in SPI mode +constexpr Pin GlobalTmc51xxEnablePin = NoPin; // The pin that drives ENN of all TMC drivers +constexpr Pin GlobalTmc51xxCSPin = NoPin; // The pin that drives CS of all TMC drivers +Usart * const USART_TMC51xx = USART1; +constexpr uint32_t ID_TMC51xx_SPI = ID_USART1; +constexpr IRQn TMC51xx_SPI_IRQn = USART1_IRQn; +# define TMC51xx_SPI_Handler USART1_Handler + +constexpr Pin TMC51xxMosiPin = NoPin; +constexpr Pin TMC51xxMisoPin = NoPin; +constexpr Pin TMC51xxSclkPin = NoPin; + +#else + +constexpr Pin ENABLE_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin }; +constexpr Pin STEP_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin }; +constexpr Pin DIRECTION_PINS[DRIVES] = { NoPin, NoPin, NoPin, NoPin, NoPin }; + +// Pin assignments etc. using USART1 in SPI mode +constexpr Pin GlobalTmc2660EnablePin = NoPin; // The pin that drives ENN of all TMC drivers +Usart * const USART_TMC2660 = USART1; +constexpr uint32_t ID_TMC2660_SPI = ID_USART1; +constexpr IRQn TMC2660_SPI_IRQn = USART1_IRQn; +# define TMC2660_SPI_Handler USART1_Handler + +constexpr Pin TMC2660MosiPin = NoPin; +constexpr Pin TMC2660MisoPin = NoPin; +constexpr Pin TMC2660SclkPin = NoPin; + +#endif + +// 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[NumEndstops] = { NoPin, NoPin, NoPin, NoPin, NoPin, NoPin }; + +// Heater and thermistors +constexpr Pin TEMP_SENSE_PINS[NumThermistorInputs] = { 66, 86, 48, 65 }; // Thermistor pin numbers (labelled AD1-2 and AD4-5 on eval board, but AD5 has a 0R resistor missing) +constexpr Pin HEAT_ON_PINS[NumHeaters] = { NoPin, NoPin, NoPin, NoPin }; // Heater pin numbers (TBD) + +// 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 = 4; + +// Digital pins the 31855s have their select lines tied to +constexpr Pin SpiTempSensorCsPins[MaxSpiTempSensors] = { NoPin, NoPin, NoPin, NoPin }; + +// Pin that controls the ATX power on/off +constexpr Pin ATX_POWER_PIN = NoPin; + +// Analogue pin numbers +constexpr Pin Z_PROBE_PIN = NoPin; // TBD +constexpr Pin PowerMonitorVinDetectPin = NoPin; // TBD + +constexpr float PowerMonitorVoltageRange = 11.0 * 3.3; // We use an 11:1 voltage divider (TBD) + +constexpr Pin VssaSensePin = NoPin; +constexpr Pin VrefSensePin = NoPin; + +// Digital pin number to turn the IR LED on (high) or off (low), also controls the DIAG LED +constexpr Pin Z_PROBE_MOD_PIN = NoPin; +constexpr Pin DiagPin = NoPin; // TBD + +// Cooling fans +constexpr size_t NUM_FANS = 1; +constexpr Pin COOLING_FAN_PINS[NUM_FANS] = { NoPin }; +constexpr size_t NumTachos = 1; +constexpr Pin TachoPins[NumTachos] = { NoPin }; // TBD + +// SD cards +constexpr size_t NumSdCards = 2; +constexpr Pin SdCardDetectPins[NumSdCards] = { 51, NoPin }; +constexpr Pin SdWriteProtectPins[NumSdCards] = { NoPin, NoPin }; +constexpr Pin SdSpiCSPins[1] = { NoPin }; +constexpr uint32_t ExpectedSdCardSpeed = 25000000; + +#if SUPPORT_INKJET +// Inkjet control pins +constexpr Pin INKJET_SERIAL_OUT = xx; // Serial bitpattern into the shift register +constexpr Pin INKJET_SHIFT_CLOCK = xx; // Shift the register +constexpr Pin INKJET_STORAGE_CLOCK = xx; // Put the pattern in the output register +constexpr Pin INKJET_OUTPUT_ENABLE = xx; // Make the output visible +constexpr Pin INKJET_CLEAR = xx; // Clear the register to 0 + +#endif + +#if SUPPORT_ROLAND +// Roland mill +constexpr Pin ROLAND_CTS_PIN = xx; // Expansion pin 11, PA12_TXD1 +constexpr Pin ROLAND_RTS_PIN = xx; // Expansion pin 12, PA13_RXD1 + +#endif + +// 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[] = +{ +}; +constexpr Pin DueX5GpioPinMap[] = {}; // TBD +constexpr int HighestLogicalPin = 50; // highest logical pin number on this electronics + +// SAME70 Flash locations +// These are designed to work with 1Mbyte flash processors as well as 2Mbyte +// We can only erase complete 128kb sectors on the SAME70, so we allow 128Kb for IAP +constexpr uint32_t IAP_FLASH_START = 0x004E0000; +constexpr uint32_t IAP_FLASH_END = 0x004FFFFF; + +// Duet pin numbers to control the WiFi interface +constexpr Pin EspResetPin = 27; // Low on this in holds the WiFi module in reset (ESP_RESET) +constexpr Pin EspDataReadyPin = 19; // Input from the WiFi module indicating that it wants to transfer data (ESP GPIO0) +constexpr Pin SamTfrReadyPin = 66; // Output from the SAM to the WiFi module indicating we can accept a data transfer (ESP GPIO4 via 7474) +constexpr Pin SamCsPin = 28; // SPI NPCS pin, input from WiFi module + +// Timer allocation +#define NETWORK_TC (TC0) +#define NETWORK_TC_CHAN (0) +#define NETWORK_TC_IRQN TC0_IRQn +#define NETWORK_TC_HANDLER TC0_Handler +#define NETWORK_TC_ID ID_TC0 + +#define STEP_TC (TC0) +#define STEP_TC_CHAN (1) +#define STEP_TC_IRQN TC1_IRQn +#define STEP_TC_HANDLER TC1_Handler +#define STEP_TC_ID ID_TC1 + +#endif diff --git a/src/Version.h b/src/Version.h index d5d272ae..fddd4bff 100644 --- a/src/Version.h +++ b/src/Version.h @@ -12,7 +12,7 @@ #ifndef VERSION #ifdef RTOS # define RTOSVER "(RTOS)" -# define MAIN_VERSION "2.02RC1+" +# define MAIN_VERSION "2.02RC2" #else # define MAIN_VERSION "1.22" # define RTOSVER @@ -22,7 +22,7 @@ #endif #ifndef DATE -# define DATE "2018-09-05b1" +# define DATE "2018-09-07b2" #endif #define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d" |