Directory wise structure of BSP - VxWorks

This is a discussion on Directory wise structure of BSP - VxWorks ; I working on a BSP project.Our BSP is working fine .But I will be very much thankful if anybody tell me how to make device drivers in BSP folders in seperate folder and compile them.. Also can anybody guide me ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Directory wise structure of BSP

  1. Directory wise structure of BSP

    I working on a BSP project.Our BSP is working fine .But I will be very
    much thankful if anybody tell me how to make device drivers in BSP
    folders in seperate folder and compile them..

    Also can anybody guide me how to compile them to make object to a
    predefined directory?

    I gone through the make file in BSP dir.But it seems that we can
    change the file name and object file.


  2. Re: Directory wise structure of BSP

    Nabendu wrote:

    >I working on a BSP project.Our BSP is working fine .But I will be very
    >much thankful if anybody tell me how to make device drivers in BSP
    >folders in seperate folder and compile them..
    >
    >Also can anybody guide me how to compile them to make object to a
    >predefined directory?
    >
    >I gone through the make file in BSP dir.But it seems that we can
    >change the file name and object file.


    I'm writing this without access to WR documentation, so there are
    probably aspects I'll get wrong. Still, I suspect it will get you
    going. Also, what I'm about to say applies to VxWorks versions 5.x.
    I think that much has changed in version 6.

    BSPs are stored in $WIND_BASE\target\config\BSP_name, where $WIND_BASE
    is the Tornado installation's base directory and BSP_name is the name
    of the BSP. BSP makefiles are used only to build target boot ROMs.

    Driver source and make files are stored in appropriate directories
    under $WIND_BASE\target\src\drv\ and driver source files are stored in
    appropriate directories under $WIND_BASE\target\h\drv. A properly
    written driver makefile (You can use the supplied drivers' makefiles
    as models.) is invoked with:

    make CPU=xxx TOOL=yyy

    Where xxx is the architecture name (68k, ppc, etc) amd yyy is the tool
    chain name (often gnu). A successful build adds driver objects to the
    archive/library named $Wind_BASE/target/lib/lib$(CPU)$(TOOL)vx.a.

    Component Definition Files (*.cdf) are used to make the driver objeects
    visible to Tornado so that they can be conditionally included in
    configurable VxWorks images. The CDF language allows one to define
    drivers' configurable aspects (The base address of a memory mapped device,
    for example.) and a whole lot more. The CDF files may be located
    in a variety of directories depending on how general or specific are the
    drivers they describe.

    Drivers required to be included in a target's boot ROM (Not all are!)
    are added to a BSP's sysLib.c by directly including their source files,
    usually conditionally according to macros in the BSP's config.h file.
    For example, a driver named foobar with a configurable device base address
    may be included in a boot ROM by adding these lines to config.h:

    #define INCLUDE_FOOBAR

    #ifdef INCLUDE_FOOBAR
    #define FOOBAR_BASE_ADDRESS ( 0x01000000 )
    #endif

    and these lines to sysLib.c:

    #ifdef INCLUDE_FOOBAR
    #include foobar.c
    #endif

    Does that help?

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at hotmail dot com | - The Who, Bargain

  3. Re: Directory wise structure of BSP

    On Jun 20, 8:47 am, "Michael R. Kesti"
    wrote:
    > Nabendu wrote:
    > >I working on a BSP project.Our BSP is working fine .But I will be very
    > >much thankful if anybody tell me how to make device drivers in BSP
    > >folders in seperate folder and compile them..

    >
    > >Also can anybody guide me how to compile them to make object to a
    > >predefined directory?

    >
    > >I gone through the make file in BSP dir.But it seems that we can
    > >change the file name and object file.

    >
    > I'm writing this without access to WR documentation, so there are
    > probably aspects I'll get wrong. Still, I suspect it will get you
    > going. Also, what I'm about to say applies to VxWorks versions 5.x.
    > I think that much has changed in version 6.
    >
    > BSPs are stored in $WIND_BASE\target\config\BSP_name, where $WIND_BASE
    > is the Tornado installation's base directory and BSP_name is the name
    > of the BSP. BSP makefiles are used only to build target boot ROMs.
    >
    > Driver source and make files are stored in appropriate directories
    > under $WIND_BASE\target\src\drv\ and driver source files are stored in
    > appropriate directories under $WIND_BASE\target\h\drv. A properly
    > written driver makefile (You can use the supplied drivers' makefiles
    > as models.) is invoked with:
    >
    > make CPU=xxx TOOL=yyy
    >
    > Where xxx is the architecture name (68k, ppc, etc) amd yyy is the tool
    > chain name (often gnu). A successful build adds driver objects to the
    > archive/library named $Wind_BASE/target/lib/lib$(CPU)$(TOOL)vx.a.
    >
    > Component Definition Files (*.cdf) are used to make the driver objeects
    > visible to Tornado so that they can be conditionally included in
    > configurable VxWorks images. The CDF language allows one to define
    > drivers' configurable aspects (The base address of a memory mapped device,
    > for example.) and a whole lot more. The CDF files may be located
    > in a variety of directories depending on how general or specific are the
    > drivers they describe.
    >
    > Drivers required to be included in a target's boot ROM (Not all are!)
    > are added to a BSP's sysLib.c by directly including their source files,
    > usually conditionally according to macros in the BSP's config.h file.
    > For example, a driver named foobar with a configurable device base address
    > may be included in a boot ROM by adding these lines to config.h:
    >
    > #define INCLUDE_FOOBAR
    >
    > #ifdef INCLUDE_FOOBAR
    > #define FOOBAR_BASE_ADDRESS ( 0x01000000 )
    > #endif
    >
    > and these lines to sysLib.c:
    >
    > #ifdef INCLUDE_FOOBAR
    > #include foobar.c
    > #endif
    >
    > Does that help?
    >
    > --
    > ================================================== ======================
    > Michael Kesti | "And like, one and one don't make
    > | two, one and one make one."
    > mrkesti at hotmail dot com | - The Who, Bargain




    Lots of thanks Michael,it works,I changed the source of drivers to
    individual directory path in syslib.c.
    Its working fine.I will also use cdf if same thing can be done by
    using that.



+ Reply to Thread