Add a new target for opening a serial monitor.
This commit is contained in:
parent
f437ea63eb
commit
060abab51f
2 changed files with 31 additions and 0 deletions
|
@ -8,3 +8,11 @@ documentation](http://mjo.tc/atelier/2009/02/arduino-cli.html
|
||||||
"Documentation") exists.
|
"Documentation") exists.
|
||||||
|
|
||||||
If you're using Debian or Ubuntu, you can find this in the arduino-core package.
|
If you're using Debian or Ubuntu, you can find this in the arduino-core package.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
### Serial Monitor
|
||||||
|
|
||||||
|
If you have minicom installed, you can run `make monitor` to open the serial
|
||||||
|
output. You can use a different serial monitoring tool (e.g. screen) by
|
||||||
|
overriding the `SERIAL_MONITOR_BINARY` and `SERIAL_MONITOR_FLAGS` variables.
|
||||||
|
|
|
@ -448,6 +448,26 @@ endif
|
||||||
|
|
||||||
AVRDUDE_ISP_OPTS = -P $(ISP_PORT) $(ISP_PROG)
|
AVRDUDE_ISP_OPTS = -P $(ISP_PORT) $(ISP_PROG)
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
#
|
||||||
|
# Serial monitoring
|
||||||
|
#
|
||||||
|
|
||||||
|
ifndef SERIAL_MONITOR_BAUDRATE
|
||||||
|
SERIAL_MONITOR_BAUDRATE = 9600
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef SERIAL_MONITOR_BINARY
|
||||||
|
SERIAL_MONITOR_BINARY = minicom
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef SERIAL_MONITOR_FLAGS
|
||||||
|
SERIAL_MONITOR_FLAGS = -b $(SERIAL_MONITOR_BAUDRATE) -D $(ARDUINO_PORT)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef SERIAL_MONITOR_COMMAND
|
||||||
|
SERIAL_MONITOR_COMMAND = $(SERIAL_MONITOR_BINARY) $(SERIAL_MONITOR_FLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
#
|
#
|
||||||
|
@ -505,6 +525,9 @@ depends: $(DEPS)
|
||||||
size: $(OBJDIR) $(TARGET_HEX)
|
size: $(OBJDIR) $(TARGET_HEX)
|
||||||
$(SIZE) $(TARGET_HEX)
|
$(SIZE) $(TARGET_HEX)
|
||||||
|
|
||||||
|
monitor:
|
||||||
|
$(SERIAL_MONITOR_COMMAND)
|
||||||
|
|
||||||
show_boards:
|
show_boards:
|
||||||
$(PARSE_BOARD) --boards
|
$(PARSE_BOARD) --boards
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue