This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: printf/gets/etc not working


I have asked the same question before, it seems that the tty0 is opened
in a special mode (for POSIX stdio) so that it can be only accessed via
printfs, and can't be opened in other ways. I also need to
opened /dev/ser0 but i don't know how to configure ecos to be able to
open /dev/ser0. Does anyone know?

Thanks,
--
Jiqing Qiang


On Tue, 2010-08-17 at 09:53 -0700, Slide wrote:
> On Mon, Aug 16, 2010 at 11:46 PM, Ilija Kocho <ilijak@siva.com.mk> wrote:
> > On 16.08.2010 19:48, Slide wrote:
> >> On Mon, Aug 16, 2010 at 10:43 AM, Ilija Kocho <ilijak@siva.com.mk> wrote:
> >>
> >>> On 16.08.2010 19:00, Slide wrote:
> >>>
> >>>> On Sat, Aug 14, 2010 at 8:51 AM, Ilija Kocho <ilijak@siva.com.mk> wrote:
> >>>>
> >>>>
> >>>>> On 14.08.2010 16:00, Slide wrote:
> >>>>>
> >>>>>
> >>>>>> On Sat, Aug 14, 2010 at 3:44 AM, Ilija Kocho <ilijak@siva.com.mk> wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> Check if hardware serial ports (such as /dev/ser0) and TTY-mode devices
> >>>>>>> (such as /dev/tty0) are included.
> >>>>>>> In configtool:
> >>>>>>>    I/O sub-system -> Serial device drivers +-> Hardware serial device
> >>>>>>> drivers
> >>>>>>>                                            +-> TTY-mode serial device
> >>>>>>> drivers
> >>>>>>> // Ilija
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>> I do have TTY-mode devices enabled, but I thought that if I enabled
> >>>>>> tty0 it would conflict with the ttydiag or the haldiag devices that
> >>>>>> seem to be created.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> In addition you can avoid usage of haldiag (ttydiag) device by setting
> >>>>> "Console device name" to "/dev/tty0".
> >>>>>
> >>>>>
> >>>>>> Thanks,
> >>>>>>
> >>>>>>
> >>>>>>
> >>>> I did what you suggested, and enabled TTY port 0 and disabled the TTY
> >>>> diagnostic device.
> >>>>
> >>> Did you set "Console device name" to /dev/tty0?
> >>>
> >>>
> >>>> I see the following printed out when the target
> >>>> boots:
> >>>>
> >>>> Init device '/dev/tty0'
> >>>> Init tty channel: 0x8010f590
> >>>> Init device '/dev/haldiag'
> >>>>
> >>>> Which is good, no more ttydiag, but printf still doesn't work. Is
> >>>> there anything I can do to test if tty0 is working?
> >
> > You could check /dev/ser0, a low level device used by /dev/tty0.
> >
> >> Yes, under I/O sub-system > Serial device drivers > TTY-mode serial
> >> device drivers I set "Console device name" to "/dev/tty0", I also set
> >> ISO C Library > ISO C library standard input/output functions >
> >> Default console device to "/dev/tty0"
> >>
> >> thanks,
> >>
> >> slide
> >>
> >>
> 
> Ok, I double checked by trying to call open("/dev/ser0", O_RDWR) and
> it returned -1, so does an open on /dev/tty0, so something is not
> connected correctly somewhere.
> 
> Thanks,
> 
> slide
> 


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]