Makefile: allow user-specified baud rate for console, ie "make BAUD=115200 console...
authorMichael Moon <triffid.hunter@gmail.com>
Mon, 11 Mar 2013 05:21:20 +0000 (16:21 +1100)
committerMichael Moon <triffid.hunter@gmail.com>
Mon, 11 Mar 2013 05:21:20 +0000 (16:21 +1100)
src/makefile

index d95c2dc..129a2f4 100644 (file)
@@ -42,6 +42,7 @@ endif
 include $(BUILD_DIR)/build.mk\r
 \r
 CONSOLE?=/dev/arduino_A900K10V\r
+BAUD?=2000000\r
 \r
 .PHONY: debug-store flash upload debug console dfu\r
 \r
@@ -61,5 +62,5 @@ debug: ../LPC1768/$(PROJECT)_lastupload.elf
        arm-none-eabi-gdb $< -ex  "set target-charset ASCII" -ex "set remotelogfile mri.log" -ex "target remote $(CONSOLE)"\r
 \r
 console:\r
-       stty raw ignbrk -echo 2000000 < $(CONSOLE)\r
+       stty raw ignbrk -echo $(BAUD) < $(CONSOLE)\r
        ( cat <&3 & cat >&3 ; kill %% ) 3<>$(CONSOLE)\r