summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--stmhal/Makefile20
-rwxr-xr-xtools/build-stm-latest.sh4
2 files changed, 10 insertions, 14 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile
index 26f15cfcd3..4cd33b9581 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -195,25 +195,21 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_FATFS:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_CC3K:.c=.o))
OBJ += $(BUILD)/pins_$(BOARD).o
-all: $(BUILD)/flash.dfu
+all: $(BUILD)/firmware.dfu
-.PHONY: flashboard
+.PHONY: deploy
-flashboard: $(BUILD)/flash.dfu
+deploy: $(BUILD)/firmware.dfu
$(ECHO) "Writing $< to the board"
$(Q)$(DFU_UTIL) -a 0 -D $<
-$(BUILD)/flash.dfu: $(BUILD)/flash0.bin $(BUILD)/flash1.bin
+$(BUILD)/firmware.dfu: $(BUILD)/firmware.elf
$(ECHO) "Create $@"
- $(Q)$(PYTHON) $(DFU) -b 0x08000000:$(BUILD)/flash0.bin -b 0x08020000:$(BUILD)/flash1.bin $@
+ $(Q)$(OBJCOPY) -O binary -j .isr_vector $^ $(BUILD)/firmware0.bin
+ $(Q)$(OBJCOPY) -O binary -j .text -j .data $^ $(BUILD)/firmware1.bin
+ $(Q)$(PYTHON) $(DFU) -b 0x08000000:$(BUILD)/firmware0.bin -b 0x08020000:$(BUILD)/firmware1.bin $@
-$(BUILD)/flash0.bin: $(BUILD)/flash.elf
- $(Q)$(OBJCOPY) -O binary -j .isr_vector $^ $@
-
-$(BUILD)/flash1.bin: $(BUILD)/flash.elf
- $(Q)$(OBJCOPY) -O binary -j .text -j .data $^ $@
-
-$(BUILD)/flash.elf: $(OBJ)
+$(BUILD)/firmware.elf: $(OBJ)
$(ECHO) "LINK $@"
$(Q)$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
$(Q)$(SIZE) $@
diff --git a/tools/build-stm-latest.sh b/tools/build-stm-latest.sh
index 951d8be9c2..f0d639d10f 100755
--- a/tools/build-stm-latest.sh
+++ b/tools/build-stm-latest.sh
@@ -24,8 +24,8 @@ git_hash="$(git rev-parse --short HEAD 2> /dev/null || echo unknown)"
for board in PYBV3 PYBV10; do
echo $board
lower_board=$(echo $board | tr A-Z a-z)
- build_dir=/tmp/stm-build-$lower_board
+ build_dir=/tmp/stm-build-$board
make -B BOARD=$board BUILD=$build_dir || exit 1
- mv $build_dir/flash.dfu $dest_dir/$lower_board-$date-$git_hash.dfu
+ mv $build_dir/firmware.dfu $dest_dir/$lower_board-$date-$git_hash.dfu
rm -rf $build_dir
done