This is the mail archive of the
ecos-devel@sourceware.org
mailing list for the eCos project.
Re: tty.cdl
On Mon, 28 Mar 2011, Ilija Kocho wrote:
> On 27.03.2011 23:11, Sergei Gavrikov wrote:
> > On Sun, 27 Mar 2011, Ilija Kocho wrote:
> >
> >> Sergei, I started this discussion in order to discuss this issue before
> >> I drop any code. Your proposal sounds rational. I shall open a Bug and
> >> reference this discussion.
> > Ilija and may be not :-) I've seen that io_serial.h has
> >
> > #ifdef CYGDAT_IO_SERIAL_DEVICE_HEADER
> > # include CYGDAT_IO_SERIAL_DEVICE_HEADER
> > #endif
> >
> > So, your issue can be managed on the target's side, as both and tty.c
> > and termios.c include this header. You can add CDL component in your HAL
> > config file which parent should be CYGPKG_IO_SERIAL_TTY and define extra
> > devices (TTY4, TTY5, ...) there. Also define/set your own value for the
> > CYGDAT_IO_SERIAL_DEVICE_HEADER in the HAL's config file.
> >
> Sergei, thanks for remark. I tried it but produced file is included to
> early as table definitions such as
>
> DEVTAB_ENTRY(tty_io4,
> "/dev/tty4",
> CYGDAT_IO_SERIAL_TTY_TTY4_DEV,
> &tty_devio,
> tty_init,
> tty_lookup, // Execute this when device is being looked up
> &tty_private_info4);
>
> depend on definitions included afterwards. Also file io_serial.h is
> included in serial.c where produces errors.
Yep. Then I noticed this catch too.
> However the TTYs provided by devicel driver / HAL may be included at
> proper place in tty.c later in similar way:
>
> #ifdef CYGDAT_IO_SERIAL_TTY_ADD
> # include CYGDAT_IO_SERIAL_TTY_ADD
> #endif
Exactly.
> I think these would be all changes to tty.c
and the same for termios.c.
> Should I continue this way?
IMO, it is good solution (please, submit a patch to eCos Bugzilla).
Thank you,
Sergei