James Fitzsimons created an issue: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5245



## Summary
The Beaglebone black BSP console driver currently only works if the BSP is 
built with CONSOLE_POLLED configuration. When built with CONSOLE_POLLED = False 
(i.e. interrupt driven mode), the console driver doesn't accept input.

## Steps to reproduce
Build the Beaglebone black BSP with CONSOLE_POLLED = False and run the 
following test application:

`#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <sys/ioctl.h>

#include <rtems.h>

#include <bsp/beagleboneblack.h>
#include <bsp/gpio.h>
#include <bsp/i2c.h>



static void Init(rtems_task_argument arg) {
        rtems_status_code status;

        printf("Starting Console testing\n");
        printf("Enter a string up to 80 characters:\n");
        char buf[80] = "";
        char *cmd, *sval, *rval;

        int num_bytes = read(STDIN_FILENO, buf, sizeof(buf));
        printf("You entered: %s\n", buf);

        status = rtems_task_delete( RTEMS_SELF); /* should not return */

        printf("rtems_task_delete returned with status of %d.\n", status);
        exit(1);
}

#define CONFIGURE_MICROSECONDS_PER_TICK 1000

#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
//#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER

#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 10
#define CONFIGURE_UNLIMITED_OBJECTS
#define CONFIGURE_UNIFIED_WORK_AREAS

#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT

#include <rtems/confdefs.h>`

When the BSP will not accept any input, but will immediately return an empty 
output as per the following:

`....
Starting kernel ...


RTEMS Beagleboard: am335x-based
        ARM Debug: 0x4b141000
Starting Console testing
Enter a string up to 80 characters:
You entered: 


`


## Expected behaviour

When the BSP is built with with CONSOLE_POLLED = False, the example application 
above will accept input and display it back to the user like this:

`....
Starting kernel ...


RTEMS Beagleboard: am335x-based
        ARM Debug: 0x4b141000
Starting Console testing
Enter a string up to 80 characters:
This is a test string
You entered: This is a test string`

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5245
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to