Hi:
I wrote a programme about communication with serial ports,but
it can't work.The programme was proved correctly by others.So,I tried
to find other solution too figure it out.I thought may be there was
something wrong with initializing serial ports and I went to see
bootConfig.c,then found this :


#ifdef INCLUDE_TYCODRV_5_2
#ifdef INCLUDE_TTY_DEV
if (NUM_TTY > 0)
{
tyCoDrv (); /* install console
driver */

for (ix = 0; ix < NUM_TTY; ix++) /* create serial
devices */
{
sprintf (tyName, "%s%d", "/tyCo/", ix);

(void) tyCoDevCreate (tyName, ix, 512, 512);

if (ix == CONSOLE_TTY)
strcpy (consoleName, tyName); /* store console name
*/
}

consoleFd = open (consoleName, O_RDWR, 0);

/* set baud rate */

(void) ioctl (consoleFd, FIOBAUDRATE, CONSOLE_BAUD_RATE);
(void) ioctl (consoleFd, FIOSETOPTIONS,
OPT_ECHO | OPT_CRMOD | OPT_TANDEM | OPT_7_BIT);
}
#endif /* INCLUDE_TTY_DEV */

#else /* !INCLUDE_TYCODRV_5_2 */
#ifdef INCLUDE_TTY_DEV
if (NUM_TTY > 0)
{
ttyDrv(); /* install console
driver */

for (ix = 0; ix < NUM_TTY; ix++) /* create serial
devices */
{
#if (defined(INCLUDE_WDB) && (WDB_COMM_TYPE == WDB_COMM_SERIAL))
if (ix == WDB_TTY_CHANNEL) /* don't use WDBs channel */
continue;
#endif
sprintf (tyName, "%s%d", "/tyCo/", ix);
(void) ttyDevCreate (tyName, sysSerialChanGet(ix), 512,
512);

if (ix == CONSOLE_TTY) /* init the tty console
*/
{
strcpy (consoleName, tyName);
consoleFd = open (consoleName, O_RDWR, 0);
(void) ioctl (consoleFd, FIOBAUDRATE,
CONSOLE_BAUD_RATE);
(void) ioctl (consoleFd, FIOSETOPTIONS,
OPT_ECHO | OPT_CRMOD | OPT_TANDEM | OPT_7_BIT);
}
}
}
#endif /* INCLUDE_TTY_DEV */


I want to know whether it can initial serial ports and what console in
"console_tty" means.
How should I set the config.h in bspname.please tell me as more details
as possible .
Thank you !!