Pinecil
Introduction
The Pinecil is a portable open-source soldering iron that includes a RISC-V MCU. It's a great tool for when you need soldering on the go. But it also works just as well as a conventional soldering iron.
The Pinecil was developed at PINE64 in collaboration with Ben Brown, who ported the firmware to RISC-V.
The MCU of the Pinecil V1 is a GD32VF103TB RISC-V supporting RV32IMAC running at 108 MHz. There is plenty of space with 128KB Flash and 32KB SRAM, at least for a soldering iron.
So if you ever wanted to hack your soldering iron, this would be the right platform ;)
Firmware Upgrade
After receiving my Pinecil, the first thing I did (after briefly testing it) was to update the outdated factory shipped firmware.
The shipped firmware v2.14
was over a year old.
IronOS
is the name of the firmware which runs on the Pinecil and various other soldering irons, for example the TS100
.
The development happens in this repository.
First, head to the Releases
section and download the latest firmware for the Pinecil. In my case this was v2.19
from July 13, 2022.
From there download Pinecil.zip
, which contains a Set of .hex and .dfu files.
LICENSE Pinecil_HR.hex Pinecil_SK.dfu
LICENSE_RELEASE.md Pinecil_HU.dfu Pinecil_SK.hex
Pinecil_BE.dfu Pinecil_HU.hex Pinecil_SL.dfu
Pinecil_BE.hex Pinecil_IT.dfu Pinecil_SL.hex
Pinecil_BG.dfu Pinecil_IT.hex Pinecil_SR_CYRL.dfu
Pinecil_BG.hex Pinecil_JA_JP.dfu Pinecil_SR_CYRL.hex
Pinecil_CS.dfu Pinecil_JA_JP.hex Pinecil_SR_LATN.dfu
Pinecil_CS.hex Pinecil_LT.dfu Pinecil_SR_LATN.hex
Pinecil_DA.dfu Pinecil_LT.hex Pinecil_SV.dfu
Pinecil_DA.hex Pinecil_NL_BE.dfu Pinecil_SV.hex
Pinecil_DE.dfu Pinecil_NL_BE.hex Pinecil_TR.dfu
Pinecil_DE.hex Pinecil_NL.dfu Pinecil_TR.hex
Pinecil_EL.dfu Pinecil_NL.hex Pinecil_UK.dfu
Pinecil_EL.hex Pinecil_NO.dfu Pinecil_UK.hex
Pinecil_EN.dfu Pinecil_NO.hex Pinecil_VI.dfu
Pinecil_EN.hex Pinecil_PL.dfu Pinecil_VI.hex
Pinecil_ES.dfu Pinecil_PL.hex Pinecil_YUE_HK.dfu
Pinecil_ES.hex Pinecil_PT.dfu Pinecil_YUE_HK.hex
Pinecil_FI.dfu Pinecil_PT.hex Pinecil_ZH_CN.dfu
Pinecil_FI.hex Pinecil_RO.dfu Pinecil_ZH_CN.hex
Pinecil_FR.dfu Pinecil_RO.hex Pinecil_ZH_TW.dfu
Pinecil_FR.hex Pinecil_RU.dfu Pinecil_ZH_TW.hex
Pinecil_HR.dfu Pinecil_RU.hex
As you can see from the 2-letter country codes, there is support for a lot of languages.
I chose to install the English firmware version. Therefore the following files are of interest:
Pinecil_EN.dfu
Pinecil_EN.hex
The .hex
file contains the raw firmware without any additional information. So you must know where to put it in flash. But there is an easier way.
DFU (Device Firmware Upgrade) is a standardized way to flash firmware to devices over USB. Luckily for us the RISC-V core of the Pinecil supports DFU to update its firmware. The .dfu
file not only contains the firmware, but also the necessary addresses in a way for dfu-util
to know where to put it.
By the way, the bootloader of the Pinecil is inside ROM, meaning you can't brick it by flashing wrongly.
First install dfu-util
:
sudo apt install dfu-util
You can find the flashing instructions for the pinecil here.
They steps are listed below:
Steps
🛑️ Do not use the DC power jack while updating firmware or you may destroy your PC. 🛑️
- Download and extract the firmware package from GitHub IronOS Releases.
- Highly recommend updating dfu-util to the newest version.
- Enter DFU mode: press and hold (-) button at the back of the iron (do not release).
- Connect USB to PC, and USB-C to back of Pinecil, keep holding (-) button down.
- The screen will stay black/off to indicate the Pinecil is in DFU mode. This is normal.
- Once the USB cable is connected at two ends, wait 10 seconds more, then release the (-) button.
- Using dfu-util you can flash the firmware using a command line like this: dfu-util -D Pinecil_EN.dfu
So I hold the (-) button while powering up the Pinecil, and see there, the device enumerates correctly:
> lsusb
...
Bus 001 Device 019: ID 28e9:0189 GDMicroelectronics GD32 DFU Bootloader (Longan Nano)
...
Now, all that is left to flash the new firmware is:
> dfu-util -D Pinecil_EN.dfu
Tada! The pinecil with up to date v2.19
firmware.
The full output can be seen here:
> dfu-util -D Pinecil_EN.dfu
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Match vendor ID from file: 28e9
Match product ID from file: 0189
Multiple alternate interfaces for DfuSe file
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #1 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Option Bytes "
DfuSe interface name: "Internal Flash "
Found GD32VF103, which reports a bad page size and count for its internal memory.
Fixed layout based on part number: page size 1024, count 128.
File contains 1 DFU images
Parsing DFU image 1
Target name: ST...
Image for alternate setting 0, (1 elements, total size = 52332)
Setting Alternate Interface #0 ...
Parsing element 1, address = 0x08000000, size = 52324
Erase [=========================] 100% 52324 bytes
Erase done.
Download [=========================] 100% 52324 bytes
Download done.
Done parsing DfuSe file
Testing
The first message that greeted me was a warning about changed settings. The next thing I noticed was the new look of the main menu:
When holding the Pinecil the upside down, the orientation of the menu will now change accordingly thanks to its builtin gyroscope.
The settings menu was completely overhauled, now with cool little animations :)
These are just the cosmetic changes I noticed after a few minutes of playing with the old firmware. I can only imagine that under the hood a lot more was changed and improved.
Small Caveat
It was not a software problem, but a hardware one I encountered when I was unable to reinsert the soldering tip into the Pinecil. One of the screws holding the soldering tip was screwed in just a bit too much. By loosening it a bit, I could insert the soldering tip again without any problems.
Summary
At first, I doubted that the Pinecil could really hold up as a proper soldering iron replacement. This doubt vanished quickly. The Pinecil really can be used as your main soldering iron and is great at it.
Here's a last picture of it in action:
The upgraded Pinecil V2 seems great as well, but I will be using this one for a long time.