Registering stdin as Keyboard Input for MicroWindows

Steve Strobel steve at
Wed Jan 14 18:54:41 UTC 2004

I have been working with Mark to get MicroWindows running on our 5272 target.  We got nxscribble compiling and can download and step through it using DDD.  We get the following serial output:

  Starting RTEMS init task...
  Init Task Stack Size is: 524288
  Cannot initialise keyboard
  Error opening /dev/fb0: m
  Cannot initialise screen
  cannot open graphics

We haven't yet created a /dev/fb0 file, so that error is expected.  Is there a better way to do that than creating a file in IMFS (like the fileio sample does) before calling GrOpen?

I am not sure how to deal with the problem initializing the keyboard.  MWKbd_Open() seems to be trying to connect RTEMS' stdin to MicroWindows kbd_fd.  That eventually results in the following function call in cpukit/libmisc/mw-fb/mw_uid.c:

   * register the device to insert events to the message
   * queue named as the value passed in q_name 
  int uid_register_device( int fd, const char *q_name )
    return ioctl( fd, MW_UID_REGISTER_DEVICE, q_name );

Further down the call stack, rtems_termios_ioctl (in file cpukit/libcsupport/src/termios.c) eventually gets called.  It has a switch statement that doesn't have a case to handle the command MW_UID_REGISTER_DEVICE, so it ends up returning RTEMS_INVALID_NUMBER, causing the keyboard failure message.  It seems like termios.c needs to be patched to handle MW_UID_REGISTER_DEVICE.  Was that patch part of what was available from Rosimildo da Silva <rdasilva at> at one time (we haven't been able to find a live link to that patch)?  Any suggestions (or a copy of that patch file) would be greatly appreciated.  Thanks.


At 05:08 PM 1/9/2004 -0700, Mark Mussetter <mark at> wrote:
>Hello Everyone,
>I'm having problems building a demo called nxscribble for microwindows running on RTEMS running on a motorola 5272...

Steve Strobel                           WWW:
Link Communications, Inc.               Phone: (406) 245-5002 ext 102
MailTo:steve at              Fax: (406) 245-4889

More information about the users mailing list