Skip to content

Commit

Permalink
Merge pull request #283 from brentru/merge-bins-esp32
Browse files Browse the repository at this point in the history
Fix and merge binaries for ESP32 Web Tool
  • Loading branch information
brentru authored Jul 12, 2022
2 parents c03b22a + 64122e1 commit 83e90f2
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 6 deletions.
93 changes: 89 additions & 4 deletions .github/workflows/build-clang-doxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ jobs:
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
build-esp32:
name: Build WipperSnapper ESP32
build-esp32-4M:
name: Build WipperSnapper ESP32 4M
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arduino-platform: ["feather_esp32", "feather_esp32_v2", "qtpy_esp32"]
arduino-platform: ["feather_esp32"]
steps:
- uses: actions/setup-python@v1
with:
Expand All @@ -86,6 +86,82 @@ jobs:
- name: Install extra Arduino libraries
run: |
git clone --quiet https://github.com/brentru/Adafruit_MQTT_Library.git /home/runner/Arduino/libraries/Adafruit_MQTT_Library
- name: Install Dependencies
run: |
pip3 install esptool
- name: build ESP32 platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
- name: Rename build artifacts to reflect the platform name
run: |
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.elf wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.elf
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.map wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.map
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.bootloader.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin
mv examples/Wippersnapper_demo/build/*/Wippersnapper_demo.ino.partitions.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.partitions.bin
- name: Check boot_app0 file existence (esp32 built from core, not-source)
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "/home/runner/.arduino15/packages/esp32/hardware/esp32/*/tools/partitions/boot_app0.bin"

- name: boot_app0 file from arduino-cli core
if: steps.check_files.outputs.files_exists == 'true'
run: mv /home/runner/.arduino15/packages/esp32/hardware/esp32/*/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin

- name: boot_app0 file from esp32 source bsp
if: steps.check_files.outputs.files_exists == 'false'
run: mv /home/runner/Arduino/hardware/espressif/esp32/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin

- name: Create combined binary using Esptool merge_bin
run: |
python3 -m esptool --chip esp32 merge_bin --flash_mode dio --flash_freq 80m --flash_size 4MB \
-o wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.combined.bin \
0x1000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin \
0x8000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.partitions.bin \
0xe000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin \
0x10000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
- name: Zip build artifacts
run: |
zip -r wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.*
- name: upload build artifacts zip
uses: actions/upload-artifact@v2
with:
name: build-files
path: |
wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip
build-esp32-8M:
name: Build WipperSnapper ESP32 8M
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arduino-platform: ["feather_esp32_v2", "qtpy_esp32"]
steps:
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- uses: actions/checkout@v2
- name: Get WipperSnapper version
run: |
git fetch --prune --unshallow --tags
git describe --dirty --tags
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
- uses: actions/checkout@v2
with:
repository: adafruit/ci-arduino
path: ci
- name: Install CI-Arduino
run: bash ci/actions_install.sh
- name: Install extra Arduino libraries
run: |
git clone --quiet https://github.com/brentru/Adafruit_MQTT_Library.git /home/runner/Arduino/libraries/Adafruit_MQTT_Library
- name: Install Dependencies
run: |
pip3 install esptool
- name: build ESP32 platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
- name: Rename build artifacts to reflect the platform name
Expand All @@ -110,6 +186,15 @@ jobs:
if: steps.check_files.outputs.files_exists == 'false'
run: mv /home/runner/Arduino/hardware/espressif/esp32/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin

- name: Create combined binary using Esptool merge_bin
run: |
python3 -m esptool --chip esp32 merge_bin --flash_mode dio --flash_freq 80m --flash_size 8MB \
-o wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.combined.bin \
0x1000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bootloader.bin \
0x8000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.partitions.bin \
0xe000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.boot_app0.bin \
0x10000 wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.bin
- name: Zip build artifacts
run: |
zip -r wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.zip wippersnapper.${{ matrix.arduino-platform }}.littlefs.${{ env.WS_VERSION }}.*
Expand Down Expand Up @@ -317,7 +402,7 @@ jobs:
clang_and_doxy:
runs-on: ubuntu-latest
needs: [build-samd, build-esp32, build-esp32c3, build-esp32sx, build-esp8266, build-samd-non-fs]
needs: [build-samd, build-esp32-4M, build-esp32-8M, build-esp32c3, build-esp32sx, build-esp8266, build-samd-non-fs]
steps:
- uses: actions/setup-python@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit WipperSnapper
version=1.0.0-beta.39
version=1.0.0-beta.40
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino client for Adafruit.io WipperSnapper
Expand Down
2 changes: 1 addition & 1 deletion src/Wippersnapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#endif

#define WS_VERSION \
"1.0.0-beta.39" ///< WipperSnapper app. version (semver-formatted)
"1.0.0-beta.40" ///< WipperSnapper app. version (semver-formatted)

// Reserved Adafruit IO MQTT topics
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic
Expand Down

0 comments on commit 83e90f2

Please sign in to comment.