Merge branch 'dev' into epr-pinecil-og
This commit is contained in:
35
.github/workflows/docs.yml
vendored
Normal file
35
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
name: Docs
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# Triggers the workflow on push or pull request
|
||||
push:
|
||||
branches: [ dev, docs ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
deploy-docs:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v4
|
||||
|
||||
- run: pip install --upgrade pip && pip install mkdocs mkdocs-gen-files
|
||||
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
|
||||
|
||||
- name: Publish docs
|
||||
run: mkdocs gh-deploy
|
||||
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Install dependencies (apk)
|
||||
run: apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git bash
|
||||
run: apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git musl-dev clang bash clang-extra-tools
|
||||
|
||||
- name: Install dependencies (python)
|
||||
run: python3 -m pip install bdflib
|
||||
|
||||
@@ -4,4 +4,4 @@ IronOS supports both a bootup logo _AND_ bootup animations.
|
||||
|
||||
However, they are no longer included in this repo.
|
||||
|
||||
[Please read the docs](../Documentation/Logo.md)
|
||||
[Please read the docs](https://ralim.github.io/IronOS/Logo/)
|
||||
|
||||
@@ -35,7 +35,7 @@ This may change during power up as the sources are negotiated in turn.
|
||||
- **DC** input (dumb)
|
||||
- **QC** input (We used QC2/3 negotiation for current supply)
|
||||
- **PD W. VBus** input (PD subsystem is used to negotiate for current supply); and VBus is connected to your input power source
|
||||
- **PD No VBus** input (PD subsystem is used to negotiate for current supply); and VBus is **NOT** connected to your input power source. If it is Not required or possible to do a special mod of your PCB (i.e. late model V1, some early Green PCB models) then [PD No VBus] displays on-screen ([see details and PD Debug section below](/Documentation/DebugMenu.md#pd-debug-menu)).
|
||||
- **PD No VBus** input (PD subsystem is used to negotiate for current supply); and VBus is **NOT** connected to your input power source. If it is Not required or possible to do a special mod of your PCB (i.e. late model V1, some early Green PCB models) then [PD No VBus] displays on-screen ([see details and PD Debug section below](https://ralim.github.io/IronOS/DebugMenu/#pd-debug-menu)).
|
||||
|
||||
### Vin
|
||||
|
||||
@@ -50,7 +50,7 @@ This can be used with RTip for assessing temperature processing performance.
|
||||
|
||||
This is the handle temperature or more accurately the reading of the Cold Junction Compensation (CJC) temperature sensor. This is expressed in °C. Range of 20-40 °C is normal depending on how hot/cold the room is and how long power has been plugged in which warms the PCB further.
|
||||
This is used for CJC of the tip temperature.
|
||||
> If CHan is extremely high, this indicates the temperature sensor isn't reading correctly ([see Troubleshooting](/Documentation/Troubleshooting.md))
|
||||
> If CHan is extremely high, this indicates the temperature sensor isn't reading correctly ([see Troubleshooting](https://ralim.github.io/IronOS/Troubleshooting/))
|
||||
|
||||
|
||||
### Max C
|
||||
@@ -95,7 +95,7 @@ This indicates the high-water mark for the stack for the PID thread. The smaller
|
||||
### Hall
|
||||
|
||||
This appears if your device is capable of having a hall effect sensor installed (Pinecil).
|
||||
This shows the current magnetic field strength reading from the sensor. It is used to check if the sensor is operational, and for diagnostics and optimal placement of magnets on a stand (higher number is better/stronger). [See Hall Sensor for details](/Documentation/HallSensor.md).
|
||||
This shows the current magnetic field strength reading from the sensor. It is used to check if the sensor is operational, and for diagnostics and optimal placement of magnets on a stand (higher number is better/stronger). [See Hall Sensor for details](https://ralim.github.io/IronOS/HallSensor/).
|
||||
|
||||
# PD Debug menu
|
||||
|
||||
|
||||
120
Documentation/Flashing/MHP30.md
Normal file
120
Documentation/Flashing/MHP30.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# Flashing / Upgrading your iron
|
||||
|
||||
## Downloading source file
|
||||
|
||||
In the development of this firmware, there are three _types_ of firmware released.
|
||||
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 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.
|
||||
Select the appropriate file type for your unit, in general Miniware devices need `.hex` and Pinecil needs `.dfu`.
|
||||
Flash according to details below
|
||||
|
||||
### Bleeding edge / latest
|
||||
|
||||
For the _latest_ code, you will need to download the zip file from the artifacts page on the build for what you want.
|
||||
Head to the [Actions](https://github.com/Ralim/IronOS/actions) page and then select the run for the appropriate branch you would like.
|
||||
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).
|
||||
|
||||
# MHP30
|
||||
|
||||
This is completely safe, but if it goes wrong just put the `.hex` file from the official website ([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 MHP30.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `MHP30_{Language-Code}.hex`.
|
||||
|
||||
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/IronOS/wiki/Upgrading-Firmware).
|
||||
|
||||
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.
|
||||
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 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, for easier installation follow the guide at the end of this document.
|
||||
|
||||
On the USB-C port, `USB_D+` is shorted to `SWDIO` and `USB_D-` is shorted to `SWCLK` so debugging works without disassembly (attach while staying in the bootloader). Installing [IronOS-dfu](https://github.com/Ralim/IronOS-dfu) is recommended as it allows reliable flashing of binary files with [dfu-util](http://dfu-util.sourceforge.net/).
|
||||
|
||||
Noting that for the MHP30 the stock firmware checks a checksum at the end of the first 8k that has to be valid or else it goes into "demo mode".
|
||||
|
||||
## Mac
|
||||
|
||||
sgr1ff1n (Shane) commented in [issue 11](https://github.com/Ralim/IronOS/issues/11) that upgrading worked on their Mac as per normal:
|
||||
|
||||
> I just wanted to say that I was able to update the firmware on my ts100 from the stock version to 1.08 found in this repository using my Mac. I simply followed the same steps however through Finder. I have a MacBook Pro (13-inch, Mid 2012) running Sierra 10.12.4 (16E195).
|
||||
|
||||
## Linux
|
||||
|
||||
While in the past there were reports of unreliable upgrades, the consensus in [issue 11](https://github.com/Ralim/IronOS/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/IronOS/master/Flashing/flash_ts100_linux.sh) that works on Ubuntu 16.04 as well as other distros.
|
||||
|
||||
If you want to do it manually (or if the script does not work for some reason) the general procedure is the same as for Windows, the differences are in the way to mount the unit and copy the firmware.
|
||||
Remember that after flashing, the firmware filename will have changed to end in `.RDY` or `.ERR` or `.NOT` and only `.RDY` means the flashing was successful!
|
||||
|
||||
- The unit has to be mounted as `msdos` type (thanks @balrog-kun for having spotted it). You may disable automount, but unmounting the automounted drive and remounting as `msdos` works fine. You do not need to turn off automounting, but you do need to unmount the device with `umount`.
|
||||
- It is recommended to use an all-caps filename for the firmware, even if successful flashing were done with lower case names.
|
||||
- Avoid USB hubs, plug directly in your computer.
|
||||
- If it fails, try again several times without unplugging. Just let it remount.
|
||||
|
||||
Example, to be run as root, once the unit has been plugged in DFU mode and auto-mounted:
|
||||
|
||||
```bash
|
||||
FW=ts100.hex
|
||||
unset NAME
|
||||
eval $(lsblk -P -p -d --output NAME,MODEL|grep "DFU[ _]Disk")
|
||||
[ -z ${NAME+x} ] && exit 1 # Could not find DFU device
|
||||
umount "$NAME"
|
||||
mkdir /tmp/mntdfu
|
||||
mount -t msdos "$NAME" /tmp/mntdfu
|
||||
cp "$FW" "/tmp/mntdfu/$(basename $FW|tr a-z A-Z)"
|
||||
sync
|
||||
umount /tmp/mntdfu
|
||||
rmdir /tmp/mntdfu
|
||||
```
|
||||
|
||||
Device will reboot and automount will rerun if not disabled.
|
||||
Check the extension of your firmware, it should be `.RDY` now.
|
||||
|
||||
## FAQ
|
||||
|
||||
#### 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.
|
||||
|
||||
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.
|
||||
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.).
|
||||
|
||||
#### Device randomly disconnects or does not show up in DFU mode
|
||||
|
||||
1. Check if the USB cable you are using has the data pins; test it on another device. There are a surprisingly large number of micro-USB cables that are power _only_.
|
||||
|
||||
2. Try other USB ports. Often different USB controllers will interact with the units differently due to design quirks in the Miniware design.
|
||||
|
||||
### Alternative bootloader
|
||||
|
||||
If you are an advanced user, and you have used `usb-dfu` tools before, or you would like to learn; there is an alternative bootloader for these irons.
|
||||
This will **NOT** show up as a USB storage drive, but instead show up using a standard DFU protocol device. You can then use dfu tools or GUIs to upgrade the iron using the `.bin` files that are posted to the releases page.
|
||||
|
||||
To install this alternative bootloader, follow the instructions [here](https://github.com/Ralim/IronOS-dfu/blob/mainline/docs/Bootloader.md).
|
||||
|
||||
Note that this is only recommended for users who know what they are doing. If you don't understand how this works, please don't flash this.
|
||||
@@ -24,75 +24,7 @@ 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 devices (TS100, TS80, TS80P & MHP30)
|
||||
|
||||
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 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 (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.
|
||||
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 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, for easier installation follow the guide at the end of this document.
|
||||
|
||||
On the bottom of the MCU riser PCB, there are 4 pads for programming. On v2.51A PCB revision `USB_D+` is shorted to `SWDIO` and `USB_D-` is shorted to `SWCLK` so debugging works without disassembly (attach while staying in the bootloader). Installing [IronOS-dfu](https://github.com/Ralim/IronOS-dfu) is recommended as it allows reliable flashing of binary files with [dfu-util](http://dfu-util.sourceforge.net/).
|
||||
|
||||
There is a complete device flash backup included in this repository. (Note this includes the bootloader, so will need an SWD programmer to load onto the unit).
|
||||
|
||||
For the TS80 the SWD pins are used for the QC negotiation, so you can actually connect to the SWD power via the USB connector.
|
||||
|
||||
## Mac
|
||||
|
||||
sgr1ff1n (Shane) commented in [issue 11](https://github.com/Ralim/ts100/issues/11) that upgrading worked on their Mac as per normal:
|
||||
|
||||
> I just wanted to say that I was able to update the firmware on my ts100 from the stock version to 1.08 found in this repository using my Mac. I simply followed the same steps however through Finder. I have a MacBook Pro (13-inch, Mid 2012) running Sierra 10.12.4 (16E195).
|
||||
|
||||
## 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.
|
||||
|
||||
If you want to do it manually (or if the script does not work for some reason) the general procedure is the same as for Windows, the differences are in the way to mount the unit and copy the firmware.
|
||||
Remember that after flashing, the firmware filename will have changed to end in `.RDY` or `.ERR` or `.NOT` and only `.RDY` means the flashing was successful!
|
||||
|
||||
- The unit has to be mounted as `msdos` type (thanks @balrog-kun for having spotted it). You may disable automount, but unmounting the automounted drive and remounting as `msdos` works fine. You do not need to turn off automounting, but you do need to unmount the device with `umount`.
|
||||
- It is recommended to use an all-caps filename for the firmware, even if successful flashing were done with lower case names.
|
||||
- Avoid USB hubs, plug directly in your computer.
|
||||
- If it fails, try again several times without unplugging. Just let it remount.
|
||||
|
||||
Example, to be run as root, once the unit has been plugged in DFU mode and auto-mounted:
|
||||
|
||||
```bash
|
||||
FW=ts100.hex
|
||||
unset NAME
|
||||
eval $(lsblk -P -p -d --output NAME,MODEL|grep "DFU[ _]Disk")
|
||||
[ -z ${NAME+x} ] && exit 1 # Could not find DFU device
|
||||
umount "$NAME"
|
||||
mkdir /tmp/mntdfu
|
||||
mount -t msdos "$NAME" /tmp/mntdfu
|
||||
cp "$FW" "/tmp/mntdfu/$(basename $FW|tr a-z A-Z)"
|
||||
sync
|
||||
umount /tmp/mntdfu
|
||||
rmdir /tmp/mntdfu
|
||||
```
|
||||
|
||||
Device will reboot and automount will rerun if not disabled.
|
||||
Check the extension of your firmware, it should be `.RDY` now.
|
||||
|
||||
# Pinecil V2 (Pine64)
|
||||
- The MCU in V2 is Bouffalo BL706 and does *not* use usb-dfu for flashing as the previous MCU did.
|
||||
- The current firmware (2.18) is very fresh and no upgrade is available/needed.
|
||||
- When an update is released for V2, then IronOS will also include an update method to follow.
|
||||
- Background on the [BL706 chipset](https://lupyuen.github.io/articles/bl706)
|
||||
|
||||
# Pinecil V1 (Pine64)
|
||||
# Pinecil V1
|
||||
|
||||
- The MCU used in Pinecil supports usb-dfu. Reference [Pinecil Wiki](https://wiki.pine64.org/wiki/Pinecil).
|
||||
- Recommended Updater: the [Pine64 Updater](https://github.com/pine64/pinecil-firmware-updater/releases), is an easy-to-use GUI app. It is fast and works in several types of OS, i.e. Windows/Mac. It will automatically fetch the newest stable version of IronOS from GitHub.
|
||||
@@ -110,11 +42,11 @@ Check the extension of your firmware, it should be `.RDY` now.
|
||||
|
||||
1. Highly recommend updating `dfu-util` to the newest version before starting.
|
||||
2. Download and extract the firmware package from GitHub [IronOS Releases](https://github.com/Ralim/IronOS/releases).
|
||||
4. Enter DFU mode: press and hold (`-`) button at the back of the iron before you connect the USB-C cable.
|
||||
5. Connect USB to PC, and USB-C to back of Pinecil, keep holding (`-`) button down.
|
||||
6. Once the USB cable is connected at two ends, wait ~10 seconds more, then release the (`-`) button.
|
||||
7. The screen will stay **black/off** to indicate the Pinecil is in DFU mode. This is normal.
|
||||
8. Using `dfu-util` you can flash the firmware using a command line like this:
|
||||
3. Enter DFU mode: press and hold (`-`) button at the back of the iron before you connect the USB-C cable.
|
||||
4. Connect USB to PC, and USB-C to back of Pinecil, keep holding (`-`) button down.
|
||||
5. Once the USB cable is connected at two ends, wait ~10 seconds more, then release the (`-`) button.
|
||||
6. The screen will stay **black/off** to indicate the Pinecil is in DFU mode. This is normal.
|
||||
7. Using `dfu-util` you can flash the firmware using a command line like this:
|
||||
|
||||
```
|
||||
dfu-util -D Pinecil_EN.dfu
|
||||
@@ -123,15 +55,20 @@ dfu-util -D Pinecil_EN.dfu
|
||||
Choose the file name from the folder with the appropriate 2-letter country code for your chosen language (i.e., EN = English).
|
||||
|
||||
### Troubleshooting:
|
||||
|
||||
- If you get a message stating that `More than one DFU capable USB device found!` when running the above command you probably have an old version of `dfu-util` installed. Might be worth updating. You can still install on the old version, but you will have to specify which DFU interface to flash to. Running the command `dfu-util -l` will show you if there are several DFU devices detected. Example:
|
||||
|
||||
```
|
||||
Found DFU: [28e9:0189] ver=0100, devnum=48, cfg=1, intf=0, path="1-1", alt=1, name="@Option Bytes /0x1FFFF800/01*016Be", serial="??"
|
||||
Found DFU: [28e9:0189] ver=0100, devnum=48, cfg=1, intf=0, path="1-1", alt=0, name="@Internal Flash /0x08000000/128*001Kg", serial="??"
|
||||
```
|
||||
|
||||
In this example we see that more than one part of the Pinecil is detected as a DFU interface and we need to specify which one we want to flash to. We want the `Internal Flash` so in this case we can use `alt=0` to identify which interface to target. The command would then look like this:
|
||||
|
||||
```
|
||||
dfu-util -D Pinecil_EN.dfu -a 0
|
||||
```
|
||||
|
||||
- Note: if you use an older release of `dfu-util` and do not see `alt=0, name="@Internal Flash /0x08000000/128*001Kg"` when running `dfu-util -l` you likely will not be able to update without first updating 'dfu-util'.
|
||||
- If your update is crashing part-way into the update, there is sometimes an issue with older/fussy USB controllers (they can show up/disappear/then show up again)
|
||||
- Try a direct connection to the USB port, do not use a USB hub, and use shorter cable. If possible, pick a port connected to the main board.
|
||||
@@ -163,7 +100,6 @@ dfu-util -D Pinecil_EN.dfu -a 0
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="28e9", ATTR{idProduct}=="0189", TEST=="power/control", ATTR{power/control}="on"
|
||||
```
|
||||
|
||||
|
||||
## Windows
|
||||
|
||||
Two Options for Windows
|
||||
@@ -188,8 +124,8 @@ Two Options for Windows
|
||||
```
|
||||
dfu-util -D Pinecil_EN.dfu
|
||||
```
|
||||
- If you have errors, see Troubleshooting [above](/Documentation/Flashing.md#troubleshooting).
|
||||
|
||||
- If you have errors, see Troubleshooting above.
|
||||
|
||||
### Option 2: use the GUI tool from chip vendor
|
||||
|
||||
@@ -220,41 +156,4 @@ dfu-util -D Pinecil_EN.dfu
|
||||
18. Do not need to press any buttons, a new screen should appear.
|
||||
19. To confirm upgrade, hold the minus (`-`) button down for a few seconds, it then shows new firmware version v2.xx.x....date
|
||||
|
||||
- If you have errors, see Troubleshooting [above](/Documentation/Flashing.md#troubleshooting).
|
||||
|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
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.
|
||||
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.).
|
||||
|
||||
#### [Miniware] Device randomly disconnects or does not show up in DFU mode
|
||||
|
||||
1. Check if the USB cable you are using has the data pins; test it on another device. There are a surprisingly large number of micro-USB cables that are power _only_.
|
||||
|
||||
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
|
||||
|
||||
If you are an advanced user, and you have used `usb-dfu` tools before, or you would like to learn; there is an alternative bootloader for these irons.
|
||||
This will **NOT** show up as a USB storage drive, but instead show up using a standard DFU protocol device. You can then use dfu tools or GUIs to upgrade the iron using the `.bin` files that are posted to the releases page.
|
||||
|
||||
To install this alternative bootloader, follow the instructions [here](https://github.com/Ralim/IronOS-dfu/blob/mainline/docs/Bootloader.md).
|
||||
|
||||
Note that this is only recommended for users who know what they are doing. If you don't understand how this works, please don't flash this.
|
||||
- If you have errors, see Troubleshooting above.
|
||||
32
Documentation/Flashing/Pinecil V2.md
Normal file
32
Documentation/Flashing/Pinecil V2.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Flashing / Upgrading your iron
|
||||
|
||||
## Downloading source file
|
||||
|
||||
In the development of this firmware, there are three _types_ of firmware released.
|
||||
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 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.
|
||||
Select the appropriate file type for your unit, in general Miniware devices need `.hex` and Pinecil needs `.dfu`.
|
||||
Flash according to details below
|
||||
|
||||
### Bleeding edge / latest
|
||||
|
||||
For the _latest_ code, you will need to download the zip file from the artifacts page on the build for what you want.
|
||||
Head to the [Actions](https://github.com/Ralim/IronOS/actions) page and then select the run for the appropriate branch you would like.
|
||||
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).
|
||||
|
||||
# Pinecil V2
|
||||
|
||||
- The MCU in V2 is Bouffalo BL706 and does _not_ use usb-dfu for flashing as the previous MCU did.
|
||||
- The current firmware (2.18) is very fresh and no upgrade is available/needed.
|
||||
- When an update is released for V2, then IronOS will also include an update method to follow.
|
||||
- Background on the [BL706 chipset](https://lupyuen.github.io/articles/bl706)
|
||||
120
Documentation/Flashing/TS100.md
Normal file
120
Documentation/Flashing/TS100.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# Flashing / Upgrading your iron
|
||||
|
||||
## Downloading source file
|
||||
|
||||
In the development of this firmware, there are three _types_ of firmware released.
|
||||
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 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.
|
||||
Select the appropriate file type for your unit, in general Miniware devices need `.hex` and Pinecil needs `.dfu`.
|
||||
Flash according to details below
|
||||
|
||||
### Bleeding edge / latest
|
||||
|
||||
For the _latest_ code, you will need to download the zip file from the artifacts page on the build for what you want.
|
||||
Head to the [Actions](https://github.com/Ralim/IronOS/actions) page and then select the run for the appropriate branch you would like.
|
||||
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).
|
||||
|
||||
# TS100
|
||||
|
||||
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) 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 TS100.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `TS100_{Language-Code}.hex`.
|
||||
|
||||
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/IronOS/wiki/Upgrading-Firmware).
|
||||
|
||||
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.
|
||||
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 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, for easier installation follow the guide at the end of this document.
|
||||
|
||||
On the bottom of the MCU riser PCB, there are 4 pads for programming. On v2.51A PCB revision `USB_D+` is shorted to `SWDIO` and `USB_D-` is shorted to `SWCLK` so debugging works without disassembly (attach while staying in the bootloader). Installing [IronOS-dfu](https://github.com/Ralim/IronOS-dfu) is recommended as it allows reliable flashing of binary files with [dfu-util](http://dfu-util.sourceforge.net/).
|
||||
|
||||
On some newer TS100 units, the SWD pins are wired up to the USB pins, on older ones they are not sadly.
|
||||
|
||||
## Mac
|
||||
|
||||
sgr1ff1n (Shane) commented in [issue 11](https://github.com/Ralim/IronOS/issues/11) that upgrading worked on their Mac as per normal:
|
||||
|
||||
> I just wanted to say that I was able to update the firmware on my ts100 from the stock version to 1.08 found in this repository using my Mac. I simply followed the same steps however through Finder. I have a MacBook Pro (13-inch, Mid 2012) running Sierra 10.12.4 (16E195).
|
||||
|
||||
## Linux
|
||||
|
||||
While in the past there were reports of unreliable upgrades, the consensus in [issue 11](https://github.com/Ralim/IronOS/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/IronOS/master/Flashing/flash_ts100_linux.sh) that works on Ubuntu 16.04 as well as other distros.
|
||||
|
||||
If you want to do it manually (or if the script does not work for some reason) the general procedure is the same as for Windows, the differences are in the way to mount the unit and copy the firmware.
|
||||
Remember that after flashing, the firmware filename will have changed to end in `.RDY` or `.ERR` or `.NOT` and only `.RDY` means the flashing was successful!
|
||||
|
||||
- The unit has to be mounted as `msdos` type (thanks @balrog-kun for having spotted it). You may disable automount, but unmounting the automounted drive and remounting as `msdos` works fine. You do not need to turn off automounting, but you do need to unmount the device with `umount`.
|
||||
- It is recommended to use an all-caps filename for the firmware, even if successful flashing were done with lower case names.
|
||||
- Avoid USB hubs, plug directly in your computer.
|
||||
- If it fails, try again several times without unplugging. Just let it remount.
|
||||
|
||||
Example, to be run as root, once the unit has been plugged in DFU mode and auto-mounted:
|
||||
|
||||
```bash
|
||||
FW=ts100.hex
|
||||
unset NAME
|
||||
eval $(lsblk -P -p -d --output NAME,MODEL|grep "DFU[ _]Disk")
|
||||
[ -z ${NAME+x} ] && exit 1 # Could not find DFU device
|
||||
umount "$NAME"
|
||||
mkdir /tmp/mntdfu
|
||||
mount -t msdos "$NAME" /tmp/mntdfu
|
||||
cp "$FW" "/tmp/mntdfu/$(basename $FW|tr a-z A-Z)"
|
||||
sync
|
||||
umount /tmp/mntdfu
|
||||
rmdir /tmp/mntdfu
|
||||
```
|
||||
|
||||
Device will reboot and automount will rerun if not disabled.
|
||||
Check the extension of your firmware, it should be `.RDY` now.
|
||||
|
||||
## FAQ
|
||||
|
||||
#### 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.
|
||||
|
||||
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.
|
||||
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.).
|
||||
|
||||
#### Device randomly disconnects or does not show up in DFU mode
|
||||
|
||||
1. Check if the USB cable you are using has the data pins; test it on another device. There are a surprisingly large number of micro-USB cables that are power _only_.
|
||||
|
||||
2. Try other USB ports. Often different USB controllers will interact with the units differently due to design quirks in the Miniware design.
|
||||
|
||||
### Alternative bootloader
|
||||
|
||||
If you are an advanced user, and you have used `usb-dfu` tools before, or you would like to learn; there is an alternative bootloader for these irons.
|
||||
This will **NOT** show up as a USB storage drive, but instead show up using a standard DFU protocol device. You can then use dfu tools or GUIs to upgrade the iron using the `.bin` files that are posted to the releases page.
|
||||
|
||||
To install this alternative bootloader, follow the instructions [here](https://github.com/Ralim/IronOS-dfu/blob/mainline/docs/Bootloader.md).
|
||||
|
||||
Note that this is only recommended for users who know what they are doing. If you don't understand how this works, please don't flash this.
|
||||
118
Documentation/Flashing/TS80(P).md
Normal file
118
Documentation/Flashing/TS80(P).md
Normal file
@@ -0,0 +1,118 @@
|
||||
# Flashing / Upgrading your iron
|
||||
|
||||
## Downloading source file
|
||||
|
||||
In the development of this firmware, there are three _types_ of firmware released.
|
||||
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 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.
|
||||
Select the appropriate file type for your unit, in general Miniware devices need `.hex` and Pinecil needs `.dfu`.
|
||||
Flash according to details below
|
||||
|
||||
### Bleeding edge / latest
|
||||
|
||||
For the _latest_ code, you will need to download the zip file from the artifacts page on the build for what you want.
|
||||
Head to the [Actions](https://github.com/Ralim/IronOS/actions) page and then select the run for the appropriate branch you would like.
|
||||
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).
|
||||
|
||||
# TS80 / TS80P
|
||||
|
||||
This is completely safe, but if it goes wrong just put the `.hex` file from the official website ([TS80](https://www.minidso.com/forum.php?mod=viewthread&tid=868&extra=page%3D1)/[TS80P](https://www.minidso.com/forum.php?mod=viewthread&tid=4070&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 TS80.zip or TS80P.zip. Inside the zip file (make sure to extract the file before flashing with it) will be a file called `TS80_{Language-Code}.hex`/`TS80P_{Language-Code}.hex`.
|
||||
|
||||
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/TS80/wiki/Upgrading-Firmware).
|
||||
|
||||
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.
|
||||
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 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, for easier installation follow the guide at the end of this document.
|
||||
|
||||
On the USB port, `USB_D+` is shorted to `SWDIO` and `USB_D-` is shorted to `SWCLK` so debugging works without disassembly (attach while staying in the bootloader). Installing [IronOS-dfu](https://github.com/Ralim/IronOS-dfu) is recommended as it allows reliable flashing of binary files with [dfu-util](http://dfu-util.sourceforge.net/).
|
||||
|
||||
## Mac
|
||||
|
||||
sgr1ff1n (Shane) commented in [issue 11](https://github.com/Ralim/IronOS/issues/11) that upgrading worked on their Mac as per normal:
|
||||
|
||||
> I just wanted to say that I was able to update the firmware on my TS100 from the stock version to 1.08 found in this repository using my Mac. I simply followed the same steps however through Finder. I have a MacBook Pro (13-inch, Mid 2012) running Sierra 10.12.4 (16E195).
|
||||
|
||||
## Linux
|
||||
|
||||
While in the past there were reports of unreliable upgrades, the consensus in [issue 11](https://github.com/Ralim/IronOS/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/IronOS/master/Flashing/flash_TS100_linux.sh) that works on Ubuntu 16.04 as well as other distros.
|
||||
|
||||
If you want to do it manually (or if the script does not work for some reason) the general procedure is the same as for Windows, the differences are in the way to mount the unit and copy the firmware.
|
||||
Remember that after flashing, the firmware filename will have changed to end in `.RDY` or `.ERR` or `.NOT` and only `.RDY` means the flashing was successful!
|
||||
|
||||
- The unit has to be mounted as `msdos` type (thanks @balrog-kun for having spotted it). You may disable automount, but unmounting the automounted drive and remounting as `msdos` works fine. You do not need to turn off automounting, but you do need to unmount the device with `umount`.
|
||||
- It is recommended to use an all-caps filename for the firmware, even if successful flashing were done with lower case names.
|
||||
- Avoid USB hubs, plug directly in your computer.
|
||||
- If it fails, try again several times without unplugging. Just let it remount.
|
||||
|
||||
Example, to be run as root, once the unit has been plugged in DFU mode and auto-mounted:
|
||||
|
||||
```bash
|
||||
FW=TS80.hex
|
||||
unset NAME
|
||||
eval $(lsblk -P -p -d --output NAME,MODEL|grep "DFU[ _]Disk")
|
||||
[ -z ${NAME+x} ] && exit 1 # Could not find DFU device
|
||||
umount "$NAME"
|
||||
mkdir /tmp/mntdfu
|
||||
mount -t msdos "$NAME" /tmp/mntdfu
|
||||
cp "$FW" "/tmp/mntdfu/$(basename $FW|tr a-z A-Z)"
|
||||
sync
|
||||
umount /tmp/mntdfu
|
||||
rmdir /tmp/mntdfu
|
||||
```
|
||||
|
||||
Device will reboot and automount will rerun if not disabled.
|
||||
Check the extension of your firmware, it should be `.RDY` now.
|
||||
|
||||
## FAQ
|
||||
|
||||
#### 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.
|
||||
|
||||
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.
|
||||
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.).
|
||||
|
||||
#### Device randomly disconnects or does not show up in DFU mode
|
||||
|
||||
1. Check if the USB cable you are using has the data pins; test it on another device. There are a surprisingly large number of micro-USB cables that are power _only_.
|
||||
|
||||
2. Try other USB ports. Often different USB controllers will interact with the units differently due to design quirks in the Miniware design.
|
||||
|
||||
### Alternative bootloader
|
||||
|
||||
If you are an advanced user, and you have used `usb-dfu` tools before, or you would like to learn; there is an alternative bootloader for these irons.
|
||||
This will **NOT** show up as a USB storage drive, but instead show up using a standard DFU protocol device. You can then use dfu tools or GUIs to upgrade the iron using the `.bin` files that are posted to the releases page.
|
||||
|
||||
To install this alternative bootloader, follow the instructions [here](https://github.com/Ralim/IronOS-dfu/blob/mainline/docs/Bootloader.md).
|
||||
|
||||
Note that this is only recommended for users who know what they are doing. If you don't understand how this works, please don't flash this.
|
||||
@@ -1,12 +1,20 @@
|
||||
# Getting Started
|
||||
|
||||
Getting started with IronOS on your Pinecil/TS80/TS80P/TS100.
|
||||
If your device did not come with IronOS already installed, or if you need to update to the latest version; please see the [Flashing Guide](/Documentation/Flashing.md). It is recommended to update to the newest stable release.
|
||||
If your device did not come with IronOS already installed, or if you need to update to the latest version; please see the flashing guide for your device:
|
||||
|
||||
- [MHP30](https://ralim.github.io/IronOS/Flashing/MHP30)
|
||||
- [Pinecil V1](https://ralim.github.io/IronOS/Flashing/Pinecil%20V1/)
|
||||
- [Pinecil V2](https://ralim.github.io/IronOS/Flashing/Pinecil%20V2/)
|
||||
- [TS80 / TS80P](https://ralim.github.io/IronOS/Flashing/TS80%28P%29/)
|
||||
- [TS100](https://ralim.github.io/IronOS/Flashing/TS100)
|
||||
|
||||
It is recommended to update to the newest stable release.
|
||||
|
||||
Once your Iron has been flashed, on first power on it _may_ warn you about the system settings being reset.
|
||||
_Do not panic_; this is 100% completely normal. This is here to note to you that they have been reset to handle the internal structure changing.
|
||||
|
||||
If you receive a warning about the accelerometer or USB-PD not being detected, please see [here](/Documentation/HardwareIssues.md).
|
||||
If you receive a warning about the accelerometer or USB-PD not being detected, please see [here](https://ralim.github.io/IronOS/HardwareIssues/).
|
||||
|
||||
## The Home screen (or idle screen)
|
||||
|
||||
@@ -14,7 +22,7 @@ This is the landing page of the firmware, from here you can choose to either go
|
||||
|
||||
By default this will show a screen similar to the one below:
|
||||
|
||||

|
||||

|
||||
|
||||
Note that this may be drawn mirrored depending on the orientation of your screen (detailed mode shows a different home screen).
|
||||
|
||||
@@ -26,7 +34,7 @@ In the settings, you can turn on a detailed idle screen instead. The buttons sti
|
||||
|
||||
Depending on how your device is being powered, at right side of the screen, the firmware will either show the voltage your unit is being provided with, a battery icon (if battery mode is enabled) or a power plug icon.
|
||||
|
||||
If you see an (**X**) where the soldering iron should be, this indicates that the firmware can't see the tip connected. This could indicate a problem with the iron or tip. First, try removing the tip screw and tip and gently reinstalling both; ensure that the tip is seated all the way back. If the issue persists please see the [hardware issues section](/Documentation/HardwareIssues.md).
|
||||
If you see an (**X**) where the soldering iron should be, this indicates that the firmware can't see the tip connected. This could indicate a problem with the iron or tip. First, try removing the tip screw and tip and gently reinstalling both; ensure that the tip is seated all the way back. If the issue persists please see the [hardware issues section](https://ralim.github.io/IronOS/HardwareIssues/).
|
||||
|
||||
This OLED screen features burn-in protection; if no buttons or movement have been detected for a while it will automatically blank the screen to reduce burn-in when the iron is left unattended. Any movement or button press will wake the screen.
|
||||
|
||||
@@ -36,7 +44,7 @@ Additionally to the two icons shown, there are two "hidden" actions that can be
|
||||
|
||||
If you press and hold the button near the tip (`+/A`), this enters the temperature adjustment screen. Normally this is not required; but if you would like to adjust the set temperature _before_ the tip starts to heat, this can be useful.
|
||||
|
||||
If you press and hold the button near the rear of the iron (`-/B`), it will take you into the [debug menu](/Documentation/DebugMenu.md).
|
||||
If you press and hold the button near the rear of the iron (`-/B`), it will take you into the [debug menu](https://ralim.github.io/IronOS/DebugMenu/).
|
||||
|
||||
## Soldering Mode
|
||||
|
||||
@@ -59,14 +67,13 @@ In Sleep mode, the temperature of the iron automatically lowers to 150 °C (defa
|
||||
Simply picking up or moving the iron will wake it back up into soldering mode. You can also press any button and this will also wake the iron up.
|
||||
|
||||
#### Optional Hall Effect Feature (Pinecil only):
|
||||
Pinecil has an unpopulated footprint (U14) for a hall effect sensor (Si7210-B-00-IV). Adding the sensor and placing a neodymium magnet on the holder stand will trigger Pinecil to sleep after it enters the stand, and Zzzz will appear on-screen. The magnet is positioned on the stand in proximity to the sensor/handle which then activates one of 10 user defined settings (0=off, 1=lowest sensitivity, 9=highest sensitivity). Read the Hall Sensor document for [details on installation](/Documentation/HallSensor.md).
|
||||
|
||||
Pinecil has an unpopulated footprint (U14) for a hall effect sensor (Si7210-B-00-IV). Adding the sensor and placing a neodymium magnet on the holder stand will trigger Pinecil to sleep after it enters the stand, and Zzzz will appear on-screen. The magnet is positioned on the stand in proximity to the sensor/handle which then activates one of 10 user defined settings (0=off, 1=lowest sensitivity, 9=highest sensitivity). Read the Hall Sensor document for [details on installation](https://ralim.github.io/IronOS/HallSensor/).
|
||||
|
||||
### Idle Shutdown
|
||||
|
||||
If, after entering sleep mode, the iron still does not see movement for a much longer time (default=10 minutes); it will shut down and return to the home screen.
|
||||
|
||||
|
||||
## Settings Menu
|
||||
|
||||
The settings menu is the most evolving aspect of the firmware, so each option is not documented here. However, do not panic, as every menu option has an on-screen description so you don't _need_ to come back here to figure them all out.
|
||||
|
||||
@@ -8,16 +8,16 @@ Simply moving the iron or pressing any button will wake it back up into solderin
|
||||
|
||||
### Optional Hall Effect Feature (Pinecil only):
|
||||
|
||||
Inside the [Sleep Menu](https://github.com/Ralim/IronOS/blob/dev/Documentation/Settings.md#setting-sleep-temp) is an additional type of sleep setting. Pinecil has an unpopulated footprint (**U14**) for a hall effect sensor, Silicon Labs **Si7210-B-00-IV**. After installing the hall effect sensor (HES), it is possible to auto-trigger Pinecil to enter sleep mode when it enters the stand, and *Zzzz* will appear (or text in detailed mode). This could be a fun enhancement for any Pinecil and adds a feature typically only found in more expensive high-end irons. The HES is available at many electronic stores for ~$2-$6.
|
||||
Inside the [Sleep Menu](https://ralim.github.io/IronOS/Settings/#setting-sleep-temp) is an additional type of sleep setting. Pinecil has an unpopulated footprint (**U14**) for a hall effect sensor, Silicon Labs **Si7210-B-00-IV**. After installing the hall effect sensor (HES), it is possible to auto-trigger Pinecil to enter sleep mode when it enters the stand, and _Zzzz_ will appear (or text in detailed mode). This could be a fun enhancement for any Pinecil and adds a feature typically only found in more expensive high-end irons. The HES is available at many electronic stores for ~$2-$6.
|
||||
|
||||
After installing the HES on the PCB, place a magnet on the stand close enough to the sensor to activate one of ten user selectable settings.
|
||||
- 0=off, 1=1000, 2=750, 3=500, 4=250, 5=150, 6=100, 7=75, 8=50, 9=25 (9 has the highest sensitivity to magnets)
|
||||
- Setting of 1 might be used if you solder on PCBs with magnets and do not wish Pinecil to auto-sleep constantly. A very strong/large magnet would be required on the stand to activate the sleep mode if you use setting 1.
|
||||
- Setting of 9 would be useful if you only had a small magnet and are not concerned about Pinecil falsely triggering sleep mode near magnetized items/tools.
|
||||
- Actively watch the _hall_ number change while you slowly move the magnet around to seek the best locations & whether you have too many or too few magnets. Position the magnet(s) where you have the highest hall number will ensure consistent sleep mode when you place the iron in the stand. This requires some experimenting.
|
||||
- [See debug menu for how to display the _Hall_ number](/Documentation/DebugMenu.md)
|
||||
- Note that the sensor is physically located near the copper contacts for the tip at the front of the handle. [Reference Schematics U14](https://files.pine64.org/doc/Pinecil/Pinecil_schematic_v1.0a_20201120.pdf).
|
||||
- Neodymium magnets are recommended. If using small magnets, 2-3 may be required, but too many could also be detrimental.
|
||||
- Positioning/type/quantity of magnets is important for best results. Sometimes too many magnets breaks the effect by distorting the magnetic field **[as seen in this demo video](https://www.youtube.com/shorts/afkqKwCX00I)**. The video shows magnets at the top of the stand, and the pinecil goes correctly into Zzzz with *only* those magnets. When more magnets are added at the side, the Pinecil did not go to sleep, which is contrary to the goal. See the PDF below for details on magnetic fields with SI7210-B.
|
||||
- Orientation of North and South faces of magnets is important to increase reaction of the hall sensor [see data sheet SI7210-B-00-IV](https://www.silabs.com/documents/public/application-notes/an1018-si72xx-sensors.pdf).
|
||||
|
||||
- 0=off, 1=1000, 2=750, 3=500, 4=250, 5=150, 6=100, 7=75, 8=50, 9=25 (9 has the highest sensitivity to magnets)
|
||||
- Setting of 1 might be used if you solder on PCBs with magnets and do not wish Pinecil to auto-sleep constantly. A very strong/large magnet would be required on the stand to activate the sleep mode if you use setting 1.
|
||||
- Setting of 9 would be useful if you only had a small magnet and are not concerned about Pinecil falsely triggering sleep mode near magnetized items/tools.
|
||||
- Actively watch the _hall_ number change while you slowly move the magnet around to seek the best locations & whether you have too many or too few magnets. Position the magnet(s) where you have the highest hall number will ensure consistent sleep mode when you place the iron in the stand. This requires some experimenting.
|
||||
- [See debug menu for how to display the _Hall_ number](https://ralim.github.io/IronOS/DebugMenu/)
|
||||
- Note that the sensor is physically located near the copper contacts for the tip at the front of the handle. [Reference Schematics U14](https://files.pine64.org/doc/Pinecil/Pinecil_schematic_v1.0a_20201120.pdf).
|
||||
- Neodymium magnets are recommended. If using small magnets, 2-3 may be required, but too many could also be detrimental.
|
||||
- Positioning/type/quantity of magnets is important for best results. Sometimes too many magnets breaks the effect by distorting the magnetic field **[as seen in this demo video](https://www.youtube.com/shorts/afkqKwCX00I)**. The video shows magnets at the top of the stand, and the pinecil goes correctly into Zzzz with _only_ those magnets. When more magnets are added at the side, the Pinecil did not go to sleep, which is contrary to the goal. See the PDF below for details on magnetic fields with SI7210-B.
|
||||
- Orientation of North and South faces of magnets is important to increase reaction of the hall sensor [see data sheet SI7210-B-00-IV](https://www.silabs.com/documents/public/application-notes/an1018-si72xx-sensors.pdf).
|
||||
|
||||
@@ -28,7 +28,7 @@ The best way to see if this is the case is to measure the resistance across the
|
||||
you are expecting to see measurements in the range of 4-10 ohms. Anything higher than 10 ohms is _generally_ an issue.
|
||||
|
||||
## Iron will not heat up and displays a high temperature
|
||||
Check the Rtip and CHan numbers ([see debug menu](/Documentation/DebugMenu.md)). Extremly high CHan is suspect to a problem with the cold junction compensation temperature sensor.
|
||||
Check the Rtip and CHan numbers ([see debug menu](https://ralim.github.io/IronOS/DebugMenu/)). Extremly high CHan is suspect to a problem with the cold junction compensation temperature sensor.
|
||||
|
||||
For Pinecil V1, inspect near U10 which is the TMP36 sensor ([see issue here](https://github.com/Ralim/IronOS/issues/1234)). You may be able to reflow/resolder the TMP36 chip at U10 to correct a weak solder joint.
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ In this firmware for these soldering irons, all settings are adjustable on the d
|
||||
In this mode the iron works as you would expect, pressing either button will take you to a temperature change screen.
|
||||
- Use each button to go up/down in temperature. Pressing both buttons exits the temperature menu (or wait 3 seconds and it will time out).
|
||||
- Pressing both buttons or holding the rear button (`-/B`) will exit Soldering Mode.
|
||||
- Holding the front button (`+/A`) will enter [Boost mode](/Documentation/Menu.md#boost-mode) (if enabled).
|
||||
- Holding the front button (`+/A`) will enter [Boost mode](https://ralim.github.io/IronOS/Menu/#boost-mode) (if enabled).
|
||||
|
||||
## Settings mode
|
||||
|
||||
@@ -38,7 +38,7 @@ To calibrate your iron:
|
||||
7. Press both buttons at the same time to Save and Exit to the menu
|
||||
|
||||
### Calibrate Tip CJC
|
||||
This performs a Tip Cold Junction Calibration (CJC) ([see Temperature for details](/Documentation/Temperature.md)). This is normally not needed unless you have an issue with tip temperature or your tips are wearing out prematurely. Changing tip lengths does not necessarily mean a calibration is needed. Check first that your tips are not defective, and measured resistance is close to specifications (Pinecil/TS100 short tips 6.2 Ω, long tips 8 Ω, TS80(P) ~4.5 Ω).
|
||||
This performs a Tip Cold Junction Calibration (CJC) ([see Temperature for details](https://ralim.github.io/IronOS/Temperature/)). This is normally not needed unless you have an issue with tip temperature or your tips are wearing out prematurely. Changing tip lengths does not necessarily mean a calibration is needed. Check first that your tips are not defective, and measured resistance is close to specifications (Pinecil/TS100 short tips 6.2 Ω, long tips 8 Ω, TS80(P) ~4.5 Ω).
|
||||
|
||||
What this is for: some tips have an offset on their readings which causes issues, i.e., the actual temperature of the tip is much higher than displayed. To calibrate this out, perform the following steps.
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ Therefore the Pinecil and TS100 perform poorly when run off 12V power supplies a
|
||||
|
||||
These soldering irons use a FET to switch the power to the soldering iron tip. This is a P-MOSFET and its controlled via a small transistor circuit, which in turn is controlled via the MCU (i.e., STM32). The MCU controls this PWM output proportional to the output from the PID control loop running in the software.
|
||||
|
||||
To measure the tip temperature in the iron, the iron has a small op-amp connected across the terminals at the cold end of the tip. This is setup to measure the voltage across the same terminals that are used to power the tip. In order to read the very small voltage generated by the [thermocouple cold junction](/Documentation/Temperature.md), the iron's output must be turned off for a moment.
|
||||
To measure the tip temperature in the iron, the iron has a small op-amp connected across the terminals at the cold end of the tip. This is setup to measure the voltage across the same terminals that are used to power the tip. In order to read the very small voltage generated by the [thermocouple cold junction](https://ralim.github.io/IronOS/Temperature/), the iron's output must be turned off for a moment.
|
||||
|
||||
Once the output is turned off (via the FET), the system has a recovery time as the tip capacitance discharges and the op-amp exits saturation. After this delay period, the MCU's ADC (analog-to-digital converter) samples the output of the op-amp 8 times quickly and then sets a flag to turn the PWM output back on.
|
||||
This enforces a small dead time in the output signal while this occurs, so there is a balance between sampling the temperature often to maintain a stable tip temperature control and sampling less often to increase the maximum power deliverable to the tip ([see Complexity of measurement](/Documentation/Temperature.md#complexity-of-measurement)).
|
||||
This enforces a small dead time in the output signal while this occurs, so there is a balance between sampling the temperature often to maintain a stable tip temperature control and sampling less often to increase the maximum power deliverable to the tip ([see Complexity of measurement](https://ralim.github.io/IronOS/Temperature/#complexity-of-measurement)).
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
If your device is not operating as expected; and you are within the manufacturer support window, please first contact your manufacturer and RMA / warranty your device.
|
||||
|
||||
If your iron is not working as expected, [the Debug menu](DebugMenu.md) exposes internal measurements to help you narrow down the root cause of the issue.
|
||||
If your iron is not working as expected, [the Debug menu](https://ralim.github.io/IronOS/DebugMenu/) exposes internal measurements to help you narrow down the root cause of the issue.
|
||||
|
||||
Alongside all of these, issues with the soldering of the main MCU could cause all of these as well; and should always be checked.
|
||||
|
||||
|
||||
72
Documentation/index.md
Normal file
72
Documentation/index.md
Normal file
@@ -0,0 +1,72 @@
|
||||
# IronOS - Flexible Soldering iron control Firmware
|
||||
|
||||
The firmware implements all of the standard features of a 'smart' soldering iron, with lots of little extras and tweaks.
|
||||
I highly recommend reading the installation guide fully when installing on your iron. And after install just explore the settings menu.
|
||||
|
||||
For soldering irons that are designed to be powered by 'smart' power sources (PD and QC), the firmware supports settings around the negotiated power and voltage.
|
||||
For soldering irons that are designed to be powered by batteries (TS100 & Pinecil), settings for a cutoff voltage for battery protection are supported.
|
||||
|
||||
Currently **31** languages are supported. When downloading the firmware for your soldering iron, take note of the language code in the file name.
|
||||
|
||||
This project is considered feature complete for use as a soldering iron, _so please suggest any feature improvements you would like!_
|
||||
|
||||
_This firmware does **NOT** support the USB port while running for changing settings. This is done through the onscreen menu only. Logos are edited on a computer and flashed like firmware._
|
||||
|
||||
| Device | DC | QC | PD | EPR | BLE | Battery | Recommended |
|
||||
| :--------: | :-: | :-: | :-: | :-: | :-: | :-----: | :---------: |
|
||||
| MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ |
|
||||
| Pinecil V1 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
|
||||
| Pinecil V2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| TS80P | ❌ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
|
||||
| TS100 | ✔️ | ❌ | ❌ | ❌ | ❌ | ✔️ | ❌ |
|
||||
| TS80 | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | ❌ |
|
||||
|
||||
\*Please note that Miniware started shipping TS100's using cloned STM32 Chips. While these do work with IronOS, their DFU bootloader works terribly, and it is hard to get it to successfully flash larger firmware images like IronOS without timing out. This is the main reason why the TS100 is **_no longer recommended_**.
|
||||
|
||||
## Getting Started
|
||||
|
||||
To get started with IronOS firmware, please jump to [Getting Started Guide](https://ralim.github.io/IronOS/GettingStarted/).
|
||||
But the [TL;DR](https://www.merriam-webster.com/dictionary/TL%3BDR) is to press the button near the front of the iron to heat up. Use the button near the back of the iron to enter the settings menu.
|
||||
Long hold the rear button in soldering mode to exit back to the start screen.
|
||||
|
||||
## Installation
|
||||
|
||||
For notes on installation for your device, please refer to the flashing guide for your device:
|
||||
|
||||
- [MHP30](https://ralim.github.io/IronOS/Flashing/MHP30)
|
||||
- [Pinecil V1](https://ralim.github.io/IronOS/Flashing/Pinecil%20V1/)
|
||||
- [Pinecil V2](https://ralim.github.io/IronOS/Flashing/Pinecil%20V2/)
|
||||
- [TS80 / TS80P](https://ralim.github.io/IronOS/Flashing/TS80%28P%29/)
|
||||
- [TS100](https://ralim.github.io/IronOS/Flashing/TS100)
|
||||
|
||||
## Key Features
|
||||
|
||||
- PID style iron temperature control
|
||||
- Automatic sleep with selectable sensitivity
|
||||
- Motion wake support
|
||||
- All settings exposed in the intuitive menu
|
||||
- (TS100) Set a voltage lower limit for Lithium batteries so you don't kill your battery pack
|
||||
- (TS80) Set 18 W or 24 W settings for your power bank
|
||||
- (TS80P) Automatically negotiates appropriate PD and falls back to QC mode like TS80
|
||||
- (Pinecil) Supports all 3 power modes (PD, QC, DC In).
|
||||
- (Pinecilv2) Supports USB-PD EPR for 28V operation.
|
||||
- Improved readability Fonts, supporting multiple languages
|
||||
- Use hardware features to improve reliability
|
||||
- Can disable movement detection if desired
|
||||
- Boost mode lets you temporarily change the temperature when soldering (i.e. raise the temperature for short periods)
|
||||
- (TS100/Pinecil) Battery charge level indicator if power source set to a lipo cell count
|
||||
- (TS80/TS80P/Pinecil) Power bank operating voltage is displayed
|
||||
- [Custom boot up logo support](https://ralim.github.io/IronOS/Logo/)
|
||||
- Automatic LCD rotation based on the orientation
|
||||
|
||||
## Menu System
|
||||
|
||||
This new firmware uses a new menu system to allow access to the settings on the device.
|
||||
When on the main screen and having the tip plugged in, the unit shows a pair of prompts for the two most common operations.
|
||||
|
||||
- Pressing the button near the tip enters the _soldering mode_
|
||||
- Pressing the button near the USB end enters the _settings menu_
|
||||
- When not in _soldering mode_, holding down the button near the tip will enter _soldering temperature adjust mode_ (This is the same as the one in the _soldering mode_, but allows to adjust the temperature before heating up), in _soldering mode_ however this will activate _boost mode_ as long as you hold down the button.
|
||||
- Holding down the button near the USB end will show the _[debug menu](https://ralim.github.io/IronOS/DebugMenu/)._ In _soldering mode_ this ends the heating.
|
||||
|
||||
Operation details are over in the [Menu information.](https://ralim.github.io/IronOS/Menu/)
|
||||
33
README.md
33
README.md
@@ -18,29 +18,34 @@ Currently **31** languages are supported. When downloading the firmware for your
|
||||
|
||||
This project is considered feature complete for use as a soldering iron, _so please suggest any feature improvements you would like!_
|
||||
|
||||
_This firmware does **NOT** support the USB port while running for changing settings. This is done through the onscreen menu only. Logos are edited using the tool or python script and uploaded in DFU mode._
|
||||
|
||||
_This firmware does **NOT** support the USB port while running for changing settings. This is done through the onscreen menu only. Logos are edited on a computer and flashed like firmware._
|
||||
|
||||
| Device | DC | QC | PD | EPR | BLE | Battery | Recommended |
|
||||
|:----------:|:--:|:--:|:--:|:---:|:---:|:-------:|:-----------:|
|
||||
| MHP30 |❌ | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ |
|
||||
| Pinecil V1 |✔️ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
|
||||
| Pinecil V2 |✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| TS80P |❌ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
|
||||
| TS100 |✔️ | ❌ | ❌ | ❌ | ❌ | ✔️ | ❌ |
|
||||
| TS80 |❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | ❌ |
|
||||
| :--------: | :-: | :-: | :-: | :-: | :-: | :-----: | :---------: |
|
||||
| MHP30 | ❌ | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ |
|
||||
| Pinecil V1 | ✔️ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
|
||||
| Pinecil V2 | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| TS80P | ❌ | ✔️ | ✔️ | ❌ | ❌ | ✔️ | ✔️ |
|
||||
| TS100 | ✔️ | ❌ | ❌ | ❌ | ❌ | ✔️ | ❌ |
|
||||
| TS80 | ❌ | ✔️ | ❌ | ❌ | ❌ | ✔️ | ❌ |
|
||||
|
||||
\*Please note that Miniware started shipping TS100's using cloned STM32 Chips. While these do work with IronOS, their DFU bootloader works terribly, and it is hard to get it to successfully flash larger firmware images like IronOS without timing out. This is the main reason why the TS100 is **_no longer recommended_**.
|
||||
|
||||
## Getting Started
|
||||
|
||||
To get started with IronOS firmware, please jump to [Getting Started Guide](Documentation/GettingStarted.md).
|
||||
To get started with IronOS firmware, please jump to [Getting Started Guide](https://ralim.github.io/IronOS/GettingStarted/).
|
||||
But the [TL;DR](https://www.merriam-webster.com/dictionary/TL%3BDR) is to press the button near the front of the iron to heat up. Use the button near the back of the iron to enter the settings menu.
|
||||
Long hold the rear button in soldering mode to exit back to the start screen.
|
||||
|
||||
## Installation
|
||||
|
||||
For notes on installation for your device, please refer to the [Flashing Guide](Documentation/Flashing.md).
|
||||
For notes on installation for your device, please refer to the flashing guide for your device:
|
||||
|
||||
- [MHP30](https://ralim.github.io/IronOS/Flashing/MHP30)
|
||||
- [Pinecil V1](https://ralim.github.io/IronOS/Flashing/Pinecil%20V1/)
|
||||
- [Pinecil V2](https://ralim.github.io/IronOS/Flashing/Pinecil%20V2/)
|
||||
- [TS80 / TS80P](https://ralim.github.io/IronOS/Flashing/TS80%28P%29/)
|
||||
- [TS100](https://ralim.github.io/IronOS/Flashing/TS100)
|
||||
|
||||
## Key Features
|
||||
|
||||
@@ -59,7 +64,7 @@ For notes on installation for your device, please refer to the [Flashing Guide](
|
||||
- Boost mode lets you temporarily change the temperature when soldering (i.e. raise the temperature for short periods)
|
||||
- (TS100/Pinecil) Battery charge level indicator if power source set to a lipo cell count
|
||||
- (TS80/TS80P/Pinecil) Power bank operating voltage is displayed
|
||||
- [Custom boot up logo support](Documentation/Logo.md)
|
||||
- [Custom boot up logo support](https://ralim.github.io/IronOS/Logo/)
|
||||
- Automatic LCD rotation based on the orientation
|
||||
|
||||
## Menu System
|
||||
@@ -70,9 +75,9 @@ When on the main screen and having the tip plugged in, the unit shows a pair of
|
||||
- Pressing the button near the tip enters the _soldering mode_
|
||||
- Pressing the button near the USB end enters the _settings menu_
|
||||
- When not in _soldering mode_, holding down the button near the tip will enter _soldering temperature adjust mode_ (This is the same as the one in the _soldering mode_, but allows to adjust the temperature before heating up), in _soldering mode_ however this will activate _boost mode_ as long as you hold down the button.
|
||||
- Holding down the button near the USB end will show the _[debug menu](Documentation/DebugMenu.md)._ In _soldering mode_ this ends the heating.
|
||||
- Holding down the button near the USB end will show the _[debug menu](https://ralim.github.io/IronOS/DebugMenu/)._ In _soldering mode_ this ends the heating.
|
||||
|
||||
Operation details are over in the [Menu information.](Documentation/Menu.md)
|
||||
Operation details are over in the [Menu information.](https://ralim.github.io/IronOS/Menu/)
|
||||
|
||||
## Thanks
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"SleepingAdvancedString": "Slaapstand...",
|
||||
"SleepingTipAdvancedString": "Punt:",
|
||||
"OffString": "Uit",
|
||||
"DeviceFailedValidationWarning": "Your device is most likely a counterfeit!"
|
||||
"DeviceFailedValidationWarning": "Jouw toestel is wellicht een namaak-versie!"
|
||||
},
|
||||
"messagesWarn": {
|
||||
"ResetOKMessage": "Reset OK",
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"SleepingAdvancedString": "Tr. uśpienia",
|
||||
"SleepingTipAdvancedString": "Grot:",
|
||||
"OffString": "Wył",
|
||||
"DeviceFailedValidationWarning": "Your device is most likely a counterfeit!"
|
||||
"DeviceFailedValidationWarning": "Twoje urządzenie jest najprawdopodobniej podróbką!"
|
||||
},
|
||||
"messagesWarn": {
|
||||
"ResetOKMessage": "Reset OK",
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
"UndervoltageString": "Nízke napätie",
|
||||
"InputVoltageString": "Vstupné U: ",
|
||||
"SleepingSimpleString": "Chrr",
|
||||
"SleepingAdvancedString": "Pokojový režim..",
|
||||
"SleepingAdvancedString": "Pokojový režim.",
|
||||
"SleepingTipAdvancedString": "Hrot:",
|
||||
"OffString": "Vyp",
|
||||
"DeviceFailedValidationWarning": "Your device is most likely a counterfeit!"
|
||||
"DeviceFailedValidationWarning": "Vaše zariadenie je pravdepodobne falzifikát!"
|
||||
},
|
||||
"messagesWarn": {
|
||||
"ResetOKMessage": "Reset OK",
|
||||
@@ -331,10 +331,10 @@
|
||||
},
|
||||
"LOGOTime": {
|
||||
"text2": [
|
||||
"Boot logo",
|
||||
"duration"
|
||||
"Trvanie",
|
||||
"boot loga"
|
||||
],
|
||||
"desc": "Sets the duration for the boot logo (s=seconds)"
|
||||
"desc": "Doba trvania boot loga (s=sekundy)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
30
mkdocs.yml
Normal file
30
mkdocs.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
site_name: IronOS
|
||||
site_url: https://ralim.github.io/IronOS/
|
||||
repo_url: https://github.com/ralim/IronOS/
|
||||
site_description: "IronOS Open Source Soldering Iron firmware for Miniware and Pinecil"
|
||||
docs_dir: Documentation
|
||||
nav:
|
||||
- Home: index.md
|
||||
- Getting Started: GettingStarted.md
|
||||
- Flashing the firmware:
|
||||
- MHP30: Flashing/MHP30.md
|
||||
- Pinecil V1: Flashing/Pinecil V1.md
|
||||
- Pinecil V2: Flashing/Pinecil V2.md
|
||||
- TS80(P): Flashing/TS80(P).md
|
||||
- TS100: Flashing/TS100.md
|
||||
- Operation:
|
||||
- Main Menu: Menu.md
|
||||
- Settings: Settings.md
|
||||
- Debug Menu: DebugMenu.md
|
||||
- Power: Power.md
|
||||
- Temperature: Temperature.md
|
||||
- Startup Logo: Logo.md
|
||||
- Hardware:
|
||||
- Hall Sensor (Pinecil): HallSensor.md
|
||||
- Hardware Notes: Hardware.md
|
||||
- Troubleshooting: Troubleshooting.md
|
||||
- Known Hardware Issues: HardwareIssues.md
|
||||
- Translations: Translation.md
|
||||
- Development: Development.md
|
||||
|
||||
theme: readthedocs
|
||||
@@ -17,7 +17,7 @@ extern "C" {
|
||||
*/
|
||||
|
||||
// Erase the flash, then save the buffer. Returns 1 if worked
|
||||
uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length);
|
||||
void flash_save_buffer(const uint8_t *buffer, const uint16_t length);
|
||||
|
||||
void flash_read_buffer(uint8_t *buffer, const uint16_t length);
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -10,14 +10,15 @@
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "string.h"
|
||||
|
||||
static uint16_t settings_page[512] __attribute__((section(".settings_page")));
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
|
||||
|
||||
uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
|
||||
void flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
FLASH_EraseInitTypeDef pEraseInit;
|
||||
pEraseInit.TypeErase = FLASH_TYPEERASE_PAGES;
|
||||
pEraseInit.Banks = FLASH_BANK_1;
|
||||
pEraseInit.NbPages = 1;
|
||||
pEraseInit.PageAddress = (uint32_t)settings_page;
|
||||
pEraseInit.PageAddress = (uint32_t)SETTINGS_START_PAGE;
|
||||
uint32_t failingAddress = 0;
|
||||
resetWatchdog();
|
||||
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR | FLASH_FLAG_PGERR | FLASH_FLAG_BSY);
|
||||
@@ -32,13 +33,9 @@ uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
HAL_FLASH_Unlock();
|
||||
for (uint16_t i = 0; i < (length / 2); i++) {
|
||||
resetWatchdog();
|
||||
HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, (uint32_t)&settings_page[i], data[i]);
|
||||
HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, SETTINGS_START_PAGE+ (i*sizeof(uint16_t)), data[i]);
|
||||
}
|
||||
HAL_FLASH_Lock();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void flash_read_buffer(uint8_t *buffer, const uint16_t length) {
|
||||
memset(buffer, 0, length);
|
||||
memcpy(buffer, settings_page, length);
|
||||
}
|
||||
void flash_read_buffer(uint8_t *buffer, const uint16_t length) { memcpy(buffer, (uint8_t*)SETTINGS_START_PAGE, length); }
|
||||
|
||||
@@ -116,17 +116,6 @@ SECTIONS
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
.logo_page (NOLOAD) :
|
||||
{
|
||||
. = ABSOLUTE(__FLASH_END_ADDR__ - 2048);
|
||||
KEEP (*(.logo_page*))
|
||||
} > ROM
|
||||
|
||||
.settings_page (NOLOAD) :
|
||||
{
|
||||
. = ABSOLUTE(__FLASH_END_ADDR__ - 1024);
|
||||
KEEP (*(.settings_page*))
|
||||
} > ROM
|
||||
|
||||
.bss :
|
||||
{
|
||||
|
||||
@@ -29,66 +29,29 @@ void resetWatchdog() { HAL_IWDG_Refresh(&hiwdg); }
|
||||
static const uint16_t NTCHandleLookup[] = {
|
||||
// ADC Reading , Temp in C
|
||||
29189, 0, //
|
||||
29014, 1, //
|
||||
28832, 2, //
|
||||
28644, 3, //
|
||||
28450, 4, //
|
||||
28249, 5, //
|
||||
28042, 6, //
|
||||
27828, 7, //
|
||||
27607, 8, //
|
||||
27380, 9, //
|
||||
27146, 10, //
|
||||
26906, 11, //
|
||||
26660, 12, //
|
||||
26407, 13, //
|
||||
26147, 14, //
|
||||
25882, 15, //
|
||||
25610, 16, //
|
||||
25332, 17, //
|
||||
25049, 18, //
|
||||
24759, 19, //
|
||||
24465, 20, //
|
||||
24164, 21, //
|
||||
23859, 22, //
|
||||
23549, 23, //
|
||||
23234, 24, //
|
||||
22915, 25, //
|
||||
22591, 26, //
|
||||
22264, 27, //
|
||||
21933, 28, //
|
||||
21599, 29, //
|
||||
21261, 30, //
|
||||
20921, 31, //
|
||||
20579, 32, //
|
||||
20234, 33, //
|
||||
19888, 34, //
|
||||
19541, 35, //
|
||||
19192, 36, //
|
||||
18843, 37, //
|
||||
18493, 38, //
|
||||
18143, 39, //
|
||||
17793, 40, //
|
||||
17444, 41, //
|
||||
17096, 42, //
|
||||
16750, 43, //
|
||||
16404, 44, //
|
||||
16061, 45, //
|
||||
// 15719, 46, //
|
||||
// 15380, 47, //
|
||||
// 15044, 48, //
|
||||
// 14710, 49, //
|
||||
// 14380, 50, //
|
||||
// 14053, 51, //
|
||||
// 13729, 52, //
|
||||
// 13410, 53, //
|
||||
// 13094, 54, //
|
||||
// 12782, 55, //
|
||||
// 12475, 56, //
|
||||
// 12172, 57, //
|
||||
// 11874, 58, //
|
||||
// 11580, 59, //
|
||||
// 11292, 60, //
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ __attribute__((always_inline)) __STATIC_INLINE uint32_t __get_xPSR(void) {
|
||||
\return PSP Register value
|
||||
*/
|
||||
__attribute__((always_inline)) __STATIC_INLINE uint32_t __get_PSP(void) {
|
||||
register uint32_t result;
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile("MRS %0, psp\n" : "=r"(result));
|
||||
return (result);
|
||||
@@ -143,7 +143,7 @@ __attribute__((always_inline)) __STATIC_INLINE void __set_PSP(uint32_t topOfProc
|
||||
\return MSP Register value
|
||||
*/
|
||||
__attribute__((always_inline)) __STATIC_INLINE uint32_t __get_MSP(void) {
|
||||
register uint32_t result;
|
||||
uint32_t result;
|
||||
|
||||
__ASM volatile("MRS %0, msp\n" : "=r"(result));
|
||||
return (result);
|
||||
|
||||
@@ -278,8 +278,8 @@ typedef struct {
|
||||
#define ADC_CHANNEL_16 ((uint32_t)(ADC_SQR3_SQ1_4))
|
||||
#define ADC_CHANNEL_17 ((uint32_t)(ADC_SQR3_SQ1_4 | ADC_SQR3_SQ1_0))
|
||||
|
||||
#define ADC_CHANNEL_TEMPSENSOR ADC_CHANNEL_16 /* ADC internal channel (no connection on device pin) */
|
||||
#define ADC_CHANNEL_VREFINT ADC_CHANNEL_17 /* ADC internal channel (no connection on device pin) */
|
||||
// #define ADC_CHANNEL_TEMPSENSOR ADC_CHANNEL_16 /* ADC internal channel (no connection on device pin) */
|
||||
// #define ADC_CHANNEL_VREFINT ADC_CHANNEL_17 /* ADC internal channel (no connection on device pin) */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -812,10 +812,6 @@ uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef *hadc);
|
||||
|
||||
/* ADC IRQHandler and Callbacks used in non-blocking modes (Interruption and DMA) */
|
||||
void HAL_ADC_IRQHandler(ADC_HandleTypeDef *hadc);
|
||||
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc);
|
||||
void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef *hadc);
|
||||
void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef *hadc);
|
||||
void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -852,8 +848,6 @@ HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef *hadc);
|
||||
HAL_StatusTypeDef ADC_ConversionStop_Disable(ADC_HandleTypeDef *hadc);
|
||||
void ADC_StabilizationTime(uint32_t DelayUs);
|
||||
void ADC_DMAConvCplt(DMA_HandleTypeDef *hdma);
|
||||
void ADC_DMAHalfConvCplt(DMA_HandleTypeDef *hdma);
|
||||
void ADC_DMAError(DMA_HandleTypeDef *hdma);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -233,7 +233,7 @@ typedef struct {
|
||||
* @{
|
||||
*/
|
||||
#define I2C_ADDRESSINGMODE_7BIT 0x00004000U
|
||||
#define I2C_ADDRESSINGMODE_10BIT (I2C_OAR1_ADDMODE | 0x00004000U)
|
||||
// #define I2C_ADDRESSINGMODE_10BIT (I2C_OAR1_ADDMODE | 0x00004000U)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -317,7 +317,7 @@ typedef struct {
|
||||
#define I2C_FLAG_TXE 0x00010080U
|
||||
#define I2C_FLAG_RXNE 0x00010040U
|
||||
#define I2C_FLAG_STOPF 0x00010010U
|
||||
#define I2C_FLAG_ADD10 0x00010008U
|
||||
// #define I2C_FLAG_ADD10 0x00010008U
|
||||
#define I2C_FLAG_BTF 0x00010004U
|
||||
#define I2C_FLAG_ADDR 0x00010002U
|
||||
#define I2C_FLAG_SB 0x00010001U
|
||||
|
||||
@@ -1194,11 +1194,6 @@ HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef *hadc, uint32_t *pData, ui
|
||||
/* Set the DMA transfer complete callback */
|
||||
hadc->DMA_Handle->XferCpltCallback = ADC_DMAConvCplt;
|
||||
|
||||
/* Set the DMA half transfer complete callback */
|
||||
hadc->DMA_Handle->XferHalfCpltCallback = ADC_DMAHalfConvCplt;
|
||||
|
||||
/* Set the DMA error callback */
|
||||
hadc->DMA_Handle->XferErrorCallback = ADC_DMAError;
|
||||
|
||||
/* Manage ADC and DMA start: ADC overrun interruption, DMA start, ADC */
|
||||
/* start (in case of SW start): */
|
||||
@@ -1357,8 +1352,6 @@ void HAL_ADC_IRQHandler(ADC_HandleTypeDef *hadc) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Conversion complete callback */
|
||||
HAL_ADC_ConvCpltCallback(hadc);
|
||||
|
||||
/* Clear regular group conversion flag */
|
||||
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_STRT | ADC_FLAG_EOC);
|
||||
@@ -1401,73 +1394,10 @@ void HAL_ADC_IRQHandler(ADC_HandleTypeDef *hadc) {
|
||||
}
|
||||
}
|
||||
|
||||
/* ========== Check Analog watchdog flags ========== */
|
||||
if (__HAL_ADC_GET_IT_SOURCE(hadc, ADC_IT_AWD)) {
|
||||
if (__HAL_ADC_GET_FLAG(hadc, ADC_FLAG_AWD)) {
|
||||
/* Set ADC state */
|
||||
SET_BIT(hadc->State, HAL_ADC_STATE_AWD1);
|
||||
|
||||
/* Level out of window callback */
|
||||
HAL_ADC_LevelOutOfWindowCallback(hadc);
|
||||
|
||||
/* Clear the ADC analog watchdog flag */
|
||||
__HAL_ADC_CLEAR_FLAG(hadc, ADC_FLAG_AWD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Conversion complete callback in non blocking mode
|
||||
* @param hadc: ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc) {
|
||||
/* Prevent unused argument(s) compilation warning */
|
||||
UNUSED(hadc);
|
||||
/* NOTE : This function should not be modified. When the callback is needed,
|
||||
function HAL_ADC_ConvCpltCallback must be implemented in the user file.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Conversion DMA half-transfer callback in non blocking mode
|
||||
* @param hadc: ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef *hadc) {
|
||||
/* Prevent unused argument(s) compilation warning */
|
||||
UNUSED(hadc);
|
||||
/* NOTE : This function should not be modified. When the callback is needed,
|
||||
function HAL_ADC_ConvHalfCpltCallback must be implemented in the user file.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Analog watchdog callback in non blocking mode.
|
||||
* @param hadc: ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef *hadc) {
|
||||
/* Prevent unused argument(s) compilation warning */
|
||||
UNUSED(hadc);
|
||||
/* NOTE : This function should not be modified. When the callback is needed,
|
||||
function HAL_ADC_LevelOutOfWindowCallback must be implemented in the user file.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ADC error callback in non blocking mode
|
||||
* (ADC conversion with interruption or transfer by DMA)
|
||||
* @param hadc: ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc) {
|
||||
/* Prevent unused argument(s) compilation warning */
|
||||
UNUSED(hadc);
|
||||
/* NOTE : This function should not be modified. When the callback is needed,
|
||||
function HAL_ADC_ErrorCallback must be implemented in the user file.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
@@ -1509,7 +1439,6 @@ __weak void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc) {
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConfTypeDef *sConfig) {
|
||||
HAL_StatusTypeDef tmp_hal_status = HAL_OK;
|
||||
__IO uint32_t wait_loop_index = 0U;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance));
|
||||
@@ -1543,32 +1472,7 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef *hadc, ADC_ChannelConf
|
||||
MODIFY_REG(hadc->Instance->SMPR2, ADC_SMPR2(ADC_SMPR2_SMP0, sConfig->Channel), ADC_SMPR2(sConfig->SamplingTime, sConfig->Channel));
|
||||
}
|
||||
|
||||
/* If ADC1 Channel_16 or Channel_17 is selected, enable Temperature sensor */
|
||||
/* and VREFINT measurement path. */
|
||||
if ((sConfig->Channel == ADC_CHANNEL_TEMPSENSOR) || (sConfig->Channel == ADC_CHANNEL_VREFINT)) {
|
||||
/* For STM32F1 devices with several ADC: Only ADC1 can access internal */
|
||||
/* measurement channels (VrefInt/TempSensor). If these channels are */
|
||||
/* intended to be set on other ADC instances, an error is reported. */
|
||||
if (hadc->Instance == ADC1) {
|
||||
if (READ_BIT(hadc->Instance->CR2, ADC_CR2_TSVREFE) == RESET) {
|
||||
SET_BIT(hadc->Instance->CR2, ADC_CR2_TSVREFE);
|
||||
|
||||
if ((sConfig->Channel == ADC_CHANNEL_TEMPSENSOR)) {
|
||||
/* Delay for temperature sensor stabilization time */
|
||||
/* Compute number of CPU cycles to wait for */
|
||||
wait_loop_index = (ADC_TEMPSENSOR_DELAY_US * (SystemCoreClock / 1000000U));
|
||||
while (wait_loop_index != 0U) {
|
||||
wait_loop_index--;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Update ADC state machine to error */
|
||||
SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
|
||||
|
||||
tmp_hal_status = HAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* Process unlocked */
|
||||
__HAL_UNLOCK(hadc);
|
||||
@@ -1802,45 +1706,16 @@ void ADC_DMAConvCplt(DMA_HandleTypeDef *hdma) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Conversion complete callback */
|
||||
HAL_ADC_ConvCpltCallback(hadc);
|
||||
} else {
|
||||
/* Call DMA error callback */
|
||||
hadc->DMA_Handle->XferErrorCallback(hdma);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DMA half transfer complete callback.
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
void ADC_DMAHalfConvCplt(DMA_HandleTypeDef *hdma) {
|
||||
/* Retrieve ADC handle corresponding to current DMA handle */
|
||||
ADC_HandleTypeDef *hadc = (ADC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
|
||||
|
||||
/* Half conversion callback */
|
||||
HAL_ADC_ConvHalfCpltCallback(hadc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DMA error callback
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
void ADC_DMAError(DMA_HandleTypeDef *hdma) {
|
||||
/* Retrieve ADC handle corresponding to current DMA handle */
|
||||
ADC_HandleTypeDef *hadc = (ADC_HandleTypeDef *)((DMA_HandleTypeDef *)hdma)->Parent;
|
||||
|
||||
/* Set ADC state */
|
||||
SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_DMA);
|
||||
|
||||
/* Set ADC error code to DMA error */
|
||||
SET_BIT(hadc->ErrorCode, HAL_ADC_ERROR_DMA);
|
||||
|
||||
/* Error callback */
|
||||
HAL_ADC_ErrorCallback(hadc);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -661,11 +661,6 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA(ADC_HandleTypeDef *hadc, uint32_t
|
||||
/* Set the DMA transfer complete callback */
|
||||
hadc->DMA_Handle->XferCpltCallback = ADC_DMAConvCplt;
|
||||
|
||||
/* Set the DMA half transfer complete callback */
|
||||
hadc->DMA_Handle->XferHalfCpltCallback = ADC_DMAHalfConvCplt;
|
||||
|
||||
/* Set the DMA error callback */
|
||||
hadc->DMA_Handle->XferErrorCallback = ADC_DMAError;
|
||||
|
||||
/* Manage ADC and DMA start: ADC overrun interruption, DMA start, ADC */
|
||||
/* start (in case of SW start): */
|
||||
@@ -905,7 +900,6 @@ __weak void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef *hadc) {
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_InjectionConfTypeDef *sConfigInjected) {
|
||||
HAL_StatusTypeDef tmp_hal_status = HAL_OK;
|
||||
__IO uint32_t wait_loop_index = 0U;
|
||||
|
||||
/* Check the parameters */
|
||||
assert_param(IS_ADC_ALL_INSTANCE(hadc->Instance));
|
||||
@@ -1034,11 +1028,8 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I
|
||||
MODIFY_REG(hadc->Instance->SMPR2, ADC_SMPR2(ADC_SMPR2_SMP0, sConfigInjected->InjectedChannel), ADC_SMPR2(sConfigInjected->InjectedSamplingTime, sConfigInjected->InjectedChannel));
|
||||
}
|
||||
|
||||
/* If ADC1 InjectedChannel_16 or InjectedChannel_17 is selected, enable Temperature sensor */
|
||||
/* and VREFINT measurement path. */
|
||||
if ((sConfigInjected->InjectedChannel == ADC_CHANNEL_TEMPSENSOR) || (sConfigInjected->InjectedChannel == ADC_CHANNEL_VREFINT)) {
|
||||
SET_BIT(hadc->Instance->CR2, ADC_CR2_TSVREFE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Configure the offset: offset enable/disable, InjectedChannel, offset value */
|
||||
switch (sConfigInjected->InjectedRank) {
|
||||
@@ -1060,32 +1051,6 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef *hadc, ADC_I
|
||||
break;
|
||||
}
|
||||
|
||||
/* If ADC1 Channel_16 or Channel_17 is selected, enable Temperature sensor */
|
||||
/* and VREFINT measurement path. */
|
||||
if ((sConfigInjected->InjectedChannel == ADC_CHANNEL_TEMPSENSOR) || (sConfigInjected->InjectedChannel == ADC_CHANNEL_VREFINT)) {
|
||||
/* For STM32F1 devices with several ADC: Only ADC1 can access internal */
|
||||
/* measurement channels (VrefInt/TempSensor). If these channels are */
|
||||
/* intended to be set on other ADC instances, an error is reported. */
|
||||
if (hadc->Instance == ADC1) {
|
||||
if (READ_BIT(hadc->Instance->CR2, ADC_CR2_TSVREFE) == RESET) {
|
||||
SET_BIT(hadc->Instance->CR2, ADC_CR2_TSVREFE);
|
||||
|
||||
if ((sConfigInjected->InjectedChannel == ADC_CHANNEL_TEMPSENSOR)) {
|
||||
/* Delay for temperature sensor stabilization time */
|
||||
/* Compute number of CPU cycles to wait for */
|
||||
wait_loop_index = (ADC_TEMPSENSOR_DELAY_US * (SystemCoreClock / 1000000U));
|
||||
while (wait_loop_index != 0U) {
|
||||
wait_loop_index--;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Update ADC state machine to error */
|
||||
SET_BIT(hadc->State, HAL_ADC_STATE_ERROR_CONFIG);
|
||||
|
||||
tmp_hal_status = HAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* Process unlocked */
|
||||
__HAL_UNLOCK(hadc);
|
||||
|
||||
@@ -309,7 +309,6 @@ static HAL_StatusTypeDef I2C_MasterTransmit_BTF(I2C_HandleTypeDef *hi2c);
|
||||
static HAL_StatusTypeDef I2C_MasterReceive_RXNE(I2C_HandleTypeDef *hi2c);
|
||||
static HAL_StatusTypeDef I2C_MasterReceive_BTF(I2C_HandleTypeDef *hi2c);
|
||||
static HAL_StatusTypeDef I2C_Master_SB(I2C_HandleTypeDef *hi2c);
|
||||
static HAL_StatusTypeDef I2C_Master_ADD10(I2C_HandleTypeDef *hi2c);
|
||||
static HAL_StatusTypeDef I2C_Master_ADDR(I2C_HandleTypeDef *hi2c);
|
||||
|
||||
/**
|
||||
@@ -957,16 +956,7 @@ HAL_StatusTypeDef HAL_I2C_Slave_Transmit(I2C_HandleTypeDef *hi2c, uint8_t *pData
|
||||
/* Clear ADDR flag */
|
||||
__HAL_I2C_CLEAR_ADDRFLAG(hi2c);
|
||||
|
||||
/* If 10bit addressing mode is selected */
|
||||
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT) {
|
||||
/* Wait until ADDR flag is set */
|
||||
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_ADDR, RESET, Timeout, tickstart) != HAL_OK) {
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
|
||||
/* Clear ADDR flag */
|
||||
__HAL_I2C_CLEAR_ADDRFLAG(hi2c);
|
||||
}
|
||||
|
||||
while (hi2c->XferSize > 0U) {
|
||||
/* Wait until TXE flag is set */
|
||||
@@ -3083,10 +3073,6 @@ void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c) {
|
||||
if (((sr1itflags & I2C_FLAG_SB) != RESET) && ((itsources & I2C_IT_EVT) != RESET)) {
|
||||
I2C_Master_SB(hi2c);
|
||||
}
|
||||
/* ADD10 Set -------------------------------------------------------------*/
|
||||
else if (((sr1itflags & I2C_FLAG_ADD10) != RESET) && ((itsources & I2C_IT_EVT) != RESET)) {
|
||||
I2C_Master_ADD10(hi2c);
|
||||
}
|
||||
/* ADDR Set --------------------------------------------------------------*/
|
||||
else if (((sr1itflags & I2C_FLAG_ADDR) != RESET) && ((itsources & I2C_IT_EVT) != RESET)) {
|
||||
I2C_Master_ADDR(hi2c);
|
||||
@@ -3731,18 +3717,6 @@ static HAL_StatusTypeDef I2C_Master_SB(I2C_HandleTypeDef *hi2c) {
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Handle ADD10 flag for Master
|
||||
* @param hi2c Pointer to a I2C_HandleTypeDef structure that contains
|
||||
* the configuration information for I2C module
|
||||
* @retval HAL status
|
||||
*/
|
||||
static HAL_StatusTypeDef I2C_Master_ADD10(I2C_HandleTypeDef *hi2c) {
|
||||
/* Send slave address */
|
||||
hi2c->Instance->DR = I2C_10BIT_ADDRESS(hi2c->Devaddress);
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Handle ADDR flag for Master
|
||||
@@ -3760,14 +3734,6 @@ static HAL_StatusTypeDef I2C_Master_ADDR(I2C_HandleTypeDef *hi2c) {
|
||||
if ((hi2c->EventCount == 0U) && (CurrentMode == HAL_I2C_MODE_MEM)) {
|
||||
/* Clear ADDR flag */
|
||||
__HAL_I2C_CLEAR_ADDRFLAG(hi2c);
|
||||
} else if ((hi2c->EventCount == 0U) && (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_10BIT)) {
|
||||
/* Clear ADDR flag */
|
||||
__HAL_I2C_CLEAR_ADDRFLAG(hi2c);
|
||||
|
||||
/* Generate Restart */
|
||||
hi2c->Instance->CR1 |= I2C_CR1_START;
|
||||
|
||||
hi2c->EventCount++;
|
||||
} else {
|
||||
if (hi2c->XferCount == 0U) {
|
||||
/* Clear ADDR flag */
|
||||
@@ -3996,22 +3962,8 @@ static HAL_StatusTypeDef I2C_MasterRequestWrite(I2C_HandleTypeDef *hi2c, uint16_
|
||||
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_7BIT) {
|
||||
/* Send slave address */
|
||||
hi2c->Instance->DR = I2C_7BIT_ADD_WRITE(DevAddress);
|
||||
} else {
|
||||
/* Send header of slave address */
|
||||
hi2c->Instance->DR = I2C_10BIT_HEADER_WRITE(DevAddress);
|
||||
|
||||
/* Wait until ADD10 flag is set */
|
||||
if (I2C_WaitOnMasterAddressFlagUntilTimeout(hi2c, I2C_FLAG_ADD10, Timeout, Tickstart) != HAL_OK) {
|
||||
if (hi2c->ErrorCode == HAL_I2C_ERROR_AF) {
|
||||
return HAL_ERROR;
|
||||
} else {
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Send slave address */
|
||||
hi2c->Instance->DR = I2C_10BIT_ADDRESS(DevAddress);
|
||||
}
|
||||
|
||||
/* Wait until ADDR flag is set */
|
||||
if (I2C_WaitOnMasterAddressFlagUntilTimeout(hi2c, I2C_FLAG_ADDR, Timeout, Tickstart) != HAL_OK) {
|
||||
@@ -4059,45 +4011,8 @@ static HAL_StatusTypeDef I2C_MasterRequestRead(I2C_HandleTypeDef *hi2c, uint16_t
|
||||
if (hi2c->Init.AddressingMode == I2C_ADDRESSINGMODE_7BIT) {
|
||||
/* Send slave address */
|
||||
hi2c->Instance->DR = I2C_7BIT_ADD_READ(DevAddress);
|
||||
} else {
|
||||
/* Send header of slave address */
|
||||
hi2c->Instance->DR = I2C_10BIT_HEADER_WRITE(DevAddress);
|
||||
|
||||
/* Wait until ADD10 flag is set */
|
||||
if (I2C_WaitOnMasterAddressFlagUntilTimeout(hi2c, I2C_FLAG_ADD10, Timeout, Tickstart) != HAL_OK) {
|
||||
if (hi2c->ErrorCode == HAL_I2C_ERROR_AF) {
|
||||
return HAL_ERROR;
|
||||
} else {
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Send slave address */
|
||||
hi2c->Instance->DR = I2C_10BIT_ADDRESS(DevAddress);
|
||||
|
||||
/* Wait until ADDR flag is set */
|
||||
if (I2C_WaitOnMasterAddressFlagUntilTimeout(hi2c, I2C_FLAG_ADDR, Timeout, Tickstart) != HAL_OK) {
|
||||
if (hi2c->ErrorCode == HAL_I2C_ERROR_AF) {
|
||||
return HAL_ERROR;
|
||||
} else {
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear ADDR flag */
|
||||
__HAL_I2C_CLEAR_ADDRFLAG(hi2c);
|
||||
|
||||
/* Generate Restart */
|
||||
hi2c->Instance->CR1 |= I2C_CR1_START;
|
||||
|
||||
/* Wait until SB flag is set */
|
||||
if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_SB, RESET, Timeout, Tickstart) != HAL_OK) {
|
||||
return HAL_TIMEOUT;
|
||||
}
|
||||
|
||||
/* Send header of slave address */
|
||||
hi2c->Instance->DR = I2C_10BIT_HEADER_READ(DevAddress);
|
||||
}
|
||||
|
||||
/* Wait until ADDR flag is set */
|
||||
if (I2C_WaitOnMasterAddressFlagUntilTimeout(hi2c, I2C_FLAG_ADDR, Timeout, Tickstart) != HAL_OK) {
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "string.h"
|
||||
|
||||
static uint16_t settings_page[512] __attribute__((section(".settings_page")));
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (63 * 1024))
|
||||
|
||||
uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
void flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
FLASH_EraseInitTypeDef pEraseInit;
|
||||
pEraseInit.TypeErase = FLASH_TYPEERASE_PAGES;
|
||||
pEraseInit.Banks = FLASH_BANK_1;
|
||||
pEraseInit.NbPages = 1;
|
||||
pEraseInit.PageAddress = (uint32_t)settings_page;
|
||||
pEraseInit.PageAddress = (uint32_t)SETTINGS_START_PAGE;
|
||||
uint32_t failingAddress = 0;
|
||||
resetWatchdog();
|
||||
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR | FLASH_FLAG_PGERR | FLASH_FLAG_BSY);
|
||||
@@ -32,10 +32,10 @@ uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
HAL_FLASH_Unlock();
|
||||
for (uint16_t i = 0; i < (length / 2); i++) {
|
||||
resetWatchdog();
|
||||
HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, (uint32_t)&settings_page[i], data[i]);
|
||||
HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, SETTINGS_START_PAGE+ (i*sizeof(uint16_t)), data[i]);
|
||||
}
|
||||
HAL_FLASH_Lock();
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
||||
void flash_read_buffer(uint8_t *buffer, const uint16_t length) { memcpy(buffer, settings_page, length); }
|
||||
void flash_read_buffer(uint8_t *buffer, const uint16_t length) { memcpy(buffer, (uint8_t*)SETTINGS_START_PAGE, length); }
|
||||
|
||||
@@ -189,24 +189,27 @@ StackType_t *pxPortInitialiseStack(StackType_t *pxTopOfStack, TaskFunction_t pxC
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvTaskExitError(void) {
|
||||
volatile uint32_t ulDummy = 0UL;
|
||||
// volatile uint32_t ulDummy = 0UL;
|
||||
|
||||
/* A function that implements a task must not exit or attempt to return to
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
should instead call vTaskDelete( NULL ).
|
||||
// /* A function that implements a task must not exit or attempt to return to
|
||||
// its caller as there is nothing to return to. If a task wants to exit it
|
||||
// should instead call vTaskDelete( NULL ).
|
||||
|
||||
// Artificially force an assert() to be triggered if configASSERT() is
|
||||
// defined, then stop here so application writers can catch the error. */
|
||||
// configASSERT(uxCriticalNesting == ~0UL);
|
||||
// portDISABLE_INTERRUPTS();
|
||||
// while (ulDummy == 0) {
|
||||
// /* This file calls prvTaskExitError() after the scheduler has been
|
||||
// started to remove a compiler warning about the function being defined
|
||||
// but never called. ulDummy is used purely to quieten other warnings
|
||||
// about code appearing after this function is called - making ulDummy
|
||||
// volatile makes the compiler think the function could return and
|
||||
// therefore not output an 'unreachable code' warning for code that appears
|
||||
// after it. */
|
||||
// }
|
||||
for(;;){
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
defined, then stop here so application writers can catch the error. */
|
||||
configASSERT(uxCriticalNesting == ~0UL);
|
||||
portDISABLE_INTERRUPTS();
|
||||
while (ulDummy == 0) {
|
||||
/* This file calls prvTaskExitError() after the scheduler has been
|
||||
started to remove a compiler warning about the function being defined
|
||||
but never called. ulDummy is used purely to quieten other warnings
|
||||
about code appearing after this function is called - making ulDummy
|
||||
volatile makes the compiler think the function could return and
|
||||
therefore not output an 'unreachable code' warning for code that appears
|
||||
after it. */
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -116,17 +116,6 @@ SECTIONS
|
||||
_edata = .; /* define a global symbol at data end */
|
||||
} >RAM AT> ROM
|
||||
|
||||
.logo_page (NOLOAD) :
|
||||
{
|
||||
. = ABSOLUTE(__FLASH_END_ADDR__ - 2048);
|
||||
KEEP (*(.logo_page*))
|
||||
} > ROM
|
||||
|
||||
.settings_page (NOLOAD) :
|
||||
{
|
||||
. = ABSOLUTE(__FLASH_END_ADDR__ - 1024);
|
||||
KEEP (*(.settings_page*))
|
||||
} > ROM
|
||||
|
||||
.bss :
|
||||
{
|
||||
|
||||
@@ -11,21 +11,6 @@ extern TIM_HandleTypeDef htim1; // used for the systick
|
||||
/* Cortex-M3 Processor Interruption and Exception Handlers */
|
||||
/******************************************************************************/
|
||||
|
||||
void NMI_Handler(void) {}
|
||||
|
||||
// We have the assembly for a breakpoint trigger here to halt the system when a debugger is connected
|
||||
// Hardfault handler, often a screwup in the code
|
||||
void HardFault_Handler(void) {}
|
||||
|
||||
// Memory management unit had an error
|
||||
void MemManage_Handler(void) {}
|
||||
|
||||
// Prefetcher or busfault occured
|
||||
void BusFault_Handler(void) {}
|
||||
|
||||
void UsageFault_Handler(void) {}
|
||||
|
||||
void DebugMon_Handler(void) {}
|
||||
|
||||
// Systick is used by FreeRTOS tick
|
||||
void SysTick_Handler(void) { osSystickHandler(); }
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
#include "gd32vf103_libopt.h"
|
||||
#include "string.h"
|
||||
#define FMC_PAGE_SIZE ((uint16_t)0x400U)
|
||||
// static uint16_t settings_page[FMC_PAGE_SIZE] __attribute__ ((section (".settings_page")));
|
||||
// Linker script doesnt want to play, so for now its hard coded
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
|
||||
uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
void flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
|
||||
/* unlock the flash program/erase controller */
|
||||
fmc_unlock();
|
||||
@@ -34,7 +32,6 @@ uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
resetWatchdog();
|
||||
}
|
||||
fmc_lock();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void flash_read_buffer(uint8_t *buffer, const uint16_t length) {
|
||||
|
||||
@@ -202,7 +202,7 @@ void FinishMeasureTipResistance() {
|
||||
uint8_t newRes = 0;
|
||||
if (reading > 8000) {
|
||||
// return; // Change nothing as probably disconnected tip
|
||||
} else if (reading < 5000) {
|
||||
} else if (reading < 4000) {
|
||||
newRes = 62;
|
||||
} else {
|
||||
newRes = 80;
|
||||
|
||||
@@ -41,6 +41,7 @@ extern "C" {
|
||||
* These settings should not be altered.
|
||||
*-----------------------------------------------------------
|
||||
*/
|
||||
#include "FreeRTOSConfig.h"
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
|
||||
#define SETTINGS_START_PAGE (1023 * FLASH_PAGE_SIZE) // Hal auto offsets base addr
|
||||
|
||||
uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
void flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
|
||||
BL_Err_Type err = flash_erase(SETTINGS_START_PAGE, FLASH_PAGE_SIZE);
|
||||
err = flash_write(SETTINGS_START_PAGE, buffer, length);
|
||||
return err != SUCCESS;
|
||||
}
|
||||
|
||||
void flash_read_buffer(uint8_t *buffer, const uint16_t length) { flash_read(SETTINGS_START_PAGE, buffer, length); }
|
||||
|
||||
@@ -152,15 +152,15 @@ S_SRCS := $(shell find $(MINIWARE_STARTUP_DIR) -type f -name '*.S')
|
||||
LDSCRIPT=$(MINIWARE_LD_FILE)
|
||||
DEV_GLOBAL_DEFS= -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK -D GCC_ARMCM3 \
|
||||
-D ARM_MATH_CM3 \
|
||||
-D STM32F10X_MD
|
||||
DEV_LDFLAGS=
|
||||
-D STM32F10X_MD -finline-limit=9999999
|
||||
DEV_LDFLAGS= -Wl,--wrap=printf -Wl,--no-wchar-size-warning
|
||||
DEV_AFLAGS=
|
||||
DEV_CFLAGS= -D VECT_TAB_OFFSET=$(bootldr_size)U
|
||||
DEV_CXXFLAGS=
|
||||
CPUFLAGS= -mcpu=cortex-m3 \
|
||||
-mthumb \
|
||||
-mfloat-abi=soft
|
||||
flash_size=64k
|
||||
flash_size=62k
|
||||
bootldr_size=0x4000
|
||||
DEVICE_DFU_ADDRESS=0x08004000
|
||||
DEVICE_DFU_VID_PID=0x1209:0xDB42
|
||||
@@ -186,7 +186,7 @@ DEV_CXXFLAGS=
|
||||
CPUFLAGS= -mcpu=cortex-m3 \
|
||||
-mthumb \
|
||||
-mfloat-abi=soft
|
||||
flash_size=128k
|
||||
flash_size=126k
|
||||
bootldr_size=32k
|
||||
DEVICE_DFU_ADDRESS=0x08008000
|
||||
DEVICE_DFU_VID_PID=0x1209:0xDB42
|
||||
@@ -271,7 +271,7 @@ CPUFLAGS= -march=rv32imafc \
|
||||
-mcmodel=medany -fsigned-char -fno-builtin -nostartfiles \
|
||||
-DportasmHANDLE_INTERRUPT=FreeRTOS_Interrupt_Handler -DARCH_RISCV -D__RISCV_FEATURE_MVE=0 -DportUSING_MPU_WRAPPERS=0
|
||||
# -DBFLB_USE_ROM_DRIVER=1
|
||||
DEV_LDFLAGS=-nostartfiles -DDEBUG
|
||||
DEV_LDFLAGS=-nostartfiles
|
||||
DEV_AFLAGS=
|
||||
DEV_GLOBAL_DEFS=
|
||||
#Required to be turned off due to their drivers tripping warnings
|
||||
@@ -313,12 +313,11 @@ $(shell find $(DEVICE_BSP_DIR) -type d \( $(EXCLUDED_DIRS) \) -prune -false -o
|
||||
$(shell find $(SOURCE_MIDDLEWARES_DIR) -type f -name '*.cpp')
|
||||
|
||||
# code optimisation ------------------------------------------------------------
|
||||
OPTIM=-Os -flto -finline-small-functions -findirect-inlining -fdiagnostics-color -ffunction-sections -fdata-sections -fshort-enums -fsingle-precision-constant -fno-common
|
||||
OPTIM=-Os -foptimize-strlen -faggressive-loop-optimizations -fdevirtualize-at-ltrans -fmerge-all-constants -fshort-wchar -flto -finline-small-functions -finline-functions -findirect-inlining -fdiagnostics-color -ffunction-sections -fdata-sections -fshort-enums -fsingle-precision-constant -fno-common -fno-math-errno -ffast-math -ffinite-math-only -fno-signed-zeros -fsingle-precision-constant
|
||||
|
||||
# global defines ---------------------------------------------------------------
|
||||
GLOBAL_DEFINES += $(DEV_GLOBAL_DEFS) -D USE_RTOS_SYSTICK -D MODEL_$(model) -D VECT_TAB_OFFSET=$(bootldr_size)U -fshort-wchar
|
||||
|
||||
DEBUG=-g3
|
||||
ifdef swd_enable
|
||||
GLOBAL_DEFINES += -DSWD_ENABLE
|
||||
endif
|
||||
@@ -343,6 +342,7 @@ endif
|
||||
CC=$(COMPILER_PREFIX)-gcc
|
||||
CPP=$(COMPILER_PREFIX)-g++
|
||||
OBJCOPY=$(COMPILER_PREFIX)-objcopy
|
||||
SIZE=$(COMPILER_PREFIX)-size
|
||||
OBJDUMP=$(COMPILER_PREFIX)-objdump
|
||||
# use gcc in assembler mode so we can use defines etc in assembly
|
||||
AS=$(COMPILER_PREFIX)-gcc -x assembler-with-cpp
|
||||
@@ -399,13 +399,12 @@ CHECKOPTIONS_C= $(CHECKOPTIONS) -Wbad-function-cast
|
||||
|
||||
CXXFLAGS=$(DEV_CXXFLAGS) \
|
||||
$(CPUFLAGS) \
|
||||
$(DEBUG) \
|
||||
$(INCLUDES) \
|
||||
$(GLOBAL_DEFINES) \
|
||||
-D${COMPILER} \
|
||||
-MMD \
|
||||
$(CHECKOPTIONS) \
|
||||
-std=c++14 \
|
||||
-std=c++17 \
|
||||
$(OPTIM) \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
@@ -418,7 +417,6 @@ CXXFLAGS=$(DEV_CXXFLAGS) \
|
||||
|
||||
CFLAGS=$(DEV_CFLAGS) \
|
||||
$(CPUFLAGS) \
|
||||
$(DEBUG) \
|
||||
$(INCLUDES) \
|
||||
$(CHECKOPTIONS_C) \
|
||||
$(GLOBAL_DEFINES) \
|
||||
@@ -435,7 +433,6 @@ AFLAGS= $(CPUFLAGS) \
|
||||
$(DEV_AFLAGS) \
|
||||
$(GLOBAL_DEFINES) \
|
||||
$(OPTIM) \
|
||||
$(DEBUG) \
|
||||
$(ASM_INC) \
|
||||
$(INCLUDES)
|
||||
|
||||
@@ -469,35 +466,12 @@ firmware-%: $(HEXFILE_DIR)/$(model)_%.hex $(HEXFILE_DIR)/$(model)_%.bin $(HEXFIL
|
||||
|
||||
%.bin : %.elf Makefile
|
||||
$(OBJCOPY) $< -O binary $@
|
||||
$(SIZE) $<
|
||||
|
||||
%.dfu : %.bin Makefile
|
||||
python3 dfuse-pack.py -b $(DEVICE_DFU_ADDRESS)@0:$< -D $(DEVICE_DFU_VID_PID) $@
|
||||
|
||||
$(HEXFILE_DIR)/$(model)_%.elf : \
|
||||
$(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) \
|
||||
$(OUTPUT_DIR)/Core/Gen/Translation.%.o \
|
||||
$(OUTPUT_DIR)/Core/LangSupport/lang_single.o \
|
||||
Makefile $(LDSCRIPT)
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo Linking $@
|
||||
@$(CPP) $(CXXFLAGS) $(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) \
|
||||
$(OUTPUT_DIR)/Core/Gen/Translation.$*.o \
|
||||
$(OUTPUT_DIR)/Core/LangSupport/lang_single.o \
|
||||
$(LIBS) $(LINKER_FLAGS) -o$@ -Wl,-Map=$@.map
|
||||
|
||||
$(HEXFILE_DIR)/$(model)_string_compressed_%.elf : \
|
||||
$(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) \
|
||||
$(OUTPUT_DIR)/Core/Gen/Translation_brieflz.%.o \
|
||||
$(OUTPUT_DIR)/Core/LangSupport/lang_single.o \
|
||||
Makefile $(LDSCRIPT)
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo Linking $@
|
||||
@$(CPP) $(CXXFLAGS) $(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) \
|
||||
$(OUTPUT_DIR)/Core/Gen/Translation_brieflz.$*.o \
|
||||
$(OUTPUT_DIR)/Core/LangSupport/lang_single.o \
|
||||
$(LIBS) $(LINKER_FLAGS) -o$@ -Wl,-Map=$@.map
|
||||
|
||||
$(HEXFILE_DIR)/$(model)_font_compressed_%.elf : \
|
||||
$(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) \
|
||||
$(OUTPUT_DIR)/Core/Gen/Translation_brieflz_font.%.o \
|
||||
$(OUTPUT_DIR)/Core/LangSupport/lang_single.o \
|
||||
@@ -509,6 +483,7 @@ $(HEXFILE_DIR)/$(model)_font_compressed_%.elf : \
|
||||
$(OUTPUT_DIR)/Core/LangSupport/lang_single.o \
|
||||
$(LIBS) $(LINKER_FLAGS) -o$@ -Wl,-Map=$@.map
|
||||
|
||||
|
||||
$(OUT_OBJS): $(OUTPUT_DIR)/%.o : %.c Makefile
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo Compiling ${<}
|
||||
@@ -544,12 +519,12 @@ Core/Gen/Translation.%.cpp $(OUTPUT_DIR)/Core/Gen/translation.files/%.pickle: ..
|
||||
$(OUTPUT_DIR)/Core/Gen/translation.files/%.o: Core/Gen/Translation.%.cpp
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo Generating $@
|
||||
@$(CPP) -c $(filter-out -flto -g3,$(CXXFLAGS)) $< -o $@
|
||||
@$(CPP) -c $(filter-out -flto ,$(CXXFLAGS)) $< -o $@
|
||||
|
||||
$(OUTPUT_DIR)/Core/Gen/translation.files/multi.%.o: Core/Gen/Translation_multi.%.cpp
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo Generating $@
|
||||
@$(CPP) -c $(filter-out -flto -g3,$(CXXFLAGS)) $< -o $@
|
||||
@$(CPP) -c $(filter-out -flto ,$(CXXFLAGS)) $< -o $@
|
||||
|
||||
$(HOST_OUTPUT_DIR)/brieflz/libbrieflz.so: Core/brieflz/brieflz.c Core/brieflz/depack.c
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
* i.e.: BUILD_VERSION = 'Rel. v2.08' --> Will generated to: 'v2.08.1a2b3c4'
|
||||
*/
|
||||
|
||||
#define BUILD_VERSION "v2.19"
|
||||
#define BUILD_VERSION "v2.20"
|
||||
|
||||
Reference in New Issue
Block a user