zynq uart

Andy James A.James at sstl.co.uk
Wed Jun 5 14:17:33 UTC 2019


Hi,
I'm trying to get UART input working on my ZYBO Zynq development board - I can use printf but scanf and getchar both hang up

Is there an issue with the driver?

Thanks
Andrew


#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <rtems.h>
#include <bsp.h>
#include <sys/mman.h>

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

static rtems_task Init(
  rtems_task_argument ignored
)
{
  char str[80];
  char ch='1';
  printf("UART Test\n");
  //scanf("%79s",str);

  ch=getchar();    // Hangs here
  printf("UART Test %c\n",ch);


  while(1);
  //TEST_END();
  //rtems_test_exit( 0 );
}


/* NOTICE: the clock driver is explicitly disabled */
#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
//#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
////#define CONFIGURE_MICROSECONDS_PER_TICK 1000
//#define CONFIGURE_TICKS_PER_TIME_SLICE 50


#define CONFIGURE_MAXIMUM_TASKS            1

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE

//#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT

//#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_SYSINIT_INITIAL_EXTENSIONS

#define CONFIGURE_INIT
#include <rtems/confdefs.h>




The information contained in this message is intended for the addressee only and may contain sensitive information. If you are not the addressee, please delete this message and notify the sender; you should not copy or distribute this message or disclose its contents to anyone. Any views or opinions expressed in this message are those of the individual(s) and not necessarily of the organisation. No reliance may be placed on this message without written confirmation from an authorised representative of its contents. No guarantee is implied that this message or any attachment is virus free or has not been intercepted and amended.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190605/f83aa795/attachment.html>


More information about the users mailing list