From a2c1c8fc61f4220dbd7a51c5ea5298c2f2501ded Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sat, 5 Sep 2020 19:27:36 +0200 Subject: [PATCH] Updated ESP32 flash procedure --- .github/workflows/release.yml | 9 +++++++++ README.md | 9 +++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0ed8d3da..f2f31726 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,3 +73,12 @@ jobs: asset_path: .pio/build/esp32/firmware.bin asset_name: ams2mqtt-esp32-${{ steps.release_tag.outputs.tag }}.bin asset_content_type: application/octet-stream + - name: Upload esp32 partitions to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: .pio/build/esp32/partitions.bin + asset_name: ams2mqtt-esp32-partitions-${{ steps.release_tag.outputs.tag }}.bin + asset_content_type: application/octet-stream diff --git a/README.md b/README.md index 8c0eeef4..626ef34f 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,15 @@ In the [Release section](https://github.com/gskjold/AmsToMqttBridge/releases) of ### Flashing binaries with [esptool.py](https://github.com/espressif/esptool) Linux: -```esptool.py --port /dev/ttyUSB0 write_flash 0x0 binary-file.bin``` +```esptool.py --port /dev/ttyUSB0 write_flash 0x0 firmware.bin``` Windows: -```esptool.py --port COM1 write_flash 0x0 binary-file.bin``` +```esptool.py --port COM1 write_flash 0x0 firmware.bin``` + +With ESP32 it is a bit more complicated: +```esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader.bin 0x8000 partitions.bin 0x10000 firmware.bin``` + +Get the bootloader here: [Arduino ESP32 bootloader](https://github.com/espressif/arduino-esp32/tree/master/tools/sdk/bin) The default bootloader is [bootloader_dio_40m.bin](https://github.com/espressif/arduino-esp32/raw/master/tools/sdk/bin/bootloader_dio_40m.bin) ## Building this project with PlatformIO