File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,25 +195,21 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_FATFS:.c=.o))
195195OBJ += $(addprefix $(BUILD ) /, $(SRC_CC3K:.c=.o ) )
196196OBJ += $(BUILD ) /pins_$(BOARD ) .o
197197
198- all : $(BUILD ) /flash .dfu
198+ all : $(BUILD ) /firmware .dfu
199199
200- .PHONY : flashboard
200+ .PHONY : deploy
201201
202- flashboard : $(BUILD ) /flash .dfu
202+ deploy : $(BUILD ) /firmware .dfu
203203 $(ECHO ) " Writing $< to the board"
204204 $(Q )$(DFU_UTIL ) -a 0 -D $<
205205
206- $(BUILD ) /flash .dfu : $(BUILD ) /flash0.bin $( BUILD ) /flash1.bin
206+ $(BUILD ) /firmware .dfu : $(BUILD ) /firmware.elf
207207 $(ECHO ) " Create $@ "
208- $(Q )$(PYTHON ) $(DFU ) -b 0x08000000:$(BUILD ) /flash0.bin -b 0x08020000:$(BUILD ) /flash1.bin $@
208+ $(Q )$(OBJCOPY ) -O binary -j .isr_vector $^ $(BUILD ) /firmware0.bin
209+ $(Q )$(OBJCOPY ) -O binary -j .text -j .data $^ $(BUILD ) /firmware1.bin
210+ $(Q )$(PYTHON ) $(DFU ) -b 0x08000000:$(BUILD ) /firmware0.bin -b 0x08020000:$(BUILD ) /firmware1.bin $@
209211
210- $(BUILD ) /flash0.bin : $(BUILD ) /flash.elf
211- $(Q )$(OBJCOPY ) -O binary -j .isr_vector $^ $@
212-
213- $(BUILD ) /flash1.bin : $(BUILD ) /flash.elf
214- $(Q )$(OBJCOPY ) -O binary -j .text -j .data $^ $@
215-
216- $(BUILD ) /flash.elf : $(OBJ )
212+ $(BUILD ) /firmware.elf : $(OBJ )
217213 $(ECHO ) " LINK $@ "
218214 $(Q )$(LD ) $(LDFLAGS ) -o $@ $(OBJ ) $(LIBS )
219215 $(Q )$(SIZE ) $@
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ git_hash="$(git rev-parse --short HEAD 2> /dev/null || echo unknown)"
2424for board in PYBV3 PYBV10; do
2525 echo $board
2626 lower_board=$( echo $board | tr A-Z a-z)
27- build_dir=/tmp/stm-build-$lower_board
27+ build_dir=/tmp/stm-build-$board
2828 make -B BOARD=$board BUILD=$build_dir || exit 1
29- mv $build_dir /flash .dfu $dest_dir /$lower_board -$date -$git_hash .dfu
29+ mv $build_dir /firmware .dfu $dest_dir /$lower_board -$date -$git_hash .dfu
3030 rm -rf $build_dir
3131done
You can’t perform that action at this time.
0 commit comments