ConfigValue: remove redundant as_pin and as_pwm methods
[clinton/Smoothieware.git] / makefile
index b094429..a612509 100644 (file)
--- a/makefile
+++ b/makefile
@@ -17,16 +17,30 @@ INCDIRS=
 LIBS_PREFIX=\r
 LIBS_SUFFIX=\r
 SRC=./src\r
+\r
+#GCC4MBED_TYPE=Debug\r
 #GCC4MBED_TYPE=Release\r
 GCC4MBED_TYPE=Checked\r
-#GCC4MBED_TYPE=Debug\r
-#MRI_UART=MRI_UART_MBED_P13_P14 MRI_UART_BAUD=115200\r
-MRI_UART=MRI_UART_MBED_USB MRI_UART_SHARE\r
-#MRI_UART=MRI_UART_MBED_USB\r
+\r
+# Set to 1 to allow MRI debug monitor to take full control of UART0 and use it\r
+# as a dedicated debug channel.  If you are using the USB based serial port for\r
+# the console then this should cause you no problems.  Set MRI_BREAK_ON_INIT to\r
+# 0 if you don't want to break into GDB at startup.\r
+ENABLE_DEBUG_MONITOR?=0\r
+\r
+ifeq "$(ENABLE_DEBUG_MONITOR)" "1"\r
+# Can add MRI_UART_BAUD=115200 to next line if GDB fails to connect to MRI.\r
+# Tends to happen on some Linux distros but not Windows and OS X.\r
+MRI_UART=MRI_UART_0\r
+MRI_BREAK_ON_INIT=1\r
+MRI_SEMIHOST_STDIO=1\r
+else\r
+MRI_UART=MRI_UART_0 MRI_UART_SHARE\r
 MRI_BREAK_ON_INIT=0\r
 MRI_SEMIHOST_STDIO=0\r
+endif\r
 \r
-CONSOLE=/dev/arduino_A900K10V\r
+CONSOLE=/dev/ttyUSB0\r
 \r
 include ./gcc4mbed/build/gcc4mbed.mk\r
 \r
@@ -38,11 +52,8 @@ debug-store: $(PROJECT).elf
 flash: $(PROJECT).hex debug-store\r
        lpc21isp $< $(CONSOLE) 115200 12000\r
 \r
-dfu: \r
-       dfu-util -D main.bin -R\r
-\r
 upload: $(PROJECT).bin debug-store\r
-       dfu-util -d 1d50:6015 -D $<\r
+       dfu-util -d 1d50:6015 -R -D $<\r
 \r
 debug: $(PROJECT)_lastupload.elf\r
        arm-none-eabi-gdb $< -ex  "set target-charset ASCII" -ex "set remotelogfile mri.log" -ex "target remote $(CONSOLE)"\r