mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +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:
parent
04eb65c883
commit
96af1bd530
1 changed files with 6 additions and 3 deletions
9
Makefile
9
Makefile
|
@ -23,6 +23,9 @@ OPTIONS ?=
|
||||||
# Debugger optons, must be empty or GDB
|
# Debugger optons, must be empty or GDB
|
||||||
DEBUG ?=
|
DEBUG ?=
|
||||||
|
|
||||||
|
# Serial port/Device for flashing
|
||||||
|
SERIAL_DEVICE ?= /dev/ttyUSB0
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Things that need to be maintained as the source changes
|
# Things that need to be maintained as the source changes
|
||||||
#
|
#
|
||||||
|
@ -193,9 +196,9 @@ clean:
|
||||||
rm -f $(TARGET_HEX) $(TARGET_ELF) $(TARGET_OBJS)
|
rm -f $(TARGET_HEX) $(TARGET_ELF) $(TARGET_OBJS)
|
||||||
|
|
||||||
flash_$(TARGET): $(TARGET_HEX)
|
flash_$(TARGET): $(TARGET_HEX)
|
||||||
stty -F /dev/ttyUSB0 raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
|
stty -F $(SERIAL_DEVICE) raw speed 115200 -crtscts cs8 -parenb -cstopb -ixon
|
||||||
echo -n 'R' >/dev/ttyUSB0
|
echo -n 'R' >$(SERIAL_DEVICE)
|
||||||
stm32flash -w $(TARGET_HEX) -v -g 0x0 -b 115200 /dev/ttyUSB0
|
stm32flash -w $(TARGET_HEX) -v -g 0x0 -b 115200 $(SERIAL_DEVICE)
|
||||||
|
|
||||||
flash: flash_$(TARGET)
|
flash: flash_$(TARGET)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue