File tree Expand file tree Collapse file tree 4 files changed +16
-12
lines changed
Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 7575 run : |
7676 if [ ${{ inputs.toolchain }} == 'esp-idf' ]; then
7777 zip -jr tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip ${{ env.BIN_PATH }}
78- cp ${{ env.BIN_PATH }}/update-tinyuf2.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
78+ cp ${{ env.BIN_PATH }}/apps/ update-tinyuf2.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
7979 else
80- for f in ${{ env.BIN_PATH }}/*; do mv $f ${f%.*}-${{ github.event.release.tag_name }}."${f#*.}"; done
80+ if [[ ${{ inputs.build-system }} == cmake ]]; then
81+ cp ${{ env.BIN_PATH }}/apps/update-tinyuf2.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
82+ else
83+ cp ${{ env.BIN_PATH }}/apps/update-tinyuf2-${{ matrix.board }}.uf2 update-tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.uf2
84+ fi
8185 zip -jr tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip ${{ env.BIN_PATH }}
8286 fi
8387
8791 with :
8892 files : |
8993 tinyuf2-${{ matrix.board }}-*.zip
90- ${{ env.BIN_PATH }}/update-tinyuf2- ${{ matrix.board }}-* .uf2
94+ update-tinyuf2- ${{ matrix.board }}- ${{ github.event.release.tag_name }}.uf2
9195
9296 - name : Upload Release Assets To AWS S3
9397 env :
Original file line number Diff line number Diff line change @@ -12,22 +12,22 @@ add_custom_command(OUTPUT bootloader_bin.c
1212 DEPENDS tinyuf2
1313 )
1414
15- add_executable (self_update
15+ add_executable (update-tinyuf2
1616 self_update.c
1717 ${FAMILY_PATH} /boards.c
1818 ${FAMILY_PATH} /board_flash.c
1919 ${CMAKE_CURRENT_BINARY_DIR} /bootloader_bin.c
2020 )
2121
22- target_include_directories (self_update PUBLIC
22+ target_include_directories (update-tinyuf2 PUBLIC
2323 ${TOP} /src
2424 )
25- target_compile_definitions (self_update PUBLIC
25+ target_compile_definitions (update-tinyuf2 PUBLIC
2626 TINYUF2_SELF_UPDATE
2727 BUILD_NO_TINYUSB
2828 BUILD_APPLICATION
2929 )
3030
31- family_configure_app(self_update )
32- family_gen_uf2(self_update ${UF2_FAMILY_ID} )
33- family_flash_uf2(self_update ${UF2_FAMILY_ID} )
31+ family_configure_app(update-tinyuf2 )
32+ family_gen_uf2(update-tinyuf2 ${UF2_FAMILY_ID} )
33+ family_flash_uf2(update-tinyuf2 ${UF2_FAMILY_ID} )
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ add_custom_target(combined-flash
8181# External project (self_update, blinky etc ...)
8282#------------------------------
8383
84- # Post build: generate bootloader_bin.c for self- update and combined.bin
84+ # Post build: generate bootloader_bin.c for update-tinyuf2 and combined.bin
8585add_custom_command (TARGET app POST_BUILD
8686 COMMAND ${Python_EXECUTABLE} ${UF2CONV_PY} --carray -o ${CMAKE_CURRENT_LIST_DIR} /apps/self_update/main/bootloader_bin.c ${CMAKE_BINARY_DIR} /tinyuf2.bin
8787 )
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ copy-artifact: $(BIN)
7979copy-artifact : $(BUILD ) /$(OUTNAME ) .bin $(BUILD ) /$(OUTNAME ) .hex
8080 @$(CP ) $(BUILD ) /$(OUTNAME ) .bin $(BIN )
8181 @$(CP ) $(BUILD ) /$(OUTNAME ) .hex $(BIN )
82- @if [ -f " $( SELF_UF2) " ]; then $(CP ) $(SELF_UF2 ) $(BIN ) ; fi
82+ @if [ -f " $( SELF_UF2) " ]; then $(CP ) $(SELF_UF2 ) $(BIN ) /apps ; fi
8383
8484# -------------- Compile Rules --------------
8585
@@ -211,4 +211,4 @@ flash-openocd-wch: $(BUILD)/$(OUTNAME).elf
211211# -------------------- Flash with uf2 -----------------
212212UF2CONV_PY = $(TOP ) /lib/uf2/utils/uf2conv.py
213213flash-uf2 : $(BUILD ) /$(OUTNAME ) .uf2
214- python ${UF2CONV_PY} -f ${UF2_FAMILY_ID} --deploy $^
214+ python ${UF2CONV_PY} -f ${UF2_FAMILY_ID} --deploy $^
You can’t perform that action at this time.
0 commit comments