stm32f0: add support for stm32flash tool
This commit is contained in:
parent
a221bf87bf
commit
a5175b3e54
1 changed files with 9 additions and 0 deletions
|
@ -33,6 +33,12 @@ $(OPENCM3_DIR)/lib/lib$(OPENCM3_LIBNAME).a:
|
||||||
|
|
||||||
$(BUILD)/tbm: $(OPENCM3_DIR)/lib/lib$(OPENCM3_LIBNAME).a
|
$(BUILD)/tbm: $(OPENCM3_DIR)/lib/lib$(OPENCM3_LIBNAME).a
|
||||||
|
|
||||||
|
$(BUILD)/tbm.bin: $(BUILD)/tbm
|
||||||
|
$(PREFIX)objcopy -Obinary $< $@
|
||||||
|
|
||||||
|
$(BUILD)/tbm.hex: $(BUILD)/tbm
|
||||||
|
$(PREFIX)objcopy -Oihex $< $@
|
||||||
|
|
||||||
run: $(BUILD)/tbm
|
run: $(BUILD)/tbm
|
||||||
@echo "GDB $<"
|
@echo "GDB $<"
|
||||||
@$(GDB) --batch \
|
@$(GDB) --batch \
|
||||||
|
@ -40,4 +46,7 @@ run: $(BUILD)/tbm
|
||||||
-x flash.scr \
|
-x flash.scr \
|
||||||
$<
|
$<
|
||||||
|
|
||||||
|
flash: $(BUILD)/tbm.bin
|
||||||
|
stm32flash -g 0x8000000 -w $< $(STM32_PORT)
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
|
|
Loading…
Add table
Reference in a new issue