How to add serial driver to RTEMS?

Yanjun Luo yjluo at panjet.net
Wed Sep 1 11:14:27 UTC 2004


Hi Jay,

> > I know DBGU's name is "/dev/console", but where it registered by
> > rtems_io_register_name? I write some code to open "/dev/console",
> > it failed(return -1).
> 
> I'll try this out and get back to you.

I find I can use "fopen" to open the console, it failed at "open".
But when I use "fwrite" to console, it meet data_abort as below:
----------------------------------------------------------------
INSN_STRB
         data_abort at address 0xE19FFFF8, instruction: 0xE5603001,   spsr = 
0x2
0000013
----------------------------------------------------------------

my code:
-----------------------------------------------------------------
#define TEST_STRING	"This is only a USART test!\n"

  fd0 = fopen ("/dev/console", O_RDWR);
  if(fd0 == -1) printf("/dev/console open failed!!\n");       
  else
  	printf("console opened!\n");
  fwrite(TEST_STRING,1,sizeof(TEST_STRING),fd0);
-----------------------------------------------------------------  

Regards,
Yanjun Luo



More information about the users mailing list