Commit aad1204b authored by Damien George's avatar Damien George
Browse files

stmhal: Change names: flash to firmware, flashboard to deploy.

Since firmware lives in a build directory which already specifies the
board name, no real reason to also have the firmware have the board
name.
parent 51315614
......@@ -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) $@
......
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment