2009-06-18 Fernando Nicodemos <fgnicodemos@terra.com.br>

* Makefile.am, configure.ac, console/uarts.c: Add console device that
	uses MicroMonitor to do actual input and output. This driver should
	work on any board that uses MicroMonitor.
This commit is contained in:
Joel Sherrill
2009-06-18 19:58:27 +00:00
parent 753ddb2ffb
commit 737f8c4d5d
4 changed files with 49 additions and 10 deletions

View File

@@ -1,3 +1,9 @@
2009-06-18 Fernando Nicodemos <fgnicodemos@terra.com.br>
* Makefile.am, configure.ac, console/uarts.c: Add console device that
uses MicroMonitor to do actual input and output. This driver should
work on any board that uses MicroMonitor.
2009-06-18 Joel Sherrill <joel.sherrill@OARcorp.com>
* startup/linkcmds, startup/linkcmds.csb637: Move .init section from

View File

@@ -61,7 +61,7 @@ libbsp_a_SOURCES += ../shared/abort/abort.c
# umon
libbsp_a_SOURCES += ../../shared/umon/umonrtemsglue.c \
../../shared/umon/monlib.c ../../shared/umon/tfsDriver.c \
startup/umonsupp.c
../../shared/umon/umoncons.c startup/umonsupp.c
if HAS_NETWORKING
network_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__

View File

@@ -24,17 +24,21 @@ RTEMS_BSPOPTS_HELP([csb637],
[If defined, this indicates that the BSP is being built for the
csb637 variant.])
RTEMS_BSPOPTS_SET([ENABLE_LCD],[*],[0])
RTEMS_BSPOPTS_HELP([ENABLE_LCD],
[If defined, enable use of the SED1356 controller and LCD.])
AM_CONDITIONAL(ENABLE_LCD,test "$ENABLE_LCD" = "1")
RTEMS_BSPOPTS_SET([ENABLE_UMON_CONSOLE],[*],[1])
RTEMS_BSPOPTS_HELP([ENABLE_UMON_CONSOLE],
[If defined, enable use of the MicroMonitor console device.])
AM_CONDITIONAL(ENABLE_LCD,test "$ENABLE_UMON_CONSOLE" = "1")
RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET],
[If defined, print a message and wait until pressed before resetting
board when application exits.])
RTEMS_BSPOPTS_SET([ENABLE_LCD],[*],[0])
RTEMS_BSPOPTS_HELP([ENABLE_LCD],
[If defined, enable use of the SED1356 controller.])
AM_CONDITIONAL(ENABLE_LCD,test "$ENABLE_LCD" = "1")
RTEMS_BSPOPTS_SET([BSP_RESET_BOARD_AT_EXIT],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_RESET_BOARD_AT_EXIT],
[If defined, reset the board when the application exits.])

View File

@@ -32,16 +32,24 @@ rtems_device_minor_number Console_Port_Minor = 0;
extern console_fns dbgu_fns;
#if ENABLE_LCD
extern console_fns fbcons_fns;
#define NUM_DEVS 2
#define LCD_DEVICE 1
#else
#define NUM_DEVS 1
#define LCD_DEVICE 0
#endif
#if ENABLE_UMON_CONSOLE
extern console_fns umoncons_fns;
#define UMON_CONSOLE_DEVICE 1
#else
#define UMON_CONSOLE_DEVICE 0
#endif
#define NUM_DEVS (1 + LCD_DEVICE + UMON_CONSOLE_DEVICE)
/* These are used by code in console.c */
unsigned long Console_Port_Count = NUM_DEVS;
console_data Console_Port_Data[NUM_DEVS];
/*
* There's one item in array for each UART.
*
@@ -90,6 +98,27 @@ console_tbl Console_Port_Tbl[] = {
NULL, /* setData - NOT USED */
0, /* ulClock - NOT USED */
0 /* ulIntVector - NOT USED */
},
#endif
#if ENABLE_UMON_CONSOLE
{
"/dev/umon", /* sDeviceName */
SERIAL_CUSTOM, /* deviceType */
&umoncons_fns, /* pDeviceFns */
NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
0, /* ulMargin - NOT USED */
0, /* ulHysteresis - NOT USED */
NULL, /* pDeviceParams */
0, /* ulCtrlPort1 - Pointer to UMON regs */
0, /* ulCtrlPort2 - NOT USED */
0, /* ulDataPort - NOT USED */
NULL, /* getRegister - NOT USED */
NULL, /* setRegister - NOT USED */
NULL, /* getData - NOT USED */
NULL, /* setData - NOT USED */
0, /* ulClock - NOT USED */
0 /* ulIntVector - NOT USED */
}
#endif
};