Hi all,

I'm trying to get back into some embedded development using RTEMS after a
number of years away and have resurrected an old project using the
Beaglebone black as a starting point.

I have built the latest RTEMS and have some test applications running on
the board ok, but today I was trying to build a basic UI task and try as I
might I can't read input from the console.

I'm using the following code in the Init task:

char buf[80] = "";
char *cmd, *sval, *rval;
printf("cmd: ");

rval = fgets(buf, 80, stdin);
if (rval == NULL) {
printf("fgets returned NULL\n");
} else {
printf("fgets returned %s\n", rval);
}

printf("buf = %s\n", buf);
cmd = strtok(buf, " \t\n");
printf("cmd = %s\n", cmd);

which outputs:

Starting kernel ...


RTEMS Beagleboard: am335x-based
        ARM Debug: 0x4b141000
Starting Motor Testing
cmd: fgets returned NULL
buf =
cmd = (null)

I know the hardware connections are fine as I can use the Linux console ok.

Am I doing something stupid, or is the console driver for this BSP not
working as expected?

Many thanks for any advice you can provide!
Cheers,
James
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to