1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 03:20:00 +03:00

[PATCH 3/4] Add SERIAL_DEVICE to the Makefile for configuring the flash target

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@332 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop@gmail.com 2013-05-29 00:09:33 +00:00
parent 04eb65c883
commit 96af1bd530

View file

@ -23,6 +23,9 @@ OPTIONS ?=
# Debugger optons, must be empty or GDB
DEBUG ?=
# Serial port/Device for flashing
SERIAL_DEVICE ?= /dev/ttyUSB0
###############################################################################
# Things that need to be maintained as the source changes
#
@ -193,9 +196,9 @@ clean:
rm -f $(TARGET_HEX) $(TARGET_ELF) $(TARGET_OBJS)
flash_$(TARGET): $(TARGET_HEX)
stty -F /dev/ttyUSB0 raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
echo -n 'R' >/dev/ttyUSB0
stm32flash -w $(TARGET_HEX) -v -g 0x0 -b 115200 /dev/ttyUSB0
stty -F $(SERIAL_DEVICE) raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
echo -n 'R' >$(SERIAL_DEVICE)
stm32flash -w $(TARGET_HEX) -v -g 0x0 -b 115200 $(SERIAL_DEVICE)
flash: flash_$(TARGET)