@@ -147,34 +147,36 @@ jobs:
147
147
} >> "$GITHUB_OUTPUT"
148
148
- name : fetch tinyuf2 combined.bin
149
149
run : |
150
- echo "Fetching tinyuf2 bootloader..."
151
150
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \
152
- grep -o "\"browser_download_url\": \"[^\"]*tinyuf2-${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}-[^\"]*\.zip\"" | \
153
- cut -d '"' -f 4)
151
+ jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}'-") and endswith(".zip")) | .browser_download_url')
154
152
if [ -z "$DOWNLOAD_URL" ]; then
155
153
echo "Error: Could not find the latest tinyuf2 release for board ${fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}."
156
154
exit 1
157
155
fi
158
156
wget "$DOWNLOAD_URL" -O tinyuf2.zip
159
157
unzip -o tinyuf2.zip -d .
160
158
159
+ - name : move partition and bootloader files for tinyuf2 (to match flash_args)
160
+ run : |
161
161
# Copy files where they're expected to make flash_args happy
162
162
mkdir bootloader
163
163
cp bootloader.bin bootloader/bootloader.bin
164
164
mkdir partition_table
165
165
cp partition-table.bin partition_table/partition-table.bin
166
166
167
- # Append main app to flash_args file
168
- echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args
169
-
167
+ - name : Create new_flash_args file from flash_args with added app bin + output file
168
+ run : |
170
169
# Create new_flash_args with esptool parameters first and output file
171
170
echo "--flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}}" > new_flash_args
172
171
echo "--flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}}" >> new_flash_args
173
172
echo "--flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}}" >> new_flash_args
174
173
echo "-o wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.combined.bin" >> new_flash_args
175
174
176
- # Append flash_args content skipping the first line
175
+ # Append flash_args content to new_flash_args, skipping the first line
177
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
178
180
- name : Check boot_app0 file existence (esp32sx built from core, not-source)
179
181
id : check_files
180
182
uses : andstor/file-existence-action@v3
0 commit comments