Skip to content

Commit

Permalink
Merge Dev into mainline (#1)
Browse files Browse the repository at this point in the history
* Removing USB
Need to refine the drive to the iron tip

* Update README.md

* * Rewrite all code from scratch
* Only kept settings
* New font
* New PID
* New Menus
* Use Hardware I2C
* Faster System
* Better Heating Time
* No USB
* Full Menu System
  • Loading branch information
Ralim authored Sep 29, 2016
1 parent 278d29b commit 0b26e66
Show file tree
Hide file tree
Showing 77 changed files with 3,673 additions and 10,434 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*.obj
*.elf
*.d

*.DS_Store
# Precompiled Headers
*.gch
*.pch
Expand All @@ -27,10 +27,13 @@
*.app
*.i*86
*.x86_64
*.hex
workspace/*.hex

# Debug files
*.dSYM/
*.su
workspace/ts100/Debug/*
workspace/.metadata/*

workspace/ts100/.settings/language.settings.xml
workspace/ts100/.cproject
2,113 changes: 2,113 additions & 0 deletions Flash Backup.hex

Large diffs are not rendered by default.

32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# TS100
Source code for the TS100 Soldering Iron
This is a complete open source re-write of the software for the ts100 soldering iron.

## UNTESTED!
This was started to remove the need for USB for changing system settings.

This repository is my attempt (so far) at converting the source code for the TS100 soldering iron to the free System Workbench IDE and gcc based compilers.
The software has similar functionality to the original firmware.

I am also attempting to translate / comment as a go for a reference.

Untested on actual hardware until noted otherwise.
## Features Working
* Soldering / Temperature control
* Full PID Iron Temp
* Adjusting temperature
* Automatic sleep
* Motion wake support
* Basic settings menu
* Input voltage UVLO measurement
* Saving settings to flash for persistence
* Improved GUI
* Use hardware I2C for communications
* Can disable movement detection if desired
## Features still to be implemented
* Manual Temp Calibration

# Upgrading your ts100 iron
This is completely safe, if it goes wrong just put the .hex file from the official website onto the unit and your back to the old firmware :)

1. Hold the button closest to the tip, and plug in the USB to the computer.
2. The unit will appear as a USB drive.
3. Drag the .hex file onto the USB drive.
4. The unit will disconnect and reconnect.
5. The filename will have changed to end in .RDY or .ERR .
6. If it ends with .RDY your done! Otherwise something went wrong.
7. If it went wrong try on a windows computer, some Mac / Linux machines do not play well with their boot loader.
4 changes: 1 addition & 3 deletions SystemDesign.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@ This is used for motion detection of the soldering iron.

# USB Disk
When the unit is plugged into the computer, it presents a FAT device to the operating system over the usb connection.
This is implimented using a ram buffer for the disk.
This is implemented using a ram buffer for the disk.




# Future improvements to be made
These features are things I would like to add to the firmware

* Use hardware PWM for driving the heating element.
* Use the sysTick hardware for timing of events
* Move all the settings to an on device menu system instead of usb link
* Move error codes into a unified struct
* Rewrite most of the OLED stack to not require hardcoded values
* Rework the modes of the unit to be neater

15 changes: 8 additions & 7 deletions TS100/TS100.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Mcu.Pin9=PA14
Mcu.PinsNb=16
Mcu.UserConstants=
Mcu.UserName=STM32F103T8Ux
MxCube.Version=4.16.0
MxDb.Version=DB.4.0.160
MxCube.Version=4.16.1
MxDb.Version=DB.4.0.161
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true
Expand Down Expand Up @@ -107,7 +107,7 @@ PB7.Signal=I2C1_SDA
PCC.Checker=false
PCC.Line=STM32F103
PCC.MCU=STM32F103T(8-B)Ux
PCC.MXVersion=4.16.0
PCC.MXVersion=4.16.1
PCC.PartNumber=STM32F103T8Ux
PCC.Seq0=0
PCC.Series=STM32F1
Expand All @@ -127,13 +127,13 @@ ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=1
ProjectManager.PreviousToolchain=
ProjectManager.PreviousToolchain=SW4STM32
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=TS100.ioc
ProjectManager.ProjectName=TS100
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=SW4STM32
ProjectManager.ToolChainLocation=/home/ralim/Repo/ts100/TS100
ProjectManager.ToolChainLocation=C\:\\Users\\Ralim\\Repo\\ts100\\TS100
ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false,2-MX_I2C1_Init-I2C1-false,3-MX_ADC2_Init-ADC2-false,4-MX_USB_PCD_Init-USB-false,5-MX_ADC1_Init-ADC1-false
RCC.ADCFreqValue=12000000
Expand All @@ -147,12 +147,13 @@ RCC.APB2TimFreq_Value=48000000
RCC.FCLKCortexFreq_Value=48000000
RCC.FamilyName=M
RCC.HCLKFreq_Value=48000000
RCC.IPParameters=ADCFreqValue,ADCPresc,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSourceVirtualString,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value
RCC.IPParameters=ADCFreqValue,ADCPresc,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLSource,PLLSourceVirtual,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USBFreq_Value
RCC.MCOFreq_Value=48000000
RCC.PLLCLKFreq_Value=48000000
RCC.PLLMCOFreq_Value=24000000
RCC.PLLMUL=RCC_PLL_MUL12
RCC.PLLSourceVirtualString=RCC_PLLSOURCE_HSI_DIV2
RCC.PLLSource=RCC_PLLSOURCE_HSI_DIV2
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSI_DIV2
RCC.SYSCLKFreq_VALUE=48000000
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
RCC.TimSysFreq_Value=48000000
Expand Down
33 changes: 18 additions & 15 deletions workspace/ts100/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="elf" artifactName="${ProjName}" 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.debug" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1236130657" name="Debug" parent="fr.ac6.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.bin&quot;; arm-none-eabi-size &quot;${BuildArtifactFileName}&quot; ">
<configuration artifactExtension="elf" artifactName="${ProjName}" 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.debug" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1236130657" name="Debug" parent="fr.ac6.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.bin&quot;; arm-none-eabi-size &quot;${BuildArtifactFileName}&quot; ;arm-none-eabi-objcopy -O ihex &quot;${BuildArtifactFileBaseName}.elf&quot; &quot;${BuildArtifactFileBaseName}.hex&quot;">
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1236130657." name="/" resourcePath="">
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.2123758208" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug">
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.1416828544" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" value="STM32F103T8Ux" valueType="string"/>
<option id="fr.ac6.managedbuild.option.gnu.cross.board.1401196546" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" value="ts100" valueType="string"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.1811524023" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
<builder buildPath="${workspace_loc:/ts100}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.727350462" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
<builder buildPath="${workspace_loc:/ts100}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.727350462" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
</outputEntries>
</builder>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1500724168" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.963224364" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.size" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.400507088" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.963224364" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.more" valueType="enumerated"/>
<option id="gnu.c.compiler.option.debugging.level.400507088" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1436405353" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/STM32_USB-FS-Device_Driver/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/StdPeriph_Driver/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/CMSIS/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/CMSIS/device&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/StdPeriph_Driver/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/CMSIS/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/CMSIS/device}&quot;"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1155214152" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
<listOptionValue builtIn="false" value="STM32F103T8Ux"/>
Expand All @@ -45,7 +49,7 @@
</option>
<option id="gnu.c.compiler.option.dialect.std.1983627145" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.c11" valueType="enumerated"/>
<option id="gnu.c.compiler.option.warnings.nowarn.1227270879" name="Inhibit all warnings (-w)" superClass="gnu.c.compiler.option.warnings.nowarn" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.1556802580" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" value="true" valueType="boolean"/>
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.1556802580" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.1635097739" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.211510996" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
</tool>
Expand All @@ -65,10 +69,10 @@
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.1926145385" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.104990963" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
<option id="gnu.both.asm.option.include.paths.834243276" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/StdPeriph_Driver/inc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/CMSIS/core&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/CMSIS/device&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/StdPeriph_Driver/inc}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/CMSIS/core}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/CMSIS/device}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1754789872" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.610009869" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
Expand All @@ -77,7 +81,6 @@
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="CMSIS"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="STM32_USB-FS-Device_Driver"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="StdPeriph_Driver"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
Expand Down
1 change: 1 addition & 0 deletions workspace/ts100/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Debug/
27 changes: 0 additions & 27 deletions workspace/ts100/.settings/language.settings.xml

This file was deleted.

6 changes: 4 additions & 2 deletions workspace/ts100/LinkerScript.ld
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
ROM (rx) : ORIGIN = 0x08004000, LENGTH = 36K
ROM (rx) : ORIGIN = 0x08004000, LENGTH = 47K

}
/*^ The rom is shortened as the last ~10K is used for storing the virtual USB Disk, and the offset at the beginning in the bootloader*/
/*ROM (rx) : ORIGIN = 0x08004000, LENGTH = 48K*/
/*^ The offset at the beginning in the bootloader, 1K at the end for settings (actually 256 bytes, but leaving room for now)*/
/* Sections */
SECTIONS
{
Expand Down
Loading

0 comments on commit 0b26e66

Please sign in to comment.