Serial port issues

Michel Macena mmacena.eng at gmail.com
Mon Aug 5 20:55:18 UTC 2019


Hi, I'm working with an ERC 32 target board and would like
to read strings or any characters in the serial input (UART).
regular C printf() function works well but when I try
fgets(), scanf() or fgetc() the board just does not get the string
or any character, is there any RTEMS specific ways to get
characters or strings through the standard serial port ?

a sample code:

#include <bsp.h>
#include <stdlib.h>
#include <stdio.h>

char line[6];

rtems_task Init(
  rtems_task_argument ignored
)
{

    fgets(line,6,stdin);
    printf( "string: %s\n",line );

}

/* configuration information */

#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 1

#define CONFIGURE_INIT

#include <rtems/confdefs.h>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190805/a2ca725c/attachment.html>


More information about the users mailing list