Console driver not working?

James Fitzsimons james.fitzsimons at gmail.com
Sun Apr 27 06:18:15 UTC 2025


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20250427/f00da9e1/attachment.htm>


More information about the users mailing list