amiro-blt / Target / Demo / flash.mk @ 1446566f
History | View | Annotate | Download (475 Bytes)
1 | 8446a3a1 | Thomas Schöpping | STM32FLASH := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))../../Host/Source/stm32flash/stm32flash |
---|---|---|---|
2 | 69661903 | Thomas Schöpping | ifeq ($(OS),Windows_NT) |
3 | STM32FLASH_PORT ?= COM5 |
||
4 | else |
||
5 | STM32FLASH_PORT ?= /dev/ttyUSB0 |
||
6 | endif |
||
7 | BAUDRATE = 115200 |
||
8 | BINARY = $(BIN_PATH)/$(PROJ_NAME).hex |
||
9 | GPIO_ENTER_SEQUENCE = "rts,-dtr,-rts" |
||
10 | GPIO_EXIT_SEQUENCE = "rts,dtr,-rts" |
||
11 | |||
12 | flash: $(BINARY) |
||
13 | @echo +++ Flashing |
||
14 | $(STM32FLASH) $(STM32FLASH_PORT) -i $(GPIO_ENTER_SEQUENCE):$(GPIO_EXIT_SEQUENCE) -R -b $(BAUDRATE) -w $(BINARY) |