Feature: Only require one binary file for initial flashing

There is no need anymore to upload multiple .bin files. All binaries are combined into one.
This commit is contained in:
Thomas Basler 2023-06-09 00:03:01 +02:00
parent abfc2735ba
commit c8fc123e81
3 changed files with 6 additions and 20 deletions

View File

@ -98,17 +98,15 @@ jobs:
- name: Rename Firmware - name: Rename Firmware
run: mv .pio/build/${{ matrix.environment }}/firmware.bin .pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin run: mv .pio/build/${{ matrix.environment }}/firmware.bin .pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin
- name: Copy boot_app0.bin - name: Rename Factory Firmware
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin .pio/build/${{ matrix.environment }}/boot_app0.bin run: mv .pio/build/${{ matrix.environment }}/firmware.factory.bin .pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.factory.bin
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: opendtu-${{ matrix.environment }} name: opendtu-${{ matrix.environment }}
path: | path: |
.pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin .pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin
.pio/build/${{ matrix.environment }}/partitions.bin .pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.factory.bin
.pio/build/${{ matrix.environment }}/bootloader.bin
.pio/build/${{ matrix.environment }}/boot_app0.bin
release: release:
name: Create Release name: Create Release
@ -133,12 +131,10 @@ jobs:
with: with:
path: artifacts/ path: artifacts/
- name: Create ZIPs - name: Move all files to the same location
run: | run: |
ls -R ls -R
sudo apt install zip
cd artifacts cd artifacts
for i in */; do zip -r "${i%/}.zip" "$i"; done
for i in */; do cp ${i}opendtu-*.bin ./; done for i in */; do cp ${i}opendtu-*.bin ./; done
- name: Create release - name: Create release

View File

@ -210,14 +210,7 @@ It is recommended to make all changes only in the 'platformio_override.ini', th
### using the pre-compiled .bin files ### using the pre-compiled .bin files
The pre-compiled binary files can be found here on the [github page behind "Releases"](https://github.com/tbnobody/OpenDTU/releases) (look at the right column). For a first installation on an ESP32, download `opendtu-generic.zip`, unpack and use a ESP32 flash tool of your choice (see next chapter) to flash the `.bin` files to the right addresses: The pre-compiled binary files can be found here on the [github page behind "Releases"](https://github.com/tbnobody/OpenDTU/releases) (look at the right column). For a first installation on an ESP32, download `opendtu-generic.factory.bin` and use a ESP32 flash tool of your choice to flash the `.bin` file to the address `0x0`. (The previous method with different .bin files is no more necessary.)
| Address | File |
| ---------| ---------------------- |
| 0x1000 | bootloader.bin |
| 0x8000 | partitions.bin |
| 0xe000 | boot_app0.bin |
| 0x10000 | opendtu-*.bin |
For further updates download `opendtu-generic.bin` and use the over-the-air firmware update in OpenDTU's web interface. For further updates download `opendtu-generic.bin` and use the over-the-air firmware update in OpenDTU's web interface.
@ -226,10 +219,7 @@ For further updates download `opendtu-generic.bin` and use the over-the-air firm
```bash ```bash
esptool.py --port /dev/ttyUSB0 --chip esp32 --before default_reset --after hard_reset \ esptool.py --port /dev/ttyUSB0 --chip esp32 --before default_reset --after hard_reset \
write_flash --flash_mode dout --flash_freq 40m --flash_size detect \ write_flash --flash_mode dout --flash_freq 40m --flash_size detect \
0x1000 bootloader.bin \ 0x0 opendtu-generic.factory.bin
0x8000 partitions.bin \
0xe000 boot_app0.bin \
0x10000 opendtu-generic.bin
``` ```
#### Flash with Espressif Flash Download Tool (Windows) #### Flash with Espressif Flash Download Tool (Windows)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 168 KiB