vme driver for pc386

Till Straumann strauman at slac.stanford.edu
Mon Jun 15 16:22:20 UTC 2009


lee wrote:
> Hi Till
>
> I have a few questions regarding the powerpc vmeUniverse driver.
> Im busy, after a couple of months on another project, to again try and
> port the vmeUniverse driver from powerpc to i386/pc386. 
>
> What i've done so far was to copy the relevant directories and vmeconfig
> files to the directory.
That's almost certainly a bad idea. You never want to copy/paste
stuff that can be shared among different BSPs. Instead, let
your Makefile just pull in the sources from another BSP.
Ideally, such shared pieces (involves most of the things under
libbsp/powerpc/shared/vme) should eventually go into a separate library
to be used by different BSPs.
> . The readme file is a bit difficult to follow for
> me, because it assumes familiarity with rtems at a level of which im not
> at the moment.
>
> I would like to at least get it compiled into pc386, whether it works or
> not, then continue implementing the driver for my needs. That is
> actually the part that I would do quickly :P.
I got to compile everything in < 15min. All I had to do was
modify the pc386 BSP's Makefile.am and add a BSP specific
VMEConfig.h:

1) Modify Makefile.am:

Index: Makefile.am
===================================================================
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/i386/pc386/Makefile.am,v
retrieving revision 1.41.2.1
diff -c -r1.41.2.1 Makefile.am
*** Makefile.am    24 Sep 2008 07:32:19 -0000    1.41.2.1
--- Makefile.am    15 Jun 2009 16:11:41 -0000
***************
*** 89,94 ****
--- 89,108 ----
 
  ide_SOURCES = ide/idecfg.c ide/ide.c
 
+
+ include_bsp_HEADERS += ../../shared/vmeUniverse/vmeUniverse.h \
+     ../../shared/vmeUniverse/vme_am_defs.h \
+     ../../shared/vmeUniverse/VME.h \
+     include/VMEConfig.h \
+     ../../shared/vmeUniverse/vmeUniverseDMA.h\
+     ../../shared/vmeUniverse/bspVmeDmaList.h\
+     ../../shared/vmeUniverse/VMEDMA.h
+ vme_SOURCES = ../../shared/vmeUniverse/vmeUniverse.c \
+     ../../shared/vmeUniverse/bspVmeDmaList.c \
+     ../../powerpc/shared/vme/vmeconfig.c \
+     ../../powerpc/shared/vme/vme_universe.c
+
+
  if HAS_NETWORKING
  ne2000_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
  noinst_PROGRAMS += ne2000.rel
***************
*** 120,126 ****
  noinst_LIBRARIES = libbsp.a
  libbsp_a_SOURCES = $(clock_SOURCES) $(console_SOURCES) $(gdb_SOURCES) \
      $(gnat_SOURCES) $(pci_SOURCES) $(startup_SOURCES) $(timer_SOURCES) \
!     $(ide_SOURCES)
 
  libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/cache.rel \
      ../../../libcpu/@RTEMS_CPU@/page.rel \
--- 134,140 ----
  noinst_LIBRARIES = libbsp.a
  libbsp_a_SOURCES = $(clock_SOURCES) $(console_SOURCES) $(gdb_SOURCES) \
      $(gnat_SOURCES) $(pci_SOURCES) $(startup_SOURCES) $(timer_SOURCES) \
!     $(ide_SOURCES) $(vme_SOURCES)
 
  libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/cache.rel \
      ../../../libcpu/@RTEMS_CPU@/page.rel \

2) Add new VMEConfig.h  ***NOTE*** the actual values I defined there
   are ***BOGUS*** -- they are specific to a particular board and you
   should revise them. I have no pc386 hardware with VME available.
   ( I attached a template that I put into libbsp/i386/pc386/include )

3) run ampolish3 to update 'preinstall.am'

     ampolish3 Makefile.am > preintall.am

4) (unless you configured your rtems with --enable-maintainer-mode)
   re-run 'bootstrap', configure RTEMS and build.


HTH
-- Till
>
> I need to get midas ported onto rtems before end of july. so u can see
> my rush for this... :P 
>
> at the moment I get these compile errors: 
>
> /opt/rtems/c/src/lib/libbsp/i386/pc386/pci/pci.c:27:23: error:
> libcpu/io.h: No such file or directory
> /opt/rtems/c/src/lib/libbsp/i386/pc386/pci/pci.c:31:21: error:
> bsp/pci.h: No such file or directory
> /opt/rtems/c/src/lib/libbsp/i386/pc386/pci/pci.c:32:23: error:
> bsp/gtreg.h: No such file or directory
> /opt/rtems/c/src/lib/libbsp/i386/pc386/pci/pci.c:33:27: error:
> bsp/gtpcireg.h: No such file or directory
> /opt/rtems/c/src/lib/libbsp/i386/pc386/pci/pci.c:68: error: expected
> '=', ',', ';', 'asm' or '__attribute__' before
> 'BSP_sysControllerVersion'
> /opt/rtems/c/src/lib/libbsp/i386/pc386/pci/pci.c:69: error: expected
> '=', ',', ';', 'asm' or '__attribute__' before 'BSP_VMEinterface'
> /opt/rtems/c/src/lib/libbsp/i386/pc386/pci/pci.c:70: error: expected
> '=', ',', ';', 'asm' or '__attribute__'
>
> I figure that bsp dir is something that is created at configure time.
> I've set i386/Makefile.am and pc386/Makefile.am as follows:
>
> [pc386/Makefile.am ]
>
> include_HEADERS += ../../i386/shared/pci/pcibios.h pci/pci.h \
> 	pci/gtpcireg.h
> # pci
> libbsp_a_SOURCES += ../../i386/shared/pci/pcibios.c \
>     ../../i386/shared/pci/pcibios.h pci/pci.c \
>     pci/pcifinddevice.c
>
>
> [i386/Makefile.am]# shared/pci
> EXTRA_DIST += shared/pci/pcibios.h
> EXTRA_DIST += shared/pci/pcibios.c
> EXTRA_DIST += shared/pci/pci.c shared/pci/pcifinddevice.c \
> 	shared/pci/generic_clear_hberrs.c 
>
>
>
> Now for the questions :P
>
> Are these the only things in the Makefile that I have to set. When I set
> them I do a bootstrap, configure and make RTEMS_BSP etc.
>
> Also,these are just my pci problems. 
>
> Kind Regards
> Lee
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: VMEConfig.h
Type: text/x-chdr
Size: 6691 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20090615/05d8db21/attachment.bin>


More information about the users mailing list