From 96af1bd5305513fcb69ea8a439037b09e5cea7a6 Mon Sep 17 00:00:00 2001 From: "timecop@gmail.com" Date: Wed, 29 May 2013 00:09:33 +0000 Subject: [PATCH] [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 --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5724d4287..2e6f0eeed 100644 --- a/Makefile +++ b/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)