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.
pull/556/head
Damien George 2014-05-03 17:46:45 +01:00
rodzic 51315614e1
commit aad1204b8e
2 zmienionych plików z 10 dodań i 14 usunięć

Wyświetl plik

@ -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) $@

Wyświetl plik

@ -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