Skip to content

Commit

Permalink
Feature: Only require one binary file for initial flashing
Browse files Browse the repository at this point in the history
There is no need anymore to upload multiple .bin files. All binaries are combined into one.
  • Loading branch information
tbnobody committed Jun 8, 2023
1 parent abfc273 commit c8fc123
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,15 @@ jobs:
- name: Rename Firmware
run: mv .pio/build/${{ matrix.environment }}/firmware.bin .pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin

- name: Copy boot_app0.bin
run: cp ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin .pio/build/${{ matrix.environment }}/boot_app0.bin
- name: Rename Factory Firmware
run: mv .pio/build/${{ matrix.environment }}/firmware.factory.bin .pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.factory.bin

- uses: actions/upload-artifact@v3
with:
name: opendtu-${{ matrix.environment }}
path: |
.pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin
.pio/build/${{ matrix.environment }}/partitions.bin
.pio/build/${{ matrix.environment }}/bootloader.bin
.pio/build/${{ matrix.environment }}/boot_app0.bin
.pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.factory.bin
release:
name: Create Release
Expand All @@ -133,12 +131,10 @@ jobs:
with:
path: artifacts/

- name: Create ZIPs
- name: Move all files to the same location
run: |
ls -R
sudo apt install zip
cd artifacts
for i in */; do zip -r "${i%/}.zip" "$i"; done
for i in */; do cp ${i}opendtu-*.bin ./; done
- name: Create release
Expand Down
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,7 @@ It is recommended to make all changes only in the 'platformio_override.ini', th

### 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:

| Address | File |
| ---------| ---------------------- |
| 0x1000 | bootloader.bin |
| 0x8000 | partitions.bin |
| 0xe000 | boot_app0.bin |
| 0x10000 | opendtu-*.bin |
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.)

For further updates download `opendtu-generic.bin` and use the over-the-air firmware update in OpenDTU's web interface.

Expand All @@ -226,10 +219,7 @@ For further updates download `opendtu-generic.bin` and use the over-the-air firm
```bash
esptool.py --port /dev/ttyUSB0 --chip esp32 --before default_reset --after hard_reset \
write_flash --flash_mode dout --flash_freq 40m --flash_size detect \
0x1000 bootloader.bin \
0x8000 partitions.bin \
0xe000 boot_app0.bin \
0x10000 opendtu-generic.bin
0x0 opendtu-generic.factory.bin
```

#### Flash with Espressif Flash Download Tool (Windows)
Expand Down
Binary file modified docs/esp32_flash_download_tool.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit c8fc123

@Rico-Marvin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kann mir jemand sagen wo ich die opendtu-generic.factory.bin runter laden kann. Suche schon seit 1 Woche nach lösungen. Konnte mich nicht mehr mit Bei opendtu anmelden. Vielen dank

Please sign in to comment.