diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index e283030b4..9a3c72108 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -25,6 +25,7 @@ jobs: matrix: arduino-platform: [ + "feather_esp32s2", "funhouse_noota", "esp32s3_devkitc_1_n8", "xiao_esp32s3", @@ -33,6 +34,8 @@ jobs: - offset: "0x0" - offset: "0x1000" arduino-platform: "funhouse_noota" + - offset: "0x1000" + arduino-platform: "feather_esp32s2" steps: - name: "skip if unwanted" continue-on-error: true @@ -61,6 +64,7 @@ jobs: with: repository: adafruit/Wippersnapper_Boards path: ws-boards + ref: migrate-4mb-to-esptool - name: Install CI-Arduino run: bash ci/actions_install.sh - name: Install extra Arduino libraries @@ -141,6 +145,38 @@ jobs: echo $content echo EOF } >> "$GITHUB_OUTPUT" + - name: fetch tinyuf2 combined.bin + run: | + DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \ + jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}'-") and endswith(".zip")) | .browser_download_url') + if [ -z "$DOWNLOAD_URL" ]; then + echo "Error: Could not find the latest tinyuf2 release for board ${fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}." + exit 1 + fi + wget "$DOWNLOAD_URL" -O tinyuf2.zip + unzip -o tinyuf2.zip -d . + + - name: move partition and bootloader files for tinyuf2 (to match flash_args) + run: | + # Copy files where they're expected to make flash_args happy + mkdir bootloader + cp bootloader.bin bootloader/bootloader.bin + mkdir partition_table + cp partition-table.bin partition_table/partition-table.bin + + - name: Create new_flash_args file from flash_args with added app bin + output file + run: | + # Create new_flash_args with esptool parameters first and output file + echo "--flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}}" > new_flash_args + echo "--flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}}" >> new_flash_args + echo "--flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}}" >> new_flash_args + echo "-o wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.combined.bin" >> new_flash_args + + # Append flash_args content to new_flash_args, skipping the first line + tail -n +2 flash_args >> new_flash_args + + # Append main app to flash_args file + echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> new_flash_args - name: Check boot_app0 file existence (esp32sx built from core, not-source) id: check_files uses: andstor/file-existence-action@v3 @@ -156,23 +192,17 @@ jobs: ls /home/runner/Arduino/hardware/espressif/esp32/tools/partitions - 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 }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin + run: cp /home/runner/.arduino15/packages/esp32/hardware/esp32/*/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ 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 }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin + run: cp /home/runner/Arduino/hardware/espressif/esp32/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin + - name: Copy boot_app0 file to ota_data_initial.bin (overwrite tinyuf2 boot preference) + run: cp wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin ota_data_initial.bin - name: Create combined binary using Esptool merge-bin run: | echo ${{ steps.get_board_json.outputs.boardJson }} echo ${{ fromJson(steps.get_board_json.outputs.boardJson) }} - python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin \ - --flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}} \ - --flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}} \ - --flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}} \ - -o wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.combined.bin \ - ${{ matrix.offset }} wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bootloader.bin \ - 0x8000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.partitions.bin \ - 0xe000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin \ - 0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin + python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin @new_flash_args - name: Zip build artifacts run: | zip -r wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.zip wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.* @@ -203,7 +233,6 @@ jobs: "magtag", "metroesp32s2", "metro_esp32s3", - "feather_esp32s2", "feather_esp32s2_tft", "feather_esp32s2_reverse_tft", "feather_esp32s3", diff --git a/library.properties b/library.properties index 38362080b..f6063d7ed 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit WipperSnapper -version=1.0.0-beta.106 +version=1.0.0-beta.107 author=Adafruit maintainer=Adafruit sentence=Arduino application for Adafruit.io WipperSnapper diff --git a/src/Wippersnapper.h b/src/Wippersnapper.h index d0130a629..00efa6f61 100644 --- a/src/Wippersnapper.h +++ b/src/Wippersnapper.h @@ -142,7 +142,7 @@ #endif #define WS_VERSION \ - "1.0.0-beta.106" ///< WipperSnapper app. version (semver-formatted) + "1.0.0-beta.107" ///< WipperSnapper app. version (semver-formatted) // Reserved Adafruit IO MQTT topics #define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic