File tree Expand file tree Collapse file tree 5 files changed +19
-14
lines changed
Expand file tree Collapse file tree 5 files changed +19
-14
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 @@ -18,8 +18,8 @@ def set_matrix_json():
1818 if b .is_dir ():
1919 matrix [p .name ]['board' ].append (b .name )
2020 # For quick testing by only build 1 espressif board
21- if p .name == 'espressif' :
22- break
21+ # if p.name == 'espressif':
22+ # break
2323 print (json .dumps (matrix ))
2424
2525
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 @@ -74,12 +74,13 @@ SELF_UF2 ?= apps/self_update/$(BUILD)/update-$(OUTNAME).uf2
7474
7575$(BIN ) :
7676 @$(MKDIR ) -p $@
77+ @$(MKDIR ) -p $@ /apps
7778
7879copy-artifact : $(BIN )
7980copy-artifact : $(BUILD ) /$(OUTNAME ) .bin $(BUILD ) /$(OUTNAME ) .hex
8081 @$(CP ) $(BUILD ) /$(OUTNAME ) .bin $(BIN )
8182 @$(CP ) $(BUILD ) /$(OUTNAME ) .hex $(BIN )
82- @if [ -f " $( SELF_UF2) " ]; then $(CP ) $(SELF_UF2 ) $(BIN ) ; fi
83+ @if [ -f " $( SELF_UF2) " ]; then $(CP ) $(SELF_UF2 ) $(BIN ) /apps ; fi
8384
8485# -------------- Compile Rules --------------
8586
@@ -211,4 +212,4 @@ flash-openocd-wch: $(BUILD)/$(OUTNAME).elf
211212# -------------------- Flash with uf2 -----------------
212213UF2CONV_PY = $(TOP ) /lib/uf2/utils/uf2conv.py
213214flash-uf2 : $(BUILD ) /$(OUTNAME ) .uf2
214- python ${UF2CONV_PY} -f ${UF2_FAMILY_ID} --deploy $^
215+ python ${UF2CONV_PY} -f ${UF2_FAMILY_ID} --deploy $^
You can’t perform that action at this time.
0 commit comments