Index: main/dev/uart16550.c
===================================================================
--- main/dev/uart16550.c	(revision 8107331ecd3cbb6e941e6bc8267541ddf511d017)
+++ main/dev/uart16550.c	(revision b8ffb40eaadaf34b218578b818ece0323430c756)
@@ -186,4 +186,9 @@
 target_gotachar(void)
 {
+#if	INCLUDE_BLINKLED
+	extern void TARGET_BLINKLED(void);
+
+	TARGET_BLINKLED();
+#endif
 	if (CONSOLE(SIO_LSTAT) & SIO_LSTAT_RRDY)
 		return(1);
Index: ports/beagleboneblack/am335x.h
===================================================================
--- ports/beagleboneblack/am335x.h	(revision 8107331ecd3cbb6e941e6bc8267541ddf511d017)
+++ ports/beagleboneblack/am335x.h	(revision b8ffb40eaadaf34b218578b818ece0323430c756)
@@ -251,4 +251,8 @@
 /* Control Module Registers */
 /*===========================================================================*/
+#define CONF_GPMC_A5                    0x0854
+#define CONF_GPMC_A6                    0x0858
+#define CONF_GPMC_A7                    0x085c
+#define CONF_GPMC_A8                    0x0860
 #define CONF_UART0_RXD                  0x0970
 #define CONF_UART0_TXD                  0x0974
Index: ports/beagleboneblack/config.h
===================================================================
--- ports/beagleboneblack/config.h	(revision 8107331ecd3cbb6e941e6bc8267541ddf511d017)
+++ ports/beagleboneblack/config.h	(revision b8ffb40eaadaf34b218578b818ece0323430c756)
@@ -145,7 +145,4 @@
 #define MONSTACKSIZE	(16*1024)
 
-// Cogent specific options
-#define INCLUDE_I2C				0
-#define	INCLUDE_LCD				0
 
 /* Specify inclusion of subsystems within the monitor here.
@@ -196,4 +193,6 @@
 #define INCLUDE_SD		0
 #define INCLUDE_DNS		0
+#define INCLUDE_BLINKLED	1
+#define TARGET_BLINKLED target_blinkled
 
 /* Inclusion of this next file will make sure that all of the above
Index: ports/beagleboneblack/cpuio.c
===================================================================
--- ports/beagleboneblack/cpuio.c	(revision 8107331ecd3cbb6e941e6bc8267541ddf511d017)
+++ ports/beagleboneblack/cpuio.c	(revision b8ffb40eaadaf34b218578b818ece0323430c756)
@@ -8,4 +8,5 @@
 #include "am335x.h"
 #include "uart16550.h"
+#include "cli.h"
 
 int
@@ -138,9 +139,36 @@
 pinMuxInit(void)
 {
-        // Set pin mux configuration for UART0 RX/TX pins
-        CNTL_MODULE_REG(CONF_UART0_RXD) = SLEWSLOW | RX_ON |
-                PULL_OFF | MUXMODE_0;
-        CNTL_MODULE_REG(CONF_UART0_TXD) = SLEWSLOW | RX_OFF |
-                PULL_OFF | MUXMODE_0;
+    // Set pin mux configuration for UART0 RX/TX pins
+    CNTL_MODULE_REG(CONF_UART0_RXD) = SLEWSLOW | RX_ON |
+        PULL_OFF | MUXMODE_0;
+    CNTL_MODULE_REG(CONF_UART0_TXD) = SLEWSLOW | RX_OFF |
+        PULL_OFF | MUXMODE_0;
+
+    // Configure GPIO pins tied to four USR LEDS...
+    // GPIO1_21: USER0 LED (D2)
+    CNTL_MODULE_REG(CONF_GPMC_A5) = SLEWSLOW | RX_ON |
+        PULL_OFF | MUXMODE_7;
+    // GPIO1_22: USER1 LED (D3)
+    CNTL_MODULE_REG(CONF_GPMC_A6) = SLEWSLOW | RX_ON |
+        PULL_OFF | MUXMODE_7;
+    // GPIO1_23: USER2 LED (D4)
+    CNTL_MODULE_REG(CONF_GPMC_A7) = SLEWSLOW | RX_ON |
+        PULL_OFF | MUXMODE_7;
+    // GPIO1_24: USER3 LED (D5)
+    CNTL_MODULE_REG(CONF_GPMC_A8) = SLEWSLOW | RX_ON |
+        PULL_OFF | MUXMODE_7;
+}
+
+void
+InitGPIO1(void)
+{
+    // GPIO_CTRL: Enable GPIO1 module
+	GPIO1_REG(0x130) = 0;
+
+    // GPIO_OE: 25-24 are outputs...
+	GPIO1_REG(0x134) &= ~(USR0_LED | USR1_LED | USR2_LED | USR3_LED);
+
+    // All LEDs off...
+	GPIO1_REG(0x13c) &= ~(USR0_LED | USR1_LED | USR2_LED | USR3_LED);
 }
 
@@ -153,15 +181,87 @@
 	ram_vector_install();
 
-        // Enable the control module:
-        CM_WKUP_REG(CM_WKUP_CONTROL_CLKCTRL) |= 2;
-
-        // Enable clock for UART0:
-        CM_WKUP_REG(CM_WKUP_UART0_CLKCTRL) |= 2;
-
-        pinMuxInit();
-
-        InitUART(DEFAULT_BAUD_RATE);
-
-        // Set UART0 mode to 16x
-        UART0_REG(UART_MDR1) &= ~7;
-}
+    // Enable the control module:
+    CM_WKUP_REG(CM_WKUP_CONTROL_CLKCTRL) |= 2;
+
+    // Enable clock for UART0:
+    CM_WKUP_REG(CM_WKUP_UART0_CLKCTRL) |= 2;
+
+    // Enable clock for GPIO1:
+    CM_PER_REG(CM_DIV_M3_DPLL_PER) |= 2;
+
+    pinMuxInit();
+
+    InitUART(DEFAULT_BAUD_RATE);
+	InitGPIO1();
+
+    // Set UART0 mode to 16x
+    UART0_REG(UART_MDR1) &= ~7;
+}
+
+int
+led(int num, int on)
+{
+	unsigned long bit;
+
+	switch(num) {
+		case 0:	// D0
+			bit = USR0_LED;
+			break;
+		case 1:	// D1
+			bit = USR1_LED;
+			break;
+		case 2:	// D2
+			bit = USR2_LED;
+			break;
+		case 3:	// D3
+			bit = USR3_LED;
+			break;
+		default:
+			return(-1);
+	}
+
+    // GPIO21-24:
+	if (on)
+	    GPIO1_REG(0x13c) |= bit;
+	else
+	    GPIO1_REG(0x13c) &= ~bit;
+	return(0);
+}
+
+void
+target_blinkled(void)
+{
+#if INCLUDE_BLINKLED
+	static uint8_t ledstate;
+	static struct elapsed_tmr tmr;
+
+#define STATLED_ON()	led(0,1)
+#define STATLED_OFF()	led(0,0)
+#ifndef BLINKON_MSEC
+#define BLINKON_MSEC 10000
+#define BLINKOFF_MSEC 10000
+#endif
+
+	switch(ledstate) {
+		case 0:
+			startElapsedTimer(&tmr,BLINKON_MSEC);
+			STATLED_ON();
+			ledstate = 1;
+			break;
+		case 1:
+			if(msecElapsed(&tmr)) {
+				STATLED_OFF();
+				ledstate = 2;
+				startElapsedTimer(&tmr,BLINKOFF_MSEC);
+			}
+			break;
+		case 2:
+			if(msecElapsed(&tmr)) {
+				STATLED_ON();
+				ledstate = 1;
+				startElapsedTimer(&tmr,BLINKON_MSEC);
+			}
+			break;
+	}
+#endif
+}
Index: ports/beagleboneblack/cpuio.h
===================================================================
--- ports/beagleboneblack/cpuio.h	(revision 8107331ecd3cbb6e941e6bc8267541ddf511d017)
+++ ports/beagleboneblack/cpuio.h	(revision b8ffb40eaadaf34b218578b818ece0323430c756)
@@ -1,1 +1,22 @@
 #define DEFAULT_BAUD_RATE 115200
+
+#define HWREAD32(a)	*(volatile unsigned long *)(a)
+#define HWREAD16(a)	*(volatile unsigned short *)(a)
+#define HWREAD8(a)	*(volatile unsigned char *)(a)
+
+#define HWWRITE32(a,b)	*(volatile unsigned long *)(a) = (b)
+#define HWWRITE16(a,b)	*(volatile unsigned short *)(a) = (b)
+#define HWWRITE8(a,b)	*(volatile unsigned char *)(a) = (b)
+
+#define GPIO1_21    (1<<21)
+#define GPIO1_22    (1<<22)
+#define GPIO1_23    (1<<23)
+#define GPIO1_24    (1<<24)
+
+// Referring to BBB schematic...
+// Pg6 shows the 4 user leds, pg3 shows the pins on the Sitara
+// The four user leds are on GPIO1, pins 21-24
+#define USR0_LED    GPIO1_21        // Ball V15: GPMC_A5 mode7 (D2)
+#define USR1_LED    GPIO1_22        // Ball U15: GPMC_A6 mode7 (D3)
+#define USR2_LED    GPIO1_23        // Ball T15: GPMC_A7 mode7 (D4)
+#define USR3_LED    GPIO1_24        // Ball V16: GPMC_A8 mode7 (D5)
Index: ports/beagleboneblack/xcmdtbl.h
===================================================================
--- ports/beagleboneblack/xcmdtbl.h	(revision 8107331ecd3cbb6e941e6bc8267541ddf511d017)
+++ ports/beagleboneblack/xcmdtbl.h	(revision b8ffb40eaadaf34b218578b818ece0323430c756)
@@ -7,4 +7,4 @@
 /* added to the cmdtbl[] array. */
 /* For example:
-    "dummy",    dummycmd,   dummyHelp,
+    { "dummy",    dummycmd,   dummyHelp,    0 },
 */
