1
0
forked from me/IronOS

Merge branch 'master' into dfulogo

This commit is contained in:
cybernesto
2022-01-24 17:14:53 +01:00
56 changed files with 8156 additions and 747 deletions

View File

@@ -20,54 +20,71 @@ Use the following steps to set up a build environment for IronOS on the command
1. [Follow steps 1 3 here to install the toolchain](https://github.com/glegrain/STM32-with-macOS#0---installing-the-toolchain) needed to compile for STM32 microcontrollers.
2. Install `python`:
```
brew install python
```
3. (Optional) Update `pip` so it doesn't warn you about being out-of-date:
```
python3 -m pip install --upgrade pip
```
4. Change to the `source` directory:
```
cd source
```
5. Create a Python virtual environment for IronOS named `ironos-venv` to keep your Python installation clean:
```
python3 -m venv ironos-venv
```
6. Activate the Python virtual environment:
```
source ironos-venv/bin/activate
```
7. Install the dependencies required to run `make-translation.py`:
```
pip install bdflib
```
8. All done! See some examples below for how you can build your own IronOS.
### Examples
To build a single language Simplified Chinese firmware for the TS80P with 8 simultaneous jobs:
To build a single language Simplified Chinese firmware for the TS80P with 8 simultaneous jobs:
```
make -j8 model=TS80P firmware-ZH_CN
```
To build a European multi-language firmware for the Pinecil with as many simultaneous jobs as there are logical processors on Linux:
To build a European multi-language firmware for the Pinecil with as many simultaneous jobs as there are logical processors on Linux:
```
make -j$(nproc) model=Pinecil firmware-multi_European
```
To build a Cyrillic compressed multi-language firmware for the Pinecil with as many simultaneous jobs as there are logical processors on macOS:
To build a Cyrillic compressed multi-language firmware for the Pinecil with as many simultaneous jobs as there are logical processors on macOS:
```
make -j$(sysctl -n hw.logicalcpu) model=Pinecil firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian
```
To build a custom multi-language firmware including English and Simplified Chinese for the TS80:
To build a custom multi-language firmware including English and Simplified Chinese for the TS80:
```
make -j8 model=TS80 custom_multi_langs="EN ZH_CN" firmware-multi_Custom
```
To build a custom compressed multi-language firmware including German, Spanish, and French for the TS100 (note if `model` is unspecified, it will default to `TS100`):
To build a custom compressed multi-language firmware including German, Spanish, and French for the TS100 (note if `model` is unspecified, it will default to `TS100`):
```
make -j8 custom_multi_langs="DE ES FR" firmware-multi_compressed_Custom
```
@@ -77,6 +94,7 @@ To build a release instead, run the `build.sh` script. This will update translat
## Updating languages
To update the language translation files and their associated font maps, execute the `make_translation.py` code from the `Translations` directory.
If you edit the translation definitions or the english translation, please also run `gen_menu_docs.py` to update the settings menu documentation automatically.
## Building Pinecil

View File

@@ -6,13 +6,13 @@ In the development of this firmware, there are three _types_ of firmware release
These are the "Main" stable releases, which generally have high confidence in being bug free.
Release candidates are released slightly more often, and these are generally perfectly fine for everyday use. These are released early to allow for translation checking and for wonderful people to help spot bugs and regressions.
Finally, there are the "mainline" builds, which are built from the main git branch.
These are built on every change an can be found on the Actions tab (see below).
These are built on every change and can be found on the Actions tab (see below).
### Main release
Main releases are made to the [releases page](https://github.com/Ralim/IronOS/releases).
Download the zip file that matches your model of soldering iron, and extract it.
You then need to use the appropriate file type for your unit, in general Miniware irons are `.hex` and Pinecil is `.bin`.
You then need to use the appropriate file type for your unit, in general Miniware devices need `.hex` and Pinecil need `.bin`.
Flash according to details below
### Bleeding edge / latest
@@ -24,20 +24,20 @@ In general you probably want `master`.
Once you click on a run, scroll down to the "Artifacts" section and then click on your model to download a zip file.
Then this works the same as a production release (use the correct file).
## Miniware irons (TS100, TS80, TS80P)
## Miniware devices (TS100, TS80, TS80P & MHP30)
This is completely safe, but if it goes wrong just put the .hex file from the [official website](http://www.miniware.com.cn/product-category/soldering-pen/electric-soldering-kit/) onto the unit and you're back to the old firmware. Downloads for the hex files to flash are available on the [releases page.](https://github.com/Ralim/IronOS/releases) The file you want is called _(MODEL)\_EN.hex_ unless you want the translations, they are (MODEL)\__language short name_.hex. Where (MODEL) is either TS100 or TS80.
This is completely safe, but if it goes wrong just put the `.hex` file from the official website ([TS100](https://www.minidso.com/forum.php?mod=viewthread&tid=868&extra=page%3D1), [TS80](https://www.minidso.com/forum.php?mod=viewthread&tid=3202&extra=page%3D1), [TS80P](https://www.minidso.com/forum.php?mod=viewthread&tid=4070&extra=page%3D1) & [MHP30](https://www.minidso.com/forum.php?mod=viewthread&tid=4385&extra=page%3D1)) onto the unit and you're back to the old firmware. Downloads for the `.hex` files to flash are available on the [releases page.](https://github.com/Ralim/IronOS/releases) The file you want is called _(MODEL)\_EN.hex_ unless you want the translations, they are (MODEL)\__language short name_.hex. Where (MODEL) is either TS100 or TS80.
Officially the bootloader on the iron only works under Windows (use the built-in File Explorer, as alternative file managers or copy handlers like Teracopy will fail). However, users have reported that it does work under Mac, and can be made to work under Linux _sometimes_. Details over on the [wiki page](https://github.com/Ralim/ts100/wiki/Upgrading-Firmware).
Officially the bootloader on the devices only works under Windows (use the built-in File Explorer, as alternative file managers or copy handlers like Teracopy will fail). However, users have reported that it does work under Mac, and can be made to work under Linux _sometimes_. Details over on the [wiki page](https://github.com/Ralim/ts100/wiki/Upgrading-Firmware).
1. Hold the button closest to the tip, and plug in the USB to the computer.
1. Hold the button closest to the tip (MHP30 the left button on the back), and plug in the USB to the computer.
2. The unit will appear as a USB drive. ( Screen will say `DFU` on it.)
3. Drag the .hex file onto the 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 you're done! Otherwise, something went wrong.
7. If it didn't work the first time, try copying the file again without disconnecting the iron, often it will work on the second shot.
8. Disconnect the USB and power up the iron. You're good to go.
5. The filename will have changed to end in *.RDY* or *.ERR*
6. If it ends with *.RDY* you're done! Otherwise, something went wrong.
7. If it didn't work the first time, try copying the file again without disconnecting the device, often it will work on the second shot.
8. Disconnect the USB and power up the device. You're good to go.
For the more adventurous out there, you can also load this firmware onto the device using an SWD programmer.
@@ -55,7 +55,7 @@ sgr1ff1n (Shane) commented in [issue 11](https://github.com/Ralim/ts100/issues/1
# Linux
While in past there were reports of unreliable upgrades, the consensus in [issue 11](https://github.com/Ralim/ts100/issues/11) is that things work mostly as expected in Linux.
While in the past there were reports of unreliable upgrades, the consensus in [issue 11](https://github.com/Ralim/ts100/issues/11) is that things work mostly as expected in Linux.
@awigen has contributed a script [flash_ts100_linux.sh](https://raw.githubusercontent.com/Ralim/ts100/master/Flashing/flash_ts100_linux.sh) that works on Ubuntu 16.04 as well as other distros.
@@ -95,7 +95,7 @@ Generally all usb controllers work, but some hubs have issues so avoiding hubs m
Once the device is connected while holding the button, the screen will stay **off**.
This is normal, and then you can use the appropriate tool to load the .hex or .bin file as per your OS.
This is normal, and then you can use the appropriate tool to load the `.hex` or `.bin` file as per your OS.
You can also refer to the Pine64 [Wiki](https://wiki.pine64.org/wiki/Pinecil).
@@ -109,54 +109,54 @@ dfu-util -D Pinecil_EN.dfu
### Windows
For windows the easiest tool to use is the vendors gui tool from [here](http://www.gd32mcu.com/download/down/document_id/176/path_type/1).
For windows the easiest tool to use is the vendors gui tool from [here](http://www.gd32mcu.com/en/download?kw=GD32+MCU+Dfu+Tool&lan=en).
Should the link break, its called "GD32 MCU Dfu Tool" and can be grabbed from http://www.gd32mcu.com/en/download/.
You will also need the matching drivers from [here](http://www.gd32mcu.com/download/down/document_id/244/path_type/1) installed if you have not used gigadevice parts before.
You will also need the matching drivers from [here](http://www.gd32mcu.com/en/download?kw=GD32+Dfu+Drivers&lan=en) installed if you have not used gigadevice parts before.
These are called "GD32 Dfu Drivers" if the link breaks.
#### Steps:
1. Download both the `GD32 MCU DFU TOOL` and the `Drivers`
1. Install the drivers and open the DFU tool
1. Ignore the prompt to update the tool.
1. Connect pinecil to windows with usb cable while holding down minus button, **screen will be stay blank** but you will hear the noise from windows connecting to it.
1. At the top of the DFU tool, you should see `GD DFU DEVICE 1` appear at the top
1. Change the mode to `Download to device`
1. Select the `open` button in that area of the window and load the `Pinecil_XX.hex` file from the downloaded release
1. Tick the `verify after download` check box
1. Click the OK button at the bottom of the window to run the process
1. After it is complete either click "Leave DFU` or unplug the iron and power cycle it while _not_ holding down the buttons.
1. Download both the `GD32 MCU DFU TOOL` and the `Drivers`.
2. Install the drivers and open the DFU tool.
3. Ignore the prompt to update the tool.
4. Connect the Pinecil to a Windows PC via USB cable while holding down the minus button, **screen will stay blank** but you will hear the noise from Windows connecting to it.
5. At the top of the DFU tool, you should see `GD DFU DEVICE 1` appear.
6. Change the mode to `Download to device`.
7. Select the `open` button in that area of the window and load the `Pinecil_XX.hex` file from the downloaded release.
8. Tick the `verify after download` check box.
9. Click the OK button at the bottom of the window to run the process.
10. After it is complete either click `Leave DFU` or unplug the iron and power cycle it while _not_ holding down the buttons.
You can also use dfu-util if you wish to set it up, but that is better documented by others when it comes to windows.
You can also use dfu-util if you wish to set it up, but that is better documented by others when it comes to Windows.
### FAQ
#### [Miniware] The file is showing up with the extension `.ERR`
This can occur during the programming process if any of the checks in the bootloader fail. This is often triggered by anti-virus software or using a non-windows host OS.
This can occur during the programming process if any of the checks in the bootloader fail. This is often triggered by anti-virus software or using a non-Windows host OS.
First, try just copying the file a second time.
1. Attach the iron in DFU mode
2. Copy the hex file to the device
3. The device disconnects and connects with the `.ERR` file
4. Copy the same hex file again **DO NOT TRY AND DELETE THE OLD ONE**
5. The device will disconnect and reconnect again
6. The device _should_ now have the `.RDY` file
1. Attach the iron in DFU mode.
2. Copy the `.hex` file to the device.
3. The device disconnects and connects with the `.ERR` file.
4. Copy the same `.hex` file again **DO NOT TRY AND DELETE THE OLD ONE**.
5. The device will disconnect and reconnect again.
6. The device _should_ now have the `.RDY` file.
7. You're done.
If this fails and you are on Mac or Linux reading the wiki page about programming can help. There is also a very long issue thread going through all of the different attempts around this too.
If you are on windows, it's often best to try another computer (friends, work, partners etc).
If you are on Windows, it's often best to try another computer (friends, work, partners etc).
#### [Miniware] Device randomly disconnects or does not show up in DFU mode
First, check the USB cable you are using has the data pins; test it on another device. There are a surprisingly large number of usb-micro cables that are power _only_.
1. heck if the USB cable you are using has the data pins; test it on another device. There are a surprisingly large number of usb-micro cables that are power _only_.
Secondly, try other USB ports. Often different USB controllers will interact with the units differently due to design quirks in the miniware design.
2. Try other USB ports. Often different USB controllers will interact with the units differently due to design quirks in the miniware design.
## [Miniware] Alternative bootloader

302
Documentation/Settings.md Normal file
View File

@@ -0,0 +1,302 @@
<!-- This is an automatically generated file. DO NOT EDIT. Edit gen_menu_docs.py instead -->
# IronOS Settings Menu
The below breaks down the menu's and what each setting means.
## Menu Categories
In the menu there are a few main categories that are used to keep the list manageable.
### Category: Power settings
Menu for settings related to power. Main settings to do with the input voltage.
### Category: Soldering settings
Settings for soldering mode, such as boost temps, the increment used when pressing buttons and if button locking is enabled.
### Category: Sleep mode
Settings to do with power saving, such as sleep mode, sleep temps, and shutdown modes.
### Category: User interface
User interface related settings, such as units.
### Category: Advanced settings
Advanced settings. Misc catchall for settings that don't fit anywhere else or settings that require some thought before use.
## Settings
These are all of the settings possible in the menu.
**Not all settings are visible for all devices.**
For example, the TS100 does not have USB-PD settings.
When using the device, if unsure you can pause (press nothing) on a setting and after a short delay help text will scroll across the screen.
This is the "on device help text".
### Setting: Power source
When the device is powered by a battery, this adjusts the low voltage threshold for when the unit should turn off the heater to protect the battery.
On device help text:
Power source. Sets cutoff voltage. (DC 10V) (S 3.3V per cell, disable power limit)
### Setting: Sleep temp
Temperature the device will drop down to while asleep. Typically around halfway between off and soldering temperature.
On device help text:
Tip temperature while in "sleep mode"
### Setting: Sleep timeout
How long of a period without movement / button-pressing is required before the device drops down to the sleep temperature.
On device help text:
Interval before "sleep mode" kicks in (S=seconds | M=minutes)
### Setting: Shutdown timeout
How long of a period without movement / button-pressing is required before the device turns off the tip heater completely and returns to the main idle screen.
On device help text:
Interval before the iron shuts down (M=minutes)
### Setting: Motion sensitivity
Scale of how sensitive the device is to movement. Higher numbers == more sensitive. 0 == motion detection turned off.
On device help text:
0=off | 1=least sensitive | ... | 9=most sensitive
### Setting: Temperature unit
If the device shows temperatures in °C or °F.
On device help text:
C=Celsius | F=Fahrenheit
### Setting: Detailed idle screen
Should the device show an 'advanced' view on the idle screen. The advanced view uses text to show more details than the typical icons.
On device help text:
Display detailed information in a smaller font on the idle screen
### Setting: Display orientation
If the display should rotate automatically or if it should be fixed for left- or right-handed mode.
On device help text:
R=right-handed | L=left-handed | A=automatic
### Setting: Boost temp
When the unit is in soldering mode. You can hold down the button at the front of the device to temporarily override the soldering temperature to this value. This SETS the temperature, it does not ADD to it.
On device help text:
Temperature used in "boost mode"
### Setting: Heat on power up
When the device powers up, should it enter into a special mode. These settings set it to either start into soldering mode, sleeping mode or auto mode (Enters into soldering mode on the first movement).
On device help text:
O=off | S=soldering temp | Z=standby at sleep temp until moved | R=standby without heating until moved
### Setting: Cooldown blink
If the idle screen should blink the tip temperature for attention while the tip is over 50°C. Intended as a 'tip is still hot' warning.
On device help text:
Flash the temperature reading after heating was halted while the tip is still hot
### Setting: Calibrate temperature?
Used to calibrate the ADC+Op-amp offsets for the tip. This calibration must be performed when the tip temperature and the handle temperature are equal. Generally not required unless your device is reading more than 5°C off target.
On device help text:
Start tip temperature offset calibration
### Setting: Factory reset?
Resets all settings and calibrations to factory defaults. Does NOT erase custom user boot up logo's.
On device help text:
Reset settings to default
### Setting: Calibrate input voltage?
Enters an adjustment mode where you can gradually adjust the measured voltage to compensate for any unit-to-unit variance in the voltage sense resistors.
On device help text:
Start VIN calibration (long press to exit)
### Setting: Detailed solder screen
Should the device show an 'advanced' soldering view. This is a text-based view that shows more information at the cost of no nice graphics.
On device help text:
Display detailed information in a smaller font on soldering screen
### Setting: Scrolling speed
How fast the description text scrolls when hovering on a menu. Faster speeds may induce tearing, but allow reading the whole description faster.
On device help text:
Speed info text scrolls past at (S=slow | F=fast)
### Setting: QC voltage
This adjusts the maximum voltage the QC negotiation will adjust to. Does NOT affect USB-PD. Should be set safely based on the current rating of your power supply.
On device help text:
Max QC voltage the iron should negotiate for
### Setting: PD timeout
How long until firmware stops trying to negotiate for USB-PD and tries QC instead. Longer times may help dodgy / old PD adapters, faster times move onto PD quickly. Units of 100ms. Recommended to keep small values.
On device help text:
PD negotiation timeout in 100ms steps for compatibility with some QC chargers
### Setting: Power limit
Allows setting a custom wattage for the device to aim to keep the AVERAGE power below. The unit can't control its peak power no matter how you set this. (Except for MHP30 which will regulate nicely to this). If USB-PD is in use, the limit will be set to the lower of this and the supplies advertised wattage.
On device help text:
Maximum power the iron can use (W=watt)
### Setting: Reverse + - keys
Swaps which button increments and decrements on temperature change screens.
On device help text:
Reverse assignment of buttons for temperature adjustment
### Setting: Temp change short
Factor by which the temperature is changed with a quick press of the buttons.
On device help text:
Temperature-change-increment on short button press
### Setting: Temp change long
Factor by which the temperature is changed with a hold of the buttons.
On device help text:
Temperature-change-increment on long button press
### Setting: Power pulse
Enables and sets the wattage of the power pulse. Power pulse causes the device to briefly turn on the heater to draw power to avoid power banks going to sleep.
On device help text:
Intensity of power of keep-awake-pulse (watt)
### Setting: Hall sensor sensitivity
If the unit has a hall effect sensor (Pinecil), this adjusts how sensitive it is at detecting a magnet to put the device into sleep mode.
On device help text:
Sensitivity of the Hall effect sensor to detect sleep (O=off | L=low | M=medium | H=high)
### Setting: Allow locking buttons
If locking the buttons against accidental presses is enabled.
On device help text:
While soldering, hold down both buttons to toggle locking them (D=disable | B=boost mode only | F=full locking)
### Setting: Minimum voltage
When powered by a battery, this adjusts the minimum voltage per cell before shutdown. (This is multiplied by the cell count.)
On device help text:
Minimum allowed voltage per cell (3S: 3 - 3.7V | 4-6S: 2.4 - 3.7V)
### Setting: Anim. loop
Should the menu animations loop. Only visible if the animation speed is not set to "Off"
On device help text:
Loop icon animations in main menu
### Setting: Anim. speed
How fast should the menu animations loop, or if they should not loop at all.
On device help text:
Pace of icon animations in menu (O=off | S=slow | M=medium | F=fast)
### Setting: Power pulse delay
Adjusts the time interval between power pulses. Longer gaps reduce undesired heating of the tip, but needs to be fast enough to keep your power bank awake.
On device help text:
Delay before keep-awake-pulse is triggered (x 2.5s)
### Setting: Power pulse duration
How long should the power pulse go for. Some power banks require seeing the power draw be sustained for a certain duration to keep awake. Should be kept as short as possible to avoid wasting power / undesired heating of the tip.
On device help text:
Keep-awake-pulse duration (x 250ms)
### Setting: Language: EN English
Changes the device language on multi-lingual builds.
On device help text:
Current firmware language
### Setting: Screen contrast
Display brightness. Higher values age the OLED faster due to burn-in. (However, it is notable that most of these screens die from other causes first.)
On device help text:
Adjust the brightness of the OLED screen
### Setting: Invert screen
Inverts the entire OLED.
On device help text:
Invert the colours of the OLED screen