From 21144c0ce1dbd1b3f2c0ea4c593bcd9b710ff353 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 19:28:05 +0100 Subject: [PATCH 01/22] Use tinyuf2 combined.bin as image base --- .github/workflows/build-clang-doxy.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index e283030b4..cd6596a8f 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -141,6 +141,16 @@ jobs: echo $content echo EOF } >> "$GITHUB_OUTPUT" + - name: fetch tinyuf2 combined.bin + run: | + echo "Downloading tinyuf2 combined.bin for ${matrix.arduino-platform}...(${board_name})" + if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_xiao_esp32s3/tinyuf2-espressif_xiao_esp32s3-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + fi - name: Check boot_app0 file existence (esp32sx built from core, not-source) id: check_files uses: andstor/file-existence-action@v3 @@ -169,10 +179,22 @@ jobs: --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 \ + 0x0 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin \ 0xe000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin \ 0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.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 - name: Zip build artifacts run: | zip -r wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.zip wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.* From 9f70757b9c6a33233a7ab076e97b1f32fbdcc0b4 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 19:45:32 +0100 Subject: [PATCH 02/22] Correct XIAO tinyusb link --- .github/workflows/build-clang-doxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index cd6596a8f..2375d430e 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -149,7 +149,7 @@ jobs: elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_xiao_esp32s3/tinyuf2-espressif_xiao_esp32s3-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin fi - name: Check boot_app0 file existence (esp32sx built from core, not-source) id: check_files From 87cea3a14d9173c21c00abef09de2a3256519f18 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 20:02:00 +0100 Subject: [PATCH 03/22] CI --- .github/workflows/build-clang-doxy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 2375d430e..ecf3c8ece 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -143,7 +143,6 @@ jobs: } >> "$GITHUB_OUTPUT" - name: fetch tinyuf2 combined.bin run: | - echo "Downloading tinyuf2 combined.bin for ${matrix.arduino-platform}...(${board_name})" if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then From 3ad6500f61b5bc281322476a778c7c9a3f9c881a Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 20:56:10 +0100 Subject: [PATCH 04/22] Swap to using flash_args file for bin offsets --- .github/workflows/build-clang-doxy.yml | 40 +++++++++++--------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index ecf3c8ece..1b098ab67 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -144,12 +144,24 @@ jobs: - name: fetch tinyuf2 combined.bin run: | if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip fi + unzip -o tinyuf2.zip -d . + # Append main app to flash_args file + echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args + + # Create new_flash_args with esptool parameters first + 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 skipping the first line + tail -n +2 flash_args >> new_flash_args - name: Check boot_app0 file existence (esp32sx built from core, not-source) id: check_files uses: andstor/file-existence-action@v3 @@ -173,27 +185,7 @@ jobs: 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 \ - 0x0 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin \ - 0xe000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin \ - 0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.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 }}.* From 451ac02e2e4b0d5b4f2c8e5e652110d0307d29e6 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 21:38:15 +0100 Subject: [PATCH 05/22] Copy bootloader/partition table files for flash_args --- .github/workflows/build-clang-doxy.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 1b098ab67..cbc9430c6 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -151,6 +151,13 @@ jobs: wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip fi unzip -o tinyuf2.zip -d . + + # 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 + # Append main app to flash_args file echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args From 2fc427c9087965f62dab7af8c34740be24fa4ccc Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 22:01:38 +0100 Subject: [PATCH 06/22] Overwrite tinyusb boot preference --- .github/workflows/build-clang-doxy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index cbc9430c6..369b9d4dd 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -184,10 +184,12 @@ 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 }} From 7bf7357328d083986ab27cd89661952daf0935e1 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Thu, 17 Jul 2025 17:50:18 +0100 Subject: [PATCH 07/22] Update tinyuf2 fetch process to use bootloaderBoardName --- .github/workflows/build-clang-doxy.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 369b9d4dd..6fa36a192 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -143,13 +143,21 @@ jobs: } >> "$GITHUB_OUTPUT" - name: fetch tinyuf2 combined.bin run: | - if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip - elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip - elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip - fi + echo "Fetching tinyuf2 bootloader..." + # if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then + # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip + # elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then + # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip + # elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then + # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip + # fi + + DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \ + grep -o "\"browser_download_url\": \"[^\"]*tinyuf2-${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}-[^\"]*\.zip\"" | \ + cut -d '"' -f 4) + + wget "$DOWNLOAD_URL" -O tinyuf2.zip + unzip -o tinyuf2.zip -d . # Copy files where they're expected to make flash_args happy From 26c6c320778beb72dd2405d8ab4d1eb07c93b587 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Thu, 17 Jul 2025 17:50:56 +0100 Subject: [PATCH 08/22] WIP: swap boards branch --- .github/workflows/build-clang-doxy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 6fa36a192..093d1e958 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -61,6 +61,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 From 09e4a79ab1d0f63c6755b9581dcf96c537ce8686 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 18 Jul 2025 19:34:21 +0100 Subject: [PATCH 09/22] cleanup tinyuf2 downlaod + error handling --- .github/workflows/build-clang-doxy.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 093d1e958..80292a998 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -145,20 +145,14 @@ jobs: - name: fetch tinyuf2 combined.bin run: | echo "Fetching tinyuf2 bootloader..." - # if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then - # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip - # elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then - # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip - # elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then - # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip - # fi - DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \ grep -o "\"browser_download_url\": \"[^\"]*tinyuf2-${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}-[^\"]*\.zip\"" | \ cut -d '"' -f 4) - + 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 . # Copy files where they're expected to make flash_args happy @@ -170,7 +164,7 @@ jobs: # Append main app to flash_args file echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args - # Create new_flash_args with esptool parameters first + # 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 From 3ed453636cdb67f2d9194f66f2492db4ccaca7f4 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 18 Jul 2025 20:05:24 +0100 Subject: [PATCH 10/22] Swap Feather ESP32-S2 to web-native-usb task --- .github/workflows/build-clang-doxy.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 80292a998..2a5e689ea 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 @@ -154,7 +157,7 @@ jobs: fi wget "$DOWNLOAD_URL" -O tinyuf2.zip unzip -o tinyuf2.zip -d . - + # Copy files where they're expected to make flash_args happy mkdir bootloader cp bootloader.bin bootloader/bootloader.bin @@ -163,13 +166,13 @@ jobs: # Append main app to flash_args file echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args - + # 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 skipping the first line tail -n +2 flash_args >> new_flash_args - name: Check boot_app0 file existence (esp32sx built from core, not-source) @@ -228,7 +231,6 @@ jobs: "magtag", "metroesp32s2", "metro_esp32s3", - "feather_esp32s2", "feather_esp32s2_tft", "feather_esp32s2_reverse_tft", "feather_esp32s3", From df4d9163a6da2dcc0d61a6caca83ffa2cfe19e15 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 19:28:05 +0100 Subject: [PATCH 11/22] Use tinyuf2 combined.bin as image base --- .github/workflows/build-clang-doxy.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index e283030b4..cd6596a8f 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -141,6 +141,16 @@ jobs: echo $content echo EOF } >> "$GITHUB_OUTPUT" + - name: fetch tinyuf2 combined.bin + run: | + echo "Downloading tinyuf2 combined.bin for ${matrix.arduino-platform}...(${board_name})" + if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_xiao_esp32s3/tinyuf2-espressif_xiao_esp32s3-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + fi - name: Check boot_app0 file existence (esp32sx built from core, not-source) id: check_files uses: andstor/file-existence-action@v3 @@ -169,10 +179,22 @@ jobs: --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 \ + 0x0 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin \ 0xe000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin \ 0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.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 - name: Zip build artifacts run: | zip -r wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.zip wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.* From 592c75abcd044fccd15df71bc94748079c060337 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 19:45:32 +0100 Subject: [PATCH 12/22] Correct XIAO tinyusb link --- .github/workflows/build-clang-doxy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index cd6596a8f..2375d430e 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -149,7 +149,7 @@ jobs: elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_xiao_esp32s3/tinyuf2-espressif_xiao_esp32s3-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin fi - name: Check boot_app0 file existence (esp32sx built from core, not-source) id: check_files From 17bc2a2c47aa2799339105ef1e9e8a9ab952c98a Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 20:02:00 +0100 Subject: [PATCH 13/22] CI --- .github/workflows/build-clang-doxy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 2375d430e..ecf3c8ece 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -143,7 +143,6 @@ jobs: } >> "$GITHUB_OUTPUT" - name: fetch tinyuf2 combined.bin run: | - echo "Downloading tinyuf2 combined.bin for ${matrix.arduino-platform}...(${board_name})" if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then From 9297c020ad8c2a556919ea402241eec11992f607 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 20:56:10 +0100 Subject: [PATCH 14/22] Swap to using flash_args file for bin offsets --- .github/workflows/build-clang-doxy.yml | 40 +++++++++++--------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index ecf3c8ece..1b098ab67 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -144,12 +144,24 @@ jobs: - name: fetch tinyuf2 combined.bin run: | if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0-combined.bin -O wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin + wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip fi + unzip -o tinyuf2.zip -d . + # Append main app to flash_args file + echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args + + # Create new_flash_args with esptool parameters first + 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 skipping the first line + tail -n +2 flash_args >> new_flash_args - name: Check boot_app0 file existence (esp32sx built from core, not-source) id: check_files uses: andstor/file-existence-action@v3 @@ -173,27 +185,7 @@ jobs: 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 \ - 0x0 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin \ - 0xe000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin \ - 0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.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 }}.* From b9746ad1c55eb561382fb276c718065ef85366d5 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 21:38:15 +0100 Subject: [PATCH 15/22] Copy bootloader/partition table files for flash_args --- .github/workflows/build-clang-doxy.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 1b098ab67..cbc9430c6 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -151,6 +151,13 @@ jobs: wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip fi unzip -o tinyuf2.zip -d . + + # 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 + # Append main app to flash_args file echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args From 0a757d6b8fa4f809299bbd101d46a89b93a8fe75 Mon Sep 17 00:00:00 2001 From: tyeth Date: Wed, 16 Jul 2025 22:01:38 +0100 Subject: [PATCH 16/22] Overwrite tinyusb boot preference --- .github/workflows/build-clang-doxy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index cbc9430c6..369b9d4dd 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -184,10 +184,12 @@ 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 }} From 61590ea1c053d5c7b1bd3fad3f977413a2a87b1f Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Thu, 17 Jul 2025 17:50:18 +0100 Subject: [PATCH 17/22] Update tinyuf2 fetch process to use bootloaderBoardName --- .github/workflows/build-clang-doxy.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 369b9d4dd..6fa36a192 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -143,13 +143,21 @@ jobs: } >> "$GITHUB_OUTPUT" - name: fetch tinyuf2 combined.bin run: | - if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip - elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip - elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then - wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip - fi + echo "Fetching tinyuf2 bootloader..." + # if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then + # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip + # elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then + # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip + # elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then + # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip + # fi + + DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \ + grep -o "\"browser_download_url\": \"[^\"]*tinyuf2-${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}-[^\"]*\.zip\"" | \ + cut -d '"' -f 4) + + wget "$DOWNLOAD_URL" -O tinyuf2.zip + unzip -o tinyuf2.zip -d . # Copy files where they're expected to make flash_args happy From 5964f2ee5b744a6f84a3c56b0b607d3b70f085fd Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Thu, 17 Jul 2025 17:50:56 +0100 Subject: [PATCH 18/22] WIP: swap boards branch --- .github/workflows/build-clang-doxy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 6fa36a192..093d1e958 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -61,6 +61,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 From 01a99d93139c1c99babdd26416d78454b56744d8 Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 18 Jul 2025 19:34:21 +0100 Subject: [PATCH 19/22] cleanup tinyuf2 downlaod + error handling --- .github/workflows/build-clang-doxy.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 093d1e958..80292a998 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -145,20 +145,14 @@ jobs: - name: fetch tinyuf2 combined.bin run: | echo "Fetching tinyuf2 bootloader..." - # if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then - # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip - # elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then - # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip - # elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then - # wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip - # fi - DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \ grep -o "\"browser_download_url\": \"[^\"]*tinyuf2-${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}-[^\"]*\.zip\"" | \ cut -d '"' -f 4) - + 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 . # Copy files where they're expected to make flash_args happy @@ -170,7 +164,7 @@ jobs: # Append main app to flash_args file echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args - # Create new_flash_args with esptool parameters first + # 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 From 0c08eddde0fe26340c2f70a43c7c0ec0974ddc2a Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 18 Jul 2025 20:11:28 +0100 Subject: [PATCH 20/22] Update version to 1.0.0-beta.107 --- library.properties | 2 +- src/Wippersnapper.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 From 714974ff136fdcaac8dafeca813da87c2f2f58fc Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 18 Jul 2025 21:36:28 +0100 Subject: [PATCH 21/22] JQ filter --- .github/workflows/build-clang-doxy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index 80292a998..f06595c98 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -146,8 +146,7 @@ jobs: run: | echo "Fetching tinyuf2 bootloader..." DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \ - grep -o "\"browser_download_url\": \"[^\"]*tinyuf2-${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}-[^\"]*\.zip\"" | \ - cut -d '"' -f 4) + 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 From 69cf7493168912c619a692dd5b1410688169e54d Mon Sep 17 00:00:00 2001 From: Tyeth Gundry Date: Fri, 18 Jul 2025 21:40:18 +0100 Subject: [PATCH 22/22] Split up tinyuf2 steps --- .github/workflows/build-clang-doxy.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-clang-doxy.yml b/.github/workflows/build-clang-doxy.yml index f06595c98..3f31af2c5 100644 --- a/.github/workflows/build-clang-doxy.yml +++ b/.github/workflows/build-clang-doxy.yml @@ -144,7 +144,6 @@ jobs: } >> "$GITHUB_OUTPUT" - name: fetch tinyuf2 combined.bin run: | - echo "Fetching tinyuf2 bootloader..." 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 @@ -153,24 +152,28 @@ jobs: 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 - # Append main app to flash_args file - echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args - + - 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 skipping the first line + + # 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