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/ttyUSB0\r
\r