Browse Source

[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
master
timecop@gmail.com 12 years ago
parent
commit
96af1bd530
  1. 9
      Makefile

9
Makefile

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

Loading…
Cancel
Save