[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Q: Adding WDT support.




On Fri, 30 Jul 1999, erik.ivanenko wrote:

> I have the pc386 BSP running on an ACER PIA-632.  This uses a 386sx-40
> clone chip.  It is an embeddable device, that sits in an ISA backplane,
> and has floppy and hd controller ports among other things.  It uses the
> AMI bios, and is completely PC compatible ( as far as I can tell ).
> 
> It does however, include a watchdog timer ( WDT ) , which makes it
> different from a PC.  The WDT
> is supposed to be initialized at the beginning of the application code
> proper, and reset periodically during the application. It is required
> ONLY by the application.
> 
> My question is:
> 
> Where should I locate the WDT control source code?  It does not belong
> in the pc386 BSP, as the existence of the WDT is specific to the
> acer-pia-632.  It seems silly to copy the pc386 BSP code just to make
> another BSP that includes the WDT control library -- as applications may
> not even use the WDT!
> 
> Should a new BSP be created, or should  the optional WDT control library
> be included with pc386?

There are a couple of approaches to this type of problem.  Which is
appropriate depends on how reusable that WDT really is.  

(1) If the WDT corresponds to a standard WDT that I could buy an ISA card
for and reuse the driver, then it is a VERY optional part of the pc386 BSP
which is left out by the linker unless referenced.  This is easy.

(2) If on the other hand it is strictly specific to the Acer box, then you
may want to think in terms of the Acer being either a variation on the
pc386 which adds that driver (mvme162 vs. mvme162lx) or a separate BSP
that (for the most part) picks up its source code from the pc386 BSP using
either VPATH or cd'ing into that tree and building it.

If you feel that (2) is a more appropriate view then we need to get Ralf's
opinion on how to view BSPs like this given the move to automake.

--joel
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