Add New Drivers Problem.
Fernando RUIZ CASAS
fernando.ruiz at ctv.es
Fri Nov 17 15:33:36 UTC 2000
The newbies have always the same kind of problems.
But the RTEMS list is the solution.
Very good error check Joel.
Ralf. The patch don't adds BSP code.
Only it makes more easy the BSP drives implementation.
(Very hard when the newbie start with RTEMS)
You can add the new driver tables without adding code in confdefs.h
the code is modified ONLY in BSP.H, not in confdefs.h
The original idea is yours, Ralf.
In console.c sh implementation because the 'link(old,new)' wasn't
active you have implemented this kind of solution.
You redefines BSP_CONSOLE_DRIVER_TABLE into two driver entries.
Joel, include the best patch if you think that this patch is useful for all.
Thanks. Joel, Ralf & Dmitry.
Saludos.
Fernando RUIZ CASAS
fernando.ruiz at ctv.es
-----Mensaje original-----
De: Joel Sherrill [mailto:joel.sherrill at OARcorp.com]
Enviado el: viernes, 17 de noviembre de 2000 16:10
Para: corsepiu at faw.uni-ulm.de
CC: Dmitry Kargapolov; Fernando RUIZ CASAS; rtems-users
Asunto: Re: Add New Drivers Problem.
Ralf Corsepius wrote:
>
> Dmitry Kargapolov wrote:
> >
> > Thursday, November 16, 2000, 10:29:01 PM, Fernando RUIZ CASAS wrote:
> >
> > FRC> Hi,
> >
> > FRC> Adding a new drivers in my bsp and avoiding to create a new
configuration
> > FRC> table
> > FRC> after several tries my solution is a patch in 'confdefs.h'.
> > FRC> This makes that my BSP tree needs a external file.
> > FRC> Is it possible include this litle patch in the new versions of
file?
> >
> > Great idea!
> >
> Actually not -- confdefs.h is supposed not to contain anything
> BSP-specific.
Maybe I am missing something but I don't see how this patch adds
anything BSP specific. It is a neat way to include an arbitrary
list of device drivers.
In the interest of paranoia, it would be better to have some error
check. The following will not compile if
CONFIGURE_APPLICATION_NEEDS_CUSTOM_DRIVER
is defined and CUSTOM_DRIVER_TABLE_ENTRY is not.
+ #ifdef CONFIGURE_APPLICATION_NEEDS_CUSTOM_DRIVER
+ CUSTOM_DRIVER_TABLE_ENTRY,
+ #endif
How about this?
#ifdef CONFIGURE_APPLICATION_NEEDS_CUSTOM_DRIVER
#if defined(CUSTOM_DRIVER_TABLE_ENTRY)
CUSTOM_DRIVER_TABLE_ENTRY,
#else
#error "CUSTOM_DRIVER_TABLE_ENTRY is NOT defined!"
#endif
#endif
> Ralf.
>
> --
> Ralf Corsepius
> Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
> (FAW)
> Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
> mailto:corsepiu at faw.uni-ulm.de FAX: +49/731/501-999
> http://www.faw.uni-ulm.de
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list