25
25
matrix :
26
26
arduino-platform :
27
27
[
28
+ " feather_esp32s2" ,
28
29
" funhouse_noota" ,
29
30
" esp32s3_devkitc_1_n8" ,
30
31
" xiao_esp32s3" ,
33
34
- offset : " 0x0"
34
35
- offset : " 0x1000"
35
36
arduino-platform : " funhouse_noota"
37
+ - offset : " 0x1000"
38
+ arduino-platform : " feather_esp32s2"
36
39
steps :
37
40
- name : " skip if unwanted"
38
41
continue-on-error : true
61
64
with :
62
65
repository : adafruit/Wippersnapper_Boards
63
66
path : ws-boards
67
+ ref : migrate-4mb-to-esptool
64
68
- name : Install CI-Arduino
65
69
run : bash ci/actions_install.sh
66
70
- name : Install extra Arduino libraries
@@ -141,6 +145,38 @@ jobs:
141
145
echo $content
142
146
echo EOF
143
147
} >> "$GITHUB_OUTPUT"
148
+ - name : fetch tinyuf2 combined.bin
149
+ run : |
150
+ DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \
151
+ jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}'-") and endswith(".zip")) | .browser_download_url')
152
+ if [ -z "$DOWNLOAD_URL" ]; then
153
+ echo "Error: Could not find the latest tinyuf2 release for board ${fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}."
154
+ exit 1
155
+ fi
156
+ wget "$DOWNLOAD_URL" -O tinyuf2.zip
157
+ unzip -o tinyuf2.zip -d .
158
+
159
+ - name : move partition and bootloader files for tinyuf2 (to match flash_args)
160
+ run : |
161
+ # Copy files where they're expected to make flash_args happy
162
+ mkdir bootloader
163
+ cp bootloader.bin bootloader/bootloader.bin
164
+ mkdir partition_table
165
+ cp partition-table.bin partition_table/partition-table.bin
166
+
167
+ - name : Create new_flash_args file from flash_args with added app bin + output file
168
+ run : |
169
+ # Create new_flash_args with esptool parameters first and output file
170
+ echo "--flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}}" > new_flash_args
171
+ echo "--flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}}" >> new_flash_args
172
+ echo "--flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}}" >> new_flash_args
173
+ echo "-o wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.combined.bin" >> new_flash_args
174
+
175
+ # Append flash_args content to new_flash_args, skipping the first line
176
+ tail -n +2 flash_args >> new_flash_args
177
+
178
+ # Append main app to flash_args file
179
+ echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> new_flash_args
144
180
- name : Check boot_app0 file existence (esp32sx built from core, not-source)
145
181
id : check_files
146
182
uses : andstor/file-existence-action@v3
@@ -156,23 +192,17 @@ jobs:
156
192
ls /home/runner/Arduino/hardware/espressif/esp32/tools/partitions
157
193
- name : boot_app0 file from arduino-cli core
158
194
if : steps.check_files.outputs.files_exists == 'true'
159
- 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
195
+ 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
160
196
- name : boot_app0 file from esp32 source bsp
161
197
if : steps.check_files.outputs.files_exists == 'false'
162
- run : mv /home/runner/Arduino/hardware/espressif/esp32/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin
198
+ run : cp /home/runner/Arduino/hardware/espressif/esp32/tools/partitions/boot_app0.bin wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin
199
+ - name : Copy boot_app0 file to ota_data_initial.bin (overwrite tinyuf2 boot preference)
200
+ run : cp wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin ota_data_initial.bin
163
201
- name : Create combined binary using Esptool merge-bin
164
202
run : |
165
203
echo ${{ steps.get_board_json.outputs.boardJson }}
166
204
echo ${{ fromJson(steps.get_board_json.outputs.boardJson) }}
167
- python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin \
168
- --flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}} \
169
- --flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}} \
170
- --flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}} \
171
- -o wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.combined.bin \
172
- ${{ matrix.offset }} wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bootloader.bin \
173
- 0x8000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.partitions.bin \
174
- 0xe000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin \
175
- 0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin
205
+ python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin @new_flash_args
176
206
- name : Zip build artifacts
177
207
run : |
178
208
zip -r wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.zip wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.*
@@ -203,7 +233,6 @@ jobs:
203
233
" magtag" ,
204
234
" metroesp32s2" ,
205
235
" metro_esp32s3" ,
206
- " feather_esp32s2" ,
207
236
" feather_esp32s2_tft" ,
208
237
" feather_esp32s2_reverse_tft" ,
209
238
" feather_esp32s3" ,
0 commit comments