Skip to content
forked from wose/ts100

ts100 soldering iron firmware written in Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

konstantisu/ts100-2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ts100

ts100 soldering iron firmware written in Rust

⚠️ You can't solder with this firmware (yet) ⚠️ Take a look at Ralim/ts100 for a feature complete alternative.

v0.1.0

Hardware

Schematics

Schematics

PCB

Main Board Top

Main Board Bottom

CPU Board Top

CPU_Board_Bottom

Debugger Interface

The SWD interface is exposed as 4 solder pads at the bottom of the CPU board.

  • VCC (NC)
  • GND (NC)
  • SWCLK (blue wire)
  • SWDIO (red wire)

I added a little bit of kapton tape in between the CPU and main board before assembling to minimize the damage if the solder connection breaks.

CPU and Main board

Firmware Backup

It's probably a good idea to backup the original firmware including the (horrible) bootloader. After connecting an ST-Link programmer you can use openocd to dump the flash.

Start openocd:

% openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg
Open On-Chip Debugger 0.9.0 (2017-03-07-13:28)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
        Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
        Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
        adapter speed: 1000 kHz
        adapter_nsrst_delay: 100
        none separate
        Info : Unable to match requested speed 1000 kHz, using 950 kHz
        Info : Unable to match requested speed 1000 kHz, using 950 kHz
        Info : clock speed 950 kHz
        Info : STLINK v2 JTAG v17 API v2 SWIM v4 VID 0x0483 PID 0x3748
        Info : using stlink api v2
        Info : Target voltage: 3.245003
        Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints

Dump the firmware:

% telnet localhost 4444
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> dump_image ts100_orig.bin 0x08000000 0xffff
dumped 65535 bytes in 1.386794s (46.149 KiB/s)
>

Hacking

Dependencies

  • Rust nighly
  • OpenOCD
  • GNU ld
  • GDB
  • Xargo
% rustup default nightly
% rustc -V
rustc 1.21.0-nightly (f774bced5 2017-08-12)

% sudo apt-get install binutils-arm-none-eabi gdb-arm-none-eabi openocd
% arm-none-eabi-ld -V | head -n1
GNU ld (2.28-5+9+b3) 2.28
% arm-none-eabi-gdb -v | head -n1
GNU gdb (7.12-6+9+b2) 7.12.0.20161007-git
% openocd -v 2>&1 | head -n1
Open On-Chip Debugger 0.9.0 (2017-03-07-13:28)

% cargo install xargo
% xargo -V
xargo 0.3.8
cargo 0.22.0-nightly (7704f7b1f 2017-08-09)

% rustup component add rust-src

Compiling

% git clone https://github.com/wose/ts100.git
% cd ts100/firmware
% xargo build --release

OpenOCD/GDB

Connect the soldering iron to the ST-Link programmer and start openocd:

% openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg

Start gdb in another terminal. The included .gdbinit will connect to openocd and flash the chip when gdb is started.

% arm-none-eabi-gdb target/thumbv7m-none-eabi/release/firmware

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

ts100 soldering iron firmware written in Rust

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.0%
  • GDB 2.0%