@@ -144,12 +144,24 @@ jobs:
144144 - name : fetch tinyuf2 combined.bin
145145 run : |
146146 if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then
147- 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
147+ wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip
148148 elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then
149- 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
149+ 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
150150 elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then
151- 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
151+ wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip
152152 fi
153+ unzip -o tinyuf2.zip -d .
154+ # Append main app to flash_args file
155+ echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args
156+
157+ # Create new_flash_args with esptool parameters first
158+ echo "--flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}}" > new_flash_args
159+ echo "--flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}}" >> new_flash_args
160+ echo "--flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}}" >> new_flash_args
161+ echo "-o wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.combined.bin" >> new_flash_args
162+
163+ # Append flash_args content skipping the first line
164+ tail -n +2 flash_args >> new_flash_args
153165 - name : Check boot_app0 file existence (esp32sx built from core, not-source)
154166 id : check_files
155167 uses : andstor/file-existence-action@v3
@@ -173,27 +185,7 @@ jobs:
173185 run : |
174186 echo ${{ steps.get_board_json.outputs.boardJson }}
175187 echo ${{ fromJson(steps.get_board_json.outputs.boardJson) }}
176- python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin \
177- --flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}} \
178- --flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}} \
179- --flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}} \
180- -o wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.combined.bin \
181- 0x0 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.tinyuf2-combined.bin \
182- 0xe000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin \
183- 0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin
184- # - name: Create combined binary using Esptool merge-bin
185- # run: |
186- # echo ${{ steps.get_board_json.outputs.boardJson }}
187- # echo ${{ fromJson(steps.get_board_json.outputs.boardJson) }}
188- # python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin \
189- # --flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}} \
190- # --flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}} \
191- # --flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}} \
192- # -o wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.combined.bin \
193- # ${{ matrix.offset }} wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bootloader.bin \
194- # 0x8000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.partitions.bin \
195- # 0xe000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.boot_app0.bin \
196- # 0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin
188+ python3 -m esptool --chip ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.chip}} merge-bin @new_flash_args
197189 - name : Zip build artifacts
198190 run : |
199191 zip -r wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.zip wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.*
0 commit comments